-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
a7770d7
to
2c06867
Compare
match manifest::parts_checksum(cd.download_dir.as_ref()) { | ||
Ok(checksum) => { | ||
if checksum == cd.manifest.checksum { | ||
// TODO: Import 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.
I'm not sure yet if we should import the snapshot here, or make another call from the App
. In any case, the App
will have to write to its app state history, so we'll have to return the full SnapshotManifest
so it can construct the necessary record.
The benefit of returning from here would be just a bit of extra visibility in the logs, showing explicitly when we start the import.
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.
This change was done in 6e3c587
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.
I had a few questions on how you import and if you already persist this snapshot so it is available to offer it to other peers, but I see this is addressed in the follow-up PR. Will ask my questions there if they are still not solved. 🙏
match manifest::parts_checksum(cd.download_dir.as_ref()) { | ||
Ok(checksum) => { | ||
if checksum == cd.manifest.checksum { | ||
// TODO: Import 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.
I had a few questions on how you import and if you already persist this snapshot so it is available to offer it to other peers, but I see this is addressed in the follow-up PR. Will ask my questions there if they are still not solved. 🙏
f7f1ff4
to
c9be10d
Compare
8693151
to
1e2e5a7
Compare
Closes consensus-shipyard/ipc#179
App::offer_snapshot
to put into the state a newSnapshotDownload
record which shows which manifest we are downloading to what temporary directorySnapshotDownload
cleans up the temporary directory when the last clone of it is dropped, e.g. if CometBFT restarts with a new snapshotApp::apply_snapshot_chunk
to ingest new chunks of a snapshot, saving them to the temporary directory and validating the checksum when they are all presentNot done in this PR:
apply_snapshot_chunk
sequentially, but I'm not sure if it waits before passing the next chunk, or is it similar toend_block
which was called whiledeliver_tx
was still running. We'll see.