Open toshihiko-okubo opened 1 year ago
When I create a tendermint-client on fabric-ibc chaincode and relay a packet after 10 minutes, The relay fails with an error message like this.
new header has a time from the future 2022-10-05 03:27:12.262279251 +0000 UTC (now: 2022-10-05 03:15:31 +0000 UTC; max clock drift: 10m0s
This is a verification that the Timestamp of the Header is earlier than the sum of the blockTimeStamp of the fabric and MaxClockDrift.
header.timestamp < blockTimestamp + maxClockDrift
https://github.com/tendermint/tendermint/blob/v0.34.10/light/verifier.go#L176
fabric-ibc manages the blockTimestamp in a model called Sequence, and the Sequence must be updated before the UpdateClient is executed to avoid this error. https://github.com/hyperledger-labs/yui-fabric-ibc/blob/v0.2.2/chaincode/chaincode.go#L91
When I create a tendermint-client on fabric-ibc chaincode and relay a packet after 10 minutes, The relay fails with an error message like this.
This is a verification that the Timestamp of the Header is earlier than the sum of the blockTimeStamp of the fabric and MaxClockDrift.
https://github.com/tendermint/tendermint/blob/v0.34.10/light/verifier.go#L176
fabric-ibc manages the blockTimestamp in a model called Sequence, and the Sequence must be updated before the UpdateClient is executed to avoid this error. https://github.com/hyperledger-labs/yui-fabric-ibc/blob/v0.2.2/chaincode/chaincode.go#L91