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.

31 lines
996 B

  1. # Blockchain Reactor
  2. The Blockchain Reactor's high level responsibility is to maintain connection to a reasonable number
  3. of peers in the network, request blocks from them or provide them with blocks, validate and persist
  4. the blocks to disk and play blocks to the ABCI app.
  5. ## Block Reactor
  6. * coordinates the pool for synching
  7. * coordinates the store for persistence
  8. * coordinates the playing of blocks towards the app using a sm.BlockExecutor
  9. * handles switching between fastsync and consensus
  10. * it is a p2p.BaseReactor
  11. * starts the pool.Start() and its poolRoutine()
  12. * registers all the concrete types and interfaces for serialisation
  13. ### poolRoutine
  14. * requests blocks from a specific peer based on the pool
  15. * periodically asks for status updates
  16. * tries to switch to consensus
  17. * tries to sync the app by taking downloaded blocks from the pool, gives them to the app and stores
  18. them on disk
  19. ## Block Pool
  20. * maintain connections to other peers
  21. ## Block Store
  22. * persists blocks to disk