From 76b39526ec469015bdc4f238bc755c6d0c500dad Mon Sep 17 00:00:00 2001 From: leopardracer <136604165+leopardracer@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:40:05 +0300 Subject: [PATCH 1/4] Update client-validation-removal.md --- .../ics-003-connection-semantics/client-validation-removal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/core/ics-003-connection-semantics/client-validation-removal.md b/spec/core/ics-003-connection-semantics/client-validation-removal.md index d1d764cbb..ff0996943 100644 --- a/spec/core/ics-003-connection-semantics/client-validation-removal.md +++ b/spec/core/ics-003-connection-semantics/client-validation-removal.md @@ -17,7 +17,7 @@ Without this check, it is possible in very unlucky circumstances to have two cha While it is beneficial that misconfigured connection attempts are blocked from completing, the client validation in the connection handshake introduced a lot of problems for the upgradability and flexibility of the protocol. - Not all chains have the ability to introspect their own consensus, specifically their own consensus history which is required to validate a counterparty's previous consensus state. -- Explicit verification of a counterparty client state and consensus state makes adding new implementions of the same consensus difficult since the validation of any new client implementations must be supported on the counterparty you want to use it with. Thus, the structure of `ClientState` and `ConsensusState` is very difficult to change without interchain coordination. +- Explicit verification of a counterparty client state and consensus state makes adding new implementations of the same consensus difficult since the validation of any new client implementations must be supported on the counterparty you want to use it with. Thus, the structure of `ClientState` and `ConsensusState` is very difficult to change without interchain coordination. - Similarly, the proofs rely on ICS24 paths for the `ClientState` and `ConsensusState`. Thus, changing the key paths to a more efficient representation is very difficult without interchain coordination. ## Social Consensus From 924c4d0669e572178b9af2d6f5f1d6cca5501880 Mon Sep 17 00:00:00 2001 From: leopardracer <136604165+leopardracer@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:41:36 +0300 Subject: [PATCH 2/4] Update PACKET.md --- spec/IBC_V2/core/ics-004-packet-semantics/PACKET.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/IBC_V2/core/ics-004-packet-semantics/PACKET.md b/spec/IBC_V2/core/ics-004-packet-semantics/PACKET.md index 6a0a2f3e6..afdf174c3 100644 --- a/spec/IBC_V2/core/ics-004-packet-semantics/PACKET.md +++ b/spec/IBC_V2/core/ics-004-packet-semantics/PACKET.md @@ -60,7 +60,7 @@ In version 2 of the IBC specification, implementations **MAY** support multiple Each payload will include its own `Encoding` and `AppVersion` that will be sent to the application to instruct it how to decode and interpret the opaque application data. The application must be able to support the provided `Encoding` and `AppVersion` in order to process the `AppData`. If the receiving application does not support the encoding or app version, then the application **must** return an error to IBC core. If the receiving application does support the provided encoding and app version, then the application must decode the application as specified by the `Encoding` string and then process the application as expected by the counterparty given the agreed-upon app version. Since the `Encoding` and `AppVersion` are now in each packet they can be changed on a per-packet basis and an application can simultaneously support many encodings and app versions from a counterparty. This is in stark contrast to IBC version 1 where the channel prenegotiated the channel version (which implicitly negotiates the encoding as well); so that changing the app version after channel opening is very difficult. -All implementations must commit the packet in the standardized IBC commitment format to satisfy the protocol. In order to do this we must first commit the packet data and timeout. The timeout is encoded in LittleEndian format. The packet data which is a list of payloads is committed to by hashing each individual field of the payload and successively concatenating them together. This ensures a standard unambigious commitment for a given packet. Thus a given packet will always create the exact same commitment by all compliant implementations and two different packets will never create the same commitment by a compliant implementation. This commitment value is then stored under the standardized provable packet commitment key as defined below: +All implementations must commit the packet in the standardized IBC commitment format to satisfy the protocol. In order to do this we must first commit the packet data and timeout. The timeout is encoded in LittleEndian format. The packet data which is a list of payloads is committed to by hashing each individual field of the payload and successively concatenating them together. This ensures a standard unambiguous commitment for a given packet. Thus a given packet will always create the exact same commitment by all compliant implementations and two different packets will never create the same commitment by a compliant implementation. This commitment value is then stored under the standardized provable packet commitment key as defined below: ```typescript func packetCommitmentPath(packet: Packet): bytes { From a37056d9d3a612c135a7a18bbfd426119bc326f5 Mon Sep 17 00:00:00 2001 From: leopardracer <136604165+leopardracer@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:44:16 +0300 Subject: [PATCH 3/4] Update README.md --- spec/IBC_V2/core/ics-026-application-callbacks/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/IBC_V2/core/ics-026-application-callbacks/README.md b/spec/IBC_V2/core/ics-026-application-callbacks/README.md index 04a607c96..07c19390e 100644 --- a/spec/IBC_V2/core/ics-026-application-callbacks/README.md +++ b/spec/IBC_V2/core/ics-026-application-callbacks/README.md @@ -77,7 +77,7 @@ NOTE: IBC v2 allows multiple payloads coming from multiple applications to be se #### WriteAcknowledgement -The IBC core handler MAY expose the following function signature to the ICS26 applications registed on the port router, so that the application can write acknowledgements asynchronously. +The IBC core handler MAY expose the following function signature to the ICS26 applications registered on the port router, so that the application can write acknowledgements asynchronously. This is only necessary if the implementation supports processing packets asynchronously. In this case, an application may process the packet asynchronously from when the IBC core handler receives the packet. Thus, the acknowledgement cannot be returned as part of the `OnRecvPacket` callback and must be submitted to the core IBC handler by the ICS26 application at a later time. Thus, we must introduce a new endpoint on the IBC handler for the ICS26 application to call when it is done processing a receive packet and wants to write the acknowledgement. @@ -98,7 +98,7 @@ WriteAcknowledgement Postconditions: - If the acknowledgement is successful, then all receiving applications must have executed their recvPacket logic and written state - If the acknowledgement is unsuccessful (ie ERROR ACK), any state changes made by the receiving applications MUST all be reverted. This ensure atomic execution of the multi-payload packet. -NOTE: In the case that the packet contained multiple payloads, the IBC core handler MUST wait for all applications to return their individual acknowledgements for the packet before commiting the acknowledgment. If ANY application returns the error acknowledgement, then the acknowledgement for the entire packet only contains the `ERROR_SENTINEL_ACKNOWLEDGEMENT`. Otherwise, the acknowledgment is a list containing each applications individual acknowledgment in the same order that their associated payload existed in the packet. +NOTE: In the case that the packet contained multiple payloads, the IBC core handler MUST wait for all applications to return their individual acknowledgements for the packet before committing the acknowledgment. If ANY application returns the error acknowledgement, then the acknowledgement for the entire packet only contains the `ERROR_SENTINEL_ACKNOWLEDGEMENT`. Otherwise, the acknowledgment is a list containing each applications individual acknowledgment in the same order that their associated payload existed in the packet. ### ICS26 Interface Exposed to Core Handler From 32731e743d0553ce19d8ce9bd14a3031bc096e8c Mon Sep 17 00:00:00 2001 From: leopardracer <136604165+leopardracer@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:45:46 +0300 Subject: [PATCH 4/4] Update README.md --- spec/IBC_V2/core/ics-024-host-requirements/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/IBC_V2/core/ics-024-host-requirements/README.md b/spec/IBC_V2/core/ics-024-host-requirements/README.md index 32a913cc6..c9635c435 100644 --- a/spec/IBC_V2/core/ics-024-host-requirements/README.md +++ b/spec/IBC_V2/core/ics-024-host-requirements/README.md @@ -101,7 +101,7 @@ Future paths may be used in future versions of the protocol, so the entire key-s | Packet Receipt | {destClientId}0x2{bigEndianUint64Sequence} | | Acknowledgement Commitment | {destClientId}0x3{bigEndianUint64Sequence} | -IBC V2 only proves commitments related to packet handling, thus the commitments and how to construct them are specifed in [ICS-4](../ics-004-packet-semantics/PACKET.md). +IBC V2 only proves commitments related to packet handling, thus the commitments and how to construct them are specified in [ICS-4](../ics-004-packet-semantics/PACKET.md). As mentioned above, the provable path space controlled by the IBC handler may be prefixed in a global provable key/value store. In this case, the prefix must be appended by the IBC handler before the proof is verified. @@ -113,7 +113,7 @@ In the case, the state machine does not support `NonMembership` proofs; a client The state machine MUST make updates sequentially so that all state updates happen in order and can be associated with a unique `Height` in that order. Each state update at a height `h` MUST be eventually **finalized** at a finite timestamp `t` such that the order of state updates from the initial state up to `h` will never change after time `t`. -IBC handlers will only accept packet-flow messages from state updates which are already deemed to be finalized. In cases where the finality property is probabilistically guaranteed, this probabilitic guarantee must be handled within the ICS-2 client in order to provide a final view of the remote state machine for the ICS-4 packet handler. +IBC handlers will only accept packet-flow messages from state updates which are already deemed to be finalized. In cases where the finality property is probabilistically guaranteed, this probabilistic guarantee must be handled within the ICS-2 client in order to provide a final view of the remote state machine for the ICS-4 packet handler. ### Time