Skip to content
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 03 Implementation #4517

Merged
merged 362 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
362 commits
Select commit Hold shift + click to select a range
b934d57
add test
mossid Jun 13, 2019
2ac7d8c
in progres
mossid Jun 19, 2019
a5d86b7
fin rebase
mossid Jun 25, 2019
acd44f3
in progress
mossid Jun 25, 2019
582fd6d
fin rebase
mossid Jun 25, 2019
cb3081d
add CLIObject in progress
mossid Jun 25, 2019
e48fd1c
cli in progress
mossid Jun 26, 2019
a372f56
add CLIObject
mossid Jun 26, 2019
67b1d73
separate testing from tendermint
mossid Jun 26, 2019
ee95a83
add key to node
mossid Jun 26, 2019
b6865aa
add root and storekey to tests/node, add codec
mossid Jun 26, 2019
631b72d
rm cli/query.go
mossid Jul 7, 2019
b9d8929
fix test
mossid Jul 7, 2019
dbd6b83
fix lint
mossid Jul 7, 2019
f6e5f90
fix lint
mossid Jul 7, 2019
892a120
add handler/msgs/client
mossid Jul 9, 2019
dce1148
rm relay
mossid Jul 9, 2019
26e8038
finalize rebase on 23 root/path sep
mossid Jul 11, 2019
812bea4
fix lint, fix syntax
mossid Jul 11, 2019
176c8ce
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Jul 13, 2019
00df063
fix querying
mossid Jul 13, 2019
19321f1
extract out context withstore
mossid Jul 13, 2019
486e862
fix 02-client test
mossid Jul 13, 2019
67a3e1b
fix 23-commitment test
mossid Jul 13, 2019
8e660ea
add query in progress
mossid Jul 15, 2019
dbd47aa
rm freebase, reformat query
mossid Jul 15, 2019
2369a7c
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Jul 15, 2019
5584ceb
add cli/handler/msg in progress
mossid Jul 15, 2019
503a399
add cli/msg/handler
mossid Jul 17, 2019
3351a6a
add CLIQuery, fix tests
mossid Jul 17, 2019
bed5276
fix golangci
mossid Jul 18, 2019
f609249
add docs in progre
mossid Jul 24, 2019
7da69c1
add comments
mossid Jul 25, 2019
600445a
add comments
mossid Jul 25, 2019
98720bb
Apply suggestions from code review
mossid Jul 25, 2019
cdee396
add comments in progress
mossid Jul 25, 2019
ce588a4
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Jul 25, 2019
39dca11
Merge branch 'joon/ics-23-implementation' of github.com:cosmos/cosmos…
mossid Jul 25, 2019
94e2cdc
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/store…
mossid Jul 26, 2019
8d9e779
add comments
mossid Jul 26, 2019
92d0fb4
fix comment
mossid Jul 26, 2019
d896152
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Jul 26, 2019
f70d3bd
add comments in progress
mossid Jul 27, 2019
5d913b7
recover IntEncoding scheme for integer
mossid Jul 29, 2019
699b0ba
add uint tests, don't use codec in custom types
mossid Jul 29, 2019
323818f
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Jul 29, 2019
9a077eb
finalize merge
mossid Jul 29, 2019
a4a20d6
add godoc
mossid Jul 30, 2019
02a9ba5
add godoc in progress
mossid Jul 30, 2019
a9adb58
reformat test
mossid Jul 30, 2019
abb2f51
rm XXX
mossid Jul 30, 2019
361aa42
add godoc
mossid Jul 30, 2019
97edd89
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/store…
mossid Jul 30, 2019
23debb9
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Jul 30, 2019
b0ca51a
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Jul 30, 2019
54a67b0
modify store
mossid Jul 31, 2019
24e621a
add query
mossid Jul 31, 2019
64c0381
update query.go
mossid Jul 31, 2019
971a642
update query.go
mossid Jul 31, 2019
2968dd3
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Jul 31, 2019
6be03df
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Jul 31, 2019
e7f6708
cli refactor in progress
mossid Jul 31, 2019
0d134d5
cli refactor in progress
mossid Jul 31, 2019
fcad487
add Query to boolean.go
mossid Aug 1, 2019
3142d4b
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Aug 1, 2019
6de0ed5
fix key
mossid Aug 1, 2019
05d39a1
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Aug 1, 2019
811b384
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Aug 1, 2019
62b7d75
fix cli / merkle test
mossid Aug 1, 2019
d6fabbd
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Aug 1, 2019
6dc912f
godoc cleanup
alexanderbez Aug 7, 2019
63c6f3c
godoc cleanup
alexanderbez Aug 7, 2019
b6441c0
godoc cleanup
alexanderbez Aug 7, 2019
4d723ae
godoc cleanup
alexanderbez Aug 7, 2019
244d2c2
godoc cleanup
alexanderbez Aug 7, 2019
7286fed
fix test
mossid Aug 14, 2019
f81d7b4
fix client
mossid Aug 14, 2019
7bf4d57
merge from ics04 branch
mossid Aug 15, 2019
7471bdf
Merge branch 'joon/store-mapping' of github.com:cosmos/cosmos-sdk int…
mossid Aug 15, 2019
3c86363
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Aug 15, 2019
32cb0ca
merge from ics04 branch
mossid Aug 15, 2019
af260c8
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Aug 15, 2019
17f18d7
merge from ics04 branch
mossid Aug 15, 2019
8b876ba
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Aug 15, 2019
e1abf49
merge from ics04 branch
mossid Aug 15, 2019
71d2620
fix lint
mossid Aug 15, 2019
073a67a
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Aug 15, 2019
eb7f614
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Aug 15, 2019
04543f8
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/store…
mossid Sep 2, 2019
59d2b3e
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Sep 2, 2019
6d1088f
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Sep 2, 2019
6299864
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Sep 2, 2019
10d1c46
Apply suggestions from code review
mossid Sep 10, 2019
09e6600
applying review in progress
mossid Sep 11, 2019
6f5f633
Merge branch 'joon/store-mapping' of github.com:cosmos/cosmos-sdk int…
mossid Sep 11, 2019
4116bb7
apply review - make querier interface
mossid Sep 11, 2019
8040c81
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/store…
mossid Sep 17, 2019
48bb32d
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Sep 17, 2019
9b63a6b
fix dependency
mossid Sep 17, 2019
a7df43c
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Sep 17, 2019
acaaaf2
fix dependency
mossid Sep 17, 2019
c18ba68
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Sep 17, 2019
828badd
revise querier interface to work both on cli & store
mossid Sep 18, 2019
1e64e92
revise querier interface to work both on cli & store
mossid Sep 18, 2019
b4d7491
reflect downstream change
mossid Sep 18, 2019
a59d1e7
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid Sep 18, 2019
bb09ad9
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid Sep 18, 2019
3ba9f9c
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Sep 18, 2019
de1a045
fix cli
mossid Sep 18, 2019
2ef039a
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid Sep 18, 2019
a600589
reflect downstream changes
mossid Sep 18, 2019
9f63629
rm commented lines
mossid Sep 28, 2019
b4e71e1
address review in progress
mossid Sep 28, 2019
3f509ee
address review, rm cleanup/closing
mossid Sep 28, 2019
6b966a3
rename Path -> Prefix
mossid Oct 1, 2019
21bd8d0
Store accessor upstream changes (#5119)
fedekunze Oct 1, 2019
af2564b
Merge branch 'joon/store-mapping' of https://github.com/cosmos/cosmos…
fedekunze Oct 1, 2019
303ebf3
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 1, 2019
9b3b120
Merge branch 'master' into joon/store-mapping
fedekunze Oct 1, 2019
18f8d70
Merge branch 'joon/store-mapping' of https://github.com/cosmos/cosmos…
fedekunze Oct 1, 2019
df5b21a
add comments, reformat merkle querier
mossid Oct 1, 2019
7afe221
Merge branch 'joon/ics-23-implementation' of github.com:cosmos/cosmos…
mossid Oct 1, 2019
1ac982c
rm merkle/utils
mossid Oct 1, 2019
fa04419
ICS 23 upstream changes (#5120)
fedekunze Oct 1, 2019
0d5a317
downstream changes
fedekunze Oct 1, 2019
db8d382
update Value
fedekunze Oct 1, 2019
02b31a5
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 1, 2019
4d518f2
update test
fedekunze Oct 1, 2019
8a3e5ea
fix
fedekunze Oct 1, 2019
9975a1d
ICS 02 upstream changes (#5122)
fedekunze Oct 1, 2019
ffc6918
merge ICS 02
fedekunze Oct 1, 2019
11bdbd7
ICS 03 upstream changes (#5123)
fedekunze Oct 1, 2019
cc404a0
cleanup types and submodule
fedekunze Oct 2, 2019
d93a0ae
more cleanup and godocs
fedekunze Oct 2, 2019
9b6afe9
remove counterPartyManager/State and cleanup
fedekunze Oct 2, 2019
c8a0ab4
implement SubmitMisbehaviour and refactor
fedekunze Oct 2, 2019
4483182
errors
fedekunze Oct 4, 2019
23fbb5d
events
fedekunze Oct 4, 2019
ebecbce
fix test
fedekunze Oct 4, 2019
0e85ed0
refactors
fedekunze Oct 4, 2019
03574cb
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 7, 2019
f16d6e9
WIP refactor ICS03
fedekunze Oct 7, 2019
a7d2d98
remove Mapping
fedekunze Oct 7, 2019
1b7e466
remove store accessors
fedekunze Oct 7, 2019
c09a84c
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 7, 2019
99c586b
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 7, 2019
02bd6f7
proposed refactor
fedekunze Oct 7, 2019
0e37d75
remove store accessors from ICS02
fedekunze Oct 7, 2019
8dec96f
refactor queriers, handler and clean keeper
fedekunze Oct 8, 2019
83f4c1b
logger and tx long description
fedekunze Oct 8, 2019
178912f
ineffassign
fedekunze Oct 8, 2019
c4617e0
merge ICS02
fedekunze Oct 8, 2019
9a225e9
Apply suggestions from code review
fedekunze Oct 8, 2019
fe7da5f
Apply suggestions from code review
fedekunze Oct 8, 2019
c8ff483
remove store accessors
fedekunze Oct 8, 2019
8bcf17f
refactor handshake to update it to the latest ICS03 spec
fedekunze Oct 9, 2019
3df5378
update handler and msgs
fedekunze Oct 9, 2019
21f7d2c
add verification functions
fedekunze Oct 9, 2019
4e9d2bb
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 9, 2019
604afd5
update verification
fedekunze Oct 9, 2019
cf347bf
ICS02 module.go
fedekunze Oct 9, 2019
5514e9e
top level x/ibc structure
fedekunze Oct 9, 2019
39dd637
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 9, 2019
eefa08b
update connection queries
fedekunze Oct 9, 2019
482f24d
update connection tx
fedekunze Oct 10, 2019
e4ffd8e
remove extra files
fedekunze Oct 10, 2019
0163482
update expected client keeper and export verification funcs
fedekunze Oct 14, 2019
a1c22e9
Merge branch 'master' into joon/ics-23-implementation
fedekunze Oct 15, 2019
a8ceb45
Update x/ibc/02-client/client/cli/query.go
fedekunze Oct 15, 2019
956eb5c
Update x/ibc/02-client/types/tendermint/consensus_state.go
fedekunze Oct 15, 2019
2cc23b2
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 15, 2019
2e1e894
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 15, 2019
c573d57
address some of the review comments
fedekunze Oct 15, 2019
6913146
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 15, 2019
f852b1b
resolve some TODOs and address comments from review
fedekunze Oct 15, 2019
245901c
update connection versioning
fedekunze Oct 15, 2019
7a82144
minor error updates
fedekunze Oct 15, 2019
6af2ce7
minor UX improvements
fedekunze Oct 16, 2019
8be3af7
rename pkg
fedekunze Oct 16, 2019
53ab47d
fixes
fedekunze Oct 16, 2019
d3a533a
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 16, 2019
0d56b51
implement query proofs
fedekunze Oct 17, 2019
7ba777e
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 18, 2019
499abb4
refactor ICS23
fedekunze Oct 18, 2019
a925d88
cleanup types
fedekunze Oct 18, 2019
74d8a4b
rename pkg and fix import
fedekunze Oct 21, 2019
53f5fad
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 21, 2019
c12c298
implement batch verification
fedekunze Oct 21, 2019
a34b741
gosimple suggestion
fedekunze Oct 21, 2019
bf4f096
Merge branch 'master' into joon/ics-23-implementation
fedekunze Oct 21, 2019
386489b
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 21, 2019
383ba49
merge ICS23
fedekunze Oct 21, 2019
9b77275
various fixes; remove legacy tests; remove commitment path query
fedekunze Oct 22, 2019
40fca1a
alias
fedekunze Oct 22, 2019
1eaf55e
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 22, 2019
deceeb8
minor updates from ICS23
fedekunze Oct 22, 2019
2a1a144
renaming
fedekunze Oct 22, 2019
2aa4734
ICS02 changes
fedekunze Oct 22, 2019
714e6e2
update verification and rename root funcs
fedekunze Oct 22, 2019
93bb9d7
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 22, 2019
de13f5a
move querier to x/ibc
fedekunze Oct 22, 2019
aae117f
update query.go to use 'custom/...' query path
fedekunze Oct 22, 2019
f8fd580
add tests
AdityaSripal Oct 22, 2019
cbc1106
ICS 24 Implementation (#5229)
AdityaSripal Oct 22, 2019
f8d99ca
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 23, 2019
23ae994
flatten ICS23 structure
fedekunze Oct 23, 2019
e1fa5f8
fix ApplyPrefix
fedekunze Oct 23, 2019
7222642
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 23, 2019
4f89602
updates from ICS23 and ICS24
fedekunze Oct 23, 2019
22f874a
msg.ValidateBasic and ADR09 evidence interface
fedekunze Oct 23, 2019
2edb03f
complete types testing
AdityaSripal Oct 23, 2019
5783b03
merge
AdityaSripal Oct 23, 2019
696db2e
delete empty test file
AdityaSripal Oct 23, 2019
69db1f2
remove ibc errors from core error package
AdityaSripal Oct 23, 2019
c22faa1
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 24, 2019
021544f
custom JSON marshaling; msg.ValidateBasic; renaming of variables
fedekunze Oct 24, 2019
7809e4d
minor update
fedekunze Oct 24, 2019
102ab3d
custom JSON marshaling
fedekunze Oct 24, 2019
2f68c0c
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 24, 2019
33312c2
start batch-verify tests
AdityaSripal Oct 24, 2019
49d08e3
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Oct 25, 2019
5239720
minor changes on commitment types
fedekunze Oct 25, 2019
e048a6c
R4R - Store consensus state correctly (#5242)
chengwenxi Oct 25, 2019
093c004
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Oct 25, 2019
3965928
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 25, 2019
0c187bf
update alias
fedekunze Oct 25, 2019
29bc19e
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze Oct 25, 2019
24e6d29
update alias
fedekunze Oct 25, 2019
d1f71dd
Merge branch 'master' into joon/ics-23-implementation
fedekunze Oct 30, 2019
0a461b5
use testsuite
AdityaSripal Oct 30, 2019
dac68df
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
AdityaSripal Oct 30, 2019
7f9c166
Integrate Evidence Implementation into ICS-02 (#5258)
AdityaSripal Nov 4, 2019
a74ebf3
Merge branch 'master' into joon/ics-23-implementation
fedekunze Nov 4, 2019
6d580aa
finish tendermint tests
AdityaSripal Nov 5, 2019
0dd779e
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
AdityaSripal Nov 5, 2019
e875ca7
complete merge
AdityaSripal Nov 5, 2019
cd0aa22
Add tests for msgs
AdityaSripal Nov 5, 2019
0c8b759
upstream changes
fedekunze Nov 5, 2019
c6fa07b
fix
fedekunze Nov 5, 2019
17abbda
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze Nov 5, 2019
820482f
upstream changes
fedekunze Nov 5, 2019
962979d
ICS23 changes
fedekunze Nov 5, 2019
b5442d3
fix cons state
fedekunze Nov 5, 2019
7c67236
context changes
fedekunze Nov 5, 2019
4866753
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze Nov 5, 2019
a696f05
upstream changes
fedekunze Nov 5, 2019
df6bd66
fix cli tx
fedekunze Nov 5, 2019
024486c
upstream changes
fedekunze Nov 5, 2019
9b5da80
conflicts
fedekunze Nov 5, 2019
3b66a33
fix
fedekunze Nov 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
FlagRPCWriteTimeout = "write-timeout"
FlagOutputDocument = "output-document" // inspired by wget -O
FlagSkipConfirmation = "yes"
FlagProve = "prove"
)

// LineBreak can be included in a command list to provide a blank line
Expand Down
102 changes: 102 additions & 0 deletions x/ibc/03-connection/alias.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
package connection

// nolint
// autogenerated code using github.com/rigelrozanski/multitool
// aliases generated for the following subdirectories:
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types

import (
"github.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper"
"github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"
)

const (
NONE = types.NONE
INIT = types.INIT
TRYOPEN = types.TRYOPEN
OPEN = types.OPEN
StateNone = types.StateNone
StateInit = types.StateInit
StateTryOpen = types.StateTryOpen
StateOpen = types.StateOpen
DefaultCodespace = types.DefaultCodespace
CodeConnectionExists = types.CodeConnectionExists
CodeConnectionNotFound = types.CodeConnectionNotFound
CodeClientConnectionPathsNotFound = types.CodeClientConnectionPathsNotFound
CodeConnectionPath = types.CodeConnectionPath
CodeInvalidCounterpartyConnection = types.CodeInvalidCounterpartyConnection
CodeInvalidVersion = types.CodeInvalidVersion
CodeInvalidHeight = types.CodeInvalidHeight
CodeInvalidConnectionState = types.CodeInvalidConnectionState
CodeInvalidProof = types.CodeInvalidProof
CodeInvalidCounterparty = types.CodeInvalidCounterparty
AttributeKeyConnectionID = types.AttributeKeyConnectionID
AttributeKeyCounterpartyClientID = types.AttributeKeyCounterpartyClientID
SubModuleName = types.SubModuleName
StoreKey = types.StoreKey
RouterKey = types.RouterKey
QuerierRoute = types.QuerierRoute
QueryConnection = types.QueryConnection
QueryClientConnections = types.QueryClientConnections
)

var (
// functions aliases
NewKeeper = keeper.NewKeeper
QuerierConnection = keeper.QuerierConnection
QuerierClientConnections = keeper.QuerierClientConnections
RegisterCodec = types.RegisterCodec
NewConnectionEnd = types.NewConnectionEnd
NewCounterparty = types.NewCounterparty
StateFromString = types.StateFromString
ErrConnectionExists = types.ErrConnectionExists
ErrConnectionNotFound = types.ErrConnectionNotFound
ErrClientConnectionPathsNotFound = types.ErrClientConnectionPathsNotFound
ErrConnectionPath = types.ErrConnectionPath
ErrInvalidCounterpartyConnection = types.ErrInvalidCounterpartyConnection
ErrInvalidVersion = types.ErrInvalidVersion
ErrInvalidHeight = types.ErrInvalidHeight
ErrInvalidConnectionState = types.ErrInvalidConnectionState
ErrInvalidConnectionProof = types.ErrInvalidConnectionProof
ErrInvalidCounterparty = types.ErrInvalidCounterparty
ConnectionPath = types.ConnectionPath
ClientConnectionsPath = types.ClientConnectionsPath
KeyConnection = types.KeyConnection
KeyClientConnections = types.KeyClientConnections
NewMsgConnectionOpenInit = types.NewMsgConnectionOpenInit
NewMsgConnectionOpenTry = types.NewMsgConnectionOpenTry
NewMsgConnectionOpenAck = types.NewMsgConnectionOpenAck
NewMsgConnectionOpenConfirm = types.NewMsgConnectionOpenConfirm
NewConnectionResponse = types.NewConnectionResponse
NewQueryConnectionParams = types.NewQueryConnectionParams
NewClientConnectionsResponse = types.NewClientConnectionsResponse
NewQueryClientConnectionsParams = types.NewQueryClientConnectionsParams
GetCompatibleVersions = types.GetCompatibleVersions
LatestVersion = types.LatestVersion
PickVersion = types.PickVersion

// variable aliases
SubModuleCdc = types.SubModuleCdc
EventTypeConnectionOpenInit = types.EventTypeConnectionOpenInit
EventTypeConnectionOpenTry = types.EventTypeConnectionOpenTry
EventTypeConnectionOpenAck = types.EventTypeConnectionOpenAck
EventTypeConnectionOpenConfirm = types.EventTypeConnectionOpenConfirm
AttributeValueCategory = types.AttributeValueCategory
)

type (
Keeper = keeper.Keeper
ConnectionEnd = types.ConnectionEnd
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type name will be used as connection.ConnectionEnd by other packages, and that stutters; consider calling this End (from golint)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type name will be used as connection.ConnectionEnd by other packages, and that stutters; consider calling this End (from golint)

Counterparty = types.Counterparty
State = types.State
ClientKeeper = types.ClientKeeper
MsgConnectionOpenInit = types.MsgConnectionOpenInit
MsgConnectionOpenTry = types.MsgConnectionOpenTry
MsgConnectionOpenAck = types.MsgConnectionOpenAck
MsgConnectionOpenConfirm = types.MsgConnectionOpenConfirm
ConnectionResponse = types.ConnectionResponse
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type name will be used as connection.ConnectionResponse by other packages, and that stutters; consider calling this Response (from golint)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type name will be used as connection.ConnectionResponse by other packages, and that stutters; consider calling this Response (from golint)

QueryConnectionParams = types.QueryConnectionParams
ClientConnectionsResponse = types.ClientConnectionsResponse
QueryClientConnectionsParams = types.QueryClientConnectionsParams
)
130 changes: 130 additions & 0 deletions x/ibc/03-connection/client/cli/query.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
package cli
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add queryability for:

  • List of connections for a given chain


import (
"fmt"
"strings"

"github.com/spf13/cobra"
"github.com/spf13/viper"

abci "github.com/tendermint/tendermint/abci/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"
)

// GetQueryCmd returns the query commands for IBC connections
func GetQueryCmd(queryRoute string, cdc *codec.Codec) *cobra.Command {
ics03ConnectionQueryCmd := &cobra.Command{
Use: "connection",
Short: "IBC connection query subcommands",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}

ics03ConnectionQueryCmd.AddCommand(client.GetCommands(
GetCmdQueryConnection(queryRoute, cdc),
)...)
return ics03ConnectionQueryCmd
}

// GetCmdQueryConnection defines the command to query a connection end
func GetCmdQueryConnection(queryRoute string, cdc *codec.Codec) *cobra.Command {
cmd := &cobra.Command{
Use: "end [connection-id]",
Short: "Query stored connection end",
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
Long: strings.TrimSpace(fmt.Sprintf(`Query stored connection end
Example:
$ %s query ibc connection end [connection-id]
`, version.ClientName),
),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cliCtx := context.NewCLIContext().WithCodec(cdc)
connectionID := args[0]

bz, err := cdc.MarshalJSON(types.NewQueryConnectionParams(connectionID))
if err != nil {
return err
}

req := abci.RequestQuery{
Path: fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryConnection),
Data: bz,
Prove: viper.GetBool(flags.FlagProve),
}

res, err := cliCtx.QueryABCI(req)
if err != nil {
return err
}

var connection types.ConnectionEnd
if err := cdc.UnmarshalJSON(res.Value, &connection); err != nil {
return err
}

if res.Proof == nil {
return cliCtx.PrintOutput(connection)
}

connRes := types.NewConnectionResponse(connectionID, connection, res.Proof, res.Height)
return cliCtx.PrintOutput(connRes)
},
}
cmd.Flags().Bool(flags.FlagProve, true, "show proofs for the query results")

return cmd
}

// GetCmdQueryClientConnections defines the command to query a client connections
func GetCmdQueryClientConnections(queryRoute string, cdc *codec.Codec) *cobra.Command {
return &cobra.Command{
Use: "client [client-id]",
Short: "Query stored client connection paths",
Long: strings.TrimSpace(fmt.Sprintf(`Query stored client connection paths
Example:
$ %s query ibc connection client [client-id]
`, version.ClientName),
),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cliCtx := context.NewCLIContext().WithCodec(cdc)
clientID := args[0]

bz, err := cdc.MarshalJSON(types.NewQueryClientConnectionsParams(clientID))
if err != nil {
return err
}

req := abci.RequestQuery{
Path: fmt.Sprintf("custom/%s/%s", queryRoute, types.QueryClientConnections),
Data: bz,
Prove: viper.GetBool(flags.FlagProve),
}

res, err := cliCtx.QueryABCI(req)
if err != nil {
return err
}

var connectionPaths []string
if err := cdc.UnmarshalJSON(res.Value, &connectionPaths); err != nil {
return err
}

if res.Proof == nil {
return cliCtx.PrintOutput(connectionPaths)
}

connPathsRes := types.NewClientConnectionsResponse(clientID, connectionPaths, res.Proof, res.Height)
return cliCtx.PrintOutput(connPathsRes)
},
}
}
Loading