Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Util] Generate protocol snapshot file from latest checkpoint file #5580

Closed
zhangchiqing opened this issue Mar 25, 2024 · 0 comments · Fixed by #5604
Closed

[Util] Generate protocol snapshot file from latest checkpoint file #5580

zhangchiqing opened this issue Mar 25, 2024 · 0 comments · Fixed by #5604
Assignees

Comments

@zhangchiqing
Copy link
Member

Problem Definition

In order to create data (checkpoint file + protocol snapshot file) for dynamic bootstrapped execution node, currently we have to make a copy of the entire data disk of an execution node, and run state extraction on it. And usually we use an old snapshot , which usually is about 1 day old, for this data preparation task. Since the data is about 1 day old, it will take time for the dynamic bootstrapped execution node to catch up. And running state extraction would need dedicated machine resource and also takes time.

Idea

Since the execution node generates checkpoint file from time to time, we could make use the latest checkpoint file for dynamic bootstrapping. The only thing missing is to generate the corresponding protocol snapshot file for a given checkpoint file. If this could work, then creating data for dynamic bootstrapping would be much faster and cheaper.

Solution

  1. Since a checkpoint could contain up to 500 trie root hashes, we need to pick one and find a block which produces a statecommitment matches the trie root hash, and then find a finalized block that contains the seal to that block.
  2. Add a command to admin tool or a util command that takes a checkpoint file and generates a protocol snapshot file for it.
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 a pull request may close this issue.

1 participant