Skip to content

Conversation

@strmfos
Copy link
Contributor

@strmfos strmfos commented Dec 5, 2025

BlockHeader overload of TryCalculateFeePerBlobGas sets feePerBlobGas to UInt256.MaxValue when ExcessBlobGas is null, but return value was ignored. Use already extracted excessBlobGas (line 108) instead.

@flcl42
Copy link
Contributor

flcl42 commented Dec 5, 2025

Does it make difference? Could you add a test that reveals it if so?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the EIP-7918 blob gas calculation where the return value of TryCalculateFeePerBlobGas was ignored, potentially causing incorrect calculations when parentBlockHeader.ExcessBlobGas is null.

Key Changes:

  • Changed the call from using the BlockHeader overload to using the ulong overload with the already-extracted excessBlobGas value that properly handles null through null-coalescing

@strmfos
Copy link
Contributor Author

strmfos commented Dec 6, 2025

Added a test for the null case

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