Commit Graph

221 Commits

Author SHA1 Message Date
Amaury Martiny 69bbb8b327
Rename proto Req/Res to Pagination (#6796)
* Rename proto Req to Pagination

* Change Res to Pagination

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-20 16:51:16 +00:00
colin axner 1d6344888e
Fix query unrelayed packets logic (#6733)
* add some query functions to channel keeper

* update grpc queries and cli cmd and tests

* rerun proto gen after merging master

* fix build broken from merge conflicts

* add test and update proto

* Update x/ibc/04-channel/client/cli/query.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-20 12:42:36 +00:00
Cory 32de79d0aa
refactor auths broadcast cmd in alignment with #6216 (#6713)
* refactor auths broadcast cmd in alignment with #6216

* add TxResponse proto definition, and related refactoring

* re-run make proto-gen, updating staking.pb.go

* cleanup TxResponse tests to handle nil return values

* properly handle nil Tx value in TxResponse's implementation of UnpackInterfaces

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-17 17:17:21 +00:00
atheeshp 28269908d9
x/gov: gRPC query Service (#6491)
* WIP: adding gRPC for gov

* removed passing new store

* fixed error

* added register query service in module

* order of imports changed

* order of imports changed

* Fix proto file

* added get all proposals grpc

* added more tests

* added doc in tests

* added grpc for votes

* Added grpc for Deposits

* updated protos

* added grpc for proposal, vote, deposit, tally

* WIP: adding params grpc

* added params in gRPC

* updated error messages

* fixed error check

* added more tests

* updated tests

* added yaml types

* review changes and lint issues

* updated tests

* code cleanup

* removed cosmos.gov prefixes

* added more checks

* added more test checks

* added filtered pagination

* removed test check

* added tests for filtered pagination

* Fix Proposals

* lint

* fixed error in tests

* lint issues

* Add nil check for params

* Added unpacker

* removed casttypes

* review changes

* use suite in grpc query tests

* migrated tests to use suite

* fix non-determinism

* tests migrated to table driven tests

* fixed doc typo

* revert change

* Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov

* review changes

* review changes

* review changes

* review change

* review changes

* docs updated

* review change

* review changes

* review changes

* review changes

* Update x/gov/keeper/keeper_test.go

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.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-16 09:16:23 +00:00
colin axner a65bcdd7e5
add custom relative and absolute timeouts to ibc-transfer (#6724)
* add custom relative and absolute timeouts

* fix misspell

* Update x/ibc-transfer/client/cli/tx.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-15 13:32:09 +00:00
SaReN 5656e8647b
x/staking: gRPC query Service (#6490)
* Add types for staking grpc

* Update module.go

* Update staking query types

* Add grpc query methods

* Add delegation response to proto

* Add queriers for delegations

* Add queriers for unbonding

* Add queriers for redelegations

* Add cases for redelegations

* Add test for grpc validators

* Update staking types to proto

* Update staking query proto

* Add tests for grpc

* Add tests for grpc pool, parameters

* Fix lint issues

* Add grpc redelegation tests

* Add more tests

* Add docs for query proto

* Add docs for query types

* Modify redel querier

* Add debugging statements

* Revert debugging

* Fix proto lint errors

* Add wrapper for keeper

* Embed keeper in querier

* Add more tests

* Add tests for validator unbondings

* Add redel tests

* fix queryRedelegationsFromSrcValidator

* Fix Redelegation tests

* update godoc

* Update args

* Update tests with suite

* Fix lint

* Remove redundant types

* Refactor tests

* fix test

* refactor query proto

* Fix tests

* address review comments

* lint staking proto

* add godoc

* Update tests to table driven tests

* add debugging

* Fix grpc tests

* address comments

* address whitespace suggestions

* Add more tests

* add tests for invalid redels

* update error messages

* address review suggestions

* add tests

* move suite to keeper_test

Co-authored-by: Aaron Craelius <aaronc@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-14 17:41:30 +00:00
Alexander Bezobchuk 6bd36c8719
Merge PR #6702: x/slashing: In-Process CLI Integration Tests 2020-07-14 11:55:19 -04:00
colin axner 5dfc4a2ec9
Standardize connection versioning + channel versioning docs (#6640)
* update connection versions with feature set flag

* make connection version modular to support channel versioning and registering

* revert IBCVersion renaming, add channel versioning logic

* fix channel version flag

* remove unnecessary godoc

* remove unused func

* fix lint and version test

* add test and fix error

* revert changes

* update docs

* remove unnecessary godoc

* Apply suggestions from code review

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

* update doc

* add test cases for unchecked lines

* go fmt

* begin migration to standardized version

* revert proto changes

* restructure versioning to go from string to proto

* update versionStr to encodedVersion naming

* fix version test build

* fix keeper tests

* fix various tests

* fixes from self review

* update docs

* fix lint

* add more code cov

* rename ToString funcs to Encode/DecodeVersion + GetCompatibleEncodedVersions renaming

* update spec docs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-14 08:43:26 +00:00
atheeshp be111ef036
x/distribution: gRPC query service (#6600)
* WIP: adding grpc

* added grpc for query withdraw address

* Fix outstanding rewards query

* added inteerface registry

* added gRPC for delegation rewards

* added remaining commands

* lint issue

* added tests

* added test for community pool

* fixed error

* added test for delegator validators

* updated to use test suite

* updated tests

* more test checks added

* updated tests

* Add sdk wrap

* removed pagination for outstanding rewards

* fixed distr tests issue

* fixed slashes issue

* migrated tests to table driven tests

* docs updated

* review changes

* review changes

* review changes

* Update x/distribution/keeper/grpc_query.go

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-13 20:01:16 +00:00
Marie 1e23679066
x/evidence: gRPC query service (#6593)
* Add basic grpc query service for x/evidence

* Add grpc query test for AllEvidences query

* linting

* Add AnyUnpacker to query test helper and some var renaming

* Add test to check Evidence query result

* Update proto/cosmos/evidence/query.proto

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

* Use table tests

* Use NewQueryEvidenceRequest in place of QueryEvidenceParams

* Remove ConvertEvidence

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-10 13:52:59 +00: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
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
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
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
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
Alexander Bezobchuk d5049413ef
Merge PR #6525: x/bank: Refactor CLI & Tests 2020-06-30 16:59:21 -04:00
SaReN 4b0c66982a
Add pagination (#6452)
* Add pagination types and helper func

* Update API

* Add pagination to queryBalance

* Add QueryBalance to use Paginate

* Update GetAllBalances usage

* Add tests for QueryAllBalances

* Fix bank get balance querier tests

* Add pagination test setup

* revert simapp changes

* Fix pagenation tests

* Add more tests for pagination

* Add offset nullable

* Add more tests

* Fix paginate for offset

* Add grpc queryconn for query

* Fix paginate

* Fix maxlimit

* Fix queryClient

* Fix pagination tests

* refacor

* Fix grpc tests

* Revert

* review changes

* Fix lint

* Update types/query/pagination.go

* Fix review suggestions

* Remove maxLimit and use defaultLimit

* change example paginate as a testable fun

* Fix review comments

* Merge master

* Add bank query.pb.go

* Add missing import

* Add pageReq to queryBalance

* Add example for pagenate

* Fix cli tests

* Remove example for pagination

* Update paginate example

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-20 23:44:04 +00:00
Cory 4e73e0f817
Update proto files & definitions in accordance with ADR023 (#6413)
* consolidate proto files into single directory, turn on PACKAGE_DIRECTORY_MATCH linting

* add third_party root for third party proto files

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

* update protocgen script, and run code generation

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

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

* add comment for sed usage in makefile

* remove unused aliases of proto generated types

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-06-18 10:04:26 -07:00