Skip to main content

Module light_client

Module light_client 

Source
Available on crate feature unstable only.
Expand description

Light-client helpers for verifying state against a trusted validator committee.

This module composes the pieces that the rest of the crate provides into a small end-to-end verifier:

  • EpochCache stores the currently-trusted validator committee and remembers each completed epoch as a closed checkpoint range.
  • The committee ratchet driver (in a follow-up commit) advances the cache forward by fetching and BLS-verifying each epoch’s last checkpoint summary.
  • The high-level LightClient (in a follow-up commit) ties together the alpha ProofService (see crate::proto::sui::rpc::v2alpha), the ratchet, and the OCS proof verifier in sui_sdk_types::proof to authenticate ObjectReferences against the network’s validator committee end-to-end.

The whole module is gated on the crate’s unstable feature.

Re-exports§

pub use events::AuthenticatedEvent;

Modules§

events
Authenticated event stream verification.

Structs§

EpochCache
A cache of validator committees indexed by epoch.
LightClient
A light client that authenticates state against a trusted validator committee.
RatchetConfig
Configuration for the committee ratchet driver.

Enums§

CheckpointObjectProof
The authenticated outcome of LightClient::prove_object_at_checkpoint.
LightClientError
Errors returned by the crate::light_client APIs.

Functions§

ratchet_to_checkpoint
Advance cache forward so that it covers target_seq, with the default RatchetConfig and no archive endpoint.
ratchet_to_checkpoint_with_config
Advance cache forward so that it covers target_seq.