Skip to content

flamenco, runtime: implement static_instruction_limit#7585

Merged
topointon-jump merged 1 commit into
mainfrom
topointon/static_instruction_limit
Dec 23, 2025
Merged

flamenco, runtime: implement static_instruction_limit#7585
topointon-jump merged 1 commit into
mainfrom
topointon/static_instruction_limit

Conversation

@topointon-jump
Copy link
Copy Markdown
Contributor

@topointon-jump topointon-jump commented Dec 15, 2025

Implement solana-foundation/solana-improvement-documents#160

  • Implementation
  • Unit tests
  • Ledger

Also drive-by fix to make fd_executor_verify_transaction take a const bank.

@topointon-jump topointon-jump force-pushed the topointon/static_instruction_limit branch from 9942e21 to ebb4f53 Compare December 15, 2025 14:13
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050832 s 0.050828 s -0.008%
backtest mainnet-368528500-perf snapshot load 1.641 s 1.639 s -0.122%
backtest mainnet-368528500-perf total elapsed 50.832055 s 50.828497 s -0.007%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050994 s 0.051115 s 0.237%
backtest mainnet-368528500-perf snapshot load 1.625 s 1.635 s 0.615%
backtest mainnet-368528500-perf total elapsed 50.994451 s 51.115122 s 0.237%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@topointon-jump topointon-jump force-pushed the topointon/static_instruction_limit branch from ebb4f53 to 48cd531 Compare December 15, 2025 14:35
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050902 s 0.050771 s -0.257%
backtest mainnet-368528500-perf snapshot load 1.639 s 1.628 s -0.671%
backtest mainnet-368528500-perf total elapsed 50.901701 s 50.770682 s -0.257%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@topointon-jump topointon-jump force-pushed the topointon/static_instruction_limit branch from 48cd531 to 2ef8245 Compare December 23, 2025 13:13
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050535 s 0.050789 s 0.503%
backtest mainnet-368528500-perf snapshot load 1.637 s 1.633 s -0.244%
backtest mainnet-368528500-perf total elapsed 50.534575 s 50.789403 s 0.504%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@topointon-jump topointon-jump force-pushed the topointon/static_instruction_limit branch from 2ef8245 to 4bb035a Compare December 23, 2025 14:35
src/flamenco/runtime/tests/run_ledger_backtest.sh -l mainnet-376969880-r2 -y 1 -m 2000000 -e 376969900 -o 5xXZc66h4UdB6Yq7FzdBxBiRAFMMScMLwHxk2QZDaNZL
src/flamenco/runtime/tests/run_ledger_backtest.sh -l mainnet-376969880-simd-339 -y 1 -m 2000000 -e 376969900 -o H6iVbVaDZgDphcPbcZwc5LoznMPWQfnJ1AM7L1xzqvt5
src/flamenco/runtime/tests/run_ledger_backtest.sh -l breakpoint-385786458 -y 1 -m 2000000 -e 385786458
src/flamenco/runtime/tests/run_ledger_backtest.sh -l localnet-static-instruction-limit -y 1 -m 1000 -e 191
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This ledger passes through an epoch boundary in which static_instruction_limit is activated, and then tries to execute a transaction with 64 instructions which succeeds. Note that the script to create this ledger also sent transactions with 65 instructions, but because these were filtered out by Agave's sanitisation code (which is what this feature changes) they don't appear in the ledger.

@topointon-jump topointon-jump changed the title [WIP] flamenco, runtime: implement static_instruction_limit flamenco, runtime: implement static_instruction_limit Dec 23, 2025
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050698 s 0.050597 s -0.199%
backtest mainnet-368528500-perf snapshot load 1.636 s 1.611 s -1.528%
backtest mainnet-368528500-perf total elapsed 50.697835 s 50.59691 s -0.199%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@topointon-jump topointon-jump force-pushed the topointon/static_instruction_limit branch from 4bb035a to 4d4eaeb Compare December 23, 2025 16:07
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.051036 s 0.050746 s -0.568%
backtest mainnet-368528500-perf snapshot load 1.698 s 1.678 s -1.178%
backtest mainnet-368528500-perf total elapsed 51.035906 s 50.746093 s -0.568%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@topointon-jump topointon-jump enabled auto-merge (squash) December 23, 2025 17:33
@topointon-jump topointon-jump force-pushed the topointon/static_instruction_limit branch from 4d4eaeb to 3df54a3 Compare December 23, 2025 17:35
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.051478 s 0.050634 s -1.640%
backtest mainnet-368528500-perf snapshot load 1.749 s 1.661 s -5.031%
backtest mainnet-368528500-perf total elapsed 51.477847 s 50.633591 s -1.640%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@topointon-jump topointon-jump merged commit 19839ac into main Dec 23, 2025
13 checks passed
@topointon-jump topointon-jump deleted the topointon/static_instruction_limit branch December 23, 2025 19:54
@ibhatt-jumptrading
Copy link
Copy Markdown
Contributor

this doesn't fully cover the case where a transaction is worst case sized for > 64 instructions because it will violate limits in the transaction parser (fd_txn_parse). The correct thing to do here imo is to change txn parse to always fail if there are >64 top level instructions.

@topointon-jump
Copy link
Copy Markdown
Contributor Author

^Discussed offline, will pr in a cleanup pr in after the feature flag is activated everywhere (~3 weeks)

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