Closed michwqy closed 1 year ago
@michwqy Thanks for your question.
According to ICS-04, the commitment for acknowledgment is hash(acknowledgement)
, which is a non-zero value. The implementation is here: https://github.com/hyperledger-labs/yui-ibc-solidity/blob/v0.3.17/contracts/core/04-channel/IBCPacket.sol#L221
Therefore, even if the relayer submits a non-existence proof of commitment, the attempt fails because the corresponding acknowledgment cannot be given.
I'm not sure if I understand correctly. Assume the commit path like path = acks/p1/ch1/s1
, thus commitments[path] = 0
before the acknowledgement is written. Let the storage location is S
, the relayer can get the proof where key is S
, and value is 0. But the relayer can't construct the acknowledgement
where sha256(acknowledgement) = 0
(maybe keccak256((sha256(acknowledgement))) = 0
). Thus relayer can't submit a acknowledgement that can pass the proof. Is my understanding right?
@michwqy Thanks for the clarification. Yes, you are right.
Thanks. I will close this issue.
As said in this,
Path of commitment and slot are used to calculate the storage location, which is the key in state trie of Ethereum. But according to the code,
The default value of the storage location is zero.
I want to know if the relayer can claim that the value on the storage path is zero before the acknowledgement is written and obtain corresponding proof (like the key of proof is the storage location and the value is zero)? If it is possible, something wrong will happen in function
onAcknowledgementPacket
inapp/20-transfer
. Because zero is not equal toICS20Lib.KECCAK256_SUCCESSFUL_ACKNOWLEDGEMENT_JSON
.