DOCS / GET STARTED / LIGHT CLIENT

Light client

The light client cryptographically verifies the chain header sequence without storing the full state or executing transactions. It's the right choice for SDKs, mobile clients, bridge relayers, and explorers that want a trustless tip — at a fraction of the resource cost of a full node.

Status

PhaseStatusWhat it covers
Phase 1✅ DoneHeader sync + Ed25519 signature verification against trusted genesis validator set. Supports header v3 and v4 (view-change).
Phase 2⏳ PlannedCheckpoint-based fast bootstrap — skip the initial header replay, start from a recent quorum-signed snapshot.
Phase 3⏳ PlannedMerkle-proof-authenticated state queries — verify balances and receipts without trusting the RPC's response.

How verification works

The light client maintains a TrustedState:

For each new header from the RPC, it verifies:

  1. previous_hash matches the trusted hash at height - 1.
  2. The leader's Ed25519 signature over height || previous_hash.
  3. The leader_pubkey belongs to a validator in the trusted active set.
  4. If view ≥ 1: the embedded new_view_qc has 2f+1 distinct valid signatures from active validators over the QC payload (per-signer lock).
  5. If justify_qc.is_some(): parent's QC is valid and signed by the active set at the parent's epoch.

On epoch boundary, the trusted set rotates. The new set is read from the next header's chain — when at least 2f+1 signatures over the new set come in, the light client adopts it.

Run the light client

Download the binary from the homepage, then:

# 1. Bootstrap from genesis (or a trusted recent checkpoint)
./shardo-light \
    --rpc-url /rpc \
    --chain-id 590 \
    --genesis path/to/genesis-testnet.json \
    --data-dir ./light-data \
    sync

The binary persists its trusted state to light-data/trusted_state.json so subsequent runs resume from the last verified header.

Trust model

You must trust:

You do not need to trust:

Use cases

Library API

The light client is also published as the shardo-light Rust crate:

use shardo_light::{LightClient, LightConfig, FileStore};

let config = LightConfig::testnet()
    .with_rpc("/rpc")
    .with_chain_id(590);

let store = FileStore::open("./light-data")?;
let mut client = LightClient::new(config, store);
client.sync_to_tip().await?;
println!("verified tip: {}", client.trusted_height());

See the JSON-RPC API for the full set of methods the light client wraps.