sui icon indicating copy to clipboard operation
sui copied to clipboard

[checkpoint] Run syncing in active process for fullnodes

Open williampsmith opened this issue 3 years ago • 0 comments

This adopts a similar pattern to the handling of the sui-node gossip process handle (which, for full nodes is a process to sync state from a quorum of validators, and for validators, is an active gossip process for txes, etc.), but for the checkpoint process.

Before:

  • Full nodes do a full checkpoint sync once before spawning an active process for syncing state with validators
  • Validator nodes spawn an active process for syncing and driving checkpoints

After:

  • Both full nodes and validators spawn an active checkpoint process.
  • For validators, this is the same checkpoint driving process as before
  • For full nodes, this is an active checkpoint syncing process that runs periodically

Other notes on this change:

  • In order to facilitate testing checkpoints on a simtest swarm, it was necessary to make CheckpointProcessControl configurable so as to avoid waiting 2+ minutes for the pause between checkpoint times. CheckpointProcessControl is now configured by setting a member of the Node, and for simtests that call start_a_fullnode*, is configured to wait on the order of seconds between checkpoints.
  • As such, we can also now configure CheckpointProcessControl from the NetworkConfig yaml

williampsmith avatar Nov 02 '22 06:11 williampsmith