Skip to content

IBC Spec: Byte separators swapped in receiptPath and acknowledgementPath function definitions #25791

@gjermundgaraba

Description

@gjermundgaraba

WARNING: Issue found by AI, but it seems to be correct from what I can tell.

File: spec/IBC_V2/core/ics-004-packet-semantics/PACKET.md

Issue: The receiptPath and acknowledgementPath function definitions have their byte separators swapped compared to the spec's own summary table and both reference implementations.

Current (incorrect):

func acknowledgementPath(packet: Packet)

{
  return packet.destClientId + byte(0x02) + bigEndian(packet.Sequence)
}
func receiptPath(packet: Packet) {
  return packet.destClientId + byte(0x03) + bigEndian(packet.Sequence)
}

Should be:

func acknowledgementPath(packet: Packet) {
  return packet.destClientId + byte(0x03) + bigEndian(packet.Sequence)
}
func receiptPath(packet: Packet) {
  return packet.destClientId + byte(0x02) + bigEndian(packet.Sequence)
}

Evidence:

Source Receipt Acknowledgement
Spec table (same file) 0x02 0x03
Spec functions (incorrect) 0x03 0x02
ibc-go (https://github.com/cosmos/ibc-go/blob/b31bf93497938b9b12d47293cb529618a62550cc/modules/core/24-host/v2/packet_keys.go#L10-L14) byte(2) byte(3)
solidity-ibc-eureka (https://github.com/cosmos/solidity-ibc-eureka/blob/2aaf99ee34b004fed8450eab244a50425a5a36b8/contracts/utils/ICS24Host.sol#L38-L58) uint8(2) uint8(3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions