Skip to content

Commit f5d7e7d

Browse files
Alexey Sharpclaude
authored andcommitted
Fix wrong trie root: don't bypass validation for force-scheduled tasks
The force-schedule fallback (stall prevention) was setting skipCheck[nextTx] = true, which tells the validator to accept the result without checking state consistency. This is only correct for the task at maxValidated+1 (the validation frontier), where all predecessors are guaranteed validated. For a non-frontier task, this can accept results computed against stale state, producing wrong trie roots. Remove the skipCheck flag from the force-schedule path. The task is still dispatched and executed; its result goes through normal validation and gets re-executed if invalid. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a36f84d commit f5d7e7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

execution/stagedsync/exec3_parallel.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,10 @@ func (be *blockExecutor) scheduleExecution(ctx context.Context, pe *parallelExec
19041904
nextTx := be.execTasks.takeNextPending()
19051905
if nextTx >= 0 {
19061906
execTask := be.tasks[nextTx]
1907-
be.skipCheck[nextTx] = true
1907+
// Do NOT set skipCheck here — the task is not at the validation
1908+
// frontier (maxValidated+1), so its result must go through normal
1909+
// validation. Setting skipCheck would accept stale-state results
1910+
// and produce wrong trie roots.
19081911
be.cntExec++
19091912

19101913
version := execTask.Version()

0 commit comments

Comments
 (0)