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

feat(dot/sync): Resume full sync after warp sync is finished #4518

Merged
merged 64 commits into from
Feb 19, 2025

Conversation

dimartiro
Copy link
Contributor

@dimartiro dimartiro commented Jan 30, 2025

Changes

Set up everything to resume syncing from the latest block retrieved using warp sync

Summary of changes

  • Retrieve block # 1 when state sync finishes
    • Use it to set the slot number
  • Set up the context to continue syncing from latest block
    • Store state in storage
    • Set new runtime from state
    • Create a new blocktree from the latest block
    • Finalize latest block
      • Do not try to finalize block ancestors
  • Fix tests

Tests

make test

# or by running a node with warp sync

make build
./bin/gossamer init --force --chain paseo
./bin/gossamer --sync warp --chain paseo

Issues

#4430

@dimartiro dimartiro force-pushed the diego/statesync/strategy branch from 527803f to 9165a5b Compare February 3, 2025 14:08
Base automatically changed from diego/statesync/strategy to development February 3, 2025 14:39
@dimartiro dimartiro marked this pull request as ready for review February 10, 2025 12:09
@dimartiro dimartiro self-assigned this Feb 11, 2025
Copy link
Member

@EclesioMeloJunior EclesioMeloJunior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dimartiro dimartiro force-pushed the diego/sync/resume-from-warp branch from b0da87a to f6a6b30 Compare February 19, 2025 00:56
@dimartiro dimartiro merged commit 5884fa0 into development Feb 19, 2025
24 checks passed
@dimartiro dimartiro deleted the diego/sync/resume-from-warp branch February 19, 2025 21:01
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 this pull request may close these issues.

3 participants