You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the other hand, IBCPacket uses sha256 + sha256 and MockClient verifyMembership further performs sha256, which always seems to cause an error. In fact, it failed in my environment.
As a tentative response, I was able to prevent the error by modifying MockClient's verifyMembership as follows.
//before
return sha256(value) == proof.toBytes32(0);
//after
bytes32 v = value.toBytes32(0); // for packet
bytes32 s = sha256(value); // for connection and channel
bytes32 p = proof.toBytes32(0);
return s == p; || v == p;
The text was updated successfully, but these errors were encountered:
yoshidan
changed the title
MockClient verifyMembership causes error
MockClient verifyMembership error
Mar 22, 2023
The proof commitment for MsgRecvPacket uses
sha256 + sha256
.yui-ibc-solidity/pkg/relay/ethereum/chain.go
Line 229 in 64b9547
https://github.com/cosmos/ibc-go/blob/12c00ec85c1238a0b9075a14593485c60f0da729/modules/core/04-channel/types/packet.go#L19
On the other hand, IBCPacket uses
sha256
+sha256
and MockClient verifyMembership further performssha256
, which always seems to cause an error. In fact, it failed in my environment.yui-ibc-solidity/contracts/core/04-channel/IBCPacket.sol
Lines 113 to 120 in 64b9547
yui-ibc-solidity/contracts/clients/MockClient.sol
Line 149 in 64b9547
It looks like we should'n use
sha256
forverifyMembership
in MockClient, but it is still an error becausesha256
is used inyui-relayer
for connection and channel.https://github.com/hyperledger-labs/yui-relayer/blob/d4cc52059626e9dd86433dbd78de0c40fba87f5b/provers/mock/prover.go#L159
As a tentative response, I was able to prevent the error by modifying MockClient's
verifyMembership
as follows.The text was updated successfully, but these errors were encountered: