From 9097d38069b61d1d9ccf4e1be4d1dbad92b48aa7 Mon Sep 17 00:00:00 2001 From: Aditya Sripal Date: Tue, 8 Nov 2022 17:03:06 +0100 Subject: [PATCH 1/3] remove localhost client --- spec/client/ics-009-loopback-client/README.md | 196 ------------------ 1 file changed, 196 deletions(-) delete mode 100644 spec/client/ics-009-loopback-client/README.md diff --git a/spec/client/ics-009-loopback-client/README.md b/spec/client/ics-009-loopback-client/README.md deleted file mode 100644 index 829bb2df3..000000000 --- a/spec/client/ics-009-loopback-client/README.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -ics: 9 -title: Loopback Client -stage: draft -category: IBC/TAO -kind: instantiation -author: Christopher Goes -created: 2020-01-17 -modified: 2020-01-17 -requires: 2 -implements: 2 ---- - -## Synopsis - -This specification describes a loop-back client, designed to be used for interaction over the IBC interface with modules present on the same ledger. - -### Motivation - -Loop-back clients may be useful in cases where the calling module does not have prior knowledge of where precisely the destination module lives and would like to use the uniform IBC message-passing interface (similar to `127.0.0.1` in TCP/IP). - -### Definitions - -Functions & terms are as defined in [ICS 2](../../core/ics-002-client-semantics). - -### Desired Properties - -Intended client semantics should be preserved, and loop-back abstractions should be negligible cost. - -## Technical Specification - -### Data structures - -No client state, consensus state, headers, or evidence data structures are required for a loopback client. - -```typescript -type ClientState object - -type ConsensusState object - -type Header object - -type Misbehaviour object -``` - -### Client initialisation - -No initialisation is necessary for a loopback client; an empty state is returned. - -```typescript -function initialise(): ClientState { - return {} -} -``` - -### Validity predicate - -No validity checking is necessary in a loopback client; the function should never be called. - -```typescript -function checkValidityAndUpdateState( - clientState: ClientState, - header: Header) { - assert(false) -} -``` - -### Misbehaviour predicate - -No misbehaviour checking is necessary in a loopback client; the function should never be called. - -```typescript -function checkMisbehaviourAndUpdateState( - clientState: ClientState, - misbehaviour: Misbehaviour) { - return -} -``` - -### State verification functions - -Loop-back client state verification functions simply read the local state. Note that they will need (read-only) access to keys outside the client prefix. - -```typescript -function verifyClientConsensusState( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - clientIdentifier: Identifier, - consensusState: ConsensusState) { - path = applyPrefix(prefix, "consensusStates/{clientIdentifier}") - assert(get(path) === consensusState) -} - -function verifyConnectionState( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - connectionIdentifier: Identifier, - connectionEnd: ConnectionEnd) { - path = applyPrefix(prefix, "connection/{connectionIdentifier}") - assert(get(path) === connectionEnd) -} - -function verifyChannelState( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - portIdentifier: Identifier, - channelIdentifier: Identifier, - channelEnd: ChannelEnd) { - path = applyPrefix(prefix, "ports/{portIdentifier}/channels/{channelIdentifier}") - assert(get(path) === channelEnd) -} - -function verifyPacketData( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - portIdentifier: Identifier, - channelIdentifier: Identifier, - sequence: uint64, - data: bytes) { - path = applyPrefix(prefix, "ports/{portIdentifier}/channels/{channelIdentifier}/packets/{sequence}") - assert(get(path) === commit(data)) -} - -function verifyPacketAcknowledgement( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - portIdentifier: Identifier, - channelIdentifier: Identifier, - sequence: uint64, - acknowledgement: bytes) { - path = applyPrefix(prefix, "ports/{portIdentifier}/channels/{channelIdentifier}/acknowledgements/{sequence}") - assert(get(path) === acknowledgement) -} - -function verifyPacketReceiptAbsence( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - portIdentifier: Identifier, - channelIdentifier: Identifier, - sequence: uint64) { - path = applyPrefix(prefix, "ports/{portIdentifier}/channels/{channelIdentifier}/receipts/{sequence}") - assert(get(path) === nil) -} - -function verifyNextSequenceRecv( - clientState: ClientState, - height: uint64, - prefix: CommitmentPrefix, - proof: CommitmentProof, - portIdentifier: Identifier, - channelIdentifier: Identifier, - nextSequenceRecv: uint64) { - path = applyPrefix(prefix, "ports/{portIdentifier}/channels/{channelIdentifier}/nextSequenceRecv") - assert(get(path) === nextSequenceRecv) -} -``` - -### Properties & Invariants - -Semantics are as if this were a remote client of the local ledger. - -## Backwards Compatibility - -Not applicable. - -## Forwards Compatibility - -Not applicable. Alterations to the client algorithm will require a new client standard. - -## Example Implementation - -Coming soon. - -## Other Implementations - -None at present. - -## History - -2020-01-17 - Initial version - -## Copyright - -All content herein is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). From 6dd2dd0fd5248d0c9d083cf4061066c90673fa28 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 9 Nov 2022 13:28:36 +0100 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f0743365..abba6126e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ - [\#808](https://github.com/cosmos/ibc/pull/808) Fix channel sequence paths in ICS4 - [\#863](https://github.com/cosmos/ibc/pull/863) Fix allowed range for `trustLevel` +- [\#878](https://github.com/cosmos/ibc/pull/878) Removes broken localhost client spec ICS9 ### Improvements From 93c0448d49ba48fd15bf67316a8f1295ba8b1b23 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 14 Nov 2022 14:51:03 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 1561a8a1f..60d82c15d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ All standards at or past the "Draft" stage are listed here in order of their ICS | [6](spec/client/ics-006-solo-machine-client/README.md) | Solo Machine Client | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/06-solomachine) | | [7](spec/client/ics-007-tendermint-client/README.md) | Tendermint Client | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/07-tendermint) | | [8](spec/client/ics-008-wasm-client/README.md) | Wasm Client | Draft | | -| [9](spec/client/ics-009-loopback-client/README.md) | Loopback Client | Draft | | | [10](spec/client/ics-010-grandpa-client/README.md) | GRANDPA Client | Draft | | ### Relayer @@ -71,4 +70,4 @@ All standards at or past the "Draft" stage are listed here in order of their ICS The Interchain Standards are also translated into the following languages: -- [Chinese](https://github.com/octopus-network/ibc-spec-cn) \ No newline at end of file +- [Chinese](https://github.com/octopus-network/ibc-spec-cn)