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

Fast "header-first" block sync #2428

Closed
1 of 12 tasks
sdbondi opened this issue Nov 11, 2020 · 0 comments · Fixed by #2436
Closed
1 of 12 tasks

Fast "header-first" block sync #2428

sdbondi opened this issue Nov 11, 2020 · 0 comments · Fixed by #2436
Labels
A-base_node Area - The Tari base node executable and libraries C-enhancement Category - New feature or request

Comments

@sdbondi
Copy link
Member

sdbondi commented Nov 11, 2020

Tracking issue for fast block sync.

Fast block sync will attempt to establish the strongest PoW chain by checking where a local chain and a remote peer's chain are linked and downloading headers from that point to the tip. Once headers are validated and downloaded, an archival node proceeds to block sync where full block bodies are downloaded.

  • Base node sync RPC service (PR Base node block sync RPC service #2348)
  • Various small bug fixes / enhancements in base node sync RPC
  • Database backend support for partial state
    • Support rewinding with or without bodies
    • Support adding/associating block bodies with existing headers
  • Change state machine to complete header sync before block sync
  • Validate headers efficiently by building and maintaining an in-memory cache of target difficulties and timestamps for the block window
  • Validate block bodies against header MMRs
  • Chain metadata must adjust as necessary to reflect which full blocks the node can provide
  • Sync peers should be selected at random for header sync
  • Allow "force sync from this peer" to be configured
  • Block sync needs to locate a peer that can provide the required full blocks

Related issues

#2113

@sdbondi sdbondi added C-enhancement Category - New feature or request A-base_node Area - The Tari base node executable and libraries protocol labels Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-base_node Area - The Tari base node executable and libraries C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant