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 client | Description | Condition 1 | Condition 2 | Condition 3 |
|---|---|---|---|---|---|
| 1 | Optional | Update only when no compatible checkpoint exists | Trick the relayer into believing the transition never took place | — | — |
| 2 | Every transaction | Update on every message | Trick the relayer into believing the transition never took place | No tx during the transition | — |
| 3 | Every transaction & Interval | Update on every message and per fixed interval | Trick the relayer into believing the transition never took place | No tx during the transition | Transition 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