Commit Graph

2299 Commits

Author SHA1 Message Date
Alessio Treglia 65ea305336
x/auth: add sign-batch command (#6350)
The command processes list of transactions from file
(one StdTx each line), generate signed transactions
or signatures and print their JSON encoding, delimited
by '\n'. As the signatures are generated, the command
increments the sequence number automatically.

Author: @jgimeno
Reviewed-by: @alessio
2020-06-08 17:19:29 +02:00
Marko b618e0a827
add comments to why its nolint (#6366)
* add comments to why its nolint

* fix spelling

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

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

* add querying for packet commitments and unrelayed acks

* add get all packet commitments test

* add query channels test

* add query connection channels test

* add test for query packet commitments

* fix key path and add unrelayed acks test

* fix part of lint

* add unrelayed packetsends func

* fix godoc

* add nolint directive

* fix lint

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-06 19:25:45 -04:00
Jonathan Gimeno 626f9b62c5
add pagination (#6163)
* add pagination

* make test pass with validators

* add pagination option

* unbonding delegations test added

* test unbondedvalidators pagination

* clean test

* remove comment

* remove comment

* add page and limit to unbonding delegations

* add flag limit and page for delegations-to command

* refactor hardcoded string values

* udpate page and limit for validator

* update changelog

* add pagination option

* add defaults

* Update CHANGELOG.md

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-06 17:32:15 +00:00
colin axner 71374d0eca
add contextual info to sigverify err msg (#6355)
* update sigverify error message

* whoops, use get sequence

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-06 08:05:30 +00:00
Aaron Craelius 43947ca2ef
Add RegisterQueryService to AppModule (#6336)
* Add RegisterQueryService to AppModule

* Update CHANGELOG.md

* Update CHANGELOG.md

* Wire up BaseApp, fix tests

* Add mock test

* add missing file

* Update types/module/module.go

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-06 07:59:57 +00:00
Aaron Craelius 72925fa9ee
Add basic x/bank gRPC query service (#6343)
* Add basic x/bank gRPC query server

* proto lint

* Add pb.go file

* cleanup

* add separate grpc query tests

* Add request validation

* Use gRPC status errors

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-05 18:10:04 +00:00
Alessio Treglia e248693ac8
x/auth/client: remove duplicate flags (#6348) 2020-06-05 16:14:22 +02:00
Federico Kunze 1a5f2b7859
x/ibc-transfer: custom absolute packet timeout (#6248)
* x/ibc-transfer: custom timeout

* remove destHeight field

* cleanup

* fix test

* replace CLI arg for flag

* update CLI

* viper get flag

* address comments from review

* update cmd example:

* update spec

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

* add spec updates

* godoc and nil check to lenght

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

* Update CHANGELOG.md

* Updates

* nit

* Fix imports

* Updates

* Use cosmos multisig instead of tendermint multisig everywhere

* Fix tests

* Rename legacy_global -> legacy

* Add doc.go

* Linting, move all RegisterCrypto calls to crypto/codec

* Update crypto/codec/amino.go

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

* Update CHANGELOG

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

* Cleaning up

* Cleaning up

* Update CHANGELOG.md

* Lint fixes

* Lint fixes

* fix tests

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-03 19:52:05 +00:00
Ethan Frey cd272d525a
Merge PR #6323: Use simple merkle proof for commit info 2020-06-03 14:50:22 -04:00
Federico Kunze 1f5626b800
baseapp: fix sender events accumulation (#6307)
* add default case on ibc AnteHandler

* reset ante handler EventManager

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

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

* Fix lint issues

* Fix goimports

* Fix gov tests

* Resolved ci-lint issues

* Add changelog

* Rename cliCtx to clientCtx

* Fix mocks and routes

* Add changelog

* Update changelog

* Apply suggestions from code review

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

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

* Update docs

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

* regenerate mocks

* Update ADRs

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

* update tests

* add replay test for unordered channels

* add cleanup back, update tests

* remove nolint

* add timeoutonclose handling and fix

* add check for deleted packets

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

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

* add ackexecuted and update tests

* add timeoutexecuted back and update test

* move events to executed funcs

* update handler

* update godoc

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-30 21:18:43 -04:00
vincent 74329c619f
Fix typo (#6295)
* fix typo

* add changelog

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-29 13:58:44 +00:00
ahmedaly113 f3962eb29b
fix #6287 sending multiple transactions from an account make nonce sequence stuck (#6291)
* fix #6287 sending multiple transactions from an account make nonce sequence stuck

* add change log

* fix ante unit test after #6287 fix

* Update x/auth/ante/sigverify.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-28 21:07:12 +00:00
vincent 71770b5a78
Merge PR #6283: Save account for multi sending 2020-05-27 23:00:01 -04:00
Alexander Bezobchuk 7144ace6b3
Revert "Merge PR #6285: Registered upgrade module tx commands" (#6286)
This reverts commit 053b38cca2.
2020-05-27 15:39:59 +00:00
Riccardo Montagnin 053b38cca2
Merge PR #6285: Registered upgrade module tx commands 2020-05-27 09:51:00 -04:00
dauTT 7cd0caba7a
Merge PR #6278: Add msg type sim operations 2020-05-26 12:52:23 -04:00
dauTT 97fecb1aa2
Merge PR #6276: Fix error msg 2020-05-23 15:29:51 -04:00
colin axner 6973c56457
x/ibc: fix internal errors messages (#6268)
* update errors in ibc client and localhost

* update code 1 errors

* fix misisng import

* add import

* fix compile and lint issues

* fix lint

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-22 17:17:52 -04:00
Federico Kunze bf3fa30671
ibc/07-tendermint: fix CLI (#6271) 2020-05-22 14:48:44 -04:00
Alessio Treglia 37882fbf4a
x/auth: remove unused passphrase arguments (#6270)
The new keyring does not handle passphrases anymore.
2020-05-22 13:34:15 +00:00
Segue ecbb5acb3d
fix ICS-20 event bug (#6269) 2020-05-22 08:11:46 -04:00
Aaron Craelius 850419fffd
Tx CLI proto module interface (#5989)
* WIP

* WIP

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

* Revert unneeded changes

* Simplify cli tx UX

* Wire up bank tx REST routes

* Fix assignment issue

* Wire up bank NewSendTxCmd

* fix lint

* revert file

* revert file

* fix simcli

* Refactor AccountRetriever

* Fix build

* Fix build

* Fix build

* Fix integration tests

* Fix tests

* Docs, linting

* Linting

* WIP on all modules

* Implement other module new tx cmd's

* Fix cmd's

* Refactor existing GetTxCmd

* Fix cmd

* Removing deprecated code

* Update ADR 020 & CHANGELOG

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Fix client/tx tests

* Fix mocks

* Fix tests

* Lint fixes

* REST tx migration

* Wire up REST

* Linting

* Update CHANGELOG, docs

* Fix tests

* lint

* Address review feedback

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* group vars

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-21 21:29:34 +00:00
SaReN bf8809ef98
Update x/auth to use Any (#6165)
* Migrate keeper codec to use marshaler

* Migrate AccountI to types

* Did go imports

* Fix tests for x/auth

* Cleanup std/codec

* Sort imports

* Fix legacy codec

* Add godoc for RegisterInterfaces

* Add RegisterInterfaces to std

* Fix typo

* Fixed merge changes

* Eliminate vesting import in auth

* Fix lint issues

* Fix tests

* Addressed comments

* Rename interfaces in RegisterInterfaces

* Removed codec.proto from std

* Minor code cleanup

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

* Fixes

* Remove MsgSubmitProposalLegacy

* Update CHANGELOG.md

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

* Fix query JSON issue

* Fix gov tests

* Revert custom Any Equals

* Re-remove types

* Rename receivers

* Fix imports in gov

* Sort imports

* Make amino JSON signing work with Any

* Run proto-gen

* Create full amino wrapper

* Fix errors

* Fixes

* Fix tests

* Test fixes

* Fix tests

* Linting

* Update ADR 019 and CHANGELOG

* Updated ADR 019

* Extract Marshal/UnmarshalProposal

* fix error

* lint

* linting

* linting

* Update client/keys/parse.go

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

* linting

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

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

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

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

* Address review feedback

* Add godocs

* Fix errors

* fix errors

* revert file

* Address review feedback

* Address review feedback

* Stacktrace debug flag

* Fix tests

* Address review feedback

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +00:00
Federico Kunze ca20a39962
x/ibc: constrain acks processing order (#6244)
* x/ibc: constrain acks processing order

* test

* address @AdityaSripal comments

* address @colin-axner comments

* address @alexanderbez comments
2020-05-18 16:50:07 +00:00
Xuefeng Zhu c74b28a7ac
remove duplicated check when RemoveValidator (#6239)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-18 02:09:28 +00:00
Federico Kunze 3893fccaa4
ibc-transfer: remove leftover file (#6236) 2020-05-17 21:55:05 -04:00
Federico Kunze 3dcdc582af
x/ibc-transfer: move ICS20 out from x/ibc (#6222)
* x/transfer: move ICS20 out from x/ibc

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

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

* add regex to validations

* comment

* update error

* test all validators:

* fix tests

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

* add ibc and transfer module to simulations

* minor update

* remove TODO

* add validation to transfer genesis

* fix transfer init genesis

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

* x/ibc/types: remove errors

* remove mocked proofs

* remove invalidProof{}

* create new ibc/types dir

* format

* move keys to host

* move order to channel

* move channel state

* move connection state

* lint
2020-05-13 19:23:33 -04:00
Aleksander Kochetkov 62147290c1
Merge PR #6212: Remove Get* Prefixes from Key Construction Functions 2020-05-13 17:23:00 -04:00
Christopher Goes 513c5f30c2
Alter connection handshake (#6209)
* Alter connection handshake

* Add test-case

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-13 13:26:19 -04:00
Federico Kunze 6d7fc911c2
x/distribution: register MsgFundCommunityPool (#6211) 2020-05-13 12:14:45 -04:00
Federico Kunze a08aa41213
ibc/07-tendermint: variable trust-level (#6206)
* ibc/07-tendermint: variable trust-level

* update client state and tests

* fix tests

* address comments from review

* cli: define trust-level as flag
2020-05-13 01:10:25 +00:00
Federico Kunze b93300288e
x/ibc: stateful clients (#6202)
Closes: #6198
2020-05-12 21:13:41 +02:00
atheeshp da92383bff
Bank proto buf migration (#6166)
* Bank proto buf migration

* WIP: Added proto code for bank

* added supply on bank module

* Bank module proto migration

* formatter applied

* Added comment for RegisterInterfaceTypes in bank/module
2020-05-12 17:35:05 +00:00
Federico Kunze 138e0b074f
x/ibc: log fixes (#6184)
* x/ibc: log fixes

* fix test
2020-05-11 17:17:05 +00:00
Federico Kunze f88d9ab586
x/ibc: create localhost client on InitGenesis (#6170)
closes: #6159
2020-05-11 17:46:00 +02:00
dependabot-preview[bot] f37308778a
build(deps): bump github.com/spf13/viper from 1.6.3 to 1.7.0 (#6183)
* build(deps): bump github.com/spf13/viper from 1.6.3 to 1.7.0

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.6.3 to 1.7.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.6.3...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* refresh go.sum

* run make format

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-05-11 10:22:36 +02:00
atheeshp dd148fcd7a
gov: port integration tests (#6120) 2020-05-10 16:25:27 +02:00
Marko bef3689245
linter: enable nolintlint (#6162)
* nolintlint enable

* remove space

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-08 08:46:12 +00:00
Alessio Treglia c8c47786da
x/ibc: fix int overflow (#6171)
x/ibc/07-tendermint/types/test_utils.go: Calculate and use
machine-dependent maxInt instead of causing int overflow by
passing math.MaxInt64.

Closes: #6130
2020-05-07 22:11:29 -04:00
Aditya b3cada1001
x/ibc: fix event emission on msgs (#6161)
* add sender events into signer, and update events into keeper

* move all handler functionality to keeper for update

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-05-07 09:55:26 -04:00
Marko 54ed8d7a2c
lint: official action (#6156)
* switch from review dog to official golangci action

* fix release

* disable nolintlint and wsl

* fix linting issues

* have name adhere to required

* add timeout

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-07 09:40:49 +00:00
Aaron Craelius 9d022c17b7
Add amino compatibility layer for proto Any (#6151)
* WIP on Any amino compatibility layer

* Add tests & JSON

* Refactor Marshal/UnmarshalAny

* remove extra test

* Add support for nested Any's

* Add docs

* Update codec/any_test.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-06 20:47:03 +00:00
Federico Kunze f3e3a30e5e
x/ibc: add missing query height (#6157) 2020-05-06 13:06:35 -04:00
Federico Kunze ff24a24ae6
x/ibc: query all client connection paths (#6155)
* x/ibc: query all client connections

* add queries to CLI and REST

* add missing height

* update swagger
2020-05-06 15:56:49 +00:00
Federico Kunze d7ebee74e7
x/ibc: proto migration pt 1 (#6097)
* x/ibc: proto migration pt 1

* fix tests

* fixes and godoc

* yaml tags

* rm changelog

* address comments from review

* fix some tests

* fix tests

* add _UNSPECIFIED suffix for default enums

* Update app

* protobuf Any fixes

* use gogoproto

* fix tests

* wrap all messages

* address @alexanderbez comments

* update proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-05-06 11:17:50 -04:00
Alessio Treglia b09eef7298
run make format (#6153) 2020-05-06 13:47:53 +02:00
SaReN c211488b0b
x/auth: cli tests (#6152)
* Add cli tests for auth

* Format imports

* Fix auth tests

* Remove keys in validate sign call

* Eliminate defer in tests

* Format imports

* Test commit
2020-05-05 21:16:37 -04:00
Alexander Bezobchuk 2f718c8d66
Remove evidence codec (#6146) 2020-05-05 19:13:36 +00:00
Aditya f2a331fddb
Fix Timeout Handling (#6118)
* fix timeout

* remove print statement

* fix tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-05 14:46:13 +00:00
Aaron Craelius 386217209d
Merge PR #6076: Proto Any init + evidence 2020-05-05 10:28:20 -04:00
SaReN 7e72e5b8a6
Add cli test for slashing (#6102)
Reference: #5951
2020-05-05 15:51:35 +02:00
Pavel 4a28dd1645
Args: cobra.ExactArgs(1) required but never used (#6140) 2020-05-05 08:43:20 +00:00
Federico Kunze 106bcd5e13
default gen state (#6139) 2020-05-04 18:00:17 -04:00
Pavel 110942add6
add anotation for json/yaml marshal ibc/tendermint/header type (#6138) 2020-05-04 20:34:08 +00:00
Alessio Treglia 2414e5bdd4
x/auth: turn sign --validate-sigantures into a standalone command (#6108)
--validate-signatures should not be a flag of the sign command
as the operation performed (transaction signatures verification)
is logically distinct.

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

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

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

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

x/module/client/testutil/

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-04 13:55:16 +00:00
colin axner 54ecf7d629
bump ibc sub module error codes (#6117)
* bump ibc sub module error codes

* add godoc

* update error numbers
2020-05-04 09:02:23 -04:00
Marko 218ec99508
various linter fixes (#6106)
x/staking: Fix all linter warnings.

Fixed warnings across base packages.

New linters:
- unparam
- nolintlint

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-05-02 21:26:59 +02:00
SaReN f92f6c9dd1
Add CLI tests for simd, distribution (#6095)
* Added cli integration base setup

* Added cmd to simapp

* Fixed ci-lint issues

* Fixed ci-lint issues

* Addressed changes in Makefile

* Updated simd to latest

* Removed testnet and replay commands

* Modified tx command for simcli

* Did code cleanup

* Removed duplication in Makefile

* Refactored cli_test

* Added build-sim to Makefile

* Added test-cli to circleci

* Added tests for staking txns

* Addressed format issues

* refctored tests code

* Added tests for send, staking

* Removed test_hepers file

* Moved test_cover to contrib

* Added codec in fixtures

* Migrated tests to respective modules

* Exported helper methods

* Moved helpers to bank

* Added codec to fixtures

* Migrated tests to modules

* Removed auth helpers from staking

* Did minor code cleanup

* Added test-cli to Makefile

* Updated github actions

* Did code refactor

* Fixed github actions for cli-test

* Added tests for recover keys and fee deduction

* Did minor code cleanup

* Added build flag to cli_tests

* Moved cli_test to tests

* Modified path in Makefile

* Updated codec std in fixtures

* Added doc for cli tests

* Remove ibc genesis validation

* Fix issue number

* Added missing imports

* Add tests for distribution and simd

* Modified naming for test functions

* Added test for withdraw rewards

* Modified test function names

* Fixed import format

* Migrated helpers to package cli

* Fixed github test actions

* Fixed test coverage in actions

* Added build sim to actions

* Apply Alessio patch for tests

* Removed unused imports

* Added init for go tests

* try fix tests

* goimports what wasn't goimports'd

* try fix ci

* add relevant tags to integration tests

* run integration tests separately

* use go build -o flag and let compiler gemerate the binary with the
right extension for the HOST platform

rename cli-test to test-integration

* update ci

* rename

Co-authored-by: atheesh <atheesh1>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-05-01 20:16:17 +00:00
Alexander Bezobchuk 843e3f163c
Merge PR #6112: Fix error code registration 2020-05-01 10:56:08 -04:00
Federico Kunze 930802e7a1
x/capability: simulations (#6062)
* x/capability: simulations

* update logs

* validate genesis state

* InitGenesis and ExportGenesis functions

* update validation func

* fix import-export sim

* remove nondeterminism from capability genesis

* Update x/capability/types/genesis.go

* Update x/capability/types/genesis.go

* fix tests

* fix merge

* consistency updates

* try fix nondeterminism

* fix conditional

* Fix random index logic

* lint

* lint

Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-30 15:07:43 +00:00
Federico Kunze 7143d092c4
x/ibc: add logs (#6104) 2020-04-30 08:37:02 -04:00
Alessio Treglia 2879c0702c
x/ibc: fix missing return statement (#6099)
* enable the wsl linter

Fix various wsl-related warnings.

x/ibc/04-channel/keeper/handshake.go: fix missing return statement in ChanOpenTry().

* goimports -w files

* remove unknown linter references

* run make format

* Revert "run make format"

This reverts commit f810b62b9e4993f08506663d4e5f2ec2228a9863.

* run make format
2020-04-29 22:36:34 -04:00
SaReN b854c485e4
Add CLI tests for fee deduction (#6088)
* Added cli integration base setup

* Added cmd to simapp

* Fixed ci-lint issues

* Fixed ci-lint issues

* Addressed changes in Makefile

* Updated simd to latest

* Removed testnet and replay commands

* Modified tx command for simcli

* Did code cleanup

* Removed duplication in Makefile

* Refactored cli_test

* Added build-sim to Makefile

* Added test-cli to circleci

* Added tests for staking txns

* Addressed format issues

* refctored tests code

* Added tests for send, staking

* Removed test_hepers file

* Moved test_cover to contrib

* Added codec in fixtures

* Migrated tests to respective modules

* Exported helper methods

* Moved helpers to bank

* Added codec to fixtures

* Migrated tests to modules

* Removed auth helpers from staking

* Did minor code cleanup

* Added test-cli to Makefile

* Updated github actions

* Did code refactor

* Fixed github actions for cli-test

* Added tests for recover keys and fee deduction

* Did minor code cleanup

* Added build flag to cli_tests

* Moved cli_test to tests

* Modified path in Makefile

* Updated codec std in fixtures

* Added doc for cli tests

* Remove ibc genesis validation

* Fix issue number

* Added missing imports

* Modified naming for test functions

Co-authored-by: atheesh <atheesh1>
Co-authored-by: kaustubhkapatral <54210167+kaustubhkapatral@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: anilCSE <anil@vitwit.com>
2020-04-29 20:46:10 +00:00
SaReN 3b71198b25
Merge PR #6033: Add setup for cli_test 2020-04-29 11:52:30 -04:00
Federico Kunze 2d3a8525b9
ibc/04-channel: import export GenesisState (#6087)
* ibc/04-channel: import export GenesisState

* update tests

* add missing genesis fields

* genesis tests

* keeper tests

* update genesis test

* typo

* rename types

* address comments from review

* minor updates

* typo
2020-04-29 09:17:20 -04:00
Aaron Craelius cc90f2e002
Merge pull request #6085: Move codec/std to std 2020-04-27 15:40:50 -04:00
Federico Kunze 9b51908597
ibc/02-client: import export GenesisState (#6073)
* ibc/02-client: import export GenesisState

* client validation

* genesis validation

* ibc genesis tests

* GetAllConsensusStates test

* fix non-determinism

* lint

* fix test
2020-04-27 14:04:26 -04:00
Anton Kaliaev f0b72b93be
server: remove deprecated UpgradeOldPrivValFile (#6079)
* server: remove deprecated UpgradeOldPrivValFile

OldFilePV was deprecated in Tendermint Core v0.28 and will be removed in
upcoming v0.34.5 release.

* remove imports

* Add changelog entries

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-04-27 16:08:44 +00:00
Alexander Bezobchuk d90b2e7a99
Allow Unjail of Non-Bonded Jailed Validator (#6061)
* Use correct API and add TODO

* Allow unjail without signing info

* Add unit test

* Update godoc

* Add changelog entries

* Fix TestUndelegateSelfDelegationBelowMinSelfDelegation

* Fix delegation tests

* Revert API call
2020-04-26 17:38:33 +00:00
Federico Kunze e9b5fc9716
ibc/03-connection: import export GenesisState (#6067)
* ibc/03-connection: import export GenesisState

* add connection paths

* add genesis to ibc module root package

* genesis tests

* iterator and fixes

* changelog

* lint fixes

* godoc

* revert validation
2020-04-24 15:52:07 +00:00
Jack Zampolin 4f52797931
Update DefaultHistoricalEntries to 100 (#6059)
* Update DefaultHistoricalEntries to 1000

* hist entries sims and comment on simapp

* changelog and godoc

* update sim param change

* update default to 100

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

* update app

* evidence store decoder

* add evidence to sim import export

* fix test

* prevent zero values on randomized genesis

* return empty evidences for genesis state

* address comments from review
2020-04-23 14:51:03 +00:00
colin axner f6e9ee7623
x/ibc: Implement Timeout Timestamp (#6022)
* add timeout timestamp to packet and timestamp to consensus state

* add timeout timestamp event attribute

* update various issues with adding timestamp

* fix tests, add default timeout timestamp

* add unit test and minor fixes

* remove unnecessary code

* code review fix

* Update x/ibc/03-connection/keeper/keeper.go

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

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

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

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

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

* Update x/ibc/07-tendermint/types/consensus_state.go

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

* return time.Time in error message

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 22:23:42 +00:00
Alessio Treglia 61753c8cf1
diagnostic messages should go to /dev/stderr (#6058)
Use cmd.PrintErrf() to redirect messages to stderr
wherever applicable.
2020-04-22 22:20:16 +02:00
Alexander Bezobchuk 72a2dae3db
Bump Tendermint v0.33.4 (#6055)
* Bump go.{mod,sum}

* Update APIs from Tendermint

* Add max clock drift to client state

* Test updates

* Update APIs from Tendermint

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 19:21:48 +00:00
Jonathan Gimeno 550c3e9ef0
Jonathan/5988 sim params consensus 2 (#6051)
* temporal commit

* add random consensus params

* make format

* make random pass

* remove comment

* revert change

* update ub key types

* extract Evidence params from state

* extract the random parameters from state

* clean the code

* update imports!

* mispelled back

* mispelled back

* add misspelled command

* update changelog

* remove useless linter to avoid misspell

* remove function

* use tendermint constants

* update import test

* remove debug comment

* Update baseapp/baseapp.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 18:24:13 +00:00
Jack Zampolin f82bc19b99
Fix capabilities issue (#6057)
* Fix capabilities issue

* Update x/capability/module.go

quick doc fix

* Address PR comments

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-04-22 17:49:09 +00:00
Alexander Bezobchuk b737e7f7f9
Remove JSON marshaler for base account (#6054)
* Remove JSON marshaler for base account

* Add changelog entries
2020-04-22 14:01:20 +00:00
Aditya 5e40869705
x/capability: start global capability index at 1 (#6047)
* start index at 1

* Update x/capability/keeper/keeper.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-21 21:04:11 -04:00
Alexander Bezobchuk 37c92c5f39
Revert "Add consensus params into Simulation (#6002)" (#6046)
This reverts commit 65048683b5.
2020-04-21 21:46:34 +00:00
Federico Kunze 3ee975c57b
Merge PR #6037: refactor simulation decoder 2020-04-21 17:33:56 -04:00
Jonathan Gimeno 65048683b5
Add consensus params into Simulation (#6002)
* temporal commit

* add random consensus params

* make format

* make random pass

* remove comment

* revert change

* update ub key types

* extract Evidence params from state

* extract the random parameters from state

* clean the code

* update imports!

* mispelled back

* mispelled back

* add misspelled command

* update changelog

* remove useless linter to avoid misspell

* remove function

* use tendermint constants

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-21 18:28:43 +00:00
Jack Zampolin 71c62a432f
Merge PR #6043: Fix some lcd test failures in gaia 2020-04-21 14:13:03 -04:00
Mikhail Kornilov c15f112cf1
x/auth/ante: AccountKeeper expected interface used instead of the str… (#6040)
* x/auth/ante: AccountKeeper expected interface used instead of the strict auth.AccountKeeper dependency

* CHANGELOG.md update
2020-04-21 16:56:18 +00:00
Jack Zampolin 793c6f17ff
Fixes for Packet Ack (#6036)
* Fix packet ack

* Fix test failures
2020-04-20 22:37:18 +00:00