execution/stagedsync: an interrupt during the commitment reports a wrong trie root or panics
Maintainers usually reply within 1 day
@awskii is already working on this.
Since Nov 18, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- blockchain, databases
Research direction
Start with execution/stagedsync/committer.go around computeWithBlockAccumulator and computeCommitment, then trace the commitment state handling in execution/commitment/commitment_context.go and execution/commitment/hex_patricia_hashed.go. Reproduce an interrupt during the serial commitment path used by the stage_exec smoke test and inspect how errors affect trie state and the next block’s root. Done means shutdown no longer leaves state that produces a panic or reports a valid block as having a wrong trie root.
Written by the indexing model from the issue text.
Description
When integration stage_exec gets SIGTERM while the commitment calculator works, it can fail in two ways. Both come from the QA stage-exec smoke test on main (chaintip, serial commitment), which stops stage_exec with timeout 360:
- 2026-11-07 (run, job 128296208629): 1 ms after "Got interrupt, shutting down...", the executor reports the next block as invalid:
[EROR] [6/8 Execution] Wrong trie root of block 26293001: ceec74c2... (invalid block: wrong trie root: block 26293001 root ceec74c2... expected e2e49216...) - 2026-11-08 (run, job 128623497065): right after the interrupt, the commitment calculator panics:
panic: currentKeyLen > 0 [recovered, repanicked] execution/commitment.(*HexPatriciaHashed).EncodeCurrentState hex_patricia_hashed.go:3166 execution/commitment/commitmentdb.(*SharedDomainsCommitmentContext).encodeCommitmentState commitment_context.go:1004 ...encodeAndStoreCommitmentState commitment_context.go:975 ...computeCommitment commitment_context.go:480 ...ComputeCommitmentWithDiff commitment_context.go:439 execution/stagedsync.(*commitmentCalculator).computeWithBlockAccumulator committer.go:991 ...compute committer.go:841 / handleMessage committer.go:487 / loop committer.go:326
Line 480 at that commit (f62f1bfb3a) is the zero-update early return of computeCommitment, which stores the trie state. EncodeCurrentState panics when a fold is in progress, so a fold that an earlier, interrupted call left unfinished is the likely cause: when Process returns an error, computeCommitment does not reset the trie. Current main has the same early return. I have not checked how the interrupted fold reaches a wrong root without an error.
A wrong trie root during shutdown is the worse of the two, as the block is reported invalid. Since #26310 the smoke test runs only parallel commitment, and its daily runs have been green since 2026-11-09.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.6k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 820
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from erigontech/erigon
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
flaky test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
erigontech/erigon#26230 ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: pending nonce counts past gaps in the poolPossibly taken @yperbasis claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erigontech/erigon#26014 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
tracing: expose custom error selector and raw payload in callTracer revertReasonPossibly taken @lupin012 claimed this 9 days ago. OpenRPC
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#25928 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: remove redundant blob/commitment length checkPossibly taken @yperbasis claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
erigontech/erigon#25432 ·
Maintainers usually reply within 1 day
All issues in erigontech/erigon
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day