-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICS 06: updates for cosmos/ibc-go#4429
- Loading branch information
Carlos Rodriguez
committed
Sep 14, 2023
1 parent
727ae4c
commit 1179885
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ stage: draft | |
category: IBC/TAO | ||
kind: instantiation | ||
implements: 2 | ||
version compatibility: ibc-go v7.0.0 | ||
version compatibility: ibc-go v7.3.0 | ||
author: Christopher Goes <[email protected]> | ||
created: 2019-12-09 | ||
modified: 2019-12-09 | ||
|
@@ -25,6 +25,10 @@ Solo machine clients are roughly analogous to "implicit accounts" and can be use | |
|
||
Functions & terms are as defined in [ICS 2](../../core/ics-002-client-semantics). | ||
|
||
`getCommitmentPrefix` is as defined in [ICS 24](../../core/ics-024-host-requirements). | ||
|
||
`removePrefix` is as defined in [ICS 23](../../core/ics-023-vector-commitments). | ||
|
||
### Desired properties | ||
|
||
This specification must satisfy the client interface defined in [ICS 2](../../core/ics-002-client-semantics). | ||
|
@@ -270,11 +274,18 @@ function verifyMembership( | |
// the expected sequence used in the signature | ||
abortTransactionUnless(!clientState.frozen) | ||
abortTransactionUnless(proof.timestamp >= clientState.consensusState.timestamp) | ||
|
||
// path is prefixed with the store prefix of the commitment proof | ||
// e.g. in ibc-go implementation this is "ibc" | ||
// since solomachines do not use multi-stores, the prefix needs | ||
// to be removed from the path to retrieve the correct key in the | ||
// solomachine store | ||
unprefixedPath = removePrefix(getCommitmentPrefix(), path) | ||
signBytes = SignBytes( | ||
sequence: clientState.sequence, | ||
timestamp: proof.timestamp, | ||
diversifier: clientState.consensusState.diversifier, | ||
path: path.String(), | ||
path: unprefixedPath, | ||
data: value, | ||
) | ||
proven = checkSignature(clientState.consensusState.publicKey, signBytes, proof.sig) | ||
|
@@ -308,11 +319,18 @@ function verifyNonMembership( | |
): Error { | ||
abortTransactionUnless(!clientState.frozen) | ||
abortTransactionUnless(proof.timestamp >= clientState.consensusState.timestamp) | ||
|
||
// path is prefixed with the store prefix of the commitment proof | ||
// e.g. in ibc-go implementation this is "ibc" | ||
// since solomachines do not use multi-stores, the prefix needs | ||
// to be removed from the path to retrieve the correct key in the | ||
// solomachine store | ||
unprefixedPath = removePrefix(getCommitmentPrefix(), path) | ||
signBytes = SignBytes( | ||
sequence: clientState.sequence, | ||
timestamp: proof.timestamp, | ||
diversifier: clientState.consensusState.diversifier, | ||
path: path.String(), | ||
path: unprefixedPath, | ||
data: nil, | ||
) | ||
proven = checkSignature(clientState.consensusState.publicKey, signBytes, proof.sig) | ||
|
@@ -354,6 +372,7 @@ Not applicable. Alterations to the client verification algorithm will require a | |
December 9th, 2019 - Initial version | ||
December 17th, 2019 - Final first draft | ||
August 15th, 2022 - Changes to align with 02-client-refactor in [\#813](https://github.com/cosmos/ibc/pull/813) | ||
September 14th, 2022 - Changes to align with changes in [\#4429](https://github.com/cosmos/ibc-go/pull/4429) | ||
|
||
## Copyright | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters