Commit Graph

259 Commits

Author SHA1 Message Date
Cory 4e73e0f817
Update proto files & definitions in accordance with ADR023 (#6413)
* consolidate proto files into single directory, turn on PACKAGE_DIRECTORY_MATCH linting

* add third_party root for third party proto files

* move ibc proto files to top level folder, rename .proto files to types.proto as before

* update protocgen script, and run code generation

* move vesting proto definition to cosmos namespace, rename from types.proto in alignment with buf.build naming conventions

* update Makefile so proto dependencies are set with new structure when updated

* add comment for sed usage in makefile

* remove unused aliases of proto generated types

* add settings.json instructions to contributing.md for including protobuf paths

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-06-18 10:04:26 -07:00
Federico Kunze fe9356ddb8
07-tendermint: ignore misbehaviour if age is greater than consensus params (#6422)
* 07-tendermint: ignore misbehaviour if age is greater than consensus params

* update tests and errors

* add comment on consensus params

* Update x/ibc/02-client/handler.go

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>

* update evidence GetTime to use Max

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-06-18 12:52:34 -04:00
Federico Kunze 1c8249e26d
x/ibc: tx client protobuf migration (#6461)
* ibc/03-connection: tx client migration

* update commands

* update ibc-transfer

* remove unused queryRoute

* initialize clientCtx
2020-06-17 21:56:48 +02:00
Federico Kunze d82114df2b
ibc/04-channel: move UNORDERED channel ack to RecvPacket (#6457) 2020-06-17 05:36:09 -04:00
YOSHIDA Masanori e2f336345d
x/ibc: add the missing path parameter "height" to "/ibc/clients/{client-id}/consensus-state/{height}" (#6448)
* x/ibc: fix "height" query parameter handling in queryConsensusStateHandlerFn

* x/ibc: add the missing path parameter "{height}" to "/ibc/clients/{client-id}/consensus-state/{height}"

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-16 09:19:20 -04:00
Alexander Bezobchuk 35312d098e
JSON Codec Updates (#6444)
* Initial commit

* More updates

* Fix tests

* CLI test updates

* Updates

* Updates
2020-06-16 00:20:50 +00:00
dauTT 8cf8098861
x/capability: remove alias.go usage (#6438) 2020-06-14 19:05:45 +02:00
dauTT cc42a82c86
x/evidence: remove alias.go usage (#6435) 2020-06-14 11:58:48 +02:00
dauTT 560398cfdc
x:ibc: remove alias.go usage (#6429)
* x:ibc: remove alias.go usage

* Replace ibc24host with ibchost
2020-06-13 14:29:00 +00:00
Aditya e07c1e20bc
address review from pr #6374 (#6430)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-13 00:33:25 +00:00
dauTT 14e3aa1265
x/staking: remove alias.go usage (#6397)
* x/staking: remove alias.go usage

* Fix formatting and Add entry in CHANGELOG.md

* Add missing end curly parenthesis

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-12 14:54:37 +00:00
Jonathan Gimeno ddbb9a2321
run make format (#6416) 2020-06-12 10:17:36 -04:00
Federico Kunze 55a7226535
x/ibc: channel from client state query (#6401)
* x/ibc: channel from client state query

* 04-channel/client: add CLI and REST queries

* querier test
2020-06-12 08:06:24 -04:00
Aditya d82c2e6a94
Enforce ProofSpecs in 23-Commitment (#6374)
* enforce spec ordering

* modify clients to pass in specs to verify functions

* start fixing tests

* Apply suggestions from code review

* enforce spec length and proof length match

* fix all tests

* add argument to constructor:

* fixed msg client and tests

* appease linter

* Apply suggestions from code review

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* finish fixes from review

* add back proof-specific checks

* Apply suggestions from code review

* more robust proof spec checks

* add CHANGELOG entries

* do not hardcode proofspecs in 23-commitment

* fix client modules

* fix tests

* appease linter

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-12 10:45:40 +00:00
colin axner 9048ffa8d3
Update ibc proof to be bytes (#6393)
* update interfaces to use []byte instead of commitment proof

* update 03/04 msgs with bytes

* fix compile errors

* fix channel tests

* fix connection tests

* fix testing, tm, and localhost tests

* fix ante tests

* update 03-connection spec

* update channel msgs spec

* small fixes after self review

* rm unused import

* Update x/ibc/03-connection/client/utils/utils.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* add empty proof test and rm ics 20 from ibc spec

* fix merge issues

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-12 00:19:25 +02:00
Jonathan Gimeno b09d6728ec
Rename all methods IsEmpty to Empty to be consistent with all codebase (#6409)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-11 23:32:24 +02:00
Jonathan Gimeno 49597b19ec
module: pass route by value (#6404)
* use instance

* add some comments

* Update types/router.go

* rename Nil to Empty

* run make mocks

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-11 15:37:23 +00:00
colin axner affe7265cb
Update connection and channel to use types_test package name (#6395)
* convert connection types test pacakge name

* convert channel types test package name

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-11 00:31:54 +00:00
Jonathan Gimeno 79c308ae4a
Concept PR simplify Module (#6231)
* add test of alternative impl

* simplify query route too

* change name querier

* simplify register routes

* revert change

* add route

* add router

* first step refactor

* refactor

* update documentation

* update

* add format

* simplify appmodule

* update changelog

* rename vars

* remove interface

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-10 18:48:16 +00:00
Federico Kunze 0d9faec1f3
07-tendermint: cherry-picks from #6272 (#6387) 2020-06-10 08:36:18 -04:00
Federico Kunze 55796fb3e7
x/ibc: client consensus_height event (#6381) 2020-06-10 05:34:18 -04:00
colin axner 6851c844b3
x/ibc: testing pkg (#6356)
* add ibc testing pkg with testchain

* add ibctestsuite

* add create connection and channel support

* lint fixes

* lint

* revert

* simplify code via lint

* change suite to coordinator

* Update x/ibc/testing/chain.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* make trust level var and remove get from channel test struct

* apply most suggestions from pr review

* split conn handshake into single step funcs

* split channel handshake into separate funcs

* apply @fedekunze suggestions

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-10 09:00:13 +00:00
colin axner a8298976ac
update 07-tm err msg to utc time (#6383)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-10 08:54:23 +00:00
Federico Kunze 744c1ce250
x/ibc: simulation store decoders (#6247)
* x/ibc: simulation store decoders

* x/ibc: missing decoders

* fixes

* 02-client: decoder test

* 03-connection: decoder test

* x/ibc: decoder test

* address comments from review

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-10 08:09:51 +00:00
Federico Kunze c44813bcdf
x/ibc: commit timeout timestamp (#6363)
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-06-08 08:03:18 -04:00
Segue 52d11acb45
R4R: Fix bug of unordered channel (#6337)
* fix unordered

* resolve conflicts
2020-06-08 06:19:59 +00:00
colin axner b9b578d6de
x/ibc: querying support for unordered channels (#6294)
* pause

* add querying for packet commitments and unrelayed acks

* add get all packet commitments test

* add query channels test

* add query connection channels test

* add test for query packet commitments

* fix key path and add unrelayed acks test

* fix part of lint

* add unrelayed packetsends func

* fix godoc

* add nolint directive

* fix lint

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-06 19:25:45 -04:00
Aaron Craelius 43947ca2ef
Add RegisterQueryService to AppModule (#6336)
* Add RegisterQueryService to AppModule

* Update CHANGELOG.md

* Update CHANGELOG.md

* Wire up BaseApp, fix tests

* Add mock test

* add missing file

* Update types/module/module.go

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-06 07:59:57 +00:00
Federico Kunze 1a5f2b7859
x/ibc-transfer: custom absolute packet timeout (#6248)
* x/ibc-transfer: custom timeout

* remove destHeight field

* cleanup

* fix test

* replace CLI arg for flag

* update CLI

* viper get flag

* address comments from review

* update cmd example:

* update spec

* address comments from review
2020-06-04 19:30:56 +00:00
colin axner b1f483fe24
move packet executed call to ibc handler (#6312)
* move packet executed to within ibc handler

* add spec updates

* godoc and nil check to lenght

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-04 11:24:21 +00:00
colin axner 50d748bffb
remove duplicate event emission (#6328)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-04 10:59:13 +00:00
Aaron Craelius 81d647e505
Move codec.RegisterCrypto and codec.Cdc to new packages (#6330)
* Move codec.Cdc to legacy_global.Cdc

* Update CHANGELOG.md

* Updates

* nit

* Fix imports

* Updates

* Use cosmos multisig instead of tendermint multisig everywhere

* Fix tests

* Rename legacy_global -> legacy

* Add doc.go

* Linting, move all RegisterCrypto calls to crypto/codec

* Update crypto/codec/amino.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-04 10:38:24 +00:00
Aaron Craelius fed0c2317d
Change GetQueryCmd to take client.Context (#6326)
* Change GetQueryCmd to take a client.Context

* Update CHANGELOG

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-03 20:15:11 +00:00
Aaron Craelius 2e11c81668
Make sdk.Msg implement proto.Message (#6327)
* Make sdk.Msg implement proto.Message

* Cleaning up

* Cleaning up

* Update CHANGELOG.md

* Lint fixes

* Lint fixes

* fix tests

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-03 19:52:05 +00:00
Federico Kunze 1f5626b800
baseapp: fix sender events accumulation (#6307)
* add default case on ibc AnteHandler

* reset ante handler EventManager

* use event manager from runTx instead the one set by the ante handler

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-02 04:26:13 +00:00
SaReN 39f53ac22f
client: rename CliContext to Context (#6290)
* Refactor CliContext as Context

* Fix lint issues

* Fix goimports

* Fix gov tests

* Resolved ci-lint issues

* Add changelog

* Rename cliCtx to clientCtx

* Fix mocks and routes

* Add changelog

* Update changelog

* Apply suggestions from code review

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* merge client/rpc/ro{ot,utes}.go

* Update docs

* client/rpc: remove redundant client/rpc.RegisterRPCRoutes

* regenerate mocks

* Update ADRs

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-01 12:46:03 +00:00
colin axner 654b2fdd10
x/ibc: packet commitment deletion after ack verification (#6292)
* add deletion of packet commitments to AcknowledgePacket and remove CleanupPacket

* update tests

* add replay test for unordered channels

* add cleanup back, update tests

* remove nolint

* add timeoutonclose handling and fix

* add check for deleted packets

* Update x/ibc/04-channel/keeper/keeper.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* add ackexecuted and update tests

* add timeoutexecuted back and update test

* move events to executed funcs

* update handler

* update godoc

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-30 21:18:43 -04:00
colin axner 6973c56457
x/ibc: fix internal errors messages (#6268)
* update errors in ibc client and localhost

* update code 1 errors

* fix misisng import

* add import

* fix compile and lint issues

* fix lint

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-22 17:17:52 -04:00
Federico Kunze bf3fa30671
ibc/07-tendermint: fix CLI (#6271) 2020-05-22 14:48:44 -04:00
Aaron Craelius 850419fffd
Tx CLI proto module interface (#5989)
* WIP

* WIP

* WIP on removing x/auth dependency from client/tx

* Revert unneeded changes

* Simplify cli tx UX

* Wire up bank tx REST routes

* Fix assignment issue

* Wire up bank NewSendTxCmd

* fix lint

* revert file

* revert file

* fix simcli

* Refactor AccountRetriever

* Fix build

* Fix build

* Fix build

* Fix integration tests

* Fix tests

* Docs, linting

* Linting

* WIP on all modules

* Implement other module new tx cmd's

* Fix cmd's

* Refactor existing GetTxCmd

* Fix cmd

* Removing deprecated code

* Update ADR 020 & CHANGELOG

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Fix client/tx tests

* Fix mocks

* Fix tests

* Lint fixes

* REST tx migration

* Wire up REST

* Linting

* Update CHANGELOG, docs

* Fix tests

* lint

* Address review feedback

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* group vars

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-21 21:29:34 +00:00
Federico Kunze ca20a39962
x/ibc: constrain acks processing order (#6244)
* x/ibc: constrain acks processing order

* test

* address @AdityaSripal comments

* address @colin-axner comments

* address @alexanderbez comments
2020-05-18 16:50:07 +00:00
Federico Kunze 3dcdc582af
x/ibc-transfer: move ICS20 out from x/ibc (#6222)
* x/transfer: move ICS20 out from x/ibc

* rename to ibc-transfer
2020-05-15 20:36:47 +00:00
colin axner 86a9750508
x/ibc: update path validator to enforce no beginning or ending of the separator (#6233)
* update path validator to enforce no beginning or ending of the separator

* modify test slightly
2020-05-15 14:58:43 -04:00
Federico Kunze b2ad4d2a23
x/ibc: alter id requirements (#6227)
* x/ibc: alter id requirements

* add regex to validations

* comment

* update error

* test all validators:

* fix tests

* check for only separators
2020-05-15 17:24:31 +00:00
Federico Kunze c9ec0ff087
x/ibc: default genesis state for sims (#6158)
* x/ibc: default genesis state for sims

* add ibc and transfer module to simulations

* minor update

* remove TODO

* add validation to transfer genesis

* fix transfer init genesis

* address @alexanderbez comments
2020-05-14 22:47:11 +00:00
Federico Kunze 48aebed2ea
x/ibc: /types cleanup (#6169)
* x/ibc: move /types to /common

* x/ibc/types: remove errors

* remove mocked proofs

* remove invalidProof{}

* create new ibc/types dir

* format

* move keys to host

* move order to channel

* move channel state

* move connection state

* lint
2020-05-13 19:23:33 -04:00
Christopher Goes 513c5f30c2
Alter connection handshake (#6209)
* Alter connection handshake

* Add test-case

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-13 13:26:19 -04:00
Federico Kunze a08aa41213
ibc/07-tendermint: variable trust-level (#6206)
* ibc/07-tendermint: variable trust-level

* update client state and tests

* fix tests

* address comments from review

* cli: define trust-level as flag
2020-05-13 01:10:25 +00:00
Federico Kunze b93300288e
x/ibc: stateful clients (#6202)
Closes: #6198
2020-05-12 21:13:41 +02:00
Federico Kunze 138e0b074f
x/ibc: log fixes (#6184)
* x/ibc: log fixes

* fix test
2020-05-11 17:17:05 +00:00