-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: check versioned hash version for EIP-4844 transactions #6601
fix: check versioned hash version for EIP-4844 transactions #6601
Conversation
it should be checked here, although implicitly by recalculating the versioned hash reth/crates/primitives/src/transaction/eip4844.rs Lines 147 to 150 in 1cc52ff
the error type is useful though, see the TODO in the above snippet |
Oh I see, thanks! Would it be worth keeping both checks? How should I proceed? You're welcome to modify this PR how you see fit btw. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the way forward would be to create a new BlobTransactionValidationError
variant that describes a mismatched versioned hash, and change this to return that variant
return Err(BlobTransactionValidationError::InvalidProof) |
adding a link to the spec, or even quoting the spec code verbatim around those lines would be useful as an artifact of this |
Sounds good. I'll make this change tomorrow. |
Should be ready now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, this looks good to me, thanks!
I didn't see where the versioned hash's version was checked for EIP-4844 transactions. This PR adds this check. I don't believe this is a big deal though because the CL should also check this.
Here's the spec for this:
This part in particular: