Skip to main content

sui_rpc/light_client/
mod.rs

1//! Light-client helpers for verifying state against a trusted validator
2//! committee.
3//!
4//! This module composes the pieces that the rest of the crate provides
5//! into a small end-to-end verifier:
6//!
7//! - [`EpochCache`] stores the currently-trusted validator committee and
8//!   remembers each completed epoch as a closed checkpoint range.
9//! - The committee ratchet driver (in a follow-up commit) advances the
10//!   cache forward by fetching and BLS-verifying each epoch's last
11//!   checkpoint summary.
12//! - The high-level `LightClient` (in a follow-up commit) ties together
13//!   the alpha `ProofService` (see [`crate::proto::sui::rpc::v2alpha`]),
14//!   the ratchet, and the OCS proof verifier in
15//!   `sui_sdk_types::proof` to authenticate `ObjectReference`s against
16//!   the network's validator committee end-to-end.
17//!
18//! The whole module is gated on the crate's `unstable` feature.
19
20mod client;
21mod config;
22mod epoch_cache;
23mod error;
24pub mod events;
25mod ratchet;
26mod retry;
27
28pub use client::CheckpointObjectProof;
29pub use client::LightClient;
30pub use config::RatchetConfig;
31pub use epoch_cache::EpochCache;
32pub use error::LightClientError;
33pub use events::AuthenticatedEvent;
34pub use ratchet::ratchet_to_checkpoint;
35pub use ratchet::ratchet_to_checkpoint_with_config;