Skip to content

Conversation

@bshastry
Copy link
Contributor

@bshastry bshastry commented Dec 1, 2025

Fixes #18079

Previously, when post.Tx (txbytes) was present in state tests, erigon would override the message constructed from the transaction JSON with one derived from the raw transaction bytes. This caused inconsistencies because the txbytes could have different values (e.g., gas limit) than the transaction JSON fields.

Other clients (go-ethereum, nethermind, besu) only use txbytes for validation purposes, not to replace the message. This fix aligns erigon with other clients by:

  1. Adding BlobVersionedHashes field to stTransaction struct (previously missing, which was the original reason for the txbytes workaround)
  2. Using BlobVersionedHashes in toMessage() when constructing messages
  3. Removing the txbytes override logic that incorrectly replaced the message for all transaction types

This fixes gas calculation mismatches where erigon would report different initial gas than other clients due to the txbytes having a different gas limit than the transaction JSON.

🤖 Generated with Claude Code

Previously, when post.Tx (txbytes) was present in state tests, erigon
would override the message constructed from the transaction JSON with
one derived from the raw transaction bytes. This caused inconsistencies
because the txbytes could have different values (e.g., gas limit) than
the transaction JSON fields.

Other clients (go-ethereum, nethermind, besu) only use txbytes for
validation purposes, not to replace the message. This fix aligns erigon
with other clients by:

1. Adding BlobVersionedHashes field to stTransaction struct (previously
   missing, which was the original reason for the txbytes workaround)
2. Using BlobVersionedHashes in toMessage() when constructing messages
3. Removing the txbytes override logic that incorrectly replaced the
   message for all transaction types

This fixes gas calculation mismatches where erigon would report
different initial gas than other clients due to the txbytes having
a different gas limit than the transaction JSON.

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

Co-Authored-By: Claude <[email protected]>
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.

State test runner ignores blobVersionedHashes when txbytes is absent

1 participant