The third step requires us to request full blocks from peers.
We currently ensure the peer has the full block by only running body_sync against full archival nodes (with more work than us) -
We should be able to safely fast sync from a node that itself was fast sync'd
Most nodes should have recent blocks, regardless of archival status
I wonder if the heuristic can be something along the lines of -
"If requesting a block pre-horizon then only request from full archival peers, but if requesting a full block post-horizon then any peer (with more work) will do"?
The existing behavior also adds some further complication - we determine how many blocks to request during body_sync as a function of the number of peers we have. But we are then only requesting blocks from archival peers and there may only be a few archival nodes out there.
These archival nodes are going to be overwhelmed if we have lots of connected peers and lots of peers attempting to sync.
Right now we fast sync by -
The third step requires us to request full blocks from peers. We currently ensure the peer has the full block by only running body_sync against full archival nodes (with more work than us) -
https://github.com/mimblewimble/grin/blob/f0cf903adc33cee56494099ebb2218c1a06c18ae/servers/src/grin/sync.rs#L207-L210
This feels wrong for a couple of reasons -
I wonder if the heuristic can be something along the lines of - "If requesting a block pre-horizon then only request from full archival peers, but if requesting a full block post-horizon then any peer (with more work) will do"?
The existing behavior also adds some further complication - we determine how many blocks to request during body_sync as a function of the number of peers we have. But we are then only requesting blocks from archival peers and there may only be a few archival nodes out there. These archival nodes are going to be overwhelmed if we have lots of connected peers and lots of peers attempting to sync.