Skip to content

Generate classic transactions in every apply load mode. - #5201

Merged
dmkozh merged 1 commit into
stellar:masterfrom
dmkozh:apply_load_classic_bench
Apr 8, 2026
Merged

dmkozh merged 1 commit into
stellar:masterfrom
dmkozh:apply_load_classic_bench

Conversation

@dmkozh

@dmkozh dmkozh commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Description

Generate classic transactions in every apply load mode.

Based on #5200.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI review requested due to automatic review settings April 2, 2026 00:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new apply-load “model transaction” type based on a custom token contract, and updates apply-load benchmarking to always include a configured number of classic payment transactions per ledger across modes.

Changes:

  • Add ApplyLoadModelTx::CUSTOM_TOKEN and config parsing for APPLY_LOAD_MODEL_TX="custom_token".
  • Implement custom token contract setup (upload/create/multi_mint) and token transfer tx generation for apply-load.
  • Generate APPLY_LOAD_CLASSIC_TXS_PER_LEDGER classic payments in benchmark iterations / model-tx benchmarks; update tests and add example config.

Reviewed changes

Copilot reviewed 23 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/simulation/TxGenerator.h Adds instruction constant + TxGenerator API for token transfers.
src/simulation/TxGenerator.cpp Implements invokeTokenTransfer() Soroban transaction construction.
src/simulation/ApplyLoad.h Adds token-contract setup + classic payment + token transfer generation helpers; refactors benchmark helper naming.
src/simulation/ApplyLoad.cpp Mode-specific setup; classic+Soroban tx generation in benchmarks; token contract deploy + multi_mint; benchmark logging tweaks.
src/simulation/test/LoadGeneratorTests.cpp Updates apply-load tests to include classic txs; adds custom-token benchmark test.
src/main/Config.h Adds CUSTOM_TOKEN to ApplyLoadModelTx.
src/main/Config.cpp Parses APPLY_LOAD_MODEL_TX=custom_token and updates validation error message.
src/rust/src/bridge.rs Exposes get_apply_load_token_wasm() to C++ via the Rust bridge.
src/rust/src/soroban_test_wasm.rs Adds include_bytes! loader for apply-load-wasm/token.wasm.
src/rust/apply-load-wasm/token.wasm Adds the benchmark token contract Wasm blob.
src/rust/apply-load-wasm/README..md Documents the apply-load Wasm directory (note: filename has README..md).
docs/apply-load-benchmark-token.cfg New example config for benchmarking custom-token transfers.
docs/apply-load-benchmark-sac.cfg Updates SAC benchmark doc wording to reflect current model-tx intent.
scripts/apply_load/token/Cargo.toml New Rust workspace for the token contract source used to build the Wasm.
scripts/apply_load/token/Cargo.lock Lockfile for the token workspace.
scripts/apply_load/token/.gitignore Ignores Rust build output + local config in token workspace.
scripts/apply_load/token/contracts/token/Cargo.toml Token contract crate manifest.
scripts/apply_load/token/contracts/token/src/lib.rs Token contract crate root.
scripts/apply_load/token/contracts/token/src/contract.rs OpenZeppelin-generated token contract with multi_mint.
scripts/apply_load/token/contracts/token/src/test.rs Contract test validating multi_mint and transfer auth + balances.
scripts/apply_load/token/contracts/token/test_snapshots/test/initial_state.1.json Snapshot of contract initial state for the token workspace.
scripts/apply_load/token/contracts/token/test_snapshots/test/smoke_multi_mint_and_transfer.1.json Snapshot for multi-mint + transfer smoke test.
Builds/VisualStudio/build_rust.bat Adjusts Windows Rust build to always invoke cargo rustc for stellar-core and clears RUSTFLAGS.
Builds/VisualStudio/stellar-core.vcxproj Adds SecretManager.cpp/.h to the VS project sources/headers.
Builds/VisualStudio/stellar-core.vcxproj.filters Adds VS filters entries for SecretManager.cpp/.h.

Comment thread src/simulation/ApplyLoad.cpp Resolved
Comment thread src/simulation/ApplyLoad.cpp Resolved
Comment thread src/rust/apply-load-wasm/README..md Resolved
Comment thread Builds/VisualStudio/build_rust.bat Resolved
Comment thread src/simulation/ApplyLoad.cpp Resolved
@dmkozh
dmkozh force-pushed the apply_load_classic_bench branch from 651a8e0 to e06c61c Compare April 6, 2026 21:23
@dmkozh
dmkozh requested a review from marta-lokhova April 6, 2026 21:23
@dmkozh
dmkozh added this pull request to the merge queue Apr 7, 2026
Merged via the queue into stellar:master with commit 04a9fa0 Apr 8, 2026
56 checks passed
@dmkozh
dmkozh deleted the apply_load_classic_bench branch April 8, 2026 01:17
github-merge-queue Bot pushed a commit that referenced this pull request Apr 9, 2026
# Description

This mode uses the official Soroswap contracts from mainnet. It executes
swaps of different token pairs (to allow for parallelism).

This is based on #5201

# Checklist
- [ ] Reviewed the
[contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes)
document
- [ ] Rebased on top of master (no merge commits)
- [ ] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio
extension)
- [ ] Compiles
- [ ] Ran all tests
- [ ] If change impacts performance, include supporting evidence per the
[performance
document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants