Overview
The objective of the light client protocol is to get a commit for a recent block hash where the commit includes a majority of signatures from the last known validator set. From there, all the application state is verifiable with merkle proofs.Properties
- You get the full collateralized security benefits of CometBFT; no need to wait for confirmations.
- You get the full speed benefits of CometBFT; transactions commit instantly.
- You can get the most recent version of the application state non-interactively (without committing anything to the blockchain). For example, this means that you can get the most recent value of a name from the name-registry without worrying about fork censorship attacks, without posting a commit and waiting for confirmations. It’s fast, secure, and free!
Where to obtain trusted height & hash
Trust Options One way to obtain semi-trusted hash & height is to query multiple full nodes and compare their hashes:Running a light client as an HTTP proxy server
CometBFT comes with a built-incometbft light command, which can be used
to run a light client proxy server, verifying CometBFT RPC. All calls that
can be tracked back to a block header by a proof will be verified before
passing them back to the caller. Other than that, it will present the same
interface as a full CometBFT node.
You can start the light client proxy server by running cometbft light <chainID>,
with a variety of flags to specify the primary node, the witness nodes (which cross-check
the information provided by the primary), the hash and height of the trusted header,
and more.
For example:
cometbft light --help.