Light Client
Light Client is a blockchain client that verifies the headers of a target blockchain. Unlike a full node, it does not execute all transactions of the blocks but only verifies the headers, thus requiring fewer resources.
In general, Light Client has the following functions:
- initializeClient: This function creates the initial state of the Light Client using a trusted header and security parameters of the target chain. Since this initial header cannot be verified, it is "trusted". Common security parameters include the trusting period, which is often used to prevent PoS long-range attacks.
- updateClient: This function transitions the state of the Light Client to a new state when verification of the target chain’s header succeeds, using the current Light Client state and the chain’s header as input. The state includes the chain’s height and the state root value obtained from the header.
- verifyMembership: This function verifies the state of the target chain based on the Light Client’s state at a certain height. In most cases, the state of a chain can be represented as key-value storage, and the target for verification is the existence proof of the (key, value) pair that makes up the chain’s state. In some cases, a non-existence proof of the pair may be used (e.g., IBC’s Packet Timeout).
The specification of each Light Client differs for each blockchain and its consensus protocol. The ICS-02 of IBC defines a standard interface for the above functions. In LCP, the Enclave Light Client (ELC), which runs the Light Client within Enclave, supports the ICS-02-based Light Client specification.