Skip to content

fix: create ordered trie when computing roots for transactions, receipts & withdrawals#225

Merged
fmoletta merged 1 commit into
mainfrom
fix-root-computations
Aug 7, 2024
Merged

fix: create ordered trie when computing roots for transactions, receipts & withdrawals#225
fmoletta merged 1 commit into
mainfrom
fix-root-computations

Conversation

@fmoletta

@fmoletta fmoletta commented Aug 6, 2024

Copy link
Copy Markdown
Contributor

Motivation

These roots are currently being calculated using from_sorted_iter but without being sorted beforehand. This PR replaces this behavior with inserting directly into the trie to ensure that it is ordered, then computing the root (The same fix that has been previously applied to storage root)

Description

Fixes compute_transactions_root, compute_receipts_root & compute_withdrawals_root

Notes

After this change, the payloads created by kurtosis local net now pass the block hash validations in engine_NewPayloadV3

Closes None, but is needed for #51

@fmoletta fmoletta marked this pull request as ready for review August 6, 2024 18:29
@fmoletta fmoletta requested a review from a team as a code owner August 6, 2024 18:29
@fmoletta fmoletta added this pull request to the merge queue Aug 7, 2024
Merged via the queue into main with commit 412fcde Aug 7, 2024
@fmoletta fmoletta deleted the fix-root-computations branch August 7, 2024 17:45
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.

2 participants