Skip to content

execution/execmodule: fix unwinding logic when side forks go back in height#18993

Merged
taratorio merged 4 commits into
mainfrom
unwind_edge_number_behind
Feb 6, 2026
Merged

execution/execmodule: fix unwinding logic when side forks go back in height#18993
taratorio merged 4 commits into
mainfrom
unwind_edge_number_behind

Conversation

@taratorio

@taratorio taratorio commented Feb 6, 2026

Copy link
Copy Markdown
Member

This was caught by some of the gas-benchmark tests which run a series of new payloads and FCUs for forks with different heights, and they jump from one fork to another.

The issue was that we were not calling TruncateCanonicalHash for heights after the new FCU head number. Which meant that AppendCanonicalTxNums was appending more txNums than it should for the given FCU fork (i.e. it was going beyond it) if the fork before it was longer in height. This messed up the txNums index and caused wrong trie roots.

@taratorio taratorio enabled auto-merge (squash) February 6, 2026 02:11
@taratorio taratorio merged commit cf22c2c into main Feb 6, 2026
18 checks passed
@taratorio taratorio deleted the unwind_edge_number_behind branch February 6, 2026 02:34
Giulio2002 pushed a commit that referenced this pull request Feb 6, 2026
…height (#18993)

This was caught by some of the gas-benchmark tests which run a series of
new payloads and FCUs for forks with different heights, and they jump
from one fork to another.

The issue was that we were not calling `TruncateCanonicalHash` for
heights after the new FCU head number. Which meant that
`AppendCanonicalTxNums` was appending more txNums than it should for the
given FCU fork (i.e. it was going beyond it) if the fork before it was
longer in height. This messed up the txNums index and caused wrong trie
roots.
@yperbasis

Copy link
Copy Markdown
Member

@taratorio shall we port this to release/3.3?

taratorio added a commit that referenced this pull request Feb 10, 2026
…height (#18993)

This was caught by some of the gas-benchmark tests which run a series of
new payloads and FCUs for forks with different heights, and they jump
from one fork to another.

The issue was that we were not calling `TruncateCanonicalHash` for
heights after the new FCU head number. Which meant that
`AppendCanonicalTxNums` was appending more txNums than it should for the
given FCU fork (i.e. it was going beyond it) if the fork before it was
longer in height. This messed up the txNums index and caused wrong trie
roots.
@taratorio

Copy link
Copy Markdown
Member Author

@taratorio shall we port this to release/3.3?

@yperbasis #19063

AskAlexSharov pushed a commit that referenced this pull request Feb 10, 2026
…ck in height (#18993) (#19063)

cherry-pick: #18993

---

This was caught by some of the gas-benchmark tests which run a series of
new payloads and FCUs for forks with different heights, and they jump
from one fork to another.

The issue was that we were not calling `TruncateCanonicalHash` for
heights after the new FCU head number. Which meant that
`AppendCanonicalTxNums` was appending more txNums than it should for the
given FCU fork (i.e. it was going beyond it) if the fork before it was
longer in height. This messed up the txNums index and caused wrong trie
roots.
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.

3 participants