Commit Graph

380 Commits

Author SHA1 Message Date
dauTT 20c80cfd44
Rename *codec.Codec to *codec.LegacyAmino (#6991)
* Rename *codec.Codec to *codec.LegacyAmino

* Implement requested changes

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-08-10 19:41:21 +00:00
Alexander Bezobchuk 9ae17669d6
Tx Height Timeout (#6089)
* Implement TxHeightTimeoutDecorator

* Update error message

* rename type

* set height timeout

* update tests

* update *SignDoc)

* rename

* remove dup

* fix build

* cli updates

* rest updates

* cl++

* Update x/auth/ante/basic.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Update x/auth/ante/basic.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Update x/auth/ante/basic.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Update x/auth/ante/basic.go

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

* rename

* rename

* remove TimeoutHeight from SignDoc

* updates

* fix tests

* update IBC cmd flags

* use omitempty

* update godoc

* add test case to TestStdSignBytes

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.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-08-07 23:32:22 +00:00
atheeshp ceba0cb45d
x/ibc migrate genesis proto (#6878)
* migrated channel genesis types to proto

* connection genesis types migrated to proto

* client proto migration

* failing tests due to tendermint part incomplete

* add genesis test

* x/ibc: ClientState Any

* add genesis test

* suite NotPanics

* comment tests

* update export logic

* refactor

* update test

* fix non-determinism

* castrepeated

* x/ibc: migrate simulations to protobuf

* add proto genesis

* add UnpackInterfaces func to genclientstate

* add unpackinterfaces for consensus states

* formatting

* fix genesis tests

* add modified genesis test

* update comments

* remove localhost register codec

* use app registry

* fix bug

* Update simapp/app.go

* Update x/ibc/02-client/types/genesis.go

* unmarshaler interface

Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-07 08:33:47 +00:00
Alexander Bezobchuk 89097a00d7
Merge PR #6968: fix sign command 2020-08-06 12:25:54 -04:00
Jonathan Gimeno fe8c8b83aa
add default node home into server helpers (#6962) 2020-08-06 14:58:41 +00:00
SaReN 04cb1fb05f
Fix clientCtx intialization (#6955) 2020-08-05 21:22:33 +00:00
Alexander Bezobchuk 801b64868d
Merge PR #6935: Fix Testnet Command 2020-08-04 12:51:27 -04:00
Aditya 9b61e0947e
Remove Last Header from ClientState (#6873)
* implement features, fix tendermint tests

* allow test headers to pass in custom nextvalidatorset

* allow updates to previous heights and test

* remove unnecessary testing feature

* fix client tests

* fix ibc tests, and updating consensus state

* fix ibc-transfer tests

* appease linter

* Apply suggestions from code review

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

* add chainID test case

* fix expPass value

* Apply suggestions from code review

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

* address rest of @colin-axner review

* fix bug and errors

* Apply suggestions from code review

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* address rest of @colin-axner review

* implement updating before frozen height

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-08-04 05:05:03 -04:00
Aaron Craelius 6d937443b2
Reject unknown fields in TxDecoder and sign mode handlers (#6883)
* WIP on unknown field rejection in TxDecoder

* WIP on unknown field rejection in TxDecoder

* WIP

* WIP

* WIP

* WIP

* Fix bugs with RejectUnknownFields

* Fix tests

* Fix bug and update docs

* Lint

* Add tests

* Add unknown field tests

* Lint

* Address review comments
2020-08-03 19:47:25 +00:00
Aaron Craelius 7e2eea84c6
Fix the one remaining proto tx bug and flip the switch (#6902)
* Fix the one remaining proto tx bug and flip the switch

* Update github CI

* Wrap TxDecoder errors

* Add test

* Cleanup
2020-07-30 18:58:26 +00:00
Marko 617b822efa
types: add kv type (#6897)
* add kv type

* add changelog entry

* fix build

* replace sdkkv with kv

* revert change

* fix some tests

* proto-gen

* fix tests

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-30 14:53:02 +00:00
SaReN 72ebafeeca
Update auth cli commands (#6717)
* add utils

* update sign cmd

* update multisign cmd

* update sign batch cmd

* update genutil cmd

* add wrap tx builder

* update gentx cli

* update validate sigs cmd

* fix lint

* add flag reader to cli

* update marshaler for batchscan

* add register query server

* update to master

* remove depricated methods

* fix keyring issue

* update wraptx

* Fix batch scan

* fix register interfaces issue

* update printOutput

* Update Validate Sigs test

* WIP on signature JSON

* Cleanup

* Cleanup

* Test fixes

* Test fixes

* Fixes

* WIP on tests

* Fix gov tests

* fix lint

* fix MultiSign tests

* fix tests

* refactor tests

* Cleanup

* Address review comments

* Update encode

* Test fix

* Rename SignData func

* Fix lint

* Fix lint

* Revert ReadTxCommandFlags

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
2020-07-29 22:33:42 +00:00
Marie bc7e943158
x/auth genesis protobuf migration (#6880)
* Add auth genesis.proto and related changes

* Add UnpackInterfaces method to auth GenesisState

* Remove unrelevant test case

* Update proto/cosmos/auth/genesis.proto

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

* Add test for auth types ConvertAccountsAny

* Apply naming suggestions

* Update x/auth/types/genesis_test.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.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-07-29 16:00:15 +00:00
dauTT 5a7e22022c
Implement ADR 024 - Coin Metadata (#6821)
* Implement ADR 024 - Coin Metadata

* Fix lint

* Fix proto lint

* Index metadata by denom

* Fix test

* Fix proto comments

* Add GetAllDenomMetaData help method and refactor code accordingly

* Add x/bank/keeper/genesis_test.go

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-28 07:49:56 +00:00
Aaron Craelius e9534b0935
Add gRPC server & reflection (#6463)
* Add gRPC proxy

* Make GRPC disabled by default

* WIP on integration tests

* WIP on integration tests

* Start setting up in process tests

* Start setting up in process tests

* Make it compile

* Add start server to network util

* Add Println

* Use go routine

* Fix scopelint

* Move to proxy_test

* Add response type cache

* Remove proxy

* Tweaks

* Use channel to handle error

* Use error chan

* Update server/start.go

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

* Use %w

* Add sdk.Context

* Add comments

* Fix lint

* Add header and tests

* Address comments

* Factorize some code

* Fix lint

* Add height and prove in req metadata

* Add reflection test

* Fix lint

* Put grpc test in server/grpc

* Update baseapp/grpcserver.go

* Update baseapp/grpcserver.go

* Remove proof header

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-07-27 17:57:15 +00:00
Marie f59df68a97
Migrate x/genutil to use TxConfig (#6734)
* Update genutil collect and gentx to use TxGenerator

* Remove print statement

* Use Tx in genutil DeliverGenTxs

* Use Tx in genutil genesis_state

* Use Tx in ValidateGenesis

* Use amino txJSONDecoder and txBinaryEncoder in genutil InitGenesis

* Use TxConfig in place of TxGenerator

* Add gentx tests

* Remove commented line

* Test fixes

* Apply suggestions from code review

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

* Fixes

* Fixes

* Fixes

* Fixes

* Remove unneeded test case (doesn't apply to proto marshaling)

* linting

* Refactor to use new TxEncodingConfig interface in genutil module

* Replace golang/protobuf with gogo/protobuf package

* Use TxEncodingConfig in InitTestnet

* Remove old amino.go file

* Use TxJSONDecoder in genutil ValidateGenesis

* Add parameter to ValidateGenesis to resolve the tx JSON decoder issue

* Address review feedback

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-25 08:10:04 +00:00
Aaron Craelius 80f7ff62f7
Start removing HybridCodec (init + auth, bank, distribution) (#6838)
* Start to remove HybridCodec

* Rename

* Fixes

* Test fixes

* Cleanup
2020-07-24 19:04:29 +00:00
Anil Kumar Kammari 1f8cc450c4
Add missing cancel-software-upgrade cmd (#6840)
* Add cancel software upgrade cmd

* add proposal cancel handler

* Fix gofmt
2020-07-24 17:39:52 +00:00
Aaron Craelius 1538e65478
Fix module interface registration (#6834) 2020-07-23 22:45:34 -04:00
Aaron Craelius 0a498d8c18
Add protobuf Tx unit tests (#6614)
* Enable proto tx by default and add test_amino build flag.

* Enable proto TxDecoder

* update makefile

* fix conflicts

* Revert AminoCodec change

* Make test-unit-amino default for now

* Make test-unit-amino default for now

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-23 17:31:42 +00:00
Alexander Bezobchuk 61d69a978f
Merge PR #6806: Docs & Cleanup 2020-07-21 11:28:43 -04:00
colin axner 79fa06b26c
remove IBC ante handler in favor of using handler (#6793)
* remove IBC ante handler, add calls to handler

* move some events upstream to handler

* remove change log entry

* move ante handler tests to handler

* fix build

* update docs

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-20 15:25:57 +00:00
Jonathan Gimeno 54141887b5
Add home default to other commands. (#6789)
* Add home default to other commands.

* add defaultNodeHome to rest of commands

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-20 15:12:33 +00:00
Amaury Martiny 5c0e3b4de5
x/auth/ante: Migrate tests to use the new client.TxConfig (#6661)
* WIP: using encoding config

* Make it compile, test fails

* test should be okay

* Make tests pass

* Add comments

* Convert more tests

* Make TestAnteHandlerSigErrors work

* Make first 2 tests pass

* TestAnteHandlerAccountNumbers

* Use table tests

* Remove print

* Use test table

* TestAnteHandlerSigErrors

* TestAnteHandlerAccountNumbers

* TestAnteHandlerAccountNumbers

* Refactor TestAccount

* Refactor getSignBytes

* TestAnteHandlerAccountNumbersAtBlockHeightZero

* TestAnteHandlerSequences

* TestAnteHandlerFees

* TestAnteHandlerMultiSigner

* TestAnteHandlerBadSignBytes

* TestAnteHandlerSetPubKey

* TestAnteHandlerSigLimitExceeded

* TestCustomSignatureVerificationGasConsumer

* TestAnteHandlerReCheck

* Make all tests pass

* Refactor a little bit more

* Fee test

* SetupTest

* All tests pass

* Refactor to RunTestCase

* Don't use StdFee

* Revert some little stuff

* Finish up last couple of test cases

* Less verbose

* s/TxGenerator/TxConfig

* Add comments

* Indent

* Move KeyTestPubAddr to testdata

* Move testdata to /testutil

* Revert to use signature: nil step in signing

* Add comments

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-20 08:30:12 -04:00
Alexander Bezobchuk e59781eca7
Merge PR #6765: x/auth: Finish CLI Refactor 2020-07-17 16:20:45 -04:00
Jonathan Gimeno cdcb51a922
Merge PR #6750: Revert to allow to set DefaultNodeHome as a param in genutil CLI cmds 2020-07-17 10:20:31 -04:00
Jonathan Gimeno 351192aa0b
x/auth: in-process test refactor (#6573)
* remove unused functions

* create helper func to send tx

* refactor to use test help to send tx by client

* Commit before getting backend.

* Temporal commit

* temp commit

* remove the creation of txbuilder from cli

* fix imports

* update changelog

* Remove unused function.

* Add flag home into tx sign command.

* migrade TestCLIValidateSignatures to use new test suite

* migrate test one

* Add changes to make sign batch.

* make test pass

* refactor common logic

* First part of cli sign.

* Add test for sign batch.

* refactor a little and improve the test

* migrate broadcast command

* fix linter

* Remove printf for debug in bank module.

* Fix unused err var.

* fix linter

* fix test

* fix tests client

* Fix linter.

* Temp commit signature.

* encode tx

* migrate tests

* Fix imports.

* Remove changelog

* fix tests

* Fix tests.

* Update x/bank/client/testutil/cli_helpers.go

* Remove alias.

* Remove wait for N block func.

* export callCmd function into its own file.

* fix imports

* bring back to inner functions

* apply mock io

* the helpers use mockio

* fix bug

* Add Helpers.

* return to put the function in testutil package

* return BufferWriter in ExecTestCLICmd

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-14 18:37:14 +00:00
SaReN b9f86dd7fe
Update simapp helpers to use Tx generator (#6655)
* update helpers to use tx generator

* update modules to use tx generator

* add todo

* update ibc to use txG

* fix lint

* Eliminate panics from Gentx

* update module ops

* fix lgtm alert

* update ibc with txG

* Remove todo

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

* move simapp/helpers to test_helpers

* revert simapp/helpers to test_helpers

* revert renaming

* address suggestion

Co-authored-by: Aaron Craelius <aaron@regen.network>

* fix tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-14 17:33:31 +00:00
Alexander Bezobchuk e7554bb3b0
Fix Gas Flag Usage + CLI Flag APIs (#6685)
* Use new APIs

* fix usage

* fix usage of gas flag

* tests: TestParseGasSetting
2020-07-11 08:13:46 +00:00
Jonathan Gimeno 6ceedc9e4f
Remove TxBuilder references to viper. (#6653)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-10 11:05:35 +02:00
Alexander Bezobchuk b25e3fc76d
Merge PR #6651: More CLI cleanup 2020-07-08 13:57:45 -04:00
Ira Miller 589c1a531e
Enable/disable coin transfers by denom (#6527)
* initial implementation of per denom sendenabled

* Fix for accidentally removed keyword

* Validate individual param in param array

* Lint fix

* Refactor bank params to use protobuf
Modified SendEnabled property to be part of generic Params object
Updated genesis functions to use default params structure

* Refactor simulation genesis for clarity

* update changelog for bank sendenable per denom

* fix NoOpMsg type in multisend test

* Add a coin denom send check utility function

* Additional godoc comments and clarification

* Add default send enabled parameter to bank.
Remove empty denom capability from SendEnabled parameters
Update simulation to exercise both configuration options independently

* Minor suggested improvements.

* simulation fix

* bank proto sendenabled package name removed

* Remove extra gogo proto yaml tags

* Params rename IsSendEnabled to SendEnabledDenom

* Refactor to SendEnabledCoin(s)

* update slashing test to use bank params

* Clean up change log entry for feature.

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-08 17:43:08 +00:00
Alessio Treglia 57ac28c814
client/flags: remove NewCompletionCmd() (#6632)
The functionality was adopted tendermint upstream, see
* https://github.com/tendermint/tendermint/pull/4665
2020-07-07 19:29:30 +02:00
Alexander Bezobchuk bc261d9e83
version: Remove Viper (#6628)
* version: remove viper

* Remove home flag gets

* fix: tests
2020-07-07 17:20:09 +00:00
Alexander Bezobchuk 8670a10564
Merge PR #6595: Single Binary & Command Refactor 2020-07-07 11:40:46 -04:00
Jonathan Gimeno 3c76084bf5
Merge PR #6596: Genutil remove global viper 2020-07-06 17:48:54 -04:00
Alexander Bezobchuk 9ebda4edb9
Server/simd: Viper Removal (#6599)
* init commit

* remove viper from tm cmds

* updates

* Undo x/bank/client/cli/tx.go

* Fix unit tests

* lint++

* rename var

* Fix genutil test

* fix test

* prefer cmd.Flags() over direct viper usage

* update

* fix ABCI error tests

* fix integration tests

* Add viper to context

* fix build

* fix unit test

* Implement and use AppOptions

* Revert Redact godoc

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-05 16:56:17 +00:00
Aaron Craelius 849429ecda
Add proper support for Any in gRPC queries (#6594)
* Add proper gRPC Any support via AnyUnpacker

* Wire up grpc query router AnyUnpacker
2020-07-03 16:42:12 +00:00
Alexander Bezobchuk dacbcef54d
cl & deps++ (#6582)
* cl & deps++

* Use PersistentPreRunE

* revert x/bank/client/cli/tx.go

* move to root level

* Use block mode by default

* Skip x/auth CLI tests
2020-07-02 19:35:42 +00:00
Marko a0f9cc7627
vesting: remove alias.go (#6579) 2020-07-02 15:08:44 +02:00
Alexander Bezobchuk 14d1ee5437
Use Context in Command instead of Argument + Util (#6572)
* Use context

* use PersistentPreRunE

* undo

* use init context

* Update types

* update tests

* implement tests

* Update simapp/cmd/simcli/main.go

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

* Update simapp/cmd/simcli/main.go

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

* Update x/bank/client/cli/tx.go

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

* fix build

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-02 13:02:28 +00:00
colin axner 8ed09e5098
remove alias.go from 05-port (#6575) 2020-07-02 12:44:08 +00:00
Alexander Bezobchuk 37cc04081e
Fix Current Integration Tests (#6570)
* fix attempt

* fix test
2020-07-01 18:37:59 +00:00
Jonathan Gimeno 6a52c5a569
Remove DefaultParamspace and simplify simapp creation. (#6564)
* Remove DefaultParamspace and simplify simapp creation.

* Update changelog.

* Create function that inits ParamsKeeper.

* 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-07-01 13:57:29 +00:00
Alexander Bezobchuk d5049413ef
Merge PR #6525: x/bank: Refactor CLI & Tests 2020-06-30 16:59:21 -04:00
colin axner 43b4f2f120
remove alias.go from 02-client (#6542) 2020-06-30 10:37:05 +00:00
Aaron Craelius c0e48e1c43
Update ante handlers to use SignatureV2 (#6428)
* Update ante handlers to use SignatureV2

* WIP on test fixes

* WIP on test fixes

* Debugging CLI Tests

* CHANGELOG.md

* CHANGELOG

* Add missing tests for ante

* Add tests for verify signatures

* Update verify tests

* Fix register codec issue

* debug

* Cleanup

* Fix verify signature tests

* Remove viper

* remove keyring usage

* Fix review changes

* Fix simapp

* Fix ante tests

* Add reference issue

* Add test for multisignature

* Wrap sign error with sig

* Fix verify sign test

* Fix CHANGELOG.md

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-29 20:48:41 +00:00
colin axner 43837b16e7
Refactor 04-channel/keeper tests to ibc testing pkg (#6400)
* update testing pkg and first keeper test

* fix version bug

* add more helper testing funcs

* move create header to testing pkg

* fix connection state bug

* add staking genesis state

* update simapp with setting validator helper func

* update simapp with valset helper

* fix app hash issue

* update to query from correct iavl proof height

* first keeper test passing

* second test passing 🎉

* fix build

* update tests in all keeper_test

* fix lint

* begin refactoring querier test

* update first querier test and update testing helpers

* finish updating rest of querier tests

* rename ChannelID in TestChannel to ID

* remove usage of chain id for calling helper funcs

* update openinit and opentry tests

* finish opening channel handshake tests

* finish handshake tests

* general testing pkg cleanup

* finish packetsend refactor

* update recvpacket

* packet executed refactored

* finish packet test 🎉

* all tests passing

* cleanup and increase code cov

* remove todos in favor of opened issue #6509

* bump invalid id to meet validation requirements

* bubble up proof height + 1

* Apply suggestions from code review

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

* fix uninit conn test

* fix compile and address various pr review issues

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

Co-authored-by: Aditya <adityasripal@gmail.com>

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

Co-authored-by: Aditya <adityasripal@gmail.com>

* address @AdityaSripal comments and increase cov

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-26 16:36:04 +00:00
Alexander Bezobchuk 0d1a7293b7
cmd/simd: Use server.GetPruningOptionsFromFlags (#6508) 2020-06-25 13:57:41 +00:00
Alexander Bezobchuk cb6c552e05
init commit (#6503) 2020-06-24 14:07:26 +00:00
Alexander Bezobchuk 4716260a6e
Merge PR #6475: Pruning Refactor 2020-06-22 16:31:33 -04:00
Aaron Craelius 712d23740f
Migrate x/auth cmd's to TxGenerator marshaling (#6391)
* Migrate encode, decode, and broadcast cmd's to use TxGenerator marshal methods

* Fix tests, add EncodingConfig

* Add simapp/encoding.go and wire up with simcli

* add godocs

* fix tests

* Debugging CLI Tests

* Fix integration test

* 6391 - lint issues and code coverage (#6414)

* fixed lint issue of "txEncodeRespStr"

* added tests for encode.go

* WIP: added tests for decode.go

* added txEncoder at bytes

* updated decode test

* updated txBytes to use TxEncoder in decoder test

* added a require after TxEncoder

* removed file save

* debug decode command

* fixed decode tests

* added decode cli

* updated encode and decode in a single file

* separated decode test from encode test

* review changes

* removed register interface

* review change

* Fix tests

* WIP add test for tx sign

* removed commented code

* Fix flags

* WIP add test for sign

* Address review suggestions

* fixed command issue

* Add tests for TxEncoder

* Revert sign changes

* Fix TxEncoder tests

* Fix GetSign Cmd

* Add tx test

* Remove duplicate validation

* Add tests for TxDecoder

* Fix tests

* Fix tests

* Output to clientCtx.Output

* Fix cli_tests

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-18 20:29:41 +00:00
Alexander Bezobchuk 5040ff87c4
Merge PR #6449: Initial Metrics 2020-06-18 14:12:44 -04:00
dauTT 32278d9a2b
x/auth: remove alias.go usage (#6440)
* x/auth: remove alias.go usage

* Fix simd_test.go and formatting

* Fix app.go formatting

* Fix cli_test.go

* Fix lint warnings

* Undo accidental deletion during merge

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-17 14:42:27 -04:00
colin axner eb3f7e6473
rename blacklist to blocked (#6455)
* rename blacklisted to cannotSendTo

* add changelog

* rename to blockedAddrs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-17 13:32:49 +00:00
Jonathan Gimeno c134e8974e
Move some Param types from Keeper to Types in staking (#6451) 2020-06-16 19:59:36 +02:00
Alexander Bezobchuk 8ee7d1f403
Merge PR #6399: SDK Telemetry 2020-06-16 11:11:02 -04:00
Alexander Bezobchuk 6a05b83069
Merge PR #6426: Migrate API Server 2020-06-15 13:39:09 -04:00
dauTT 24b9be0ef8
x/bank: remove alias.go usage (#6439)
* x/bank: remove alias.go usage

* Fix simd_test.go
2020-06-14 23:06:16 +00:00
dauTT 8cf8098861
x/capability: remove alias.go usage (#6438) 2020-06-14 19:05:45 +02:00
dauTT 6e9ffc1a0e
x/crisis: remove alias.go usage (#6437) 2020-06-14 13:59:25 +00:00
dauTT 190bee27cb
x/distribution: remove alias.go usage (#6436) 2020-06-14 11:01:47 +00:00
dauTT cc42a82c86
x/evidence: remove alias.go usage (#6435) 2020-06-14 11:58:48 +02:00
dauTT 0286a4a5dc
x/ibc-transfer: remove alias.go usage (#6427)
* x/ibc-transfer: remove alias.go usage

* Fix formatting

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-06-13 16:20:38 -04: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
dauTT 1783f5ef1e
x/gov: remove alias.go usage (#6432) 2020-06-13 11:07:51 +02:00
dauTT c3ff8c0c06
x/genutil: remove alias.go usage (#6433) 2020-06-13 07:41:45 +00:00
dauTT 73bdb7d190
Merge PR #6424: x/mint - remove alias.go usage 2020-06-12 20:26:19 -04:00
Alexander Bezobchuk 7871910359
Simapp Localnet (#6421)
* Setup localnet

* Fix compose

* Fix file perms

* Fix build

* Codec + lint updates

* lint++
2020-06-12 16:23:08 +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
dauTT df68b1512c
x/slashing: remove alias.go usage (#6417)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-12 14:25:12 +00:00
dauTT 3228c3b12a
x/params: remove alias.go usage (#6415) 2020-06-12 09:52:04 -04:00
dauTT 82afd52981
x/upgrade: remove alias.go usage (#6382)
* x/upgrade: remove alias.go usage

* Simplify code

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.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-10 18:54:15 +00:00
Alessio Treglia 65ea305336
x/auth: add sign-batch command (#6350)
The command processes list of transactions from file
(one StdTx each line), generate signed transactions
or signatures and print their JSON encoding, delimited
by '\n'. As the signatures are generated, the command
increments the sequence number automatically.

Author: @jgimeno
Reviewed-by: @alessio
2020-06-08 17:19:29 +02:00
Aaron Craelius 4e0a475751
Make client.Context implement gRPC ClientConn (#6342)
* Add QueryConn to client.Context

* Add integration test

* imports

* spelling

* Make client.Context implement grpc ClientConn

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-08 13:41:30 +00: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
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
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
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
SaReN bf8809ef98
Update x/auth to use Any (#6165)
* Migrate keeper codec to use marshaler

* Migrate AccountI to types

* Did go imports

* Fix tests for x/auth

* Cleanup std/codec

* Sort imports

* Fix legacy codec

* Add godoc for RegisterInterfaces

* Add RegisterInterfaces to std

* Fix typo

* Fixed merge changes

* Eliminate vesting import in auth

* Fix lint issues

* Fix tests

* Addressed comments

* Rename interfaces in RegisterInterfaces

* Removed codec.proto from std

* Minor code cleanup

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-05-20 19:21:00 +00:00
Aaron Craelius 70767c87c4
Update x/gov to use Any (#6147)
* Update x/gov to use Any

* Fixes

* Remove MsgSubmitProposalLegacy

* Update CHANGELOG.md

* Add RegisterInterfaces for x/distribution, x/params, & x/upgrade

* Fix query JSON issue

* Fix gov tests

* Revert custom Any Equals

* Re-remove types

* Rename receivers

* Fix imports in gov

* Sort imports

* Make amino JSON signing work with Any

* Run proto-gen

* Create full amino wrapper

* Fix errors

* Fixes

* Fix tests

* Test fixes

* Fix tests

* Linting

* Update ADR 019 and CHANGELOG

* Updated ADR 019

* Extract Marshal/UnmarshalProposal

* fix error

* lint

* linting

* linting

* Update client/keys/parse.go

Co-authored-by: Marko <marbar3778@yahoo.com>

* linting

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Address review feedback

* Add godocs

* Fix errors

* fix errors

* revert file

* Address review feedback

* Address review feedback

* Stacktrace debug flag

* Fix tests

* Address review feedback

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +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
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
Marko 54ed8d7a2c
lint: official action (#6156)
* switch from review dog to official golangci action

* fix release

* disable nolintlint and wsl

* fix linting issues

* have name adhere to required

* add timeout

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-07 09:40:49 +00:00
Federico Kunze d7ebee74e7
x/ibc: proto migration pt 1 (#6097)
* x/ibc: proto migration pt 1

* fix tests

* fixes and godoc

* yaml tags

* rm changelog

* address comments from review

* fix some tests

* fix tests

* add _UNSPECIFIED suffix for default enums

* Update app

* protobuf Any fixes

* use gogoproto

* fix tests

* wrap all messages

* address @alexanderbez comments

* update proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-05-06 11:17:50 -04:00
Alexander Bezobchuk 2f718c8d66
Remove evidence codec (#6146) 2020-05-05 19:13:36 +00:00
Aaron Craelius 386217209d
Merge PR #6076: Proto Any init + evidence 2020-05-05 10:28:20 -04:00
Aditya 687d4246e5
Fix cap initialization by writing to uncached context (#6136) 2020-05-04 18:52:35 +00:00
Alessio Treglia 2414e5bdd4
x/auth: turn sign --validate-sigantures into a standalone command (#6108)
--validate-signatures should not be a flag of the sign command
as the operation performed (transaction signatures verification)
is logically distinct.

cli_test is and has always been an horrible name for package
directory as it's very much Go anti-idiomatic - _test is the
suffix used by test packages, not directories. Plus, CLI test
cases can and should live alongside other testcases that don't
require binaries to be built beforehand. Thus:

x/module/client/cli_test/*.go -> x/module/client/cli/

Test files that require sim{cli,d} shall be tagged with // +build cli_test

With regard to cli test auxiliary functions, they should live in:

x/module/client/testutil/

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-04 13:55:16 +00:00
Federico Kunze 930802e7a1
x/capability: simulations (#6062)
* x/capability: simulations

* update logs

* validate genesis state

* InitGenesis and ExportGenesis functions

* update validation func

* fix import-export sim

* remove nondeterminism from capability genesis

* Update x/capability/types/genesis.go

* Update x/capability/types/genesis.go

* fix tests

* fix merge

* consistency updates

* try fix nondeterminism

* fix conditional

* Fix random index logic

* lint

* lint

Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-30 15:07:43 +00:00
Aaron Craelius cc90f2e002
Merge pull request #6085: Move codec/std to std 2020-04-27 15:40:50 -04:00
Jack Zampolin 4f52797931
Update DefaultHistoricalEntries to 100 (#6059)
* Update DefaultHistoricalEntries to 1000

* hist entries sims and comment on simapp

* changelog and godoc

* update sim param change

* update default to 100

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-23 15:06:30 +00:00
Federico Kunze 8c736bb72f
x/evidence: StoreDecoder simulation (#6035)
* x/evidence: simulations

* update app

* evidence store decoder

* add evidence to sim import export

* fix test

* prevent zero values on randomized genesis

* return empty evidences for genesis state

* address comments from review
2020-04-23 14:51:03 +00:00
Jonathan Gimeno 550c3e9ef0
Jonathan/5988 sim params consensus 2 (#6051)
* temporal commit

* add random consensus params

* make format

* make random pass

* remove comment

* revert change

* update ub key types

* extract Evidence params from state

* extract the random parameters from state

* clean the code

* update imports!

* mispelled back

* mispelled back

* add misspelled command

* update changelog

* remove useless linter to avoid misspell

* remove function

* use tendermint constants

* update import test

* remove debug comment

* Update baseapp/baseapp.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 18:24:13 +00:00
Aditya 5e40869705
x/capability: start global capability index at 1 (#6047)
* start index at 1

* Update x/capability/keeper/keeper.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-21 21:04:11 -04:00
Federico Kunze 3ee975c57b
Merge PR #6037: refactor simulation decoder 2020-04-21 17:33:56 -04:00
Alexander Bezobchuk fea231556a
Move ModuleAccount to x/auth (#6029)
* Move ModuleAccount to x/auth

* Update x/auth module

* Update x/staking

* Update x/mint

* Update x/gov

* Update x/distribution

* Update simapp

* Update x/bank

* Update std codec

* Add changelog entries

* Update CHANGELOG.md

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-20 19:32:10 +00:00
Alexander Bezobchuk 1083fa948e
Merge PR #6010: Merge x/supply into x/bank 2020-04-20 11:22:12 -04:00
SaReN 50f81b173b
Add simd and simcli commands (#5998)
Reference: #5951
2020-04-20 15:17:21 +02:00
Federico Kunze 397ffbe119
x/ibc: update ICS09 Loopback Client (#6018)
* x/ibc: update ICS09 Loopback Client

* ibc/09-localhost: client state errors

* ibc/09-localhost: add messages for create client

* x/ibc: BeginBlocker for localhost client

* test fixes

* update client REST

* add tests
2020-04-17 22:36:12 -04:00
Aditya d247184157
Revert Capabilities on Failed Tx (#5999)
Reintroduce memKVStore to keep track of fwd and reverse mappings.

On reverse mapping, rather than store a mapping to marshalled
capability; we store the index.

capability.Keeper and all scopedKeeper have access to a capability
map that maps index to the capability pointer.

This is done to make sure that all writes to memKVStore get reverted
on a fail tx, while also allowing GetCapability to retrieve the original
memory pointer from the go map.

Go map must be accessed only by first going through the
memKVStore. SInce writes to go map cannot be automatically
reverted on tx failure, it gets cleaned up on failed GetCapability calls.

Closes: #5965
2020-04-16 18:42:13 +02:00
Alexander Bezobchuk 4da4bb64df
Merge PR #6005: x/params: Raw Parameter Querying 2020-04-16 12:22:58 -04:00
Alexander Bezobchuk 09a55f68b5
Merge PR #5952: Refactor Evidence Age Util + Governable Consensus Params 2020-04-16 11:10:39 -04:00
Federico Kunze b5a6587291
x/ibc: IBC alpha (#5277)
* IBC alpha

* ICS 23 Implementation (#4515)

* add mapping

* rm unused mapping/*, rm interfaces

* rm unused code

* mv mapping -> state, rm x/ibc

* rm GetIfExists

* add key

* rm custom encoding/decoding in enum/bool

* fix lint

* rm tests

* add commitment

* newtyped remote values

* newtyped context

* revert context newtype

* add README, keypath

* reflect downstream ics

* add merkle

* add test for proving

* soft coded root keypath

* add update

* remove RootUpdate

* separate keypath and keuprefix

* add codec

* separate root/path

* add path to codec

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* reformat test

* rm XXX

* add godoc

* add query

* update query.go

* update query.go

* add Query to boolean.go

* fix key

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* revise querier interface to work both on cli & store

* rm commented lines

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* remove Mapping

* remove store accessors

* refactor ICS23

* cleanup types

* implement batch verification

* gosimple suggestion

* alias

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* start batch-verify tests

* minor changes on commitment types

* use testsuite

* upstream changes

* context changes

* ICS 02 Implementation (#4516)

* add mapping

* rm unused mapping/*, rm interfaces

* rm unused code

* mv mapping -> state, rm x/ibc

* rm GetIfExists

* add key

* rm custom encoding/decoding in enum/bool

* fix lint

* rm tests

* add commitment

* newtyped remote values

* newtyped context

* revert context newtype

* add README, keypath

* reflect downstream ics

* add merkle

* add test for proving

* soft coded root keypath

* add update

* remove RootUpdate

* separate keypath and keuprefix

* add codec

* separate root/path

* add path to codec

* add client

* add counterpartymanager

* fix manager

* add Is() to counterobject

* add readme, reflect ICS02 revision

* reflect downstream ics

* test in progress

* add test

* in progres

* fin rebase

* in progress

* fin rebase

* add CLIObject in progress

* cli in progress

* add CLIObject

* separate testing from tendermint

* add key to node

* add root and storekey to tests/node, add codec

* rm cli/query.go

* fix test

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* rm freebase, reformat query

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* rm commented lines

* address review in progress

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* add verification functions

* ICS02 module.go

* top level x/ibc structure

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling

* start batch-verify tests

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* ICS 03 Implementation (#4517)

* add test

* in progres

* fin rebase

* in progress

* fin rebase

* add CLIObject in progress

* cli in progress

* add CLIObject

* separate testing from tendermint

* add key to node

* add root and storekey to tests/node, add codec

* rm cli/query.go

* fix test

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* fix querying

* extract out context withstore

* fix 02-client test

* fix 23-commitment test

* add query in progress

* rm freebase, reformat query

* add cli/handler/msg in progress

* add cli/msg/handler

* add CLIQuery, fix tests

* fix golangci

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* fix test

* fix client

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* update expected client keeper and export verification funcs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* start batch-verify tests

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* fix

* ICS 05 implementation (#5193)

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* fix querying

* extract out context withstore

* fix 02-client test

* fix 23-commitment test

* add query in progress

* rm freebase, reformat query

* add cli/handler/msg in progress

* add cli/msg/handler

* add CLIQuery, fix tests

* fix golangci

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* fix test

* fix client

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* start batch-verify tests

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* ICS 04 Implementation (#4548)

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* add port

* fix test

* add mocks

* fix connid -> portid in handshake.go

* add mock

* add ibc module.go, finalize mock

* add keeper

* add StoreKey const

* fix test

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix cli errors

* fix dependency

* fix dependency

* reflect method name change

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* reflect downstream changes

* fix from address in tx cli

* fix cli in progress(squash later)

* fix cli

* remove timeout, add channel cli

* fix golangci

* fix cli

* Clean up

* fix mock cli in progress

* finalize cleanup, mock cli wip

* add cli for mocksend

* fix handler

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename mock packages

* fix interface for gaia

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* update test

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* start batch-verify tests

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* upstream changes

* IBC v1.0.0 (#5245)

* applying review in progress

* apply review - make querier interface

* fix cli errors

* fix dependency

* fix dependency

* reflect method name change

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* reflect downstream changes

* fix from address in tx cli

* fix cli in progress(squash later)

* fix cli

* remove timeout, add channel cli

* fix golangci

* fix cli

* Clean up

* fix mock cli in progress

* finalize cleanup, mock cli wip

* add cli for mocksend

* fix handler

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename mock packages

* fix interface for gaia

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* update test

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* start batch-verify tests

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* add ibc module to simapp

* ICS20 implementation (#5204)

* add ibc bank mock

* modify handler

* import channel

* add receiving logic

* add cli proof handling

* modify cli

* modify receiver type

* modify errcode

* optimize codes

* add denom prefix when source is true

* refactor code

* error return

* switch ibc antehandler to decorator pattern

* fix name/comment

* ICS 20 implementation (#5250)

* move ics20 code to 20-transfer

* clean code

* fix compiling error

* add transfer module

* address ICS20 comments from review

* add routing callbacks

* clean code

* add missing err return

* modify err type

* modify err type

* add supply handling

* modify proof type

* add comments for msg and packet data

* add timeout supply handling

* modify module account name

* use supply keeper for burn and mint coins

* restructure keeper

* update alias and module.go

* golangci linter

* add ics20 handler to IBC handler

* update callbacks

* update ICS20 escrow address

* fix querier routes

* fix create client cli

* minor updates

* ibc querier test

* Refactor ibc/mock/bank into ICS 20 (#5264)

* Most of code port from mock module to ICS 20

* A few minor fixes

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix suggestions from autolinter

* Apply suggestions from code review

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

* Fix order of messages

* Add invalid height error code, check non-nil proof

* Fix linter error

* Return the underlying error

* Tendermint starts at height 1

* Apply suggestions from code review

* setup ics20 test suite

* add event to MsgRecvPacket

* update ibc keeper test to use test suite

* Add handshake commands

* WIP connection handshake

* WIP Connection Handshake

* use testsuite

* Add cliCtx.WaitForNBlocks

* fix connection handshake in progress

* fix connection handshake in progress

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* upstream changes

* upstream changes

* IBC demo fixes (#5267)

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* start batch-verify tests

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* add ibc module to simapp

* ICS20 implementation (#5204)

* add ibc bank mock

* modify handler

* import channel

* add receiving logic

* add cli proof handling

* modify cli

* modify receiver type

* modify errcode

* optimize codes

* add denom prefix when source is true

* refactor code

* error return

* switch ibc antehandler to decorator pattern

* fix name/comment

* ICS 20 implementation (#5250)

* move ics20 code to 20-transfer

* clean code

* fix compiling error

* add transfer module

* address ICS20 comments from review

* add routing callbacks

* clean code

* add missing err return

* modify err type

* modify err type

* add supply handling

* modify proof type

* add comments for msg and packet data

* add timeout supply handling

* modify module account name

* use supply keeper for burn and mint coins

* restructure keeper

* update alias and module.go

* golangci linter

* add ics20 handler to IBC handler

* update callbacks

* update ICS20 escrow address

* fix querier routes

* fix create client cli

* minor updates

* ibc querier test

* Refactor ibc/mock/bank into ICS 20 (#5264)

* Most of code port from mock module to ICS 20

* A few minor fixes

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix suggestions from autolinter

* Apply suggestions from code review

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

* Fix order of messages

* Add invalid height error code, check non-nil proof

* Fix linter error

* Return the underlying error

* Tendermint starts at height 1

* Apply suggestions from code review

* setup ics20 test suite

* add event to MsgRecvPacket

* update ibc keeper test to use test suite

* Add handshake commands

* WIP connection handshake

* WIP Connection Handshake

* use testsuite

* Add cliCtx.WaitForNBlocks

* fix connection handshake in progress

* fix connection handshake in progress

* Add print debugging (old-school)

* Add log line

* More debugging

* Set prove flag to true

* More debugging

* Use store query

* Fix query, hopefully

* Fix query path

* Hmm

* Fix context bug

* Generate & return & use consensus state proof

* Print debugging

* Add debugging

* Begin working on the channel creation command

* remove submodule prefix from keypath, fix addConnectionToClients to treat nil as empty array

* fix OpenConfirm, rm debugging code

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* Update bound port

* Add from flag to ICS 20 commands

* Undefine flag

* add debug

* Uncomment channel message handlers

* fix validatebasic identifier failure

* Fix printing

* add debug code

* CLI debugging

* fix counterpartyHops, channel handshake working w/o port

* Fix compilation error

* Push channel query command update

* Remove unused code

* Add gaiacli keys test

* Update error

* Add printf

* fix token restriciton

* comment out port

* fix querier to retrieve the next sequence

* Alter command to take arguments

* Name it packet-sequence

* add packet query utils

* Use the querier

* Packet is JSON

* printf the value

* fix query packet

* fix packet receive in progress

* lol

* export Packet fields, rename Packet.XXX() -> Packet.GetXXX()

* fix route

* add debug

* comment out port logic from packet.go

* token transfer now working

* fix client tx

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* Apply suggestions from code review

* clean up

* finish tendermint tests

* complete merge

* Add tests for msgs

* ICS02 changes

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* upstream changes

* upstream changes

* more cleanup

* Add unit tests for ICS03 (#5275)

* add Is() to counterobject

* add readme, reflect ICS02 revision

* reflect downstream ics

* test in progress

* add test

* in progres

* fin rebase

* in progress

* fin rebase

* add CLIObject in progress

* cli in progress

* add CLIObject

* separate testing from tendermint

* add key to node

* add root and storekey to tests/node, add codec

* rm cli/query.go

* fix test

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* fix querying

* extract out context withstore

* fix 02-client test

* fix 23-commitment test

* add query in progress

* rm freebase, reformat query

* add cli/handler/msg in progress

* add cli/msg/handler

* add CLIQuery, fix tests

* fix golangci

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* fix test

* fix client

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* update expected client keeper and export verification funcs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* implement ics25

* update comment

* refactor method name

* fix file name

* add test case

* refactor code

* refactor code

* blocked the consensusState check

* refactor code

* fix golangci comments

* refactor testcase

* replace rootMultiStore with simApp

* remove unless code

* remove unless code & refactor test case

* refactor testcase

* goimports code

* clean up

* Add unit tests for ICS04 (#5286)

* fix test

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix cli errors

* fix dependency

* fix dependency

* reflect method name change

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* reflect downstream changes

* fix from address in tx cli

* fix cli in progress(squash later)

* fix cli

* remove timeout, add channel cli

* fix golangci

* fix cli

* Clean up

* fix mock cli in progress

* finalize cleanup, mock cli wip

* add cli for mocksend

* fix handler

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename mock packages

* fix interface for gaia

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* update test

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* add ibc module to simapp

* ICS20 implementation (#5204)

* add ibc bank mock

* modify handler

* import channel

* add receiving logic

* add cli proof handling

* modify cli

* modify receiver type

* modify errcode

* optimize codes

* add denom prefix when source is true

* refactor code

* error return

* switch ibc antehandler to decorator pattern

* fix name/comment

* ICS 20 implementation (#5250)

* move ics20 code to 20-transfer

* clean code

* fix compiling error

* add transfer module

* address ICS20 comments from review

* add routing callbacks

* clean code

* add missing err return

* modify err type

* modify err type

* add supply handling

* modify proof type

* add comments for msg and packet data

* add timeout supply handling

* modify module account name

* use supply keeper for burn and mint coins

* restructure keeper

* update alias and module.go

* golangci linter

* add ics20 handler to IBC handler

* update callbacks

* update ICS20 escrow address

* fix querier routes

* fix create client cli

* minor updates

* ibc querier test

* Refactor ibc/mock/bank into ICS 20 (#5264)

* Most of code port from mock module to ICS 20

* A few minor fixes

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix suggestions from autolinter

* Apply suggestions from code review

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

* Fix order of messages

* Add invalid height error code, check non-nil proof

* Fix linter error

* Return the underlying error

* Tendermint starts at height 1

* Apply suggestions from code review

* setup ics20 test suite

* add event to MsgRecvPacket

* update ibc keeper test to use test suite

* Add handshake commands

* WIP connection handshake

* WIP Connection Handshake

* Add cliCtx.WaitForNBlocks

* fix connection handshake in progress

* fix connection handshake in progress

* add channel unit test

* add more channel tests

* fix channel test

* refactor channel test

* add capability test for channel

* make channel testing work

* optimize channel test

* delete types/errors.go

* modify capability test

* uncomment

* add msg tests for channel

* fix port capability store

* fix channel test

* use simapp

* modify channel test

* refactor channel msg test

* go fmt

* IBC alpha general cleanup (#5291)

* remove prefix from keeper; update client queries; address ICS02 comments from @cwgoes

* add proof for root query

* golangci

* remove hardcoded bind port logic

* space

* WIP: register errors

* register errors; make format

* use new instead of register; unescape path

* golangci

* Fix codec issue in ics23

* Modify codec registration style to match previous working state

* write port tests

* ICS-02: Keeper Tests (#5329)

* add keeper tests

* fix tendermint tests

* Fix proof verification; remove store key prefixes; add additional path validations (#5313)

* fix poof verify

* minor cleanup

* fix tests

* remove key prefixes

* fix tests

* Add ICS20 tests (#5308)

* add ics20 test

* delete debug

* fix ics20 test

* revert and modify

* optimize test

* add ics20 msg test

* fix test

* add packet tests and more msgs tests

* add ReceivePacket and callbacks tests

* fix callbacks test

* add handler tests for ics20

* fix handler tests

* minor cleanup

* test all positive amounts

* update test suite NotNil to Error

* fix ics20 tests

* expected error

* Add IBC REST endpoints (#5310)

* add rest framework

* add rest endpoints for ibc connection

* add rest endpoints for ibc client

* add rest endpoints for ibc channel

* modify ibc rest api

* add rest endpoints for ibc transfer

* fix query route

* fix receive packet

* fix query client state api

* use sub module name instead of icsxx

* use const for prove judgement

* modify ibc rest api

* add api docs to swagger

* add ibc config

* fix proof path in swagger

* return query result proof

* update swagger docs

* parse prove

* clean up

* fix ibc rest api and swagger docs

* fix host validate

* fix typo

* add submitMisbehaviour error response in swagger

* fix rest queryRoot and swagger doc

* add response comments for each REST functions

* fix rest function comments

* fix IBC proofs (#5351)

* fix ICS02 proofs

* fix ICS03 proofs

* fix ICS04 proofs

* fix ICS20 proofs

* make format

* fix build; comment handshakes

* ICS-2 Implement Misbehavior (#5321)

* ibc client evidence route

* split evidence from misbehaviour

* clean up client events

* test misbehaviour and evidence

* remove comments

* remove frozen comments from demo

* Update x/ibc/02-client/types/tendermint/evidence_test.go

Co-Authored-By: Aditya <adityasripal@gmail.com>

* change evidence to detect malicious chain

* remove unnecessary sort

* fix evidence and persist committers to check misbehaviour

* minor fixes and remove incorrect tests

* add evidence tests

* remove debug statements

* cleanup evidence test

* start misbehaviour tests

* fix nondeterministic bug

* add same height and next height checks in misbehaviour

* fix bugs

* apply fede review suggestions

* finish code review changes

* fix GetCommitter and write keeper-level misbehaviour tests

* remove incorrect special case checking

* save

* final fixes

* save

* fix conflict

* fix conflicts and add back submit misbehaviour msg

* Apply suggestions from code review

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

* save

* add godocs and fix test

* fix test panics in other modules

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

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* add back aliases

* Misc ibc fixes (#5357)

* fix cli ExactArgs

* remove full handshakes

* rm dup flag

* fix error handling

* Implement Query Committer methods in ICS-02 (#5402)

* add query methods for committers in ICS-02

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

* add REST docs

* fix test

* IBC UX improvements (#5364)

* ICS02 iterators

* ICS03 iterators

* ICS04 iterators

* ICS02 client updates

* CLI connections

* setup queriers

* clean up queriers

* add tests

* IBC top-level querier tests

* update ICS02 keys

* update ICS03 keys

* make format

* update ICS04 keys

* fix a few tests

* fix ICS20 tests

* update keys

* fix ICS02 queries (#5425)

* fix CLI JSON param unmarshaling (#5431)

* Fix inconsistent string lookup functions (#5437)

* fix inconsistent string lookup functions

* test client type and ordering

* channel and connection state tests

* address golangcibot comments

* fix test

* Update x/ibc error handling (#5462)

* Merge PR #5428: Add mod, exponentiation for uint

* Modified examples in distribution module (#5441)

* Merge PR #5442: Remove of the client/alias.go

* Merge PR #5445: Mock rpcclient in tests for votes pagination

* Merge PR #5435: Added iterator that allows to read only requested values

* Merge PR #5427: Remove code duplication in x/auth/client/cli

* Merge PR #5421: Refactor Error Handling

* update x/ibc error handling

* update ICS24 and ICS02 errors

* ICS03, ICS23 and common errors

* updates from master and errors from ICS04

* build

* fix ics20 tests

* fix tests

* golangcibot fixes

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Ferenc Fabian <qwer.kocka@gmail.com>
Co-authored-by: Dmitry Shulyak <yashulyak@gmail.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* ADR 015 Implementation (#5401)

* implement in progress

* rm unneccessary change under simapp, modify baseapp for codetxbreak

* fix test in progress

* fix test error

* fix golangci

* address minor comments

* mv antehandler to ante/, address comments

* fix GetCommitment => GetData, fix syntax

* checkout types/ to ibc-alpha

* checkout to origin/ibc-alpha

* fix branch problem

* fix syntax error

* recover PacketI interface

* mv recvpacket rest from 20 -> 04

* address minor comments

* Apply suggestions from code review

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

* rm wrong files

* Apply suggestions from code review

* PacketDataI field is now named, not embed

* add acknowledgement hashing

* rename finalization functiosn

* Apply suggestions from code review

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

* Rename GetCommitment() to GetBytes()

* Add recv sequence incr to RecvPacket()

* Revert but where is PacketExecuted() called

* Call PacketExecuted(), check seq in RecvPacket()

* The port is called "bank"

* Apply suggestions from code review

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

* Update simapp/app.go

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

* Remove omitempty

* Add godoc

* Move events

* set ProofVerificationDecorator on AnteHandler

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* format

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* IBC alpha

* ICS 23 Implementation (#4515)

* add mapping

* rm unused mapping/*, rm interfaces

* rm unused code

* mv mapping -> state, rm x/ibc

* rm GetIfExists

* add key

* rm custom encoding/decoding in enum/bool

* fix lint

* rm tests

* add commitment

* newtyped remote values

* newtyped context

* revert context newtype

* add README, keypath

* reflect downstream ics

* add merkle

* add test for proving

* soft coded root keypath

* add update

* remove RootUpdate

* separate keypath and keuprefix

* add codec

* separate root/path

* add path to codec

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* reformat test

* rm XXX

* add godoc

* add query

* update query.go

* update query.go

* add Query to boolean.go

* fix key

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* revise querier interface to work both on cli & store

* rm commented lines

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* remove Mapping

* remove store accessors

* refactor ICS23

* cleanup types

* implement batch verification

* gosimple suggestion

* alias

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* start batch-verify tests

* minor changes on commitment types

* use testsuite

* upstream changes

* context changes

* ICS 02 Implementation (#4516)

* add mapping

* rm unused mapping/*, rm interfaces

* rm unused code

* mv mapping -> state, rm x/ibc

* rm GetIfExists

* add key

* rm custom encoding/decoding in enum/bool

* fix lint

* rm tests

* add commitment

* newtyped remote values

* newtyped context

* revert context newtype

* add README, keypath

* reflect downstream ics

* add merkle

* add test for proving

* soft coded root keypath

* add update

* remove RootUpdate

* separate keypath and keuprefix

* add codec

* separate root/path

* add path to codec

* add client

* add counterpartymanager

* fix manager

* add Is() to counterobject

* add readme, reflect ICS02 revision

* reflect downstream ics

* test in progress

* add test

* in progres

* fin rebase

* in progress

* fin rebase

* add CLIObject in progress

* cli in progress

* add CLIObject

* separate testing from tendermint

* add key to node

* add root and storekey to tests/node, add codec

* rm cli/query.go

* fix test

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* rm freebase, reformat query

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* rm commented lines

* address review in progress

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* add verification functions

* ICS02 module.go

* top level x/ibc structure

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling

* start batch-verify tests

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* ICS 03 Implementation (#4517)

* add test

* in progres

* fin rebase

* in progress

* fin rebase

* add CLIObject in progress

* cli in progress

* add CLIObject

* separate testing from tendermint

* add key to node

* add root and storekey to tests/node, add codec

* rm cli/query.go

* fix test

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* fix querying

* extract out context withstore

* fix 02-client test

* fix 23-commitment test

* add query in progress

* rm freebase, reformat query

* add cli/handler/msg in progress

* add cli/msg/handler

* add CLIQuery, fix tests

* fix golangci

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* fix test

* fix client

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* update expected client keeper and export verification funcs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* start batch-verify tests

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* fix

* ICS 05 implementation (#5193)

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* fix querying

* extract out context withstore

* fix 02-client test

* fix 23-commitment test

* add query in progress

* rm freebase, reformat query

* add cli/handler/msg in progress

* add cli/msg/handler

* add CLIQuery, fix tests

* fix golangci

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* fix test

* fix client

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* start batch-verify tests

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* ICS 04 Implementation (#4548)

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* add port

* fix test

* add mocks

* fix connid -> portid in handshake.go

* add mock

* add ibc module.go, finalize mock

* add keeper

* add StoreKey const

* fix test

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix cli errors

* fix dependency

* fix dependency

* reflect method name change

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* reflect downstream changes

* fix from address in tx cli

* fix cli in progress(squash later)

* fix cli

* remove timeout, add channel cli

* fix golangci

* fix cli

* Clean up

* fix mock cli in progress

* finalize cleanup, mock cli wip

* add cli for mocksend

* fix handler

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename mock packages

* fix interface for gaia

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* update test

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* start batch-verify tests

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* use testsuite

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* upstream changes

* IBC v1.0.0 (#5245)

* applying review in progress

* apply review - make querier interface

* fix cli errors

* fix dependency

* fix dependency

* reflect method name change

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* reflect downstream changes

* fix from address in tx cli

* fix cli in progress(squash later)

* fix cli

* remove timeout, add channel cli

* fix golangci

* fix cli

* Clean up

* fix mock cli in progress

* finalize cleanup, mock cli wip

* add cli for mocksend

* fix handler

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename mock packages

* fix interface for gaia

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* update test

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* start batch-verify tests

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* add ibc module to simapp

* ICS20 implementation (#5204)

* add ibc bank mock

* modify handler

* import channel

* add receiving logic

* add cli proof handling

* modify cli

* modify receiver type

* modify errcode

* optimize codes

* add denom prefix when source is true

* refactor code

* error return

* switch ibc antehandler to decorator pattern

* fix name/comment

* ICS 20 implementation (#5250)

* move ics20 code to 20-transfer

* clean code

* fix compiling error

* add transfer module

* address ICS20 comments from review

* add routing callbacks

* clean code

* add missing err return

* modify err type

* modify err type

* add supply handling

* modify proof type

* add comments for msg and packet data

* add timeout supply handling

* modify module account name

* use supply keeper for burn and mint coins

* restructure keeper

* update alias and module.go

* golangci linter

* add ics20 handler to IBC handler

* update callbacks

* update ICS20 escrow address

* fix querier routes

* fix create client cli

* minor updates

* ibc querier test

* Refactor ibc/mock/bank into ICS 20 (#5264)

* Most of code port from mock module to ICS 20

* A few minor fixes

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix suggestions from autolinter

* Apply suggestions from code review

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

* Fix order of messages

* Add invalid height error code, check non-nil proof

* Fix linter error

* Return the underlying error

* Tendermint starts at height 1

* Apply suggestions from code review

* setup ics20 test suite

* add event to MsgRecvPacket

* update ibc keeper test to use test suite

* Add handshake commands

* WIP connection handshake

* WIP Connection Handshake

* use testsuite

* Add cliCtx.WaitForNBlocks

* fix connection handshake in progress

* fix connection handshake in progress

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* finish tendermint tests

* complete merge

* Add tests for msgs

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* upstream changes

* upstream changes

* IBC demo fixes (#5267)

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* start batch-verify tests

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* add ibc module to simapp

* ICS20 implementation (#5204)

* add ibc bank mock

* modify handler

* import channel

* add receiving logic

* add cli proof handling

* modify cli

* modify receiver type

* modify errcode

* optimize codes

* add denom prefix when source is true

* refactor code

* error return

* switch ibc antehandler to decorator pattern

* fix name/comment

* ICS 20 implementation (#5250)

* move ics20 code to 20-transfer

* clean code

* fix compiling error

* add transfer module

* address ICS20 comments from review

* add routing callbacks

* clean code

* add missing err return

* modify err type

* modify err type

* add supply handling

* modify proof type

* add comments for msg and packet data

* add timeout supply handling

* modify module account name

* use supply keeper for burn and mint coins

* restructure keeper

* update alias and module.go

* golangci linter

* add ics20 handler to IBC handler

* update callbacks

* update ICS20 escrow address

* fix querier routes

* fix create client cli

* minor updates

* ibc querier test

* Refactor ibc/mock/bank into ICS 20 (#5264)

* Most of code port from mock module to ICS 20

* A few minor fixes

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix suggestions from autolinter

* Apply suggestions from code review

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

* Fix order of messages

* Add invalid height error code, check non-nil proof

* Fix linter error

* Return the underlying error

* Tendermint starts at height 1

* Apply suggestions from code review

* setup ics20 test suite

* add event to MsgRecvPacket

* update ibc keeper test to use test suite

* Add handshake commands

* WIP connection handshake

* WIP Connection Handshake

* use testsuite

* Add cliCtx.WaitForNBlocks

* fix connection handshake in progress

* fix connection handshake in progress

* Add print debugging (old-school)

* Add log line

* More debugging

* Set prove flag to true

* More debugging

* Use store query

* Fix query, hopefully

* Fix query path

* Hmm

* Fix context bug

* Generate & return & use consensus state proof

* Print debugging

* Add debugging

* Begin working on the channel creation command

* remove submodule prefix from keypath, fix addConnectionToClients to treat nil as empty array

* fix OpenConfirm, rm debugging code

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* WIP channel shake 🕺

* Update bound port

* Add from flag to ICS 20 commands

* Undefine flag

* add debug

* Uncomment channel message handlers

* fix validatebasic identifier failure

* Fix printing

* add debug code

* CLI debugging

* fix counterpartyHops, channel handshake working w/o port

* Fix compilation error

* Push channel query command update

* Remove unused code

* Add gaiacli keys test

* Update error

* Add printf

* fix token restriciton

* comment out port

* fix querier to retrieve the next sequence

* Alter command to take arguments

* Name it packet-sequence

* add packet query utils

* Use the querier

* Packet is JSON

* printf the value

* fix query packet

* fix packet receive in progress

* lol

* export Packet fields, rename Packet.XXX() -> Packet.GetXXX()

* fix route

* add debug

* comment out port logic from packet.go

* token transfer now working

* fix client tx

* Integrate Evidence Implementation into ICS-02 (#5258)

* implement evidence in ics-02

* fix build errors and import cycles

* address fede comments

* remove unnecessary pubkey and fix init

* add tests

* Apply suggestions from code review

* clean up

* finish tendermint tests

* complete merge

* Add tests for msgs

* ICS02 changes

* upstream changes

* fix

* upstream changes

* fix cons state

* context changes

* fix cli tx

* upstream changes

* upstream changes

* upstream changes

* upstream changes

* more cleanup

* Add unit tests for ICS03 (#5275)

* add Is() to counterobject

* add readme, reflect ICS02 revision

* reflect downstream ics

* test in progress

* add test

* in progres

* fin rebase

* in progress

* fin rebase

* add CLIObject in progress

* cli in progress

* add CLIObject

* separate testing from tendermint

* add key to node

* add root and storekey to tests/node, add codec

* rm cli/query.go

* fix test

* fix lint

* fix lint

* add handler/msgs/client

* rm relay

* finalize rebase on 23 root/path sep

* fix lint, fix syntax

* fix querying

* extract out context withstore

* fix 02-client test

* fix 23-commitment test

* add query in progress

* rm freebase, reformat query

* add cli/handler/msg in progress

* add cli/msg/handler

* add CLIQuery, fix tests

* fix golangci

* add docs in progre

* add comments

* add comments

* Apply suggestions from code review

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

* add comments in progress

* add comments

* fix comment

* add comments in progress

* recover IntEncoding scheme for integer

* add uint tests, don't use codec in custom types

* finalize merge

* add godoc

* add godoc in progress

* reformat test

* rm XXX

* add godoc

* modify store

* add query

* update query.go

* update query.go

* cli refactor in progress

* cli refactor in progress

* add Query to boolean.go

* fix key

* fix cli / merkle test

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* godoc cleanup

* fix test

* fix client

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* merge from ics04 branch

* fix lint

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix dependency

* fix dependency

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* update expected client keeper and export verification funcs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* minor changes on commitment types

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* implement ics25

* update comment

* refactor method name

* fix file name

* add test case

* refactor code

* refactor code

* blocked the consensusState check

* refactor code

* fix golangci comments

* refactor testcase

* replace rootMultiStore with simApp

* remove unless code

* remove unless code & refactor test case

* refactor testcase

* goimports code

* clean up

* Add unit tests for ICS04 (#5286)

* fix test

* Apply suggestions from code review

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

* applying review in progress

* apply review - make querier interface

* fix cli errors

* fix dependency

* fix dependency

* reflect method name change

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* revise querier interface to work both on cli & store

* reflect downstream change

* fix cli

* reflect downstream changes

* reflect downstream changes

* fix from address in tx cli

* fix cli in progress(squash later)

* fix cli

* remove timeout, add channel cli

* fix golangci

* fix cli

* Clean up

* fix mock cli in progress

* finalize cleanup, mock cli wip

* add cli for mocksend

* fix handler

* rm commented lines

* address review in progress

* address review, rm cleanup/closing

* rename mock packages

* fix interface for gaia

* rename Path -> Prefix

* Store accessor upstream changes (#5119)

* Store accessor upstream changes (#5119)

* add comments, reformat merkle querier

* rm merkle/utils

* ICS 23 upstream changes (#5120)

* ICS 23 upstream changes (#5120)

* update Value

* update test

* fix

* ICS 02 upstream changes (#5122)

* ICS 02 upstream changes (#5122)

* ICS 03 upstream changes (#5123)

* ICS 03 upstream changes (#5123)

* update test

* cleanup types and submodule

* more cleanup and godocs

* remove counterPartyManager/State and cleanup

* implement SubmitMisbehaviour and refactor

* errors

* events

* fix test

* refactors

* WIP refactor ICS03

* remove Mapping

* remove store accessors

* proposed refactor

* remove store accessors from ICS02

* refactor queriers, handler and clean keeper

* logger and tx long description

* ineffassign

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* remove store accessors

* refactor handshake to update it to the latest ICS03 spec

* update handler and msgs

* add verification functions

* update verification

* ICS02 module.go

* top level x/ibc structure

* update connection queries

* update connection tx

* remove extra files

* refactor: remove store accessors, update keeper and types to match spec (WIP)

* update handshake and packet

* implement packet timeouts

* implement send and receive packet

* implement packet ACK

* update handler

* add channel errors

* channel querier

* update expected client keeper and export verification funcs

* ICS 05 Implementation

* release port and godocs

* Update x/ibc/02-client/client/cli/query.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* Update x/ibc/02-client/types/tendermint/consensus_state.go

Co-Authored-By: Jack Zampolin <jack.zampolin@gmail.com>

* address some of the review comments

* resolve some TODOs and address comments from review

* update connection versioning

* minor error updates

* update ICS04 with downstream changes

* Implement tx cli actions

* add MsgSendPacket handler; msg validation, errors and events

* update errors and add port Keeper to ibc Keeper

* minor UX improvements

* rename pkg

* fixes

* refactor ICS23

* cleanup types

* ICS 5 updates (#5222)

* Validate port identifiers

* Refactor to static bind

* Add comments

* Add 'GetPorts' query function

* rename pkg and fix import

* implement batch verification

* gosimple suggestion

* various fixes; remove legacy tests; remove commitment path query

* alias

* minor updates from ICS23

* renaming

* update verification and rename root funcs

* rm legacy tests; add query proofs support

* remove capability key generation and authentication logic

* move querier to x/ibc

* update query.go to use 'custom/...' query path

* add tests

* ICS 24 Implementation (#5229)

* add validation functions

* validate path in ics-23

* address @fede comments

* move errors into host package

* flatten ICS23 structure

* fix ApplyPrefix

* updates from ICS23 and ICS24

* msg.ValidateBasic and ADR09 evidence interface

* complete types testing

* delete empty test file

* remove ibc errors from core error package

* custom JSON marshaling; msg.ValidateBasic; renaming of variables

* minor update

* custom JSON marshaling

* use host validation for port ids

* downstream changes; custom marshal JSON; msg validation, and update errors

* update errors and aliases

* update msg validation and CLI UX

* minor changes on commitment types

* fix channel and packet check (#5243)

* R4R - Store consensus state correctly (#5242)

* store consensus state correctly

* fix client example

* update alias

* update alias

* update alias and keeper.GetPort()

* authenticate port ID; remove send packet msg from CLI

* comment out handlers

* add ibc module to simapp

* ICS20 implementation (#5204)

* add ibc bank mock

* modify handler

* import channel

* add receiving logic

* add cli proof handling

* modify cli

* modify receiver type

* modify errcode

* optimize codes

* add denom prefix when source is true

* refactor code

* error return

* switch ibc antehandler to decorator pattern

* fix name/comment

* ICS 20 implementation (#5250)

* move ics20 code to 20-transfer

* clean code

* fix compiling error

* add transfer module

* address ICS20 comments from review

* add routing callbacks

* clean code

* add missing err return

* modify err type

* modify err type

* add supply handling

* modify proof type

* add comments for msg and packet data

* add timeout supply handling

* modify module account name

* use supply keeper for burn and mint coins

* restructure keeper

* update alias and module.go

* golangci linter

* add ics20 handler to IBC handler

* update callbacks

* update ICS20 escrow address

* fix querier routes

* fix create client cli

* minor updates

* ibc querier test

* Refactor ibc/mock/bank into ICS 20 (#5264)

* Most of code port from mock module to ICS 20

* A few minor fixes

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix suggestions from autolinter

* Apply suggestions from code review

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

* Fix order of messages

* Add invalid height error code, check non-nil proof

* Fix linter error

* Return the underlying error

* Tendermint starts at height 1

* Apply suggestions from code review

* setup ics20 test suite

* add event to MsgRecvPacket

* update ibc keeper test to use test suite

* Add handshake commands

* WIP connection handshake

* WIP Connection Handshake

* Add cliCtx.WaitForNBlocks

* fix connection handshake in progress

* fix connection handshake in progress

* add channel unit test

* add more channel tests

* fix channel test

* refactor channel test

* add capability test for channel

* make channel testing work

* optimize channel test

* delete types/errors.go

* modify capability test

* uncomment

* add msg tests for channel

* fix port capability store

* fix channel test

* use simapp

* modify channel test

* refactor channel msg test

* go fmt

* IBC alpha general cleanup (#5291)

* remove prefix from keeper; update client queries; address ICS02 comments from @cwgoes

* add proof for root query

* golangci

* remove hardcoded bind port logic

* space

* WIP: register errors

* register errors; make format

* use new instead of register; unescape path

* golangci

* Fix codec issue in ics23

* Modify codec registration style to match previous working state

* write port tests

* ICS-02: Keeper Tests (#5329)

* add keeper tests

* fix tendermint tests

* Fix proof verification; remove store key prefixes; add additional path validations (#5313)

* fix poof verify

* minor cleanup

* fix tests

* remove key prefixes

* fix tests

* Add ICS20 tests (#5308)

* add ics20 test

* delete debug

* fix ics20 test

* revert and modify

* optimize test

* add ics20 msg test

* fix test

* add packet tests and more msgs tests

* add ReceivePacket and callbacks tests

* fix callbacks test

* add handler tests for ics20

* fix handler tests

* minor cleanup

* test all positive amounts

* update test suite NotNil to Error

* fix ics20 tests

* expected error

* Add IBC REST endpoints (#5310)

* add rest framework

* add rest endpoints for ibc connection

* add rest endpoints for ibc client

* add rest endpoints for ibc channel

* modify ibc rest api

* add rest endpoints for ibc transfer

* fix query route

* fix receive packet

* fix query client state api

* use sub module name instead of icsxx

* use const for prove judgement

* modify ibc rest api

* add api docs to swagger

* add ibc config

* fix proof path in swagger

* return query result proof

* update swagger docs

* parse prove

* clean up

* fix ibc rest api and swagger docs

* fix host validate

* fix typo

* add submitMisbehaviour error response in swagger

* fix rest queryRoot and swagger doc

* add response comments for each REST functions

* fix rest function comments

* fix IBC proofs (#5351)

* fix ICS02 proofs

* fix ICS03 proofs

* fix ICS04 proofs

* fix ICS20 proofs

* make format

* fix build; comment handshakes

* ICS-2 Implement Misbehavior (#5321)

* ibc client evidence route

* split evidence from misbehaviour

* clean up client events

* test misbehaviour and evidence

* remove comments

* remove frozen comments from demo

* Update x/ibc/02-client/types/tendermint/evidence_test.go

Co-Authored-By: Aditya <adityasripal@gmail.com>

* change evidence to detect malicious chain

* remove unnecessary sort

* fix evidence and persist committers to check misbehaviour

* minor fixes and remove incorrect tests

* add evidence tests

* remove debug statements

* cleanup evidence test

* start misbehaviour tests

* fix nondeterministic bug

* add same height and next height checks in misbehaviour

* fix bugs

* apply fede review suggestions

* finish code review changes

* fix GetCommitter and write keeper-level misbehaviour tests

* remove incorrect special case checking

* save

* final fixes

* save

* fix conflict

* fix conflicts and add back submit misbehaviour msg

* Apply suggestions from code review

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

* save

* add godocs and fix test

* fix test panics in other modules

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

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* add back aliases

* Misc ibc fixes (#5357)

* fix cli ExactArgs

* remove full handshakes

* rm dup flag

* fix error handling

* Implement Query Committer methods in ICS-02 (#5402)

* add query methods for committers in ICS-02

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

* add REST docs

* fix test

* IBC UX improvements (#5364)

* ICS02 iterators

* ICS03 iterators

* ICS04 iterators

* ICS02 client updates

* CLI connections

* setup queriers

* clean up queriers

* add tests

* IBC top-level querier tests

* update ICS02 keys

* update ICS03 keys

* make format

* update ICS04 keys

* fix a few tests

* fix ICS20 tests

* update keys

* fix ICS02 queries (#5425)

* fix CLI JSON param unmarshaling (#5431)

* Fix inconsistent string lookup functions (#5437)

* fix inconsistent string lookup functions

* test client type and ordering

* channel and connection state tests

* address golangcibot comments

* fix test

* Update x/ibc error handling (#5462)

* Merge PR #5428: Add mod, exponentiation for uint

* Modified examples in distribution module (#5441)

* Merge PR #5442: Remove of the client/alias.go

* Merge PR #5445: Mock rpcclient in tests for votes pagination

* Merge PR #5435: Added iterator that allows to read only requested values

* Merge PR #5427: Remove code duplication in x/auth/client/cli

* Merge PR #5421: Refactor Error Handling

* update x/ibc error handling

* update ICS24 and ICS02 errors

* ICS03, ICS23 and common errors

* updates from master and errors from ICS04

* build

* fix ics20 tests

* fix tests

* golangcibot fixes

Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Ferenc Fabian <qwer.kocka@gmail.com>
Co-authored-by: Dmitry Shulyak <yashulyak@gmail.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* ADR 015 Implementation (#5401)

* implement in progress

* rm unneccessary change under simapp, modify baseapp for codetxbreak

* fix test in progress

* fix test error

* fix golangci

* address minor comments

* mv antehandler to ante/, address comments

* fix GetCommitment => GetData, fix syntax

* checkout types/ to ibc-alpha

* checkout to origin/ibc-alpha

* fix branch problem

* fix syntax error

* recover PacketI interface

* mv recvpacket rest from 20 -> 04

* address minor comments

* Apply suggestions from code review

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

* rm wrong files

* Apply suggestions from code review

* PacketDataI field is now named, not embed

* add acknowledgement hashing

* rename finalization functiosn

* Apply suggestions from code review

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

* Rename GetCommitment() to GetBytes()

* Add recv sequence incr to RecvPacket()

* Revert but where is PacketExecuted() called

* Call PacketExecuted(), check seq in RecvPacket()

* The port is called "bank"

* Apply suggestions from code review

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

* Update simapp/app.go

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

* Remove omitempty

* Add godoc

* Move events

* set ProofVerificationDecorator on AnteHandler

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* format

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix build errors

* remove tmcmn instance

* remove tmcmn instance

* Fix compliation errors

* Fix build errors

* Fix build errors

* ICS07 Tendermint Client implementation (#5485)

* implement ICS07

* build

* update tests and cleanup

* x/ibc/02-client/types: remove misbehaviour in favor of evidence

* remove root query, update queriers, implement verification funcs

* remove committer; cleanup

* move keys to ibc/types

* fix paths

* update ICS03 connection verification

* move order and states to exported pkg

* update ICS04 to latest spec

* fix build

* move ics02 types/errors package to /types

* update a few tests

* update tests; fix codec registration

* minor changes from code review

* ibc/client/types: fix tests

* ibc/02-client/keeper: fix tests

* ibc/03-connection/keeper: begin tests for verify.go

* ibc/23-commitment: add IsEmpty() to Prefix, Path and Proof

* address comments from review

* add tests for evidence

* x/ibc/07-tendermint: add tests for consensus state, header and update

* ibc/07-tendermint: fix verification panic and add tests

* ibc/07-tendermint: add failure test cases

* x/ibc/03-connection/keeper: add verification tests for failing cases

* remove unused queriers

* Update ICS 7 tests (#5556)

* Update ICS 7 tests

* Fix one problem

* Also set consensus state for height 1

* Apply same fixes to ICS 4 tests

* Remove unnecessary change

* Fix ante tests; remove printfs

* Remove printf

* Update x/ibc/ante/ante_test.go

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

* add TODOs for ADR 03 dynamic store

* add tests for msgs and packet (#5559)

* Add skeleton for ValidateBasic tests

* Move tests; basic one passes

* Add more ValidateBasic tests

* Add more ValidateBasic testcases

* Fix minor typo

* Add `ValidateBasic` tests for Packet

* Move to packet_test.go

* use app.Commit for tests

* update verify.go

* Fix all ICS 07 Tests (#5565)

* ICS 07 Debugging

* WIP Debugging

* Foo bar baz, baz bar foo, 🤷‍♂️

* cleanup print statements

* cleanup verification test

* add return err for proof verification

* cleanup; start handshake testing

* connection handshake tests

* scopelint

* WIP Test refactor

* fix ICS03 tests

* fix ICS04 tests

* nolint

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

* cleanup comments and add a few tests

* typo

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>

* fix build

* IBC historical info support (#5475)

* implement GetConsensusState

* introspect past consensus states on ICS03 handshake

* implement ToTmValidator staking util function

* add test cases

* update tests

* Fix various compile erros

* fix historical info

* fix dep cycle

* Fix golint issues

* Fix proto docs lint fail

* move consensus state query downstream to ICS03

* remove unused funcs on expected keeper

* update tests and move get consensus state to ICS03

* increase cov for verification funcs

* fix tests

* interfacer fix

* fix expected keeper

* remove TODOs

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>

* cleanup ibc-alpha diff with master

* Add bank alias for gaia

* Moar bank alias gaia

* Moar bank alias gaia

* Fix query all clients

* update to current Tendermint master

* TxSearchMock: add orderBy field to TxSearch method

* fix build errors

* Small changes for compilation of gaia

* Small changes for compilation of gaia

* Add 07-tm.Header.ConsensusState() to make conversions easy

* Add additional IBC Channel Tests (#5578)

* Add stubbed out tests

* one working testcase and mocked packet types

* Finish TestSendPacket

* Move mocked proofs to ibc/types and finish TestRecvPacket

* Implement TestPacketExecuted

* WIP TestAckPacket

* Start on timeout tests, 1 passing

* WIP Tests

* first cleanup

* test send transfer

* add packet tests

* fixes and more tests

* finish tests

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

* golangcibot fixes

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>

* merge master

* ICS07 follow up changes (#5606)

* ADR07 follow up changes

* add assertion checks

* update ICS02 tests

* update ICS07 tests

* add trusting and ubd period to msg

* tests

* more test updates

* ICS07 follow ups (#5631)

* refactor tendermint package to move msgs here

* fix rest of package to accomadate 07 refactor

* added GetHeight to ConsensusState and moved clientstate struct creation to 07-tendermint

* start work on making misbehavior retrieve consensusState LTE misbehavior

* allow misbehavior submission at height not equal to persisted consensusState

* optimize submitMisbehavior by erroring earlier

* cleanup misbehavior and propose lazy fix

* fix bug

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

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

* address fede review

* add chain-id into clientstate

* address necessary fede review

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

Co-authored-by: Aditya <adityasripal@gmail.com>

* IBC SDK specification (#5426)

* IBC SDK specification

* update events

* add implementation mapping

* minor additions to readme

* fix conflicts

* add missing ADRs, modules and ICS

* fix build

* Merge PR #5670: Fix Packet Timeout Bug

* add destination height to MsgSendTransger

* quick fix

* Add defensive checks before setting param keytables in keeprs

* ICS 20 Cleanup and Tests (#5577)

* Add comments, remove unused code and attempt to point to places where the spec is being implemented

* close channel when transfer fails

* rename packer data transfer to align to spec; refactor table tests

* ICS 20 implementation cleanup work (#5602)

* Simulation docs (#5033)

* simulation docs

* update docs with the latest simulation changes

* minor imporvments

* clean up of simulation.md

* expand section on weights

* minor reword

* minor wording fix

Co-authored-by: Marko <marbar3778@yahoo.com>

* Merge PR #5597: Include Amount in Complete Unbonding/Redelegation Events

* Add bank alias for gaia

* Moar bank alias gaia

* Moar bank alias gaia

* Call `TimeoutExecuted`, add wrappers

* Remove unused `MsgRecvPacket`

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>

* Merge PR #5603: Remove acknowledgement interface in favour of []byte

* fixes and cleanup

* spec compliance

* refactor relay prefixes and tests

* Fix test compilation

* cleanup; add notes and additional test case

* Receive transfer test

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Fix autolinter application

* Add testcase with incorrect prefix

* golangcibot fixes

* delete extra comment

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Merge PR #5666: Use Tendermint lite client verification

* Disambiguate error codes

* Fix binary marshalling for state storage

* readd MsgSubmitClientMisbehaviour

* Fix double flag registration

* ICS23 refactor (#5710)

* ICS23 restructure directories

* more fixes

* format

* Merge PR #5711: Switch mock proofs to real proofs

* Add key, path, value to mock proofs

* Also alter mock types (why are there duplicates)

* Remove mock proofs from handshake_test.go

* Use actual proofs

* Try to fix historical info, no luck

* Have test-cases produce consensus heights

* Fix consensus height / proof height difference in verifyClientConsensusState

* Bug fixes contd.

* Fix some identifier issues

* `TestConnOpenConfirm` now works

* further on proof

* fix debugger print statement

* IT PASSES

* revert identifier changes

* refactor query proof to generate proofs from either chain

* fix ack and confirm

* Remove temporary break

* fix connection and channel verify tests

* fix everything but verify client consensusstate

* fix all verify tests

* fix ics07 tests

* fix handshake tests

* fix packet tests

* fix timeout tests

Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* Try to fix store decoding issue

* Sim issue update

* add error in msg

* remove next validator set from ibctmtypes.Header

* remove warning msg

* Make IBC updating more robust

* blh

* bump tm dependency

* remove redundant clockdrift correction

* remove blh commit

* fix test build failures

* Change time from PST to UTC

* Merge PR #5770: Update error message in connection keeper

* Merge PR #5774: Debug timestamp issues

* Merge PR #5786: Fix MsgTransfer routing

* Fix test-case

* register MsgPacket

* Flip boolean

* emit packet event on SendPacket

* Fix attribute setting

* Implement in-memory KVStore

* Start keeper and types

* Add codec

* Add keys logic

* Update types

* Update keeper

* Implement NewCapability

* Implement InitializeAndSeal

* Update simapp

* Implement GetCapability

* Add logging for new and claimed caps

* Call InitializeAndSeal in SimApp

* Update keeper semantics + unit tests

* Use big endian

* More unit tests

* Increase keeper test coverage

* Remove TODO

* Add module doc

* Update doc

* Apply suggestions from code review

Co-Authored-By: Aditya <adityasripal@gmail.com>

* Update NewCapability godoc

* Clarify owner

* Add forgery test case to TestAuthenticateCapability

* Format doc

* Update to tm@v0.33.2

* Update ADR

* Explicitly take pointer in FwdCapabilityKey

* Update set to be logn

* Update app module

* Lint

* Fix broken test after packet format changed

* Add stub and unit tests for ReleaseCapability

* Finish implementation

* Add test case to TestAuthenticateCapability for releasing a cap

* remove swagger files from ibc module (#5893)

* Move IBC packet data interpretation to the application module (#5890)

* fix: move IBC packet data interpretation to the application module

This also adds a channelexported.NewOpaquePacketData(rawBytes)
implementation to assist apps in being able to manipulate the
raw packet data using the codec layer.

* feat: use an internal-to-module PacketDataI type

This one only has a GetBytes() method, which is implemented by
OpaquePacketData.

* fix: remove OpaquePacketData

No need to wrap the []byte packet.GetData().  If the caller wants
it, they can use it directly.

* docs: update adr-015

* fix: put the TimeoutHeight back into the packet commitment

* refactor: simplify unmarshalling of transfer packet

* docs: update for new unmarshal steps

* fix: clean up usage of sdkerrors.Wrapf

* Apply suggestions from code review

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

* chore: remove unnecessary "encoding/binary" import

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

* fix ibc-alpha sims (#5909)

* fix some simulations

* fix HistoricalInfo sim decoders

* add staking sim decoder test case for HistInfo

* Merge PR #5901: Add & update IBC queriers for relayer use

* Add identifier to connection responses (ref #5829)

* Update querier as well

* Fix test-case

* Update for consistency

* Add querier for connection channels; fix linter

* Fix build (?)

* Add JSON & Yaml tags

* Add tags

* Add identifiers to channels as well

* fix test

* Merge PR #5914: x/capability: Fix Object Capability Model

* Merge PR #5918: Remove source field from ICS 20 packet & message types per latest spec

* fix ics20 client args (#5924)

* Merge PR #5930: Add GetChainID to ClientState interface

* Merge PR #5925: Add additional events to x/ibc

* Migrate x/capability to Protobuf (#5926)

* migrate x/capability to protobuf

* fixes

* format

* remove capability from codec std

* return pointer for getOwners

* remove &

* Update x/capability/keeper/keeper.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* rename remove Capability interface; rename CapabilityKey -> Capaility; cc @cwgoes

* x/capability: remove RegisterCapabilityTypeCodec and seal amino cdc

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Merge PR #5939: Unmarshal packets as JSON

* Merge PR #5888: Dynamic Capabilities with Routing

* cleanup ibc-alpha (#5945)

* cleanup ibc-alpha

* remove HasKeyTable()

* add preexisting checks

* undo remove checks

* x/staking: import and export HistoricalInfo

* staking/types: add HistoricalInfo to GenesisState

* changelog

* add staking module to app BeginBlockers

* remove JSON files

* address comments from review

* cleanup ibc-alpha

* fix ibc-alpha lint (#5959)

* x/ibc: changelog (#5960)

* x/ibc: changelog

* add reference to the spec

* Merge PR #5954: Bind Transfer Port on InitChain

* Bind transfer port in InitChain

* push fixes

* address @fedekunze review

* Apply suggestions from code review

* lint

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

Co-authored-by: Joon <torecursedivine@gmail.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: vincent <vincent.ch.cn@gmail.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Ferenc Fabian <qwer.kocka@gmail.com>
Co-authored-by: Dmitry Shulyak <yashulyak@gmail.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Michael FIG <michael+github@fig.org>
Co-authored-by: Segue <huoda.china@163.com>
2020-04-08 20:57:52 -04:00
Federico Kunze 7325692550
x/staking: skip HistoricalInfo in simulations (#5949)
* x/staking: import and export HistoricalInfo

* staking/types: add HistoricalInfo to GenesisState

* changelog

* add staking module to app BeginBlockers

* remove JSON files

* address comments from review

* add HistoricalInfoKey to skipped prefixes

* fix DiffKVStores

* rm JSON
2020-04-07 22:33:30 +00:00
Jonathan Gimeno 49102b1d98
Remove dependency of types/module package on x/simulation (#5835)
Closes: #5724
2020-03-23 12:55:44 +01:00
Aleksandr Bezobchuk f60cd5a2b5
Merge branch 'master' into bez/proto-client-init 2020-03-14 12:34:34 -04:00
Jonathan Gimeno 2e42f9cb74
Favor marshal unmashal binare bare (#5799)
* change abci file to use BinaryBare

* change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in mint keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in auth keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in gov keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in slashing keeper store.

* update decoder test

* migrate decoder

* migrate gov simulation decoder

* migrate baseapp_test

* refactor QuerySubspace

* refactor coedc std codec

* migrate keybase

* migrate iavl store

* migrate root multi

* migrate ante basic

* migrate tx type to bare

* migrate auth client

* update auth types

* update decoder

* migrate supply decoder

* migrate stake encoding

* migrate staking simulation

* migrate genutil

* migrate simapp test helpers

* migrate docs

* upgrade changelog

* Update CHANGELOG.md

Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-13 19:58:43 +00:00
Aleksandr Bezobchuk 3a94f42e11
Implement app-level tx 2020-03-12 10:53:27 -04:00
Jonathan Gimeno 5c4ace2548 Merge branch 'jonathan/5569-create-module-account-on-init-genesis' of github.com:cosmos/cosmos-sdk into jonathan/5569-create-module-account-on-init-genesis 2020-03-05 22:11:35 +01:00
Jonathan Gimeno e45be08eb1 create module account on init for FeeCollectorName and tests for other module accounts 2020-03-05 22:11:05 +01:00
Jonathan Gimeno b813e8965f
Merge branch 'master' into jonathan/5569-create-module-account-on-init-genesis 2020-03-05 17:15:35 +01:00
Aleksandr Bezobchuk 4dac1abebf
Update imports 2020-03-05 09:40:43 -05:00
Aleksandr Bezobchuk 3f2f4b984e
Move pkg to std/ 2020-03-05 09:32:43 -05:00
Jonathan Gimeno e01c99d019 now it creates the module account on InitChain 2020-03-05 11:45:51 +01:00
Aleksandr Bezobchuk d256e5a56f
Address feedback 2020-03-03 13:30:21 -05:00
Aleksandr Bezobchuk 463f522f44
Merge branch 'bez/5444-gov-proto-enc' of github.com:cosmos/cosmos-sdk into bez/5444-gov-proto-enc 2020-03-03 13:25:10 -05:00
Aleksandr Bezobchuk 3b8772725f
Address feedback 2020-03-03 13:24:54 -05:00
Alexander Bezobchuk b6e36b8aca
Merge branch 'master' into bez/5444-gov-proto-enc 2020-03-03 13:19:44 -05:00
Aleksandr Bezobchuk 00180faa15
Proto lint & gen 2020-03-03 09:59:05 -05:00
Jonathan Gimeno 0a5f64b64f clean some code 2020-03-03 11:05:20 +01:00
Jonathan Gimeno 863dc1484e make test pass 2020-03-03 10:51:06 +01:00
Aleksandr Bezobchuk 5f0c53da17
update tests 2020-03-02 16:46:28 -05:00
Aleksandr Bezobchuk 7562c2765a
Update gov types 2020-03-02 14:13:42 -05:00
Aleksandr Bezobchuk 31dc2729fc
Merge branch 'master' into bez/5444-gov-proto-enc 2020-03-02 12:50:32 -05:00
Aleksandr Bezobchuk 725e2dc2b4
Update gov codec interface 2020-03-02 12:44:55 -05:00
Jonathan Gimeno f090da2100 edit text 2020-02-28 19:07:10 +01:00
Jonathan Gimeno f8442bb46f add last touches to the PR 2020-02-28 19:06:03 +01:00
Alexander Bezobchuk 19546f2197
Update simapp/test_helpers.go 2020-02-28 09:59:26 -08:00
Alexander Bezobchuk 03af49bda2
Update simapp/test_helpers.go 2020-02-28 09:59:17 -08:00
Alexander Bezobchuk 256e5fc863
Update simapp/test_helpers.go 2020-02-28 09:58:55 -08:00
Jonathan Gimeno 2c32ff3ee4
Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-28 10:58:16 +01:00
Anil Kumar Kammari 0b7449129a
Merge PR #5500: Regen network/multistore upgrades 2020-02-27 22:26:04 -08:00
Jonathan Gimeno 60293dd2e6
Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-27 17:51:14 +01:00
Jonathan Gimeno ce46939308 rename function names 2020-02-27 16:49:53 +01:00
Aaron Craelius 81735debe5 Fix proposal marshaling, make Proposal extend ProposalBase 2020-02-26 20:47:45 -05:00
Aaron Craelius 8bd648eef1 WIP on std codec 2020-02-26 20:15:00 -05:00
Aaron Craelius e8155d67d0 Simple refactoring of gov to use protobuf for store encoding (for everything besides proposal) 2020-02-26 20:15:00 -05:00
Alexander Bezobchuk 8cab43c812
Merge PR #5702: Add Param Querying to x/auth 2020-02-26 10:33:56 -05:00
Jonathan Gimeno 1648edfc0d use prealloc array for ConvertAddrsToValAddrs 2020-02-26 16:16:56 +01:00
Jonathan Gimeno c94a98f459 fix based on PR comments 2020-02-26 16:05:12 +01:00
Jonathan Gimeno 660ffc8be5 refactor ordering functions 2020-02-25 18:01:18 +01:00
Jonathan Gimeno 13f2138989 Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-25 15:48:13 +01:00
Aaron Craelius df65016694
Merge PR #5659: Migrate upgrade module to protobuf 2020-02-24 18:14:19 +01:00
Marko f7486b9395
Merge PR #5634: Protobuf - Migrate x/evidence 2020-02-24 17:05:21 +01:00
Jonathan Gimeno e5b67801a3 refactor to use accounts 2020-02-21 20:51:11 +01:00
Jonathan Gimeno ee7ccc3704 make TestDelegation pass with generated accounts 2020-02-21 19:34:07 +01:00
Jonathan Gimeno 0d24d2b2cb fix test query validators 2020-02-20 16:09:25 +01:00
Marko ebbfaf2a47
Merge PR #5681: proto: migrate bank to hybridcodec 2020-02-20 15:24:26 +01:00
Anil Kumar Kammari 883c1a2bc1
Merge PR #5627: Regen Network/Slashing protobuf 2020-02-20 01:04:13 +01:00
Jonathan Gimeno 434f539bff
Merge PR #5649: Update x/params to follow module standards 2020-02-19 12:52:20 +01:00
Alexander Bezobchuk 794a496892
Merge PR #5533: Protobuf: x/auth & x/supply 2020-02-18 13:50:13 +01:00
Alexander Bezobchuk 05c21a534a
Merge Pr #5642: Remove x/mock 2020-02-14 10:30:51 -05:00
Marko 48d39e344e
Merge PR #5619: proto: migrate params to hybrid codec 2020-02-12 11:34:09 -05:00
Marko 56c5868975
Merge PR #5610: proto: migrate x/distr to use hybrid codec 2020-02-11 09:58:37 -05:00
Alexander Bezobchuk 53bf2271d5
Merge PR #5600: Migrate x/staking to Protobuf 2020-02-06 14:21:02 -05:00
Alexander Bezobchuk 6890feb3d2
Merge PR #5572: ADR 004 Implementation 2020-01-30 16:31:16 -05:00
Alexander Bezobchuk c1991e31bd Merge PR #5527: Bump Tendermint Version to v0.33.0
* Bump Tendermint version to v0.33.0

* Deprecate old cmn package with new packages

* Update update DB APIs

* More DB updates

* Bump IAVL to v0.13.0

* Handle error returned by iavl.NewMutableTree

* Fix some IAVL stuffs

* Update IAVL

* More updates

* Passing tests

* Fix unit tests

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
2020-01-16 13:46:51 -08:00
Ferenc Fabian 066dd1114f Merge PR #5449: Add New constructor for the DecCoin 2020-01-03 15:44:53 -05:00
Anil Kumar Kammari a5fc7d6ba6 Merge PR #5367: Regen network/skip upgrade 2020-01-03 09:37:29 -05:00
Alexander Bezobchuk 9a183ffbcc
Merge PR #5421: Refactor Error Handling 2019-12-27 12:57:54 -05:00
Alessio Treglia eae10b0cff Merge PR #5419: Parametrise simulation gas value 2019-12-18 09:48:22 -05:00
Federico Kunze 3471256785 Merge PR #5378: application interfaces for simulation 2019-12-17 13:28:52 -05:00
Andrea Giacobino d58bf903f4 Merge PR #5385: fix int overflow error for rand.Intn 2019-12-12 10:20:30 -05:00
Alexander Bezobchuk bcca045caf
Merge PR #5384: Fund Community Pool -- Part II 2019-12-10 23:02:15 -05:00
Riccardo Montagnin 09bd174a49 Merge PR #5249: Support for sending funds to the community pool - Part I 2019-12-10 14:09:22 -05:00
Federico Kunze 722a633f54
Sim refactor 3: move weighted operations to modules (#4869)
* move GenesisState generators to modules

* minor change on slashing genState generator

* move simulation params back to modules (#4839)

move simulation params back to modules (#4839)

* cleanup params

* various fixes

* move store decoders to modules

* fix

* module pattern

* split generators for param change

* param changes

* revert util pkg

* banksim

* compile

* update Decoders params

* fix

* address @colin-axner comments

* move weighted operations to modules

* cleanup

* cleanup

* Update cmd_test.go

* simulation manager

* mino fixes

* cleanup

* add GenerateGenesisState to simulation manager

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* address @rigelrozanski comments

* changelog

* Apply suggestions from code review

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* restructure modules simulation pkgs

* remove cycle deps

* rename funcs and add missing params

* modularize simulator param changes

* build

* fix params keys

* make format

* various fixes

* fix tests

* minor updates to sim_test

* cleanup

* more cleanup

* modularize genesis generators

* minor cleanup

* remove cdc from generators

* remove cdc

* add get or generate

* fix non-determinism in simulation

* changelog and x/simulation godoc

* cleanup operations

* update operations to use baseapp

* updates and cleanup operations

* update operations

* restructure sim ops params

* rename sim /operations/msg.go to /operations.go

* move GenTx to a helper pkg to avoid circle deps

* rm msg.ValidateBasic

* changelog

* random fees; delete auth's DeductFees sim operation

* add chain-id for sig verification

* Update x/simulation/account.go

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* fix bank, gov and distr errors

* fix staking and slashing errors; increase prob for send enabled

* increase gas x10

* make format

* fix some distr and staking edge cases

* fix all edge cases

* golang ci

* rename acc vars; default no fees to 0stake

* cleanup; check for exchange rate and skip invalid ops

* fixes

* check for max entries

* add pubkey to genaccounts

* fix gov bug

* update staking sim ops

* fix small redelegation error

* fix small self delegation on unjail

* rm inf loop on random val/accs

* copy array

* add ok boolean to RandomValidator return values

* format

* build

* add WeightedOperations to AppModuleSimulation

* define each module proposals content as part of the module pattern

* Update x/bank/simulation/operations.go

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* Update simapp/helpers/test_helpers.go

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* address @colin-axner comments

* add genaccount pubkey validation

* fix test

* update operations and move RandomFees to x/simulation

* update gov ops

* address @alexanderbez comments

* avoid modifications to config

* reorder params

* modularized sim operations working

* changelog

* Update types/module/simulation.go

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* Update x/simulation/params.go

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* Update x/simulation/params.go

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* update /types/module

* Update x/distribution/simulation/genesis.go

Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* remove named return values

* ensure all operations are simulated

* golangci

* add nolint

* disable whitespace and funlen linter

* disable godox

* add TODO on unjail

* update ops weights

* remove dup

* update godoc

* remove unused func

* build fixes

* move weights to the same file

* scopelint

* changelog

* address @AdityaSripal comments

* address @alexanderbez comments
2019-12-05 10:29:54 +01:00
Alexander Bezobchuk 7953b525d8
Merge PR #5299: Migrate Equivocation Handling to x/evidence 2019-12-02 20:58:14 -05:00
Federico Kunze 43f011865d
Add upgrade module to simapp (#5328)
* upgrade: add x/upgrade to simapp

* upgrade: clean up tests
2019-11-19 21:54:31 +01:00
Alexander Bezobchuk 95ddc242ad
Merge PR #5240: x/evidence module implementation 2019-11-06 14:08:02 -07:00
Federico Kunze 8344c0aef8
update simulation operations to use BaseApp (#4946)
* update operations to use baseapp

* updates and cleanup operations

* update operations

* restructure sim ops params

* rename sim /operations/msg.go to /operations.go

* move GenTx to a helper pkg to avoid circle deps

* rm msg.ValidateBasic

* changelog

* random fees; delete auth's DeductFees sim operation

* add chain-id for sig verification

* Update x/simulation/account.go

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* fix bank, gov and distr errors

* fix staking and slashing errors; increase prob for send enabled

* increase gas x10

* make format

* fix some distr and staking edge cases

* fix all edge cases

* golang ci

* rename acc vars; default no fees to 0stake

* cleanup; check for exchange rate and skip invalid ops

* fixes

* check for max entries

* add pubkey to genaccounts

* fix gov bug

* update staking sim ops

* fix small redelegation error

* fix small self delegation on unjail

* rm inf loop on random val/accs

* copy array

* add ok boolean to RandomValidator return values

* format

* Update x/bank/simulation/operations.go

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* Update simapp/helpers/test_helpers.go

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* address @colin-axner comments

* add genaccount pubkey validation

* fix test

* update operations and move RandomFees to x/simulation

* update gov ops

* address @alexanderbez comments

* avoid modifications to config

* reorder params

* changelog

* Update x/distribution/simulation/genesis.go

Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* remove named return values

* ensure all operations are simulated

* golangci

* add nolint

* disable whitespace and funlen linter

* disable godox

* add TODO on unjail

* update ops weights

* remove dup

* update godoc

* x/slashing/simulation/operations.go linting

* x/staking/simulation/operations.go linting

* update operations format

* x/bank/simulation/operations.go linting

* x/distribution/simulation/operations.go linting

* x/staking/simulation/operations.go linting

* start changes: make bank simulate send multiple coins, code cleanup

* fix nondeterminism bug

* fix txsiglimit err

* fix multisend bug

* simplify simulation, cleanup opt privkey args

* make slashing test invalid unjail msgs

* Update simapp/state.go

* golangCI changes
2019-10-23 11:14:45 +02:00
Marko b9490f2d93 Merge PR #5203: Add more linters 2019-10-17 09:47:35 -04:00
Marko bb6bed4ed3 Merge PR #5171: Remove NFT module 2019-10-11 10:18:21 -04:00
Kevin Davis 64a2741250 Merge PR #5040: Separate vesting from auth, add custom vesting schedules 2019-10-10 11:53:30 -04:00
Alexander Bezobchuk fd76e62f49
Merge PR #5148: Use genesis file timestamp if none provided 2019-10-07 13:17:07 -04:00
Alexander Bezobchuk fbdf0e778e
Merge PR #5103: Migration Testing 2019-09-26 09:07:15 -07:00
Xuefeng Zhu 9c5371226a Merge PR #5051: Remove staking tkey 2019-09-18 14:28:02 -04:00
Federico Kunze ed6366679c Merge PR #5017: ADR 011: Generalize Genesis Accounts Implementation 2019-09-12 15:22:25 -04:00
Alexander Bezobchuk 15517afeb2
Merge PR #5019: Export sim CLI flags 2019-09-09 14:13:43 -04:00
Federico Kunze e3e49fc72c Merge PR #5009: remove redundant invariant simapp check 2019-09-06 14:23:40 -04:00
Alexander Bezobchuk f010d2c6f1
Merge PR #4748: Write-Through Inter-Block Cache 2019-09-04 13:33:32 -04:00
Federico Kunze 45b25ceaae Merge PR #4838: Sim refactor 2 - Move GenesisState generators to modules 2019-08-28 10:58:25 -04:00
colin axner 5aacf454e1 Merge PR #4918: refactor crisis tests 2019-08-27 09:19:26 -04:00
Federico Kunze eeb847c845 Merge #4209: NFT Module
* in sync with @okwme/cosmos-nft

* remove tmp tx

* structuring and minor changes

* supply and client files

* adding cli client

* complete cli/tx and rest.go

* cleanup and restructuring

* restructure rest folder

* minor updates on clients

* update querier

* encoding for clients and other changes

* genesis, invariants, and keeper updates

* update types

* make golangcibot happy

* renamed and removed bank keeper

* remove handlers for editmetadata, mint, burn, buy

* nft interface

* minor cleanup

* sort collections and nfts

* balance and find

* nft query and tx

* touch ups

* uint in place of int

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* little fixes:
- fix error to err to avoid collision
- error handling

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* module generalization changes

* fixes

* query with data

* minor updates and TODOs

* fix CLI tx

* golang bot fixes

* handlers and txs done

* update module generalization

* Added very basic tests which for some reason do not work

* fix test

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fixed test, now we should fix implementation, seems to fail

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fix test, create new struct instead of changing the old one

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fix handler with new logic

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* let's make it compile

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* single failing test example, need to be fixed and extended

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* single failing test example, need to be fixed and extended

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* reverting work, still problems unmarshalling inside iterator from test

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* Setter in nft.go should return NFT instead of BaseNFT

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* remove TODOS

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* comment out broken tests, we want at least a green mark here

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* little fixes

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* hopefully no conflict

* minor changes for tests

* change nft id to string, refactors

* messy pause

* Changes Balances to OWners add all necessary functions, updated Keeper with UpdateNFT as as well as MintNFT and made sure they all update Owners

* pause dev to merge sdk master

* go.mod changes

* getting closer still need module.go

* builds!!!

* fix lint begin handler tests

* stableish

* re-order nft attributes, add back mint and burn msgs and handlers

* add errors to minting the same NFT and burning an NFT that doesnt exist

* first querier test

* add simulations for nft msgs

* handler tests check tags now (fixed a bug!)

* update simulation

* generic handler

* need to check if it compiles on another machine

* fix weird interface error

* add back cli

* wtfff

* codec error fixed, logs removed. still returning empty arrays of IDs

* Take empty input as yes answer

Closes: #4564

* Add pending log entry

* merged in master

* marshall errors

* build commands

* working!!!

* linting errors

* remove unused func

* pause

* fix burn error

* fix burn error

* tests for querier

* typo

* tests for NFT types

* module spec standard

* tests for Collection and Collections types

* merge w Fede

* tests for Owner Type

* added genesis tests and beefed up keeper, querier, handler & types tests

* linting errors deadcode

* DONT COVER test_common.go

* add msg type tests

* Update x/nft/internal/keeper/key.go

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

* Update x/nft/genesis.go

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

* Update x/nft/client/cli/query.go

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

* Apply suggestions from code review

* typo

* cleanup events

* split events

* more cleanup

* remove restrictions from default handlers

* not sure where these go mod changes came from

* sim generated changes

* make format

* add mint and burn sims

* move NFT interface to nft/exported

* make format

* NFT spec

* Updates

* more updates

* update specs readme

* fix sims

* rest additions

* rest additions

* fix invariant

* minimal nft without name, description or image

* sim

* fix sim

* fix sim

* fix Update methods

* nothing

* simplify update and remove

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* remove test on memory location

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* TEST to get logs, need to be removed

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fix simulator editMetadata Msg type

* owner not found start with empty collection

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* artifacts on errors in case of failure, else, no artifacts

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* add more invariant checks to handler_tests

* never forget to overwrite

* merge and update spec

* colins feedback

* code coverage test

* code coverage test

* code coverage test

* spelling

* clean up client

* testing code coverage

* testing code coverage

* testing code coverage

* testing code coverage

* testing code coverage

* Update docs/spec/nft/README.md

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* minor changes

* integration tests and fixes

* minor golangCI fixes

* Update simapp/app.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
2019-08-26 12:54:45 -04:00
Federico Kunze 1d824d15a6 Merge PR #4953: Remove distr keeper from staking app module 2019-08-26 10:57:21 -04:00
Marko 3a4f1fc4d4 Merge PR #4881: Linting Galore 2019-08-19 12:06:27 -04:00
colin axner a697be15fe Merge PR #4909: Refactor x/bank Tests 2019-08-19 09:29:17 -04:00
colin axner bc170cba82 Merge PR #4913: Fix Module Account Blacklisting in SimApp 2019-08-15 18:29:21 -04:00
Federico Kunze 57cc5ae3a2 Merge PR #4906: Introduce Simulation Config 2019-08-15 11:35:25 -04:00
colin axner 1cf016c9a9 Merge PR #4877: refactor supply keeper tests to use simapp 2019-08-14 17:10:48 -04:00
Federico Kunze c441ce2fab Merge PR #4847: Sim refactor 1 move store decoders to modules
* move store decoders to modules

* fix

* module pattern

* compile

* update Decoders params

* fix

* address @colin-axner comments

* Update cmd_test.go

* simulation manager

* mino fixes

* cleanup

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* address @rigelrozanski comments

* changelog

* Apply suggestions from code review

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* restructure modules simulation pkgs

* address @alexanderbez comments

* fix
2019-08-13 18:16:03 -04:00
colin axner 81f86fefe5 Merge PR #4894: Change SimApp to have public keepers 2019-08-13 16:59:01 -04:00
frog power 4000 771f8a04f3 Merge PR #4865: Add security contact to Validator description 2019-08-12 09:10:16 -04:00
Federico Kunze e4c8bd72b7 Merge PR #4665: Refactor x/gov Module Structure (prep for module spec) 2019-08-08 15:51:18 -04:00
Alexander Bezobchuk 42c54f8d0c
Merge PR #4861: Simulation Fixes 2019-08-07 12:54:13 -04:00
Alexander Bezobchuk 0dcf158387
Merge PR #4852: Cleanup Supply Genesis State 2019-08-06 16:51:18 -04:00
Alexander Bezobchuk c8ee82b40a
Merge PR #4854: Crisis Module Manager Fixes 2019-08-06 15:11:55 -04:00
Federico Kunze c4e3578087 Merge PR #4791: resume simulations at a given height 2019-08-02 11:28:50 -04:00
Alexander Bezobchuk 861e4798ad
Merge PR #4836: Upgrade Tendermint and IAVL 2019-08-02 09:20:39 -04:00
colin axner 2e3c52bae1 Merge PR #4788: Query genesis transactions 2019-08-01 14:56:50 -04:00