You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.4 KiB

  1. # Fast Sync
  2. In a proof of work blockchain, syncing with the chain is the same
  3. process as staying up-to-date with the consensus: download blocks, and
  4. look for the one with the most total work. In proof-of-stake, the
  5. consensus process is more complex, as it involves rounds of
  6. communication between the nodes to determine what block should be
  7. committed next. Using this process to sync up with the blockchain from
  8. scratch can take a very long time. It's much faster to just download
  9. blocks and check the merkle tree of validators than to run the real-time
  10. consensus gossip protocol.
  11. ## Using Fast Sync
  12. To support faster syncing, tendermint offers a `fast-sync` mode, which
  13. is enabled by default, and can be toggled in the `config.toml` or via
  14. `--fast_sync=false`.
  15. In this mode, the tendermint daemon will sync hundreds of times faster
  16. than if it used the real-time consensus process. Once caught up, the
  17. daemon will switch out of fast sync and into the normal consensus mode.
  18. After running for some time, the node is considered `caught up` if it
  19. has at least one peer and it's height is at least as high as the max
  20. reported peer height. See [the IsCaughtUp
  21. method](https://github.com/tendermint/tendermint/blob/b467515719e686e4678e6da4e102f32a491b85a0/blockchain/pool.go#L128).
  22. If we're lagging sufficiently, we should go back to fast syncing, but
  23. this is an [open issue](https://github.com/tendermint/tendermint/issues/129).