Skip to content

flamenco, vm: add bpf loader serialization test fixtures#7459

Merged
topointon-jump merged 1 commit intomainfrom
topointon/bpf-loader-serialization-testss
Jan 16, 2026
Merged

flamenco, vm: add bpf loader serialization test fixtures#7459
topointon-jump merged 1 commit intomainfrom
topointon/bpf-loader-serialization-testss

Conversation

@topointon-jump
Copy link
Copy Markdown
Contributor

@topointon-jump topointon-jump commented Nov 27, 2025

Adds a set of fixtures and a unit test fixture runner for vm input serialization, generated by running the input through the Agave vm input serializers. Compares the output buffer, the vm regions and the region metadata. Includes coverage of stricter_abi_and_runtime_constraints and account_data_direct_mapping.

Also tests the provide_instruction_data_offset_in_vm_r2 feature gate.

Adjusted some of the serialization code to make it more amenable for unit testing.

Comment thread src/flamenco/progcache/fd_progcache_rec.c
@topointon-jump topointon-jump force-pushed the topointon/bpf-loader-serialization-testss branch 2 times, most recently from a15b3ff to 9a7e90d Compare November 28, 2025 16:17
Comment on lines 412 to 416
if( FD_UNLIKELY( err ) ) {
return err;
}

if( FD_UNLIKELY( input==NULL ) ) {
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
}

fd_sha256_t _sha[1];
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.

fd_exec_instr_ctx_get_index_of_instr_account_in_transaction throws FD_EXECUTOR_INSTR_ERR_MISSING_ACC if the account is missing, so propagating the error is the correct thing to do here and doesn't change the behaviour.

@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.0733 s 0.074339 s 1.417%
backtest mainnet-368528500-perf snapshot load 3.796 s 3.144 s -17.176%
backtest mainnet-368528500-perf total elapsed 73.300332 s 74.339282 s 1.417%
firedancer mem usage with mainnet.toml 1013.23 GiB 1013.23 GiB 0.000%

@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.073295 s 0.07316 s -0.184%
backtest mainnet-368528500-perf snapshot load 3.785 s 3.208 s -15.244%
backtest mainnet-368528500-perf total elapsed 73.294634 s 73.159935 s -0.184%
firedancer mem usage with mainnet.toml 1013.23 GiB 1013.23 GiB 0.000%

@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.076924 s 0.076404 s -0.676%
backtest mainnet-368528500-perf snapshot load 4.846 s 3.059 s -36.876%
backtest mainnet-368528500-perf total elapsed 76.924404 s 76.404374 s -0.676%
firedancer mem usage with mainnet.toml 1013.23 GiB 1013.23 GiB 0.000%

@topointon-jump topointon-jump force-pushed the topointon/bpf-loader-serialization-testss branch 5 times, most recently from 85c1a5f to fee122a Compare January 16, 2026 00:20
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.062795 s 0.063166 s 0.591%
backtest mainnet-368528500-perf snapshot load NaN s NaN s NaN%
backtest mainnet-368528500-perf total elapsed 62.794799 s 63.166191 s 0.591%
firedancer mem usage with mainnet.toml 993.26 GiB 993.26 GiB 0.000%

@topointon-jump topointon-jump changed the title [WIP] flamenco, vm: add bpf loader serialization test fixtures flamenco, vm: add bpf loader serialization test fixtures Jan 16, 2026
@topointon-jump topointon-jump force-pushed the topointon/bpf-loader-serialization-testss branch from fee122a to 1bae3dd Compare January 16, 2026 00:30
@topointon-jump topointon-jump enabled auto-merge (squash) January 16, 2026 00:30
cmoyes-jump
cmoyes-jump previously approved these changes Jan 16, 2026
@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.076198 s 0.075464 s -0.963%
backtest mainnet-368528500-perf snapshot load NaN s NaN s NaN%
backtest mainnet-368528500-perf total elapsed 76.197735 s 75.464136 s -0.963%
firedancer mem usage with mainnet.toml 993.26 GiB 993.26 GiB 0.000%

@github-actions
Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.063011 s 0.062783 s -0.362%
backtest mainnet-368528500-perf snapshot load NaN s NaN s NaN%
backtest mainnet-368528500-perf total elapsed 63.011335 s 62.783272 s -0.362%
firedancer mem usage with mainnet.toml 993.26 GiB 993.26 GiB 0.000%

@topointon-jump topointon-jump merged commit a03a358 into main Jan 16, 2026
13 checks passed
@topointon-jump topointon-jump deleted the topointon/bpf-loader-serialization-testss branch January 16, 2026 01:26
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