fix: disable post-Jovian DA footprint cap in benchmark#191
Open
meyer9 wants to merge 1 commit into
Open
Conversation
The hardcoded DAFootprintGasScalar=400 caused the builder's per-block DA footprint cap (base/crates/builder/core/src/execution.rs::is_tx_over_limits) to fire before the gas cap on cheap-tx workloads. Effective rule: cumulative_da_bytes * 400 <= block_gas_limit => max DA bytes/block = block_gas_limit / 400 With transferonly txs averaging ~100 bytes DA, the predicted vs observed tx counts match to within 0.03% across three gas limits in run test-1779411190779930: 150M limit: 3750 predicted / 3751 observed 200M limit: 5000 predicted / 5000 observed 250M limit: 6250 predicted / 6251 observed This capped gas/per_block at exactly 52.6% of the configured gas limit for transfer-only and account-create-full-block workloads, regardless of EL capacity. storage-create-full-block was unaffected (heavy gas/tx, light DA/tx) and correctly filled to ~98%. Setting the scalar to 0 makes the check 'tx_da_footprint = cumulative_da_bytes * 0 = 0 <= limit' always pass, restoring the gas limit as the sole per-block cap. The scalar is serialized into the L1 attributes deposit tx and written to L2 state at 0x4200...0015; the builder reads it via fetch_da_footprint_gas_scalar per block. Setup blocks propagate the new value before benchmark blocks start, so the first real benchmark block already sees scalar=0. The benchmark's purpose is measuring EL gas throughput; L1 DA capacity is a separate concern that should not artificially cap these tests.
Collaborator
🟡 Heimdall Review Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the mainnet config benchmark (
Scale Base over 150M gas limit), themainnet-transfer-onlyandmainnet-account-create-full-blockpayloads plateau at exactly 52.6% of the configured gas limit regardless of node capacity:gas/per_blockstorage-create-full-blockmainnet-transfer-onlymainnet-account-create-full-block(Run
test-1779411190779930; the 47.4% headroom is identical across all 900 blocks and across all 150M/200M/250M gas limits, with a range of 0.10–0.36%.)Root cause
The Jovian DA-footprint cap in
base/crates/builder/core/src/execution.rs::is_tx_over_limitswas firing before the gas cap:The benchmark hardcoded
DAFootprintGasScalar: 400, andblock_da_footprint_limitdefaults toblock_gas_limit. Effective rule:For ~100 B-per-tx transferonly:
Variance < 0.03% across three limits — conclusive.
storage-create-full-blockwas unaffected because its txs are heavy in gas (~2.27 M) but light in DA (~200 B), so the gas cap fires first.Fix
Set
DAFootprintGasScalarto0ingeneratePayloadAttributes. The check then computestx_da_footprint = bytes × 0 = 0 ≤ limitand always passes. The scalar is serialized into the L1 attributes deposit tx and written to L2 state; the builder reads it viafetch_da_footprint_gas_scalarper block. Setup blocks (which run withGasLimitSetup = 1e9) propagate the new scalar before benchmark blocks start.Expected outcome on next rerun
mainnet-transfer-only @ 250M: 131 M → ~245+ Mgas/per_blockmainnet-account-create-full-block @ 250M: was bound by both DA cap and EL speed (989 msget_payload); will now be a true EL-limited measurementstorage-create-full-block @ 250M: unchanged (~245 M, already gas-capped)base-mainnet-simulation @ 250M: still won't fill (separate worker-side scaleFactor bug, not addressed here)Verification
go build ./runner/...cleango vet ./runner/network/consensus/...cleanbase/crates/builder/core/src/execution.rsRationale
The benchmark's question is "how much L2 gas/sec can the EL execute?". L1 DA capacity is a separate concern measured elsewhere; baking it into the gas-throughput benchmark masks the EL-throughput signal for cheap-tx workloads.
Draft because end-to-end validation requires a single ~12 h mainnet rerun.