Difference between revisions of "Catch-Up Package"
Line 33: | Line 33: | ||
=== When Recovering Faulty Subnet === | === When Recovering Faulty Subnet === | ||
+ | |||
+ | == Starting a Node from Catch-Up Package == |
Revision as of 19:02, 23 November 2022
This Page is Still Work in Progress
Structure of Catch-Up Package
A Catch-Up Package (CUP) is a special message (not on the blockchain) that has (mostly) everything a replica needs to begin working in a given epoch, without knowing anything about previous epochs. It consists of the following data fields:
- The root of a Merkle hash tree for the entire replicated state (as opposed to the partial, per-round certified state).
- The summary block for the epoch.
- The random beacon for the first round of the epoch.
- A signature on the above fields under the (n − f)-out-of-n threshold signing key for the subnet.
To generate a CUP for a given epoch, a replica must wait until the summary block for that epoch is finalized and the corresponding per-round state is certified. As already mentioned, the entire replicated state must be hashed as a Merkle tree — even though a number of techniques are used to accelerate this process, this is still quite expensive, which is why it is only done once per epoch. Since a CUP contains only the root of this Merkle tree, a special state sync subprotocol is used that allows a replica to pull any state that it needs from its peers — again, a number of techniques are used to accelerate this process, but it is still quite expensive. Since we are using a high-threshold signature for a CUP, we can be sure that there is only one valid CUP in any epoch, and moreover, there will be many peers from which the state may be pulled. Also, since the public key of the threshold signature scheme remains constant over time, the CUP can be validated without knowing the current participants of the subnet.
The code to manage the Catch-Up Package can be found on github.