Skip to content

Comments

fix(statetest): use spec-aware blob base fee update fraction#3210

Merged
rakita merged 1 commit intobluealloy:mainfrom
bshastry:fix/spec-aware-blob-fee-fraction
Dec 8, 2025
Merged

fix(statetest): use spec-aware blob base fee update fraction#3210
rakita merged 1 commit intobluealloy:mainfrom
bshastry:fix/spec-aware-blob-fee-fraction

Conversation

@bshastry
Copy link
Contributor

@bshastry bshastry commented Dec 5, 2025

The state test runner was hardcoding BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN (3,338,477) instead of using the spec-aware value from CfgEnv. This caused consensus divergence with geth on Prague/Osaka blob transaction tests.

Changes:

  • Modified block_env() to use cfg.blob_base_fee_update_fraction() which returns the correct value based on spec (Cancun: 3338477, Prague: 5007716)
  • Updated runner.rs to pass mutable cfg reference as required by the API
  • Added comprehensive unit tests verifying correct blob fee calculation for Cancun, Prague, and Osaka forks

With excess_blob_gas=0x240000 and maxFeePerBlobGas=0x01:

  • Cancun fraction (3338477): blob_price = 2, tx FAILS (insufficient fee)
  • Prague fraction (5007716): blob_price = 1, tx SUCCEEDS

🤖 Generated with Claude Code

The state test runner was hardcoding BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN
(3,338,477) instead of using the spec-aware value from CfgEnv. This caused
consensus divergence with geth on Prague/Osaka blob transaction tests.

Changes:
- Modified block_env() to use cfg.blob_base_fee_update_fraction() which
  returns the correct value based on spec (Cancun: 3338477, Prague: 5007716)
- Updated runner.rs to pass mutable cfg reference as required by the API
- Added comprehensive unit tests verifying correct blob fee calculation
  for Cancun, Prague, and Osaka forks

With excess_blob_gas=0x240000 and maxFeePerBlobGas=0x01:
- Cancun fraction (3338477): blob_price = 2, tx FAILS (insufficient fee)
- Prague fraction (5007716): blob_price = 1, tx SUCCEEDS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 5, 2025

CodSpeed Performance Report

Merging #3210 will not alter performance

Comparing bshastry:fix/spec-aware-blob-fee-fraction (d9034ed) with main (eb37a15)

Summary

✅ 173 untouched

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm,

blob_base_fee_update_fraction should be & but this is PR for later

@rakita rakita merged commit 708be4c into bluealloy:main Dec 8, 2025
31 checks passed
@github-actions github-actions bot mentioned this pull request Dec 8, 2025
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.

2 participants