feat: calldata gas benchmark - how many resources fit per block#515
Open
jonaprieto wants to merge 1 commit into
Open
feat: calldata gas benchmark - how many resources fit per block#515jonaprieto wants to merge 1 commit into
jonaprieto wants to merge 1 commit into
Conversation
439a89d to
65daa5f
Compare
…labels Restore test_print_calldata_gas_analysis from 7bea56e with improvements: - Add resource counts to Table 3 (1 CU = 2 resources, using Compliance._RESOURCES_PER_COMPLIANCE_UNIT) - Parametrize gas limits in _logMaxCUsTable (dynamic array instead of hardcoded 36M/60M) - Replace cryptic scheme labels (4/16, 10/40, etc.) with descriptive names: Current(EIP-2028), PectraFloor(EIP-7623), Glamsterdam(EIP-7976), FlatRate(EIP-7976-alt) - Add plain-English captions to all tables explaining what each measures - Add pricing scheme reference and Fusaka context (EIP-7935 60M block limit, EIP-7825 per-tx gas cap) to notes Refs #459
65daa5f to
3578d0d
Compare
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.
Adds
test_print_calldata_gas_analysisto measure how many compliance units (CUs) and resources can fit in a block under current and proposed calldata gas pricing schemes.Key results (aggregated proof mode, current EIP-2028 pricing):
Under worst-case Glamsterdam flat rate (64 gas/byte), capacity drops ~46% but still allows 147 CUs / 294 resources per 60M block. Pectra floor never binds for ARM txns (execution gas dominates by 6-20x).
Gas limits are file-level constants (
BLOCK_GAS_LIMIT_CURRENT,BLOCK_GAS_LIMIT_FUSAKA,TX_GAS_CAP_EIP7825) for easy tweaking. The linear model (R^2 = 0.9954 agg, 1.0 reg) is validated with out-of-sample predictions.Full results: https://gist.github.com/jonaprieto/cb1f13d487144a91c7c5244debb21cd7
Refs #459