Commit Graph

2363 Commits

Author SHA1 Message Date
Alessio Treglia a940214a49
testutil cleanup and reorg (#6658)
Prepare migrating testing auxiliary functions from tests
to testutil.

Remove local duplicates on testutil.WriteToNewTempFile().

Always favor testutil.NewTestCaseDir() over ioutil.TempDir().

Add test cases for the testing auxiliary functions.
2020-07-09 14:21:20 +02:00
Amaury Martiny f8df05f6f1
x/upgrade: Refactor CLI to use protobuf query (#6623)
* x/upgrade: Refactor CLI to use protobuf query

* Import lint

* Use table tests

* Small tweak in setup

* Address bez cli refactor

* Address fede's review

* Remove useless func args

* Add back clientCtx to tx command

* Update comments

* Update docs

* Small refactor

* remove Init()

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-08 22:00:56 +00:00
Jonathan Gimeno a417b38926
Remove viper in Staking module. (#6631) 2020-07-08 22:00:34 +02:00
Alexander Bezobchuk b25e3fc76d
Merge PR #6651: More CLI cleanup 2020-07-08 13:57:45 -04:00
Ira Miller 589c1a531e
Enable/disable coin transfers by denom (#6527)
* initial implementation of per denom sendenabled

* Fix for accidentally removed keyword

* Validate individual param in param array

* Lint fix

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

* Refactor simulation genesis for clarity

* update changelog for bank sendenable per denom

* fix NoOpMsg type in multisend test

* Add a coin denom send check utility function

* Additional godoc comments and clarification

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

* Minor suggested improvements.

* simulation fix

* bank proto sendenabled package name removed

* Remove extra gogo proto yaml tags

* Params rename IsSendEnabled to SendEnabledDenom

* Refactor to SendEnabledCoin(s)

* update slashing test to use bank params

* Clean up change log entry for feature.

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-08 17:43:08 +00:00
Akhil Kumar P 674845c7f6
x/params: query gRPC service (#6585)
* Add grpc queries in x/params

* Modify grpc query tests format

* Modify query request and revert changes in querier

* Fix protobuf lint issues
2020-07-08 15:33:55 +00:00
Federico Kunze 3fc5a4dfc6
x/ibc: update CLI queries (#6647) 2020-07-08 10:57:42 -04:00
Alessio Treglia 67be012e3f
x/genutil: use HomeDir stored in ClientCtx (#6646)
Follow-up of #6636
2020-07-08 16:41:46 +02:00
Alexander Bezobchuk 33decc9779
Remove context param (#6645) 2020-07-08 14:25:02 +00:00
Akhil Kumar P 4536ca22bb
x/auth: gRPC query service (#6565)
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-07-08 13:12:38 +02:00
Federico Kunze e6bb2e7ed7
x/ibc: refactor CLI (#6639)
* x/ibc: refactor CLI

* refactor client CLI

* rename version ClientName

* Update x/ibc/09-localhost/client/cli/cli.go

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* address comments from review

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-07-08 05:57:59 -04:00
Alexander Bezobchuk 3de1c7d4fd
x/crisis: In-Process CLI Integration Tests (#6634)
* init commit

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-08 08:23:34 +00:00
Ethan Buchman 83e71049e6
x/genutil: fix HomeFlag (#6636)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-08 09:02:04 +02:00
Jonathan Gimeno c41b787e06
Merge PR #6626: Remove viper from genutil tests 2020-07-07 14:19:32 -04:00
Alexander Bezobchuk bc261d9e83
version: Remove Viper (#6628)
* version: remove viper

* Remove home flag gets

* fix: tests
2020-07-07 17:20:09 +00:00
Alessio Treglia 57ffe14631
Makefile: build simd with ledger support (#6629)
Makefile: parse COSMOS_BUILD_OPTIONS

Look for build options in the make's COSMOS_BUILD_OPTIONS
variable. This allows one to build simd with ledger support.

References:
* https://github.com/cosmos/gaia/pull/363
* https://github.com/tendermint/tendermint/pull/4738

fix tiny typo in nolint: statement that causes golangci-lint to
misbehave.
2020-07-07 19:10:11 +02:00
colin axner 9a029aea04
refactor connection keeper_test (#6622)
* refactor first set of keeper

* finish cleaning up keeper tests

* fix build

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-07-07 16:29:47 +00:00
colin axner b4a027cb5d
update consensus height check (#6625)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-07 15:45:30 +00:00
Alexander Bezobchuk 8670a10564
Merge PR #6595: Single Binary & Command Refactor 2020-07-07 11:40:46 -04:00
Federico Kunze 0fd559e42d
x/ibc: minor fixes (#6621) 2020-07-07 07:33:06 -04:00
Federico Kunze be194ca1b7
docs: improve IBC guide (#6472)
* docs: improve IBC guide

* remove module specs

* capability spec

* update capability spec

* move cap to concepts

* remove module specs

* split IBC section

* wip integration.md

* complete integration.md

* format integration.md

* docs updates

* Apply suggestions from code review

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

* fix Next links

* further readings

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-07-07 06:19:36 -04:00
Aditya 7fdcdc18e0
Enforce Connection Features on Channel Opening (#6620)
* add channel open checks for supported feature

* add tests and fix bugs

* fix version tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-07 10:00:12 +00:00
colin axner f163ec6765
refactor ibc ante_test (#6610)
* remove old code from ante test

* add recv packet test

* add acknowledge test

* add timeout tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-07 08:30:23 +00:00
Aditya 6fa295c857
fix NextSeqAck increment logic (#6619)
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-07-07 08:03:43 +00:00
atheeshp 58dcef15e1
x/mint: gRPC query service (#6535)
* Added grpc for mint

* changed unused params

* updated tests

* removed empty query request

* fixed lint issues

* review changes

* review changes

* migrated to use test suite

* Update x/mint/keeper/grpc_query_test.go

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-07 07:33:43 +00:00
SaReN a0daec2d94
x/Slashing: gRPC query service (#6597)
* Add grpc methods - slashing

* Add slashing grpc queries

* Add tests

* Remove duplicate declarations

* Add signing infos

* Update query test

* Use suite for grpc tests

* Update godoc

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-07-06 21:54:25 +00:00
Jonathan Gimeno 3c76084bf5
Merge PR #6596: Genutil remove global viper 2020-07-06 17:48:54 -04:00
Federico Kunze f35e3b2c02
x/ibc: gRPC query service (#6466)
* x/ibc: gRPC query service

* fixes

* connection updates

* register channel query service

* update clients

* change proofs to bytes

* implement additional channel grpc queries

* unrelayed packets query

* query.proto files

* move next sequence recv query to channel client

* update REST

* wip test

* add missing cli queries

* install the right tools

* fixes

* build

* lint

* use gRPC when query proof is not requested

* connection gRPC tests

* IBC query server interface

* more gRPC channel tests

* pagination tests

* connection use query server

* connection pagination tests

* channel pagination tests

* typo

* remove buf

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

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

* address comments from review

* fix tests

* unrelayed packet sequences flag

* remove ClientsConnections query

* fix

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-07-06 15:35:35 -04:00
Aaron Craelius 2f44fbf2ab
Add support for protobuf TxGenerator and SIGN_MODE_DIRECT (#6385)
* Add TxWrapper, encoder, decoder and DirectModeHandler

* fix pkg name

* Update API and leave test TODO's

* Update TxWrapper API

* tests for tx wrapper (#6410)

* WIP: added test for direct mode handler

* updated code

* Add msg

* Update TxWrapper API

* Fix pubkey declaration

* Add pubkey for tests

* Fix SetFee

* Remove logs

* Avoid global var declaration for tests

* Add test for GetPubKeys

* Fix direct signing tests

* Add more test cases for GetSignBytes

* Revert SetFee API

* Remove logs

* Refactor tests

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>

* Refactoring

* Refactoring

* Integrate SignatureV2 API

* Fix wrapper tests

* Fix tests

* Linting and API tweaks

* Update API

* WIP on updating API

* Fix tests

* Update to new SigVerifiableTx

* Rename

* Update docs to reflect ADR 020

* proto-gen

* proto docs

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* Add tests

* Refactor and improving test coverage

* WIP on test coverage

* WIP on test coverage

* proto-gen

* Fix CompactBitArray.Size() bug

* Rename

* Remove Builder interface

* Address review comments

* Update x/auth/tx/sigs.go

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

* Update x/auth/tx/encoder.go

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

* Update x/auth/tx/encoder.go

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

* Address review feedback

* Fix build issues

* Resolve conflicts

* Fix ValidateBasic test coverage

* Add test for malicious multisig

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-06 17:03:45 +00:00
Alexander Bezobchuk feb69770ef
Merge PR #6609: x/auth: CLI Remove Viper 2020-07-06 10:23:32 -04:00
colin axner bbe245ac1d
refactor connection verify_test (#6588)
* refactor verify consensus state

* refactor connection verification

* simplify code, channel + packet commitment tests

* refactor verify ack

* refactor verify ack absence

* refactor next seq recv test

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-07-06 13:37:12 +00:00
Alexander Bezobchuk fd9cdb8ba7
Merge PR #6608: ibc: remove viper from CLI 2020-07-06 09:25:47 -04:00
Amaury Martiny d0cabdeb88
x/upgrade: clean-up redundant struct (#6606)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-06 10:27:44 +00:00
Alexander Bezobchuk 51df2f2033
Module Viper Removal (#6604)
* Remove viper

* Remove viper

* Remove viper

* Skip TestCLIValidateGenesis

* remove cruft leftover

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-06 10:12:00 +00:00
Alexander Bezobchuk 9ebda4edb9
Server/simd: Viper Removal (#6599)
* init commit

* remove viper from tm cmds

* updates

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

* Fix unit tests

* lint++

* rename var

* Fix genutil test

* fix test

* prefer cmd.Flags() over direct viper usage

* update

* fix ABCI error tests

* fix integration tests

* Add viper to context

* fix build

* fix unit test

* Implement and use AppOptions

* Revert Redact godoc

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-05 16:56:17 +00:00
Amaury Martiny 4459201591
x/upgrade gRPC query service (#6590)
* Add .proto and make proto-gen

* Correct proto types

* Update pseudo tests

* Update tests

* line break

* Fix tests after merge

* Update proto/cosmos/upgrade/query.proto

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

* Update proto/cosmos/upgrade/query.proto

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

* Update proto/cosmos/upgrade/query.proto

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

* Update proto/cosmos/upgrade/query.proto

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

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-07-04 17:30:17 +00:00
Aaron Craelius 849429ecda
Add proper support for Any in gRPC queries (#6594)
* Add proper gRPC Any support via AnyUnpacker

* Wire up grpc query router AnyUnpacker
2020-07-03 16:42:12 +00:00
dauTT 4f3efaded4
Add same attributes for all connection/ channel/ packet IBC events (#6482)
* Emmit events with same attributes in connection handlers

* Emmit events with same attributes in channel handlers

* Add paket_data attribute to EventTypeAcknowledgePacket

* Revert proto changes

* Query channel and connection to emit events with same  attributes

* Simplify code

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

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

* Apply suggestions from code review

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-03 15:48:48 +00:00
colin axner 73757243c2
Update connection handshake version negotiation (#6534)
* update version negotiation and add basic testing

* add integration tests

* update spec

* apply @fedekunze suggestions

* update to enforce connection validation checks

* add test

* update godoc and spec

* small doc fix

* update versioning to feature set

* update version code and tests to specified version tuple

* update docs/spec

* merge and fix bug

* Update x/ibc/03-connection/types/version.go

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

* Apply suggestions from code review

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

* add verify proposed feature set test

* fix formatting bug

* add safety check

* merge tests into existing handshake tests

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-03 09:28:02 +00:00
colin axner db60e658f8
refactor connection handshake_test (#6576)
* refactor connopeninit test

* updated opentry

* refactor openack

* update openconfirm

* fix typo and test issue

* fix missing code cov hits

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-02 20:08:29 +00:00
colin axner 5a22342a24
check ordered channel ordering in RecvPacket (#6574)
* move nextrecvseq check to recvpacket

* add test for next recv seq not found

* fix test bug, increase cov

* remove dup check and test

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

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

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-02 20:03:45 +00:00
Alexander Bezobchuk dacbcef54d
cl & deps++ (#6582)
* cl & deps++

* Use PersistentPreRunE

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

* move to root level

* Use block mode by default

* Skip x/auth CLI tests
2020-07-02 19:35:42 +00:00
Alexander Bezobchuk cbb3dca78b
deps: bump TM v0.33.6 (#6580)
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2020-07-02 16:37:09 +02:00
Marko a0f9cc7627
vesting: remove alias.go (#6579) 2020-07-02 15:08:44 +02:00
Alexander Bezobchuk 14d1ee5437
Use Context in Command instead of Argument + Util (#6572)
* Use context

* use PersistentPreRunE

* undo

* use init context

* Update types

* update tests

* implement tests

* Update simapp/cmd/simcli/main.go

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

* Update simapp/cmd/simcli/main.go

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

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

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

* fix build

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-02 13:02:28 +00:00
colin axner 8ed09e5098
remove alias.go from 05-port (#6575) 2020-07-02 12:44:08 +00:00
Jonathan Gimeno 8f96ec0585
REST bank transfers fail due to encoding. (#6536)
Bank module REST endpoint bank/accounts/{addr}/transfers
was returning invalid StdTx format.
2020-07-02 05:16:39 +02:00
Alexander Bezobchuk 37cc04081e
Fix Current Integration Tests (#6570)
* fix attempt

* fix test
2020-07-01 18:37:59 +00:00
colin axner 2658175b01
remove alias.go from channel (#6569)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-01 18:25:23 +00:00
Jonathan Gimeno 6a52c5a569
Remove DefaultParamspace and simplify simapp creation. (#6564)
* Remove DefaultParamspace and simplify simapp creation.

* Update changelog.

* Create function that inits ParamsKeeper.

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-01 13:57:29 +00:00