-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The Genesis State Machine (GSM) transitions from Syncing to CaughtUp when
- All ChainSync peers have sent
MsgAwaitReply(ie we know of their entire chain). - We have selected a chain that is at least as good as any of these candidate chains.
With Peras (even without Ouroboros Genesis, ie with bootstrap peers), we need to add a third criterion, essentially a variant of 1.:
- All PerasCertDiffusion peers have sent us all of their certificates (this can be checked by noticing that they don't have any new certificates to offer to us, also see section 2.6.2 ("Certificate diffusion mini-protocol") in the report).
This is important because (for eclipse evasion), we need to be sure that we actually have selected the best chain currently in the system in the moment where we transition to CaughtUp, and not yet having seen all certificates can can of course distort our view.
The goal of this ticket is to enrich the GSM and its test appropriately. Of course, the required information per peer ("have we seen all of their certs") needs to be exposed by our cert diffusion implementation, cf #57. It might make sense to break this out into its own ticket if it turns out to be non-trivial.
This isn't absolutely necessary for early testnets (without adversarial activity).