cosmos-sdk/simapp/app.go

580 lines
23 KiB
Go
Raw Normal View History

package simapp
2018-04-06 22:12:00 -07:00
import (
"encoding/json"
2018-10-22 11:59:00 -07:00
"io"
"net/http"
2018-10-22 11:59:00 -07:00
"os"
"path/filepath"
2018-10-22 11:59:00 -07:00
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
dbm "github.com/tendermint/tm-db"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
2020-06-15 10:39:09 -07:00
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
2020-06-15 10:39:09 -07:00
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
2018-04-06 22:12:00 -07:00
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
2018-04-06 22:12:00 -07:00
"github.com/cosmos/cosmos-sdk/x/auth"
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 02:14:45 -07:00
"github.com/cosmos/cosmos-sdk/x/auth/ante"
2020-06-15 10:39:09 -07:00
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
fix: Panic if SetOrder* functions forgot modules (backport #10711) (#10762) * fix: Panic if SetOrder* functions forgot modules (#10711) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description fixes: #10708 Panic at startup if chain devs forgot to add some modules in SetOrder* functions. <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit d3a8e1e9535e4d980723fbabdc274cd55cf965ae) # Conflicts: # CHANGELOG.md # simapp/app.go * fix conflicss * Fix build Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2022-01-03 06:24:03 -08:00
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/authz"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"
2018-04-06 22:12:00 -07:00
"github.com/cosmos/cosmos-sdk/x/bank"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
"github.com/cosmos/cosmos-sdk/x/capability"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
Merge PR #3656: Broken-Invar Tx - aka. Crisis module * beginning thinking on issue * ... * working * working * working fee pool distribution * spek outline * spec update * gas refund calculations * simulation saved to ~/.gaiad/simulations/ * lean simulation output int * cleanup bank simulation messages * operation messges int * lint * move simulation to its own module * move simulation log code to log.go * logger overhaul int * distribution comments * fix compiling * cleanup modifications to x/distribution/keeper/allocation.go int int int * gov bug * result.IsOK() minimization * importExport typo bug * pending * address @alexanderbez comments * simple @cwgoes comments addressed * event logging unified approach * distr module name constant * implementing * compiles * gaia integration * proper constant fee removal * crisis genesis * go.sum update * ... * debugging * fix sum errors * missing err checks * working implementing CLI * remove query command * crisis expected keepers in other modules * crisis testing infrastructure * working * tests complete * modify handler to still panic if not enough pool coins, docs working * spec tags * docs complete * CL * assert invariants on a blockly basis gaiad functionality * gaiad CL * transaction details in runtime invariance panic * Apply suggestions from code review Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * sender tags * @mossid suggestions int * @cwgoes comments final * Apply suggestions from code review Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * bug seems fixed (#3998) * delete unused line in zero height export bug
2019-03-28 16:27:47 -07:00
"github.com/cosmos/cosmos-sdk/x/crisis"
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
2018-09-17 20:02:15 -07:00
distr "github.com/cosmos/cosmos-sdk/x/distribution"
distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client"
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
"github.com/cosmos/cosmos-sdk/x/evidence"
evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper"
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
"github.com/cosmos/cosmos-sdk/x/feegrant"
Add fee grant module (#8061) * Add docs * Add BasicFeeAllowance implementation * Add expiration structs and complete basic fee * Add delegation messages, add validation logic * Add keeper and helper structs * Add alias and handler to top level * Add delegation module * Add basic querier * Add types tests * Add types tests * More internal test coverage * Solid internal test coverage * Expose Querier to top level module * Add FeeAccount to auth/types, like StdTx, SignDoc * Fix all tests in x/auth * All tests pass * Appease the Golang Linter * Add fee-account command line flag * Start on DelegatedDeductFeeDecorator * Cleanup the Decorator * Wire up delegation module in simapp * add basic test for decorator (no delegation) * Table tests for deduct fees * Table tests over all conditions of delegated fee decorator * Build full ante handler stack and test it * Start genesis * Implement Genesis * Rename package delegation to subkeys * Clarify antes test cases, handle empty account w/o fees * Allow paying delegated fees with no account * Pull mempool into delegated ante, for control on StdFee * Use custom DelegatedTx, DelegatedFee for subkeys * Revert all changes to x/auth.StdTx * Appease scopelint * Register DelegatedTx with codec * Address PR comments * Remove unnecessary DelegatedMempoolFeeDecorator * Cleaned up errors in querier * Clean up message sign bytes * Minor PR comments * Replace GetAllFees... with Iterator variants * PrepareForExport adjusts grant expiration height * Panic on de/serialization error in keeper * Move custom ante handler chain to tests, update docs * More cleanup * More doc cleanup * Renamed subkeys module to fee_grant * Rename subkeys/delegation to fee grant in all strings * Modify Msg and Keeper methods to use Grant not Delegate * Add PeriodicFeeAllowance * Update aliases * Cover all accept cases for PeriodicFeeAllowance * Et tu scopelint? * Update docs as requested * Remove error return from GetFeeGrant * Code cleanup as requested by PR * Updated all errors to use new sdk/errors package * Use test suite for keeper tests * Clean up alias.go file * Define expected interfaces in exported, rather than importing from account * Remove dependency on auth/ante * Improve godoc, Logger * Cleaned up ExpiresAt * Improve error reporting with UseGrantedFee * Enforce period limit subset of basic limit * Add events * Rename fee_grant to feegrant * Ensure KeeperTestSuite actually runs * Move types/tx to types * Update alias file, include ante * I do need nolint in alias.go * Properly emit events in the handler. Use cosmos-sdk in amino types * Update godoc * Linting... * Update errors * Update pkg doc and fix ante-handler order * Merge PR #5782: Migrate x/feegrant to proto * fix errors * proto changes * proto changes * fix errors * fix errors * genesis state changed to proto * fix keeper tests * fix test * fixed tests * fix tests * updated expected keepers * updated ante tests * lint * deleted alias.go * tx updated to proto tx * remove explicit signmode * tests * Added `cli/query.go` * Added tx.go in cli * updated `module.go` * resolve errors in tx.go * Add fee payer gentx func * updated tx * fixed error * WIP: cli tests * fix query error * fix tests * Unused types and funcs * fix tests * rename helper func to create tx * remove unused * update tx cfg * fix cli tests * added simulations * Add `decoder.go` * fix build fail * added init genesis code * update tx.go * fixed LGTM alert * modified cli * remove gogoproto extensions * change acc address type to string * lint * fix simulations * Add gen simulations * remove legacy querier * remove legacy code * add grpc queries tests * fix simulations * update module.go * lint * register feegrant NewSimulationManager * fix sims * fix sims * add genesis test * add periodic grant * updated cmd * changed times * updated flags * removed days as period clock * added condition for period and exp * add periodic fee cli tests * udpated tests * fix lint * fix tests * fix sims * renaming to `fee_grant` * review changes * fix test * add condition for duplicate grants * fix tests * add `genTxWithFeeGranter` in tests * fix simulation * one of changes & test fixes * fix test * fix lint * changed package name `feegrant` to `fee_grant` * review comments * review changes * review change * review changes * added fee-account in flags * address review changes * read fee granter from cli * updated create account with mnemonic * Address review comments * move `simapp/ante` file to `feegrant/ante` * update keeper logic to create account * update docs * fix tests * update `serviceMsgClientConn` from `msgservice` * review changes * add test case for using more fees than allowed * eliminate panic checks from keeper * fix lint * change store keys string to bytes * fix tests * review changes * review changes * udpate docs * make spend limit optional * fix tests * fix tests * review changes * add norace tag * proto-docs * add docs Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Co-authored-by: SaReN <sahithnarahari@gmail.com> Co-authored-by: aleem1413 <aleem@vitwit.com> Co-authored-by: MD Aleem <72057206+aleem1314@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-29 11:54:51 -08:00
feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module"
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
2018-06-21 17:19:14 -07:00
"github.com/cosmos/cosmos-sdk/x/gov"
2020-06-13 02:07:51 -07:00
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
2018-10-19 11:36:00 -07:00
"github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
2018-05-23 13:25:56 -07:00
"github.com/cosmos/cosmos-sdk/x/slashing"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
2019-01-11 12:08:01 -08:00
"github.com/cosmos/cosmos-sdk/x/staking"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
2018-04-06 22:12:00 -07:00
)
const appName = "SimApp"
2018-04-06 22:12:00 -07:00
2018-04-25 21:27:40 -07:00
var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// ModuleBasics defines the module BasicManager is in charge of setting up basic,
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// non-dependant module elements, such as codec registration
// and genesis verification.
ModuleBasics = module.NewBasicManager(
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
auth.AppModuleBasic{},
genutil.AppModuleBasic{},
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
bank.AppModuleBasic{},
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
capability.AppModuleBasic{},
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
staking.AppModuleBasic{},
mint.AppModuleBasic{},
distr.AppModuleBasic{},
gov.NewAppModuleBasic(
paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler,
),
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
params.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
feegrantmodule.AppModuleBasic{},
upgrade.AppModuleBasic{},
evidence.AppModuleBasic{},
authzmodule.AppModuleBasic{},
Add ADR 031 BaseApp and codec infrastructure (#7519) * Refactor RegisterQueryServices -> RegisterServices * Cleaner proto files * Fix tests * Add MsgServer * Fix lint * Remove MsgServer from configurator for now * Remove useless file * Fix build * typo * Add router * Fix test * WIP * Add router * Remove test helper * Add beginning of test * Move test to simapp? * ServiceMsg implement sdk.Msg * Add handler by MsgServiceRouter * Correct signature * Add full test * use TxEncoder * Update baseapp/msg_service_router.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Push changes * WIP on ServiceMsg unpacking * Make TestMsgService test pass * Fix tests * Tidying up * Tidying up * Tidying up * Add JSON test * Add comments * Tidying * Lint * Register MsgRequest interface * Rename * Fix tests * RegisterCustomTypeURL * Add changelog entries * Put in features * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Address review comments * Address nit * Fix lint * Update codec/types/interface_registry.go Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> * godoc Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-15 06:07:59 -07:00
vesting.AppModuleBasic{},
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
)
// module account permissions
maccPerms = map[string][]string{
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
}
)
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
var (
_ App = (*SimApp)(nil)
_ servertypes.Application = (*SimApp)(nil)
)
// SimApp extends an ABCI application, but with most of its parameters exported.
// They are exported for convenience in creating helper functions, as object
// capabilities aren't needed for testing.
type SimApp struct {
*baseapp.BaseApp
legacyAmino *codec.LegacyAmino
appCodec codec.Codec
interfaceRegistry types.InterfaceRegistry
2018-04-06 22:12:00 -07:00
invCheckPeriod uint
Merge PR #3656: Broken-Invar Tx - aka. Crisis module * beginning thinking on issue * ... * working * working * working fee pool distribution * spek outline * spec update * gas refund calculations * simulation saved to ~/.gaiad/simulations/ * lean simulation output int * cleanup bank simulation messages * operation messges int * lint * move simulation to its own module * move simulation log code to log.go * logger overhaul int * distribution comments * fix compiling * cleanup modifications to x/distribution/keeper/allocation.go int int int * gov bug * result.IsOK() minimization * importExport typo bug * pending * address @alexanderbez comments * simple @cwgoes comments addressed * event logging unified approach * distr module name constant * implementing * compiles * gaia integration * proper constant fee removal * crisis genesis * go.sum update * ... * debugging * fix sum errors * missing err checks * working implementing CLI * remove query command * crisis expected keepers in other modules * crisis testing infrastructure * working * tests complete * modify handler to still panic if not enough pool coins, docs working * spec tags * docs complete * CL * assert invariants on a blockly basis gaiad functionality * gaiad CL * transaction details in runtime invariance panic * Apply suggestions from code review Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * sender tags * @mossid suggestions int * @cwgoes comments final * Apply suggestions from code review Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * bug seems fixed (#3998) * delete unused line in zero height export bug
2019-03-28 16:27:47 -07:00
2018-04-06 22:12:00 -07:00
// keys to access the substores
keys map[string]*sdk.KVStoreKey
tkeys map[string]*sdk.TransientStoreKey
memKeys map[string]*sdk.MemoryStoreKey
2018-04-06 22:12:00 -07:00
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
2020-06-13 02:07:51 -07:00
GovKeeper govkeeper.Keeper
CrisisKeeper crisiskeeper.Keeper
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
implement x/authz module (#7629) * WIP: Msg authorization module added * fixing errors * fixed errors * fixed module.go * Add msg_tests * fixes compile issues * fix test * fix test * Add msg types tests * Fix Getmsgs * fixed codec issue * Fix syntax issues * Fix keeper * fixed proto issues * Fix keeper tests * fixed router in keeper * Fix query proto * Fix cli txs * Add grpc query client implementation * Add grpc-keeper test * Add grpc query tests Add revoke and exec authorization cli commands * Fix linting issues * Fix cli query * fix lint errors * Add Genesis state * Fix query authorization * Review changes * Fix grant authorization handler * Add cli tests * Add cli tests * Fix genesis test * Fix issues * update module to use proto msg services * Add simultion tests * Fix lint * fix lint * WIP simulations * WIP simulations * add msg tests * Fix simulation * Fix errors * fix genesis import export * fix sim tests * fix sim * fix test * Register RegisterMsgServer * WIP * WIP * Update keeper test * change msg_authorization module name to authz * changed type conversion for serviceMsg * serviceMsg change to any * Fix issues * fix msg tests * fix errors * proto format * remove LegacyQuerierHandler * Use MsgServiceRouter * fix keeper-test * fix query authorizations * fix NewCmdSendAs * fix simtests * fix error * fix lint * fix lint * add tests for generic authorization * fix imports * format * Update error message * remove println * add query all grants * Add pagination for queries * format * fix lint * review changes * fix grpc tests * add pagination to cli query * review changes * replace panic with error * lint * fix errors * fix tests * remove gogoproto extensions * update function doc * review changes * fix errors * fix query flags * fix grpc query test * init service-msg * remove unsed field * add proto-codec for simulations * fix codec issue * update authz simulations * change msgauth to authz * add check for invalid msg-type * change expiration flag to Unix * doc * update module.go * fix sims * fix grant-authorization sims * fix error * fix error * add build flag * fix codec issue * rename * review changes * format * review changes * go.mod * refactor * proto-gen * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Fix review comments * fix protogen * Follow Msg...Request style for msg requests * update comment * Fix error codes * fix review comment * improve msg validations * Handle error in casting msgs * rename actor => grantStoreKey * add godoc * add godoc * Fix simulations * Fix cli, cli_tests * Fix simulations * rename to GetOrRevokeAuthorization * Move events to keeper * Fix fmt * Update x/authz/client/cli/tx.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * rename actor * fix lint Co-authored-by: atheesh <atheesh@vitwit.com> Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com> Co-authored-by: MD Aleem <72057206+aleem1413@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2021-01-25 08:41:30 -08:00
AuthzKeeper authzkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
Add fee grant module (#8061) * Add docs * Add BasicFeeAllowance implementation * Add expiration structs and complete basic fee * Add delegation messages, add validation logic * Add keeper and helper structs * Add alias and handler to top level * Add delegation module * Add basic querier * Add types tests * Add types tests * More internal test coverage * Solid internal test coverage * Expose Querier to top level module * Add FeeAccount to auth/types, like StdTx, SignDoc * Fix all tests in x/auth * All tests pass * Appease the Golang Linter * Add fee-account command line flag * Start on DelegatedDeductFeeDecorator * Cleanup the Decorator * Wire up delegation module in simapp * add basic test for decorator (no delegation) * Table tests for deduct fees * Table tests over all conditions of delegated fee decorator * Build full ante handler stack and test it * Start genesis * Implement Genesis * Rename package delegation to subkeys * Clarify antes test cases, handle empty account w/o fees * Allow paying delegated fees with no account * Pull mempool into delegated ante, for control on StdFee * Use custom DelegatedTx, DelegatedFee for subkeys * Revert all changes to x/auth.StdTx * Appease scopelint * Register DelegatedTx with codec * Address PR comments * Remove unnecessary DelegatedMempoolFeeDecorator * Cleaned up errors in querier * Clean up message sign bytes * Minor PR comments * Replace GetAllFees... with Iterator variants * PrepareForExport adjusts grant expiration height * Panic on de/serialization error in keeper * Move custom ante handler chain to tests, update docs * More cleanup * More doc cleanup * Renamed subkeys module to fee_grant * Rename subkeys/delegation to fee grant in all strings * Modify Msg and Keeper methods to use Grant not Delegate * Add PeriodicFeeAllowance * Update aliases * Cover all accept cases for PeriodicFeeAllowance * Et tu scopelint? * Update docs as requested * Remove error return from GetFeeGrant * Code cleanup as requested by PR * Updated all errors to use new sdk/errors package * Use test suite for keeper tests * Clean up alias.go file * Define expected interfaces in exported, rather than importing from account * Remove dependency on auth/ante * Improve godoc, Logger * Cleaned up ExpiresAt * Improve error reporting with UseGrantedFee * Enforce period limit subset of basic limit * Add events * Rename fee_grant to feegrant * Ensure KeeperTestSuite actually runs * Move types/tx to types * Update alias file, include ante * I do need nolint in alias.go * Properly emit events in the handler. Use cosmos-sdk in amino types * Update godoc * Linting... * Update errors * Update pkg doc and fix ante-handler order * Merge PR #5782: Migrate x/feegrant to proto * fix errors * proto changes * proto changes * fix errors * fix errors * genesis state changed to proto * fix keeper tests * fix test * fixed tests * fix tests * updated expected keepers * updated ante tests * lint * deleted alias.go * tx updated to proto tx * remove explicit signmode * tests * Added `cli/query.go` * Added tx.go in cli * updated `module.go` * resolve errors in tx.go * Add fee payer gentx func * updated tx * fixed error * WIP: cli tests * fix query error * fix tests * Unused types and funcs * fix tests * rename helper func to create tx * remove unused * update tx cfg * fix cli tests * added simulations * Add `decoder.go` * fix build fail * added init genesis code * update tx.go * fixed LGTM alert * modified cli * remove gogoproto extensions * change acc address type to string * lint * fix simulations * Add gen simulations * remove legacy querier * remove legacy code * add grpc queries tests * fix simulations * update module.go * lint * register feegrant NewSimulationManager * fix sims * fix sims * add genesis test * add periodic grant * updated cmd * changed times * updated flags * removed days as period clock * added condition for period and exp * add periodic fee cli tests * udpated tests * fix lint * fix tests * fix sims * renaming to `fee_grant` * review changes * fix test * add condition for duplicate grants * fix tests * add `genTxWithFeeGranter` in tests * fix simulation * one of changes & test fixes * fix test * fix lint * changed package name `feegrant` to `fee_grant` * review comments * review changes * review change * review changes * added fee-account in flags * address review changes * read fee granter from cli * updated create account with mnemonic * Address review comments * move `simapp/ante` file to `feegrant/ante` * update keeper logic to create account * update docs * fix tests * update `serviceMsgClientConn` from `msgservice` * review changes * add test case for using more fees than allowed * eliminate panic checks from keeper * fix lint * change store keys string to bytes * fix tests * review changes * review changes * udpate docs * make spend limit optional * fix tests * fix tests * review changes * add norace tag * proto-docs * add docs Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Co-authored-by: SaReN <sahithnarahari@gmail.com> Co-authored-by: aleem1413 <aleem@vitwit.com> Co-authored-by: MD Aleem <72057206+aleem1314@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-29 11:54:51 -08:00
FeeGrantKeeper feegrantkeeper.Keeper
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// the module manager
mm *module.Manager
// simulation manager
sm *module.SimulationManager
// module configurator
configurator module.Configurator
2018-04-06 22:12:00 -07:00
}
func init() {
userHomeDir, err := os.UserHomeDir()
if err != nil {
panic(err)
}
DefaultNodeHome = filepath.Join(userHomeDir, ".simapp")
}
// NewSimApp returns a reference to an initialized SimApp.
func NewSimApp(
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool,
homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig,
appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp),
) *SimApp {
Merge PR #3656: Broken-Invar Tx - aka. Crisis module * beginning thinking on issue * ... * working * working * working fee pool distribution * spek outline * spec update * gas refund calculations * simulation saved to ~/.gaiad/simulations/ * lean simulation output int * cleanup bank simulation messages * operation messges int * lint * move simulation to its own module * move simulation log code to log.go * logger overhaul int * distribution comments * fix compiling * cleanup modifications to x/distribution/keeper/allocation.go int int int * gov bug * result.IsOK() minimization * importExport typo bug * pending * address @alexanderbez comments * simple @cwgoes comments addressed * event logging unified approach * distr module name constant * implementing * compiles * gaia integration * proper constant fee removal * crisis genesis * go.sum update * ... * debugging * fix sum errors * missing err checks * working implementing CLI * remove query command * crisis expected keepers in other modules * crisis testing infrastructure * working * tests complete * modify handler to still panic if not enough pool coins, docs working * spec tags * docs complete * CL * assert invariants on a blockly basis gaiad functionality * gaiad CL * transaction details in runtime invariance panic * Apply suggestions from code review Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * sender tags * @mossid suggestions int * @cwgoes comments final * Apply suggestions from code review Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com> * bug seems fixed (#3998) * delete unused line in zero height export bug
2019-03-28 16:27:47 -07:00
appCodec := encodingConfig.Marshaler
legacyAmino := encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry
bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...)
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
Add ADR 031 BaseApp and codec infrastructure (#7519) * Refactor RegisterQueryServices -> RegisterServices * Cleaner proto files * Fix tests * Add MsgServer * Fix lint * Remove MsgServer from configurator for now * Remove useless file * Fix build * typo * Add router * Fix test * WIP * Add router * Remove test helper * Add beginning of test * Move test to simapp? * ServiceMsg implement sdk.Msg * Add handler by MsgServiceRouter * Correct signature * Add full test * use TxEncoder * Update baseapp/msg_service_router.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Push changes * WIP on ServiceMsg unpacking * Make TestMsgService test pass * Fix tests * Tidying up * Tidying up * Tidying up * Add JSON test * Add comments * Tidying * Lint * Register MsgRequest interface * Rename * Fix tests * RegisterCustomTypeURL * Add changelog entries * Put in features * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Address review comments * Address nit * Fix lint * Update codec/types/interface_registry.go Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> * godoc Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-15 06:07:59 -07:00
bApp.SetInterfaceRegistry(interfaceRegistry)
keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
2021-03-04 05:11:34 -08:00
evidencetypes.StoreKey, capabilitytypes.StoreKey,
authzkeeper.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
fix!: Capability Issue on Restart, Backport to v0.43 (backport #9836) (#9841) * fix!: Capability Issue on Restart, Backport to v0.43 (#9836) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #9800 The following is a breaking fix to #9800. In the non-breaking fix, the initialization logic was moved out of `InitializeAndSeal` but the API was preserved. I've now removed `InitializeAndSeal` and replaced it with just the `Seal` function, which may be called much more cleanly in `app.go` --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit 7f316adb97706d82ac5de2bae608eb5ed42300ec) # Conflicts: # CHANGELOG.md * solve conflicts Co-authored-by: Aditya <adityasripal@gmail.com> Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-08-04 04:51:39 -07:00
// NOTE: The testingkey is just mounted for testing purposes. Actual applications should
// not include this key.
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, "testingkey")
app := &SimApp{
BaseApp: bApp,
legacyAmino: legacyAmino,
appCodec: appCodec,
interfaceRegistry: interfaceRegistry,
invCheckPeriod: invCheckPeriod,
keys: keys,
tkeys: tkeys,
memKeys: memKeys,
2018-04-06 22:12:00 -07:00
}
app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey])
// set the BaseApp's parameter store
bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable()))
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey])
fix!: Capability Issue on Restart, Backport to v0.43 (backport #9836) (#9841) * fix!: Capability Issue on Restart, Backport to v0.43 (#9836) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #9800 The following is a breaking fix to #9800. In the non-breaking fix, the initialization logic was moved out of `InitializeAndSeal` but the API was preserved. I've now removed `InitializeAndSeal` and replaced it with just the `Seal` function, which may be called much more cleanly in `app.go` --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit 7f316adb97706d82ac5de2bae608eb5ed42300ec) # Conflicts: # CHANGELOG.md * solve conflicts Co-authored-by: Aditya <adityasripal@gmail.com> Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-08-04 04:51:39 -07:00
// Applications that wish to enforce statically created ScopedKeepers should call `Seal` after creating
// their scoped modules in `NewApp` with `ScopeToModule`
app.CapabilityKeeper.Seal()
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// add keepers
app.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms,
)
app.BankKeeper = bankkeeper.NewBaseKeeper(
appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(),
)
stakingKeeper := stakingkeeper.NewKeeper(
// we set the WormholeKeeper to nil because it's not used for simapp and this way the circular dependency is avoided
appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, nil, app.GetSubspace(stakingtypes.ModuleName),
)
app.MintKeeper = mintkeeper.NewKeeper(
appCodec, keys[minttypes.StoreKey], app.GetSubspace(minttypes.ModuleName), &stakingKeeper,
app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName,
)
app.DistrKeeper = distrkeeper.NewKeeper(
appCodec, keys[distrtypes.StoreKey], app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper,
&stakingKeeper, authtypes.FeeCollectorName, app.ModuleAccountAddrs(),
)
app.SlashingKeeper = slashingkeeper.NewKeeper(
appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, app.GetSubspace(slashingtypes.ModuleName),
)
app.CrisisKeeper = crisiskeeper.NewKeeper(
app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName,
)
Add fee grant module (#8061) * Add docs * Add BasicFeeAllowance implementation * Add expiration structs and complete basic fee * Add delegation messages, add validation logic * Add keeper and helper structs * Add alias and handler to top level * Add delegation module * Add basic querier * Add types tests * Add types tests * More internal test coverage * Solid internal test coverage * Expose Querier to top level module * Add FeeAccount to auth/types, like StdTx, SignDoc * Fix all tests in x/auth * All tests pass * Appease the Golang Linter * Add fee-account command line flag * Start on DelegatedDeductFeeDecorator * Cleanup the Decorator * Wire up delegation module in simapp * add basic test for decorator (no delegation) * Table tests for deduct fees * Table tests over all conditions of delegated fee decorator * Build full ante handler stack and test it * Start genesis * Implement Genesis * Rename package delegation to subkeys * Clarify antes test cases, handle empty account w/o fees * Allow paying delegated fees with no account * Pull mempool into delegated ante, for control on StdFee * Use custom DelegatedTx, DelegatedFee for subkeys * Revert all changes to x/auth.StdTx * Appease scopelint * Register DelegatedTx with codec * Address PR comments * Remove unnecessary DelegatedMempoolFeeDecorator * Cleaned up errors in querier * Clean up message sign bytes * Minor PR comments * Replace GetAllFees... with Iterator variants * PrepareForExport adjusts grant expiration height * Panic on de/serialization error in keeper * Move custom ante handler chain to tests, update docs * More cleanup * More doc cleanup * Renamed subkeys module to fee_grant * Rename subkeys/delegation to fee grant in all strings * Modify Msg and Keeper methods to use Grant not Delegate * Add PeriodicFeeAllowance * Update aliases * Cover all accept cases for PeriodicFeeAllowance * Et tu scopelint? * Update docs as requested * Remove error return from GetFeeGrant * Code cleanup as requested by PR * Updated all errors to use new sdk/errors package * Use test suite for keeper tests * Clean up alias.go file * Define expected interfaces in exported, rather than importing from account * Remove dependency on auth/ante * Improve godoc, Logger * Cleaned up ExpiresAt * Improve error reporting with UseGrantedFee * Enforce period limit subset of basic limit * Add events * Rename fee_grant to feegrant * Ensure KeeperTestSuite actually runs * Move types/tx to types * Update alias file, include ante * I do need nolint in alias.go * Properly emit events in the handler. Use cosmos-sdk in amino types * Update godoc * Linting... * Update errors * Update pkg doc and fix ante-handler order * Merge PR #5782: Migrate x/feegrant to proto * fix errors * proto changes * proto changes * fix errors * fix errors * genesis state changed to proto * fix keeper tests * fix test * fixed tests * fix tests * updated expected keepers * updated ante tests * lint * deleted alias.go * tx updated to proto tx * remove explicit signmode * tests * Added `cli/query.go` * Added tx.go in cli * updated `module.go` * resolve errors in tx.go * Add fee payer gentx func * updated tx * fixed error * WIP: cli tests * fix query error * fix tests * Unused types and funcs * fix tests * rename helper func to create tx * remove unused * update tx cfg * fix cli tests * added simulations * Add `decoder.go` * fix build fail * added init genesis code * update tx.go * fixed LGTM alert * modified cli * remove gogoproto extensions * change acc address type to string * lint * fix simulations * Add gen simulations * remove legacy querier * remove legacy code * add grpc queries tests * fix simulations * update module.go * lint * register feegrant NewSimulationManager * fix sims * fix sims * add genesis test * add periodic grant * updated cmd * changed times * updated flags * removed days as period clock * added condition for period and exp * add periodic fee cli tests * udpated tests * fix lint * fix tests * fix sims * renaming to `fee_grant` * review changes * fix test * add condition for duplicate grants * fix tests * add `genTxWithFeeGranter` in tests * fix simulation * one of changes & test fixes * fix test * fix lint * changed package name `feegrant` to `fee_grant` * review comments * review changes * review change * review changes * added fee-account in flags * address review changes * read fee granter from cli * updated create account with mnemonic * Address review comments * move `simapp/ante` file to `feegrant/ante` * update keeper logic to create account * update docs * fix tests * update `serviceMsgClientConn` from `msgservice` * review changes * add test case for using more fees than allowed * eliminate panic checks from keeper * fix lint * change store keys string to bytes * fix tests * review changes * review changes * udpate docs * make spend limit optional * fix tests * fix tests * review changes * add norace tag * proto-docs * add docs Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com> Co-authored-by: SaReN <sahithnarahari@gmail.com> Co-authored-by: aleem1413 <aleem@vitwit.com> Co-authored-by: MD Aleem <72057206+aleem1314@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-29 11:54:51 -08:00
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper)
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp)
2018-09-18 14:54:28 -07:00
// register the staking hooks
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper = *stakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()),
)
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.BaseApp.MsgServiceRouter())
implement x/authz module (#7629) * WIP: Msg authorization module added * fixing errors * fixed errors * fixed module.go * Add msg_tests * fixes compile issues * fix test * fix test * Add msg types tests * Fix Getmsgs * fixed codec issue * Fix syntax issues * Fix keeper * fixed proto issues * Fix keeper tests * fixed router in keeper * Fix query proto * Fix cli txs * Add grpc query client implementation * Add grpc-keeper test * Add grpc query tests Add revoke and exec authorization cli commands * Fix linting issues * Fix cli query * fix lint errors * Add Genesis state * Fix query authorization * Review changes * Fix grant authorization handler * Add cli tests * Add cli tests * Fix genesis test * Fix issues * update module to use proto msg services * Add simultion tests * Fix lint * fix lint * WIP simulations * WIP simulations * add msg tests * Fix simulation * Fix errors * fix genesis import export * fix sim tests * fix sim * fix test * Register RegisterMsgServer * WIP * WIP * Update keeper test * change msg_authorization module name to authz * changed type conversion for serviceMsg * serviceMsg change to any * Fix issues * fix msg tests * fix errors * proto format * remove LegacyQuerierHandler * Use MsgServiceRouter * fix keeper-test * fix query authorizations * fix NewCmdSendAs * fix simtests * fix error * fix lint * fix lint * add tests for generic authorization * fix imports * format * Update error message * remove println * add query all grants * Add pagination for queries * format * fix lint * review changes * fix grpc tests * add pagination to cli query * review changes * replace panic with error * lint * fix errors * fix tests * remove gogoproto extensions * update function doc * review changes * fix errors * fix query flags * fix grpc query test * init service-msg * remove unsed field * add proto-codec for simulations * fix codec issue * update authz simulations * change msgauth to authz * add check for invalid msg-type * change expiration flag to Unix * doc * update module.go * fix sims * fix grant-authorization sims * fix error * fix error * add build flag * fix codec issue * rename * review changes * format * review changes * go.mod * refactor * proto-gen * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Fix review comments * fix protogen * Follow Msg...Request style for msg requests * update comment * Fix error codes * fix review comment * improve msg validations * Handle error in casting msgs * rename actor => grantStoreKey * add godoc * add godoc * Fix simulations * Fix cli, cli_tests * Fix simulations * rename to GetOrRevokeAuthorization * Move events to keeper * Fix fmt * Update x/authz/client/cli/tx.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * rename actor * fix lint Co-authored-by: atheesh <atheesh@vitwit.com> Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com> Co-authored-by: MD Aleem <72057206+aleem1413@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2021-01-25 08:41:30 -08:00
Implement ADR 026 (#7029) * Add allow_governance_override_after_expiry flag to tendermint NewCreateClientCmd * 1) Add LatestTimestamp to ClientState struct by adding a new attribute latest_timestamp to the message ClientState in proto/ibc/tendermint/tendermint.proto 2) Autogenerate x/ibc/07-tendermint/types/tendermint.pb.go by running 'make proto-gen'. Strangely, as a side effect x/distribution/types/genesis.pb.go, x/evidence/types/genesis.pb.go were also modified by the command 'make proto-gen' 3) Add Expired() function * Fix tests * 1) Add allow_governance_override_after_expiry flag to tendemint clientStatus 2) Add allow_governance_override_after_misbehaviour flag to tendermint ClientStatus * Cosmetic changes * Fix tests * Add Unfreeze function * Add new ClientUpdateProposal type * Add minor fixes * Add NewClientUpdateProposalHandler unit tests * Fix proto-lint-docker * Delete x/ibc/07-tendermint/tendermint_test.go * Follow convention to put signer last in msg function signature * 1) Add GetLatestTimestamp function to ClientStatus interface 2) Change Expired() signature to Expired(now time.Time) * 1) Add override flag to UpdateClient function 2) Fix tests * Refactor HandleClientUpdateProposal * 1) Extend exported Header interface with MarshalBinaryBare and UnmarshalBinaryBare methods 2) Move ClientUpdateProposal message to from ibc.proto to client.proto 3) Refactoring code 4) Add override flag to UpdateClient method 5) Fix tests * 1) Uncomment tests and clean up code 2) Add basic validation of the header (ValidateBasic) when the override flag is true * Cosmetic changes * Add TODO comments * Fix header MarshalBinaryBare, UnmarshalBinaryBare by using protobuf encoding/decoding * Fix proto comments * Fix override logic * undo gettimestamp for solo machine and localhost * add update after proposal func, some major refactoring in progress, various issues addressed * fix tendermint proposal update handling * run make proto-gen * remove timestamp from tendemint client * fix build issue for tm types * apply various review comments * add tests for 02-client functionality * self review fixes * typo * update tests slightly * update tendermint proposal handling tests * Update x/ibc/02-client/keeper/proposal.go Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update x/ibc/07-tendermint/types/proposal_handle.go Co-authored-by: Aditya <adityasripal@gmail.com> * Update x/ibc/07-tendermint/types/proposal_handle.go Co-authored-by: Aditya <adityasripal@gmail.com> * apply most of @fedekunze and some of @AdityaSripal suggestions * convert test to bools * update docs and increase code cov * fix build * fix typo, remove omitempty * add switch * apply @fedekunze latest suggestions * fix lint * Update x/ibc/02-client/keeper/proposal_test.go Co-authored-by: Christopher Goes <cwgoes@pluranimity.org> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Colin Axner <colinaxner@berkeley.edu> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Aditya <adityasripal@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-04 13:59:22 -07:00
// register the proposal types
govRouter := govtypes.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
2021-03-04 05:11:34 -08:00
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper))
govKeeper := govkeeper.NewKeeper(
Implement ADR 026 (#7029) * Add allow_governance_override_after_expiry flag to tendermint NewCreateClientCmd * 1) Add LatestTimestamp to ClientState struct by adding a new attribute latest_timestamp to the message ClientState in proto/ibc/tendermint/tendermint.proto 2) Autogenerate x/ibc/07-tendermint/types/tendermint.pb.go by running 'make proto-gen'. Strangely, as a side effect x/distribution/types/genesis.pb.go, x/evidence/types/genesis.pb.go were also modified by the command 'make proto-gen' 3) Add Expired() function * Fix tests * 1) Add allow_governance_override_after_expiry flag to tendemint clientStatus 2) Add allow_governance_override_after_misbehaviour flag to tendermint ClientStatus * Cosmetic changes * Fix tests * Add Unfreeze function * Add new ClientUpdateProposal type * Add minor fixes * Add NewClientUpdateProposalHandler unit tests * Fix proto-lint-docker * Delete x/ibc/07-tendermint/tendermint_test.go * Follow convention to put signer last in msg function signature * 1) Add GetLatestTimestamp function to ClientStatus interface 2) Change Expired() signature to Expired(now time.Time) * 1) Add override flag to UpdateClient function 2) Fix tests * Refactor HandleClientUpdateProposal * 1) Extend exported Header interface with MarshalBinaryBare and UnmarshalBinaryBare methods 2) Move ClientUpdateProposal message to from ibc.proto to client.proto 3) Refactoring code 4) Add override flag to UpdateClient method 5) Fix tests * 1) Uncomment tests and clean up code 2) Add basic validation of the header (ValidateBasic) when the override flag is true * Cosmetic changes * Add TODO comments * Fix header MarshalBinaryBare, UnmarshalBinaryBare by using protobuf encoding/decoding * Fix proto comments * Fix override logic * undo gettimestamp for solo machine and localhost * add update after proposal func, some major refactoring in progress, various issues addressed * fix tendermint proposal update handling * run make proto-gen * remove timestamp from tendemint client * fix build issue for tm types * apply various review comments * add tests for 02-client functionality * self review fixes * typo * update tests slightly * update tendermint proposal handling tests * Update x/ibc/02-client/keeper/proposal.go Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update x/ibc/07-tendermint/types/proposal_handle.go Co-authored-by: Aditya <adityasripal@gmail.com> * Update x/ibc/07-tendermint/types/proposal_handle.go Co-authored-by: Aditya <adityasripal@gmail.com> * apply most of @fedekunze and some of @AdityaSripal suggestions * convert test to bools * update docs and increase code cov * fix build * fix typo, remove omitempty * add switch * apply @fedekunze latest suggestions * fix lint * Update x/ibc/02-client/keeper/proposal_test.go Co-authored-by: Christopher Goes <cwgoes@pluranimity.org> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Colin Axner <colinaxner@berkeley.edu> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Aditya <adityasripal@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-04 13:59:22 -07:00
appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper,
&stakingKeeper, govRouter,
)
app.GovKeeper = *govKeeper.SetHooks(
govtypes.NewMultiGovHooks(
// register the governance hooks
),
)
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
// create evidence keeper with router
evidenceKeeper := evidencekeeper.NewKeeper(
appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper,
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
)
// If evidence needs to be handled for the app, set routes in router here and seal
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
app.EvidenceKeeper = *evidenceKeeper
/**** Module Options ****/
// NOTE: we may consider parsing `appOpts` inside module constructors. For the moment
// we prefer to be more strict in what arguments the modules expect.
var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))
// NOTE: Any module instantiated in the module manager that is later modified
// must be passed by reference here.
app.mm = module.NewManager(
genutil.NewAppModule(
app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx,
encodingConfig.TxConfig,
),
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants),
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
// we set the WormholeKeeper to nil because it's not used for simapp and this way the circular dependency is avoided
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, nil),
upgrade.NewAppModule(app.UpgradeKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
params.NewAppModule(app.ParamsKeeper),
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
)
2018-09-18 14:54:28 -07:00
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// During begin block slashing happens after distr.BeginBlocker so that
// there is nothing left over in the validator fee pool, so as to keep the
// CanWithdrawInvariant invariant.
// NOTE: staking module is required if HistoricalEntries param > 0
fix!: Capability Issue on Restart, Backport to v0.43 (backport #9836) (#9841) * fix!: Capability Issue on Restart, Backport to v0.43 (#9836) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #9800 The following is a breaking fix to #9800. In the non-breaking fix, the initialization logic was moved out of `InitializeAndSeal` but the API was preserved. I've now removed `InitializeAndSeal` and replaced it with just the `Seal` function, which may be called much more cleanly in `app.go` --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit 7f316adb97706d82ac5de2bae608eb5ed42300ec) # Conflicts: # CHANGELOG.md * solve conflicts Co-authored-by: Aditya <adityasripal@gmail.com> Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-08-04 04:51:39 -07:00
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
app.mm.SetOrderBeginBlockers(
fix!: Capability Issue on Restart, Backport to v0.43 (backport #9836) (#9841) * fix!: Capability Issue on Restart, Backport to v0.43 (#9836) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #9800 The following is a breaking fix to #9800. In the non-breaking fix, the initialization logic was moved out of `InitializeAndSeal` but the API was preserved. I've now removed `InitializeAndSeal` and replaced it with just the `Seal` function, which may be called much more cleanly in `app.go` --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit 7f316adb97706d82ac5de2bae608eb5ed42300ec) # Conflicts: # CHANGELOG.md * solve conflicts Co-authored-by: Aditya <adityasripal@gmail.com> Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-08-04 04:51:39 -07:00
upgradetypes.ModuleName, capabilitytypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName,
2021-03-04 05:11:34 -08:00
evidencetypes.ModuleName, stakingtypes.ModuleName,
fix: Panic if SetOrder* functions forgot modules (backport #10711) (#10762) * fix: Panic if SetOrder* functions forgot modules (#10711) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description fixes: #10708 Panic at startup if chain devs forgot to add some modules in SetOrder* functions. <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit d3a8e1e9535e4d980723fbabdc274cd55cf965ae) # Conflicts: # CHANGELOG.md # simapp/app.go * fix conflicss * Fix build Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2022-01-03 06:24:03 -08:00
authtypes.ModuleName, banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName,
authz.ModuleName, feegrant.ModuleName,
paramstypes.ModuleName, vestingtypes.ModuleName,
)
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName,
capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName,
slashingtypes.ModuleName, minttypes.ModuleName,
genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName,
feegrant.ModuleName,
paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName,
)
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// NOTE: The genutils module must occur after staking so that pools are
// properly initialized with tokens from genesis accounts.
// NOTE: Capability module must occur first so that it can initialize any capabilities
// so that other modules that want to create or claim capabilities afterwards in InitChain
// can do so safely.
app.mm.SetOrderInitGenesis(
capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName,
slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName,
genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName,
feegrant.ModuleName,
fix: Panic if SetOrder* functions forgot modules (backport #10711) (#10762) * fix: Panic if SetOrder* functions forgot modules (#10711) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description fixes: #10708 Panic at startup if chain devs forgot to add some modules in SetOrder* functions. <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit d3a8e1e9535e4d980723fbabdc274cd55cf965ae) # Conflicts: # CHANGELOG.md # simapp/app.go * fix conflicss * Fix build Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2022-01-03 06:24:03 -08:00
paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName,
)
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
feat: support in-place migration ordering (backport #10614) (#10890) * feat: support in-place migration ordering (#10614) ## Description Closes: #10604 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit da929211d6f78014e3b40de3dc01e0ffcf0104cb) # Conflicts: # CHANGELOG.md # docs/core/upgrade.md # types/errors/errors.go # types/module/module.go * conflict fix * Add Features section * fix conflicts Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2022-01-05 16:05:01 -08:00
// Uncomment if you want to set a custom migration order here.
// app.mm.SetOrderMigrations(custom order)
app.mm.RegisterInvariants(&app.CrisisKeeper)
app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
app.mm.RegisterServices(app.configurator)
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// add test gRPC service for testing gRPC queries in isolation
Add ADR 031 BaseApp and codec infrastructure (#7519) * Refactor RegisterQueryServices -> RegisterServices * Cleaner proto files * Fix tests * Add MsgServer * Fix lint * Remove MsgServer from configurator for now * Remove useless file * Fix build * typo * Add router * Fix test * WIP * Add router * Remove test helper * Add beginning of test * Move test to simapp? * ServiceMsg implement sdk.Msg * Add handler by MsgServiceRouter * Correct signature * Add full test * use TxEncoder * Update baseapp/msg_service_router.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Push changes * WIP on ServiceMsg unpacking * Make TestMsgService test pass * Fix tests * Tidying up * Tidying up * Tidying up * Add JSON test * Add comments * Tidying * Lint * Register MsgRequest interface * Rename * Fix tests * RegisterCustomTypeURL * Add changelog entries * Put in features * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Update baseapp/msg_service_router.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> * Address review comments * Address nit * Fix lint * Update codec/types/interface_registry.go Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com> * godoc Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-15 06:07:59 -07:00
testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{})
// create the simulation manager and define the order of the modules for deterministic simulations
//
// NOTE: this is not required apps that don't use the simulator for fuzz testing
// transactions
overrideModules := map[string]module.AppModuleSimulation{
authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
}
app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules)
app.sm.RegisterStoreDecoders()
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
app.MountMemoryStores(memKeys)
2018-08-04 22:56:48 -07:00
2018-04-06 22:12:00 -07:00
// initialize BaseApp
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
app.SetInitChainer(app.InitChainer)
app.SetBeginBlocker(app.BeginBlocker)
anteHandler, err := ante.NewAnteHandler(
ante.HandlerOptions{
AccountKeeper: app.AccountKeeper,
BankKeeper: app.BankKeeper,
SignModeHandler: encodingConfig.TxConfig.SignModeHandler(),
FeegrantKeeper: app.FeeGrantKeeper,
SigGasConsumer: ante.DefaultSigVerificationGasConsumer,
},
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
)
if err != nil {
panic(err)
}
app.SetAnteHandler(anteHandler)
2018-10-04 17:20:43 -07:00
app.SetEndBlocker(app.EndBlocker)
if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(err.Error())
}
}
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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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 :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * WIP channel shake :man_dancing: * 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, :man_shrugging: * 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 17:57:52 -07:00
2018-04-06 22:12:00 -07:00
return app
}
// Name returns the name of the App
func (app *SimApp) Name() string { return app.BaseApp.Name() }
// BeginBlocker application updates every begin block
func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
return app.mm.BeginBlock(ctx, req)
}
// EndBlocker application updates every end block
func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock {
Merge PR #4159: Module/Genesis Generalization * first commit * gaia cleanup * ... * staking multihooks * missing module function return args * bank module name constant * working, module interface for x/ * got this thing compiling * make test compiles and passes * remove expanded simulation invariants * genesis issue * continued * continued * register crisis routes thought mm * begin blocker to mm * end blocker to mm * empty routes not initialized * move gaia initChainer sanity check to baseapp * remove codecs from module manager * reorging genesis stuff * module manager passed by reference/bugfixes from working last commit int int * move invariant checks from gaia to crisis * typo * basic refactors cmd/gaia/init * working * MultiStakingHooks from types to x/staking/types int * default module manager order of operations from input modules * working * typo * add AppModuleBasic * moduleBasicManager / non-test code compiles * working attempting to get tests passing * make test passes * sim random genesis fix * export bug * ... * genutil module * genutil working * refactored - happy with non-testing code in cmd/ * ... * lint fixes * comment improvement * cli test fix * compile housing * working through compile errors * working gettin' compilin' * non-test code compiles * move testnet to its own module * reworking tests int * bez staging PR 1 comments * concise module function-of names * moved all tests from genesis_test.go to other genutil tests * genaccounts package, add genutil and genaccounts to app.go * docs for genutil genaccounts * genaccounts iterate fn * non-test code with genaccounts/ now compiles * working test compiling * debugging tests * resolved all make test compile errors * test debuggin * resolved all unit tests, introduced param module * cli-test compile fixes * staking initialization bug * code comment improvements, changelog entries * BasicGaiaApp -> ModuleBasics * highlevel explanation in types/module.go * @alexanderbez comment revisions * @fedekunze PR comments * @alexanderbez PR comments (x2) * @cwgoes comments (minor updates) * @fedekunze suggestions * panic on init with multiple validator updates from different modules * initchain panic makes validate genesis fail int * AppModuleGenesis seperation int * test * remove init panic logic in validate genesis replaced with TODO * set maxprocs to match system's GOMAXPROCS * Update circleci * Cap maxprocs in CI to 4 * @alexanderbez recent comments addressed * less blocks in twouble sims int * runsim error output flag * -e on import_export as well * error out int * Try to fix failures * runsim
2019-05-16 08:25:32 -07:00
return app.mm.EndBlock(ctx, req)
}
// InitChainer application update at chain initialization
func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain {
var genesisState GenesisState
if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
x/upgrade: added consensus version tracking (part of ADR-041) (#8743) * -added consensus version tracking to x/upgrade * -added interface to module manager -added e2e test for migrations using consensus version store in x/upgrade -cleaned up x/upgrade Keeper -handler in apply upgrade now handles errors and setting consensus versions -cleaned up migration map keys -removed init chainer method -simapp now implements GetConsensusVersions to assist with testing * Changed MigrationMap identifier to VersionMap removed module_test * updated docs * forgot this * added line to changelog for this PR * Change set consensus version function to match adr 041 spec * add documentation * remove newline from changelog unnecessary newline removed * updated example in simapp for RunMigrations, SetCurrentConsensusVersions now returns an error * switch TestMigrations to use Require instead of t.Fatal * Update CHANGELOG.md Co-authored-by: Aaron Craelius <aaron@regen.network> * docs for SetVersionManager * -init genesis method added -removed panics/fails from setting consensus versions * update identifiers to be more go-like * update docs and UpgradeHandler fnc sig * Upgrade Keeper now takes a VersionMap instead of a VersionManager interface * upgrade keeper transition to Version Map * cleanup, added versionmap return to RunMigrations * quick fix * Update docs/architecture/adr-041-in-place-store-migrations.md Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * remove support for versionmap field on upgrade keeper * cleanup * rename get/set version map keeper functions * update adr doc to match name changes * remove redudant line Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-19 15:01:29 -07:00
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
2018-04-06 22:12:00 -07:00
}
2018-04-24 06:46:39 -07:00
// LoadHeight loads a particular height
func (app *SimApp) LoadHeight(height int64) error {
return app.LoadVersion(height)
2018-11-13 07:14:09 -08:00
}
// ModuleAccountAddrs returns all the app's module account addresses.
func (app *SimApp) ModuleAccountAddrs() map[string]bool {
modAccAddrs := make(map[string]bool)
for acc := range maccPerms {
modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true
}
return modAccAddrs
}
// LegacyAmino returns SimApp's amino codec.
//
// NOTE: This is solely to be used for testing purposes as it may be desirable
// for modules to register their own custom testing types.
func (app *SimApp) LegacyAmino() *codec.LegacyAmino {
return app.legacyAmino
}
// AppCodec returns SimApp's app codec.
//
// NOTE: This is solely to be used for testing purposes as it may be desirable
// for modules to register their own custom testing types.
func (app *SimApp) AppCodec() codec.Codec {
return app.appCodec
}
// InterfaceRegistry returns SimApp's InterfaceRegistry
func (app *SimApp) InterfaceRegistry() types.InterfaceRegistry {
return app.interfaceRegistry
}
// GetKey returns the KVStoreKey for the provided store key.
//
// NOTE: This is solely to be used for testing purposes.
func (app *SimApp) GetKey(storeKey string) *sdk.KVStoreKey {
return app.keys[storeKey]
}
// GetTKey returns the TransientStoreKey for the provided store key.
//
// NOTE: This is solely to be used for testing purposes.
func (app *SimApp) GetTKey(storeKey string) *sdk.TransientStoreKey {
return app.tkeys[storeKey]
}
// GetMemKey returns the MemStoreKey for the provided mem key.
//
// NOTE: This is solely used for testing purposes.
func (app *SimApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey {
return app.memKeys[storeKey]
}
// GetSubspace returns a param subspace for a given module name.
//
// NOTE: This is solely to be used for testing purposes.
func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace {
subspace, _ := app.ParamsKeeper.GetSubspace(moduleName)
return subspace
}
// SimulationManager implements the SimulationApp interface
func (app *SimApp) SimulationManager() *module.SimulationManager {
return app.sm
}
2020-06-15 10:39:09 -07:00
// RegisterAPIRoutes registers all application module routes with the provided
// API server.
func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
clientCtx := apiSvr.ClientCtx
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
// Register legacy tx routes.
authrest.RegisterTxRoutes(clientCtx, apiSvr.Router)
// Register new tx routes from grpc-gateway.
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// Register new tendermint queries routes from grpc-gateway.
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// Register legacy and grpc-gateway routes for all modules.
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// register swagger API from root so that other applications can override easily
if apiConfig.Swagger {
RegisterSwaggerAPI(clientCtx, apiSvr.Router)
}
}
// RegisterTxService implements the Application.RegisterTxService method.
func (app *SimApp) RegisterTxService(clientCtx client.Context) {
authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry)
}
// RegisterTendermintService implements the Application.RegisterTendermintService method.
func (app *SimApp) RegisterTendermintService(clientCtx client.Context) {
tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry)
}
// RegisterSwaggerAPI registers swagger route with API Server
func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) {
statikFS, err := fs.New()
if err != nil {
panic(err)
}
staticServer := http.FileServer(statikFS)
rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer))
2020-06-15 10:39:09 -07:00
}
// GetMaccPerms returns a copy of the module account permissions
func GetMaccPerms() map[string][]string {
dupMaccPerms := make(map[string][]string)
for k, v := range maccPerms {
dupMaccPerms[k] = v
}
return dupMaccPerms
}
// initParamsKeeper init params keeper and its subspaces
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper {
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)
paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
paramsKeeper.Subspace(stakingtypes.ModuleName)
paramsKeeper.Subspace(minttypes.ModuleName)
paramsKeeper.Subspace(distrtypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)
return paramsKeeper
}