Skip to content

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

Merged
klkvr merged 4 commits intomasterfrom
klkvr/fix-tx-rlp
Apr 18, 2024
Merged

fix: use 2718 encoding for transactions trie root calculation#7718
klkvr merged 4 commits intomasterfrom
klkvr/fix-tx-rlp

Conversation

@klkvr
Copy link
Copy Markdown
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
Copy Markdown
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
@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