sui
sui copied to clipboard
[checkpoint] Run syncing in active process for fullnodes
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
CheckpointProcessControlconfigurable so as to avoid waiting 2+ minutes for the pause between checkpoint times.CheckpointProcessControlis now configured by setting a member of theNode, and for simtests that callstart_a_fullnode*, is configured to wait on the order of seconds between checkpoints. - As such, we can also now configure CheckpointProcessControl from the
NetworkConfigyaml