-
Notifications
You must be signed in to change notification settings - Fork 244
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
Add fast-sync. #2657
Add fast-sync. #2657
Conversation
@@ -795,7 +801,8 @@ where | |||
} | |||
}; | |||
|
|||
let import_queue_service = import_queue.service(); | |||
let import_queue_service1 = import_queue.service(); |
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.
TODO: Remove the copy by using Arc
@@ -700,6 +700,12 @@ where | |||
mut telemetry, | |||
} = other; | |||
|
|||
// Clear block gap on reruns | |||
if client.info().finalized_state.is_some() { |
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.
TODO: Add fast-sync
flag condition.
@@ -917,7 +945,7 @@ async fn send_archived_segment_notification( | |||
archived_segment_notification_sender.notify(move || archived_segment_notification); | |||
|
|||
while acknowledgement_receiver.next().await.is_some() { | |||
debug!( | |||
info!( |
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.
TODO: return to debug
@@ -800,7 +828,7 @@ where | |||
let parent_block_hash = *block.block.header().parent_hash(); | |||
let block_hash_to_archive = block.block.hash(); | |||
|
|||
debug!( | |||
info!( |
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.
TODO: return to debug
@@ -783,6 +810,7 @@ where | |||
}; | |||
|
|||
if best_archived_block_number >= block_number_to_archive { | |||
info!(%block_number, "Skipped archiving imported block: already archived."); |
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.
TODO: set to debug
skip_proofs: true, | ||
storage_chain_mode: false, | ||
}, | ||
// sync_mode: SyncMode::Full, // TODO: add configurable default sync-state |
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.
Remove the comment
@nazar-pc the goal of this PR was primarily to provide visibility to you into the development progress, please take a look when you're back. |
There were too many things missing and too many various small things to even comment on last time I checked, wasn't sure what to do with it. I'd rather see a series of logical PRs that prepare various parts of the codebase to fast sync with explanation of the situation and why the changes are needed. Kind of like I did with PoT and many consensus upgrades prior and how I started doing with farming cluster too. I am very bad at looking at large dumps of WIP code that is not ready for review. |
Superseded by #2678 |
This PR introduces fast-sync to
subspace-node
complementing the existing sync mechanisms: DSN-sync and Substrate sync.Fast-sync algorithm aims to improve the speed of the synchronization to the latest block by skipping the majority of the blocks and downloading only the minimum of required blocks and state.
Algorithm highlight:
The initial state of the PR is draft because several block importing checks are disabled.
Currently disabled checks:
Remaining work:
restore disabled checks(UPD: all checks restored)sync-engine
)Here is the draft PR for polkadot-sdk: autonomys/polkadot-sdk#13
Code contributor checklist: