-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICS 23 Implementation #4515
ICS 23 Implementation #4515
Changes from all commits
9375649
16eea68
f73215e
cf0b8f2
e25f652
2b17a39
dc84e1e
19d7155
6764bc4
8affaa7
a7898b4
afcca90
d29b601
dd86fa9
6aad15f
088836d
cd6f1f2
d0777cd
df8c05e
47c33f0
12ef402
03d5d17
0b79b1d
7046953
3939bd4
db93a8a
37387bf
f609249
7da69c1
600445a
98720bb
cdee396
ce588a4
39dca11
94e2cdc
8d9e779
92d0fb4
d896152
f70d3bd
5d913b7
699b0ba
323818f
9a077eb
a4a20d6
a9adb58
abb2f51
361aa42
97edd89
23debb9
24e621a
64c0381
971a642
2968dd3
fcad487
3142d4b
6de0ed5
05d39a1
6dc912f
63c6f3c
b6441c0
4d723ae
244d2c2
7bf4d57
7471bdf
3c86363
32cb0ca
71d2620
04543f8
59d2b3e
10d1c46
09e6600
6f5f633
4116bb7
8040c81
48bb32d
9b63a6b
828badd
a59d1e7
9f63629
6b966a3
21bd8d0
af2564b
303ebf3
9b3b120
18f8d70
df5b21a
7afe221
1ac982c
fa04419
db8d382
a7d2d98
1b7e466
c09a84c
a1c22e9
d3a533a
7ba777e
499abb4
a925d88
53f5fad
c12c298
a34b741
bf4f096
386489b
40fca1a
f8fd580
cbc1106
f8d99ca
23ae994
e1fa5f8
2edb03f
5783b03
696db2e
69db1f2
33312c2
49d08e3
5239720
d1f71dd
0a461b5
dac68df
a74ebf3
17abbda
820482f
7c67236
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package commitment | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
) | ||
|
||
// RegisterCodec registers types declared in this package | ||
func RegisterCodec(cdc *codec.Codec) { | ||
fedekunze marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cdc.RegisterInterface((*RootI)(nil), nil) | ||
cdc.RegisterInterface((*PrefixI)(nil), nil) | ||
cdc.RegisterInterface((*PathI)(nil), nil) | ||
cdc.RegisterInterface((*ProofI)(nil), nil) | ||
|
||
cdc.RegisterConcrete(Root{}, "ibc/commitment/merkle/Root", nil) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ICS23 is supposed to be a generic format, not just for the sdk, but also for agoric (js), for rust chains (polkadot), etc. As there is no truly cross-language support for go-amino, I wonder about the usage here. Also, the very unclear definition of the pieces ( I can see this approach for a quick prototype, but if you are attempting a 1.0 of something interoperable, there needs to be a clear spec and possibility to implement in other languages. I spent considerable time getting that to work in github.com/confio/ics23 and I wonder why that was not used (not comments left on that repo to explain what was lacking/wrong with that approach)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ethanfrey correct, afaik for the IBC completeness your code should be the one that we’ll need to integrate here. With respect to what was lacking I think @cwgoes created an issue somewhere (not sure if it was here or on the ICS repo) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's right - the plan is to integrate confio/ics23 prior to 1.0.0. - #5199 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that the hackathon has passed, maybe this PR should include confio/ics23? Up to you & the SDK team @fedekunze. |
||
cdc.RegisterConcrete(Prefix{}, "ibc/commitment/merkle/Prefix", nil) | ||
cdc.RegisterConcrete(Path{}, "ibc/commitment/merkle/Path", nil) | ||
cdc.RegisterConcrete(Proof{}, "ibc/commitment/merkle/Proof", nil) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package commitment_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/suite" | ||
|
||
"github.com/cosmos/cosmos-sdk/store/iavl" | ||
"github.com/cosmos/cosmos-sdk/store/rootmulti" | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
|
||
dbm "github.com/tendermint/tm-db" | ||
) | ||
|
||
type MerkleTestSuite struct { | ||
suite.Suite | ||
|
||
store *rootmulti.Store | ||
storeKey *storetypes.KVStoreKey | ||
iavlStore *iavl.Store | ||
} | ||
|
||
func (suite *MerkleTestSuite) SetupTest() { | ||
db := dbm.NewMemDB() | ||
suite.store = rootmulti.NewStore(db) | ||
|
||
suite.storeKey = storetypes.NewKVStoreKey("iavlStoreKey") | ||
|
||
suite.store.MountStoreWithDB(suite.storeKey, storetypes.StoreTypeIAVL, nil) | ||
suite.store.LoadVersion(0) | ||
|
||
suite.iavlStore = suite.store.GetCommitStore(suite.storeKey).(*iavl.Store) | ||
} | ||
|
||
func TestMerkleTestSuite(t *testing.T) { | ||
suite.Run(t, new(MerkleTestSuite)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguements
is a misspelling ofarguments
(frommisspell
)