As previously announced in this post, DFINITY will propose to temporarily pause and recover subnet uzr34 (which hosts the Internet Identity canister) on June 26 at 8AM UTC as part of the key resharing process for deploying the production vetKD key. This pause is expected to last 5–10 minutes.
In order to make this process verifiable end-to-end, the latest IC-OS version release contains a new tool to verify CUPs of halted subnets. This enables anyone to independently verify that the subnet:
- Was intentionally halted at a given CUP
- Was later restarted without any changes to its state
What is a CUP?
A Catch-Up Package (CUP) is a cryptographically signed snapshot of a subnet’s certified state. It is emitted periodically (e.g. every 500 blocks) and includes:
- A threshold signature verifiable by the subnet’s public key
- The block height of the CUP
- A timestamp of when the CUP was created
- A state hash representing the canonical state of the subnet at that point
- The registry version under which the CUP was created
When a subnet is paused via governance proposal (as done previously in this proposal), the CUP created at the halting height represents the final checkpoint of this subnet. Subsequently, the halted subnet can only be restarted by adopting a new recovery CUP (as previously done here).
In order to prevent any (un)intentional changes to the state during this process, the state hash of the proposed recovery CUP should therefore be identical to the one referenced by the latest subnet CUP at the halting height.
What Does the Tool Do?
The new command-line tool offers functionality to verify the latest CUP of a subnet that was manually halted at the CUP height (i.e. as part of a maintenance). By inspecting this CUP, it allows anyone to determine which parameters should be used as part of a recovery proposal to restart the halted subnet. If the subnet has already been restarted, the tool will verify that the correct parameters were used according to the latest CUP.
Specifically, given a CUP persisted in a local file, the tool performs the following steps:
-
Signature & Integrity Verification: Ensures that the CUP was genuinely produced by the subnet using threshold cryptography.
-
Inspect & Display the CUP’s Parameters:
a. The time, height & registry version at which this CUP was created.
b. The state hash referencing the state checkpoint of the subnet. -
Verify that the subnet was indeed manually halted at this CUP, according to its registry version. Otherwise, this CUP does not necessarily represent the latest state of the subnet at the time it was halted.
-
Verify that the subnet was recovered correctly. Any subsequent recovery proposal should specify:
a. A height and timestamp that are greater than the ones of the local CUP. This ensures forward progress.
b. A state hash that is identical to the one in the local CUP. This ensures that no changes were made to the subnet state.
Note that for now, the tool can only be used to verify recovery proposals for subnets that were intentionally halted at the CUP height as part of a scheduled maintenance. It cannot be used to verify recovery proposals for subnets that stalled unexpectedly (i.e. due to a problem introduced by a new replica version), because in this case the latest CUP does not necessarily represent the latest state of the subnet at the time of the stall.
Try it Yourself
In order to prepare for the recovery of uzr34 on June 26, today we are publishing a CUP of subnet io67a (google drive link), that will allow you to test and familiarize yourself with the tool’s functionality. After downloading the CUP artifact, it may be verified by executing the tool as follows:
- Checkout the current IC-OS version 3564b37939f037ba4d051ada88251c13954597d2 of the subnet:
git clone https://github.com/dfinity/ic.git
cd ic
git checkout 3564b37939f037ba4d051ada88251c13954597d2
- Copy the downloaded CUP into the IC directory
cp /path/to/io67a_cup.pb ./io67a_cup.pb
- Enter the development container:
ci/container/container-run.sh
- Build and run the CUP verification tool:
bazel run //rs/cup_explorer:cup_explorer_bin -- verify-cup-of-halted-subnet --cup-path /ic/io67a_cup.pb
Note that for this test, subnet io67a was not halted at the provided CUP. Therefore, the output of the tool should include the following error message:
"Verification failed: Subnet wasn't instructed to halt on this CUP. Therefore, this CUP is NOT guaranteed to represent the latest state of the subnet!"
During a production maintenance, the output should instead include the following instructions:
"Confirmed that subnet uzr34 was halted on this CUP."
"This means that the CUP represents the latest state of the subnet while the subnet remains halted."
"The subnet may ONLY be restarted via a recovery proposal using the same state hash as listed above."
Next Steps
During the key resharing maintenance of uzr34 on June 26, DFINITY will similarly publish the latest CUP of subnet uzr34 here on the forum, after the proposal to halt the subnet at a CUP height was adopted. At that point, we encourage you to execute the tool to verify that no state changes are made as part of the subsequent recovery proposal to perform the key resharing.
We will continue to improve these processes, as we work towards our goal of making all subnet recoveries end-to-end verifiable.
In the meantime, feel free to leave feedback and discuss the tool!