Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vm.rollFork header validation error: excess_blob_gas #9297

Closed
2 tasks done
GlebRadchenko opened this issue Nov 11, 2024 · 4 comments · Fixed by #9298
Closed
2 tasks done

vm.rollFork header validation error: excess_blob_gas #9297

GlebRadchenko opened this issue Nov 11, 2024 · 4 comments · Fixed by #9298
Labels
A-evm Area: EVM C-forge Command: forge Cmd-forge-test Command: forge test T-bug Type: bug

Comments

@GlebRadchenko
Copy link

GlebRadchenko commented Nov 11, 2024

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (e028b92 2024-11-11T00:26:04.968342000Z)

What command(s) is the bug in?

forge test

Operating System

macOS (Apple Silicon)

Describe the bug

Got following error while running forge test:

[FAIL: vm.rollFork:  backend: failed committing transaction; header validation error: `excess_blob_gas` not set; `excess_blob_gas` not set;]
contract FoundryIssueTest is Test {
    uint256 immutable mainnetFork;

    constructor() {
        mainnetFork = vm.createFork("wss://scroll-mainnet.chainstacklabs.com/ws");
    }

    function setUp() public {
        vm.selectFork(mainnetFork);
    }

    function test() public {
        bytes32 targetTxHash = 0xf94774a1f69bba76892141190293ffe85dd8d9ac90a0a2e2b114b8c65764014c;
        vm.rollFork(targetTxHash);
    }
}

Note:
same behavior is observed using vm.createSelectFork

@GlebRadchenko GlebRadchenko added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Nov 11, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Nov 11, 2024
@grandizzy grandizzy added A-evm Area: EVM Cmd-forge-test Command: forge test C-forge Command: forge and removed T-needs-triage Type: this issue needs to be labelled labels Nov 11, 2024
@zerosnacks
Copy link
Member

Hi @GlebRadchenko I'm unable to reproduce your the error with the given test

Ran 1 test for test/FoundryIssueTest.sol:FoundryIssueTest
[PASS] test() (gas: 3072)
Traces:
  [3072] FoundryIssueTest::test()
    ├─ [0] VM::rollFork(0xf94774a1f69bba76892141190293ffe85dd8d9ac90a0a2e2b114b8c65764014c)
    │   └─ ← [Return] 
    └─ ← [Stop] 

Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 563.78ms (258.04ms CPU time)

Would you mind adding your foundry.toml / expand on your environment settings?

@GlebRadchenko
Copy link
Author

Sure, here is my foundry.toml:

[profile.default]
src = 'src'
out = 'out'
libs = ['lib']
gas_reports = ["test/*"]
evm_version = "cancun"
solc-version = "0.8.25"

fs_permissions = [{ access = "read", path = "./"}] # for test json reading

no specific env settings:
rustc 1.82.0 (f6e511eec 2024-10-15)

@GlebRadchenko
Copy link
Author

@zerosnacks noticed that if I use paris instead of cancun the test passes

@zerosnacks
Copy link
Member

zerosnacks commented Nov 11, 2024

Thanks @GlebRadchenko for reporting, looks like an issue in the way we are setting the field here w/ cancun set:

env.block.blob_excess_gas_and_price =
block.header.excess_blob_gas.map(BlobExcessGasAndPrice::new);

Fix is incoming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-evm Area: EVM C-forge Command: forge Cmd-forge-test Command: forge test T-bug Type: bug
Projects
Archived in project
3 participants