AttestationLightClient contract.
The attestor set and threshold
Each side’s client fixes its own list of attestor addresses and its own signature threshold when it is deployed. That list and that number are the trust root of the connection. The client state is four fields:getClientState.
The latest height is the highest height the client knows, and the frozen flag records whether the client has stopped verifying for good. Beside that state the client keeps two more records: a lookup of which addresses belong to the set, and one trusted timestamp per height.
That timestamp is this client’s consensus state, and it is the whole of what the client has accepted as true about the counterparty chain. Nothing else is retained, so the client can answer a question about a commitment only from a claim signed for that question.
The set and the threshold hold for the life of the client. Deployment fixes them along with an initial height and timestamp, and rejects an empty set, a zero threshold, a threshold larger than the set, and duplicate addresses.
Changing the set requires a replacement contract and a router client migration. Rotate an attestor set preserves the client ID while replacing the attestor set.
Each attestor adds two assumptions of its own: that its chain RPC endpoint reports accurate state, and that its signing key stays secret. Attestors covers how attestors run and how their keys are held.
What an attestation claims
An attestation is one of two signed statements about the counterparty chain:-
A State Attestation: height
Hhad timestampT. -
A Packet Attestation: at height
H, the specified commitment paths held certain values.
How a quorum is verified
A quorum is the client’s signature threshold for attestations. It is the number of distinct attestors from its set that signed the same bytes. The threshold isminRequiredSigs in the client state, set when the client is deployed, and it can be anywhere from one signature to the whole set. No function changes it afterwards, so a different threshold means deploying a new client.
Attestors sign a digest of the attestation data, tagged with whether it is a state or packet attestation: sha256(typeTag || sha256(attestationData)). That tag is the only thing bound beyond the data itself.
The client first requires at least the threshold number of signatures. Each signature it was given must then pass the client’s own checks, or the whole call reverts:
- It is of the fixed signature length.
- It recovers to an address in the configured attestor set.
- The recovered signer has not been counted already.
Updates and proof checks
A verified quorum feeds three operations, one for each question this client answers with an attestation.
An update stores a height the client did not have, and the two proof checks read a height it already holds. The latest height advances if an incoming update is for a higher height. An update for a lower height is still accepted but does not advance the latest height, so updates can arrive out of order. AttestationLightClient carries the function signatures and return values.
To attest non-membership, attestors sign the path with a zero commitment, which attests that no commitment for that path was stored as of that height.