-
Notifications
You must be signed in to change notification settings - Fork 144
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
Import snapshots and import chains #789
Conversation
@@ -60,6 +93,16 @@ pub(super) async fn start(config: Config) { | |||
let mut db = RocksDb::new(config.data_dir + "/db"); | |||
db.open().unwrap(); | |||
let db = Arc::new(db); | |||
|
|||
// Sync from snapshot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly we dont actually sync from snapshot rather we set the snapshot? Reason I mention this is because I dont think any sync logic is called in import_chain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we populate our blockstore from the snapshot file. And furthermore, we can also recompute all the state if we import with --import-chain
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if you're wondering why not full block valation, that is intended, it's just calculating intermediate states and validating those roots are correct (full block validation would be too slow when you want to trust the export)
Summary of changes
Changes introduced in this pull request:
--import-snapshot <filename>
--import-chain <filename>
Reference issue to close (if applicable)
Closes
#761
Other information and links