@@ -5,7 +5,7 @@ stage: draft
5
5
category : IBC/TAO
6
6
kind : instantiation
7
7
implements : 2
8
- version compatibility : ibc-go v7.0 .0
8
+ version compatibility : ibc-go v7.3 .0
9
9
author :
Christopher Goes <[email protected] >
10
10
created : 2019-12-09
11
11
modified : 2019-12-09
@@ -25,6 +25,10 @@ Solo machine clients are roughly analogous to "implicit accounts" and can be use
25
25
26
26
Functions & terms are as defined in [ ICS 2] ( ../../core/ics-002-client-semantics ) .
27
27
28
+ ` getCommitmentPrefix ` is as defined in [ ICS 24] ( ../../core/ics-024-host-requirements ) .
29
+
30
+ ` removePrefix ` is as defined in [ ICS 23] ( ../../core/ics-023-vector-commitments ) .
31
+
28
32
### Desired properties
29
33
30
34
This specification must satisfy the client interface defined in [ ICS 2] ( ../../core/ics-002-client-semantics ) .
@@ -270,11 +274,18 @@ function verifyMembership(
270
274
// the expected sequence used in the signature
271
275
abortTransactionUnless (! clientState .frozen )
272
276
abortTransactionUnless (proof .timestamp >= clientState .consensusState .timestamp )
277
+
278
+ // path is prefixed with the store prefix of the commitment proof
279
+ // e.g. in ibc-go implementation this is "ibc"
280
+ // since solomachines do not use multi-stores, the prefix needs
281
+ // to be removed from the path to retrieve the correct key in the
282
+ // solomachine store
283
+ unprefixedPath = removePrefix (getCommitmentPrefix (), path )
273
284
signBytes = SignBytes (
274
285
sequence : clientState .sequence ,
275
286
timestamp : proof .timestamp ,
276
287
diversifier : clientState .consensusState .diversifier ,
277
- path : path . String () ,
288
+ path : unprefixedPath ,
278
289
data : value ,
279
290
)
280
291
proven = checkSignature (clientState .consensusState .publicKey , signBytes , proof .sig )
@@ -308,11 +319,18 @@ function verifyNonMembership(
308
319
): Error {
309
320
abortTransactionUnless (! clientState .frozen )
310
321
abortTransactionUnless (proof .timestamp >= clientState .consensusState .timestamp )
322
+
323
+ // path is prefixed with the store prefix of the commitment proof
324
+ // e.g. in ibc-go implementation this is "ibc"
325
+ // since solomachines do not use multi-stores, the prefix needs
326
+ // to be removed from the path to retrieve the correct key in the
327
+ // solomachine store
328
+ unprefixedPath = removePrefix (getCommitmentPrefix (), path )
311
329
signBytes = SignBytes (
312
330
sequence : clientState .sequence ,
313
331
timestamp : proof .timestamp ,
314
332
diversifier : clientState .consensusState .diversifier ,
315
- path : path . String () ,
333
+ path : unprefixedPath ,
316
334
data : nil ,
317
335
)
318
336
proven = checkSignature (clientState .consensusState .publicKey , signBytes , proof .sig )
@@ -354,6 +372,7 @@ Not applicable. Alterations to the client verification algorithm will require a
354
372
December 9th, 2019 - Initial version
355
373
December 17th, 2019 - Final first draft
356
374
August 15th, 2022 - Changes to align with 02-client-refactor in [ \# 813] ( https://github.com/cosmos/ibc/pull/813 )
375
+ September 14th, 2022 - Changes to align with changes in [ \# 4429] ( https://github.com/cosmos/ibc-go/pull/4429 )
357
376
358
377
## Copyright
359
378
0 commit comments