koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

Sync Protocol #3

Closed mvandeberg closed 3 years ago

mvandeberg commented 4 years ago

As a Koinos node operator, I want to get a new Koinos node from genesis to the current head block.

youkaicountry commented 3 years ago

Note: The N block limit should be less than the inventory lifetime of the gossip mode.

Connect to peer Get response that includes Chain ID, Block Height, and Block ID Compare Chain ID, Block Height, Block ID to your own a. If the Chain ID is different -- hang up b. If Block ID and Block Height are equal, you are in sync -- hang up c. If Block Height is N less, then find the most recent ancestor via binary search and request the unknown blocks d.??? e. Profit