[CompactSealedState] Add import-compact-execution-state-to-storehouse util - #8699
Draft
zhangchiqing wants to merge 1 commit into
Draft
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
zhangchiqing
added this pull request to stack #8672
September 11, 2026 22:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8665. Stacked on #8673 (T2).
Problem
Bootstrapping a storehouse (payloadless) register store requires indexing registers from the root block to the latest height, which takes days on a long-running execution node.
ImportRegistersFromCheckpointcan seed the storehouse from a single-trie checkpoint, andcompact-execution-stateproduces exactly that — a checkpoint at the last sealed and executed block. However, the EN's own startup import is hardwired toroot.checkpointat the sealed root height, so there was no way to seed the register store from the compacted checkpoint.Changes
New util
import-compact-execution-state-to-storehouse(cmd/util/cmd/import-compact-execution-state-to-storehouse), registered incmd/util/cmd/root.go.It requires the EN to be stopped and the execution state to be in the Compacted Sealed State, then:
C, mirroringExecutionState.GetHighestFinalizedExecuted: the executed-block pointer capped by the finalized head, with the commit read from the commits store.--execution-state-diris a compacted single-trie checkpoint whose root hash equalsC(wal.CheckpointHasSingleRootHash).--register-dirdoes not exist or is empty, and that the register store has not been bootstrapped.bootstrap.ImportRegistersFromCheckpoint, which sets the register store's first and latest heights to the resolved height.After that the node starts with storehouse enabled, skips its own root-checkpoint import, and resumes execution at
height + 1, indexing forward only.Verification
go build ./cmd/util/cmd/...,go vet,gofmtclean.cmd/utiland ranimport-compact-execution-state-to-storehouse --help.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.