SSV Checkpoint Sync Trust Model #93
diegomrsantos
started this conversation in
SIP Discussions
Replies: 1 comment
-
|
Just want to say it is nice you gave an extra option besides B, which was the only solution I had in mind! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
SSV Checkpoint Sync Trust Model
Status: working decision note before SIP text or contract code.
Author: Diego Marin Santos (@diegomrsantos)
Goal
A client should be able to start from finalized Ethereum block
B, download an SSV checkpoint snapshot, rebuild public SSV network state atB, and continue processing recent SSV events fromB + 1.The client should not need historical SSV logs from contract deployment.
Problem
Current SSV clients rebuild this state by replaying historical contract events. This means a new client needs old logs to sync.
A checkpoint snapshot removes that dependency, but the client still needs to know whether the snapshot is valid.
Today there is also no SSV contract value that represents the full public SSV network state at finalized block
B. That means clients do not have a compact protocol commitment they can compare against to check whether they reconstructed the same state forB.This document only decides how snapshot validity is established.
Design Choice
B.eth_callchecks for fields the contract can read.B?eth_callchecks.Both candidates can use the same
SnapshotV1format and the same deterministicsnapshotRoot.Candidate A: Trusted Checkpoints
Checkpoint publishers create
SnapshotV1at blockB, computesnapshotRoot, and sign the checkpoint metadata.A client verifies the configured signatures, imports the snapshot, then resumes event processing from
B + 1.This avoids old logs without changing the SSV contracts.
Candidate A can be hardened with
eth_callchecks at blockBagainst the client's Ethereum endpoint. These checks compare snapshot fields with contract views for data the contract can read directly, such as global values, operator records, specific validator existence checks, and selected cluster tuple checks. This can catch many invalid snapshots, including snapshots produced from incomplete or buggy event data.These checks are not a complete proof. They only cover what the contract can query at block
B; they do not prove that the snapshot includes every public SSV record.Advantages:
Limitations:
eth_callchecks reduce the risk of accepting an invalid snapshot but do not remove publisher trust;Candidate B: On-chain SSV State Root
The SSV contract stores a root for public SSV network state:
A client accepts a snapshot only if its recomputed
snapshotRootequals the contract root at finalized blockB.This avoids trusting the snapshot source for contents. The snapshot source can serve bad data, but the client rejects it if the root does not match.
It also gives clients one compact value for public SSV network state at block
B:ssvPublicStateRoot.Advantages:
B;Costs:
What these costs mean:
binary-merkle-treeor Nervos'ssparse-merkle-treein Rust, and Go Merkle libraries or go-ethereum trie code if they match the final root design.Candidate B does not replace Ethereum finality or weak subjectivity. It only lets the client check that the snapshot matches the SSV root stored at block
B, and lets implementations compare that root when they need to check whether they reconstructed the same public SSV state.Root Construction
The root construction is the main technical choice inside Candidate B. It defines how many public state records become one
ssvPublicStateRoot, and how that root changes when one record is added, updated, or removed.The safe family of choices is Merkle commitments based on hash functions. They are standard, auditable, and avoid RSA, pairing, and elliptic curve assumptions. That matters for a future migration to post quantum cryptography: the root would rely on hash security rather than factoring or discrete log assumptions.
Two Merkle designs are worth evaluating first:
O(log capacity)H(domain, owner, validatorPubkey).O(log keyspace), typically much deeperThe likely first prototype should be indexed Merkle trees with fixed capacity, because SSV state has natural domains such as operators, owners, clusters, and validators. That design only works if stable indices and capacity limits are acceptable. If index management becomes too complex or fragile, Sparse Merkle Tree is the conservative fallback.
The SIP should not choose a root construction by intuition. It needs a prototype that measures gas for the affected write paths and verifies that independent implementations compute the same root from the same snapshot.
Decision Criteria
Choose Candidate A if the goal is practical checkpoint sync and the protocol is comfortable trusting configured checkpoint publishers.
Choose Candidate B if the snapshot should be verifiable from an untrusted source by comparing it with a commitment in the SSV contract, or if SSV needs a compact state commitment for finalized block
B.The main decision is whether the extra security of Candidate B is worth those costs.
Open Questions
eth_callchecks, or on a state root maintained by the SSV contract?Beta Was this translation helpful? Give feedback.
All reactions