Skip to content

Commit

Permalink
Merge pull request #313 from hyperledger-labs/audit-202409-ibc-14
Browse files Browse the repository at this point in the history
IBC-14: clarify which sequence commitments are stored

Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele authored Dec 4, 2024
2 parents 9759e51 + 6321e35 commit 4a6f4c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/core/04-channel/IBCChannelHandshake.sol
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ contract IBCChannelHandshake is IBCModuleManager, IIBCChannelHandshake, IIBCChan
channelStorage.nextSequenceRecv = 1;
channelStorage.nextSequenceAck = 1;
channelStorage.recvStartSequence.sequence = 1;

// Differ from the ICS-004 spec, we only store the commitment of the next sequence recv.
// This is because, in the current spec, the next sequence send and ack are not needed for the verification on the counterparty chain.
getCommitments()[IBCCommitment.nextSequenceRecvCommitmentKey(portId, channelId)] =
keccak256(abi.encodePacked((bytes8(uint64(1)))));
}
Expand Down

0 comments on commit 4a6f4c9

Please sign in to comment.