After discovering and connecting to some peers, we are ready to sync.
At a high level, the sync process is
- Wait for a new block to be announced
- Download a "summary" of the entire chain (aka a weight proof)
- Check that the summary is valid and contains the new block
- Request the coins for all addresses tracked by the wallet
- Validate the returned coins against the summary
This process is repeated with multiple peers to make sure there are no heavier chains and we haven't missed any coins.
Read more about
light clients and the wallet protocol.