Use RPC providers to speed up syncing from old snapshots
- Dominant language
- Rust
- Stars
- 697
- Forks
- 200
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 65
Description
# Summary
Syncing from an old snapshot requires downloading a lot of tipsets (2880 per day the snapshot is behind). We download the tipsets from the libp2p swarm in batches of 16, and we're limited to a single batch at a time. This sequential download is often slower than the validation of the tipsets, and validation cannot begin until all the tipsets have been downloaded.
RPC providers offer a `ChainGetTipSetByHeight` method that returns a tipset for a given height. We can use this method as an alternate, non-libp2p source of tipsets. Instead of sequentially fetching a single range of tipsets from the swarm, we can use RPC providers to split the range into smaller ranges fetched in parallel.
# Requirements
Fetching headers starting from a 1-week-old snapshot should at least be 10x faster.
# Motivation
I want syncing from older snapshots to be faster.
Contributor guide
Assessment
This issue has not been assessed yet.