localhost 客户端通过 LightClientModule 接口中的 VerifyMembership 和 VerifyNonMembership 方法执行状态验证,其方式是直接对核心 IBC 存储进行只读操作。 在握手过程中验证通道状态或处理数据包时,09-localhost 客户端只需比较存储在 ICS-24 定义的标准化键路径下的字节。 对于通过 VerifyMembership 进行的存在性证明,09-localhost 客户端会读取给定键路径下存储的值,并将其与调用方提供的值进行比较。相对地,通过 VerifyNonMembership 进行的不存在性证明会断言给定键路径下不存在值。 中继器在发送 IBC 消息时应提供一个哨兵证明。核心 IBC 消息处理中不允许提交 nil 或空证明。 09-localhost 轻客户端模块将 SentinelProof 定义为单个字节。如果未提供该哨兵证明值,localhost 客户端的状态验证将失败。
var SentinelProof = []byte{0x01
}
09-localhost 的 ClientState 是无状态的,因此不能直接通过 VerifyMembership 或 VerifyNonMembership 进行证明。
The localhost client handles state verification through the LightClientModule interface methods VerifyMembership and VerifyNonMembership by performing read-only operations directly on the core IBC store. When verifying channel state in handshakes or processing packets the 09-localhost client can simply compare bytes stored under the standardized key paths defined by ICS-24. For existence proofs via VerifyMembership the 09-localhost client will retrieve the value stored under the provided key path and compare it against the value provided by the caller. In contrast, non-existence proofs via VerifyNonMembership assert the absence of a value at the provided key path. Relayers are expected to provide a sentinel proof when sending IBC messages. Submission of nil or empty proofs is disallowed in core IBC messaging. The 09-localhost light client module defines a SentinelProof as a single byte. Localhost client state verification will fail if the sentinel proof value is not provided.
var SentinelProof = []byte{0x01
}
The ClientState of 09-localhost is stateless, so it is not directly provable with VerifyMembership or VerifyNonMembership.