TrustlessProtocol specLight client

Consensus State Update

Context

Consensus state rarely changes meaningfully, so an old state stays compatible with recent blocks. We can use this for efficiency: verify recent blocks against a much older state and skip the update.

The cost is absolute security. Without updating, the light client can't keep track of major state changes, which exposes us to long-range attack — validators that were honest at our last update turn malicious, transitioning themselves out of source chain's consensus (to avoid slashing) and fork the chain. But in practice this is almost impossible:

  • No record of it ever happening.
  • The permissioned relayer could still prevent the attack.
  • It works only under narrow, rigorous conditions.

To let TMP integrations balance absolute security against performance, we offer several client configurations.

Client Configurations

The configurations trade update frequency against verification cost. We compare them under one worst case: a long-range attack. The table below shows the other conditions need satisfied in order for the attack to be successful

#Update clientDescriptionCondition 1Condition 2Condition 3
1OptionalUpdate only when no compatible checkpoint existsTrick the relayer into believing the transition never took place——
2Every transactionUpdate on every messageTrick the relayer into believing the transition never took placeNo tx during the transition—
3Every transaction & IntervalUpdate on every message and per fixed intervalTrick the relayer into believing the transition never took placeNo tx during the transitionTransition must complete within a single interval

Recommendation

Every case above assumes enough validators break the consensus threshold (highly unlikely, and never happened). Given that, we recommend the simplest configuration: optional update client

On this page