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

Improve sync start speed on restart #1978

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

nazar-pc
Copy link
Member

Couple important improvements here.

First of all, instead of starting with last finalized block it makes more sense to start with best block minus archiving confirmation depth. The reason for this is that finalized block is very deep due to paritytech/polkadot-sdk#1570 and we will end up downloading much more data and checking many more blocks than we actually need.

Second tweak is a fix for checking against last processed block rather than finalized block in actual block import that will make things both faster and remove unfortunate situation where last processed block number actually goes DOWN instead of up.

Both of these improvements greatly improve DSN sync, especially on restart (but also after temporary network outages).

Code contributor checklist:

@nazar-pc nazar-pc merged commit e30137e into main Sep 20, 2023
@nazar-pc nazar-pc deleted the improve-sync-start-speed branch September 20, 2023 23:26
@nazar-pc nazar-pc added the need to audit This change needs to be audited label Sep 25, 2023
@vanhauser-thc vanhauser-thc added audited This change was audited and removed need to audit This change needs to be audited labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audited This change was audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants