RecoverClient 来处理该提案。
实现 RecoverClient
在 LightClientModule interface 中,可以看到:
- 替代客户端与目标客户端属于相同类型。参考实现请见 Tendermint 轻客户端。
- 提供的替代客户端可用于更新目标客户端。这可能意味着某些参数必须保持不变。例如,一个有效的 Tendermint 替代轻客户端不得更改 chain ID、trust level、max clock drift、unbonding period、proof specs 或 upgrade path。请注意,
AllowUpdateAfterMisbehaviour和AllowUpdateAfterExpiry已被弃用(更多信息参见 ADR 026)。
It is possible to update the client with the state of the substitute client through a governance proposal. This type of governance proposal is typically used to recover an expired or frozen client, as it can recover the entire state and therefore all existing channels built on top of the client.
RecoverClient should be implemented to handle the proposal.
Implementing RecoverClient
In the LightClientModule interface, we find:
- the substitute client is the same type as the subject client. For a reference implementation, please see the Tendermint light client.
- the provided substitute may be used to update the subject client. This may mean that certain parameters must remain unaltered. For example, a valid substitute Tendermint light client must NOT change the chain ID, trust level, max clock drift, unbonding period, proof specs or upgrade path. Please note that
AllowUpdateAfterMisbehaviourandAllowUpdateAfterExpiryhave been deprecated (see ADR 026 for more information).