After discovering and connecting to some peers, we are ready to sync.

At a high level, the sync process is

  1. Wait for a new block to be announced
  2. Download a "summary" of the entire chain (aka a weight proof)
  3. Check that the summary is valid and contains the new block
  4. Request the coins for all addresses tracked by the wallet
  5. 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.