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

fix: use 2718 encoding for transactions trie root calculation #7718

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Apr 18, 2024

Motivation

Closes #7698

Solution

Implement Encodable2718 for TypedTransaction and use correct encoding for transactions root calculation.

alloy does not expose methods for encoding transaction types other than TxEnvelope::encode_2718, so currently this impl clones txs to construct TxEnvelope. We should probably expose encode_with_signature methods used here to avoid this

@mattsse
Copy link
Member

mattsse commented Apr 18, 2024

yeah I think those should be public, because they are required for things like this, similar to

alloy-rs/alloy#529

@klkvr klkvr merged commit 3f5c615 into master Apr 18, 2024
19 checks passed
@klkvr klkvr deleted the klkvr/fix-tx-rlp branch April 18, 2024 21:49
klkvr added a commit that referenced this pull request Apr 20, 2024
* fix: use 2718 encoding for tx root

* fmt

* rm doc

* fix
@NiloCK NiloCK mentioned this pull request Jun 5, 2024
2 tasks
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.

Transaction root is not computed correctly
2 participants