Commit Graph

18 Commits

Author SHA1 Message Date
Amaury a8ef4a380d
All Makefile proto commands use Docker (#7931)
* Update tooling around docker

* Run commands

* Remove swagger gen for now

* Update proto-gen-any

* Fix indentn

* Use CURDIR

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-13 16:36:58 +00:00
Aaron Craelius 9be15a42b9
Refactor x/bank according to ADR 031 (#7520)
* Refactor x/bank according to ADR 031

* Add comment

* Update comment

* Add comment

* Add tests, address edge cases

* Imports

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-13 09:05:46 +00:00
Anil Kumar Kammari d55c1a2665
Change `address` from bytes to bech32 strings (#7242)
* init

* Fix bank proto messages

* missing conversions

* remove casttype for addresses

* Fix tests

* Fix consaddress

* more test fixes

* Fix tests

* fixed tests

* migrate missing proto declarations

* format

* Fix format

* Fix alignment

* Fix more tests

* Fix ibc merge issue

* Fix fmt

* Fix more tests

* Fix missing address declarations

* Fix staking tests

* Fix more tests

* Fix config

* fixed tests

* Fix more tests

* Update staking grpc tests

* Fix merge issue

* fixed failing tests in x/distr

* fixed sim tests

* fixed failing tests

* Fix bugs

* Add logs

* fixed slashing issue

* Fix staking grpc tests

* Fix all bank tests :)

* Fix tests in distribution

* Fix more tests in distr

* Fix slashing tests

* Fix statking tests

* Fix evidence tests

* Fix gov tests

* Fix bug in create vesting account

* Fix test

* remove fmt

* fixed gov tests

* fixed x/ibc tests

* fixed x/ibc-transfer tests

* fixed staking tests

* fixed staking tests

* fixed test

* fixed distribution issue

* fix pagination test

* fmt

* lint

* fix build

* fix format

* revert tally tests

* revert tally tests

* lint

* Fix sim test

* revert

* revert

* fixed tally issue

* fix tests

* revert

* fmt

* refactor

* remove `GetAddress()`

* remove fmt

* revert fmt.Striger usage

* Fix tests

* Fix rest test

* disable interfacer lint check

* make proto-format

* add nolint rule

* remove stray println

Co-authored-by: aleem1314 <aleem.md789@gmail.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 10:25:37 +00:00
Anil Kumar Kammari a9547b54ff
Add proto formatting tool (#7266)
* Add proto format option

* Add clang format options

* Fix proto format

* Fix fmt

* Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
2020-09-08 22:06:54 +00:00
Cory f02b0b5745
Protobuf audit: base package, module packages, tx/Msg's (#7059)
* proto audits auth, bank, crisis, distribution

* audit module proto files

* audit base proto package

* make protogen

* golint

* fix gov genesis test

* Update proto/cosmos/bank/v1beta1/tx.proto

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

* update coin metadata protos & documentation

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-08-19 07:36:41 +00:00
Alexander Bezobchuk 7d2062b674
x/bank: gRPC Params Route (#7070)
* update x/bank proto gRPC query service

* fix path

* update keeper

* add godoc

* add test

* lint++
2020-08-17 13:55:04 +00:00
Federico Kunze 0e3f87313e
ibc-transfer: enable transfer parameter (#6607)
* ibc-transfer: enable transfer parameter

* param_test.go

* update tests and types

* gRPC test

* relay logic and spec update

* fix tests

* unused param
2020-08-17 02:24:14 -04:00
atheeshp f87624e9de
Add Grpc gateway annotations (#6918)
* grpc for bank module

* edit module.go

* added annotations for x/auth query proto

* generated gw file

* added grpc gateway for x/staking query proto

* added annotations for evidence

* added annotations for gov query proto

* added annotations

* added annotations for slashing module

* updated annotations

* added annotations for staking module

* added annotations for upgrade query

* annotations added for x/ibc/channel query proto

* added annotations for ibc/connection query proto

* updated annotations

* updated annotations

* annotation changes

* ommitted ibc module

* updated go.mod

* fixed lint issue

* review changes

* review changes

* review changes

* review changes

* go sum changes

* updated annotations

* annotation changes

* Fix proto lint issues

* review changes

* review changes

* review changes

* discussion changes

* review changes

* grpc for bank module

* edit module.go

* added annotations for x/auth query proto

* generated gw file

* added grpc gateway for x/staking query proto

* added annotations for evidence

* added annotations for gov query proto

* added annotations

* added annotations for slashing module

* updated annotations

* added annotations for staking module

* added annotations for upgrade query

* annotations added for x/ibc/channel query proto

* added annotations for ibc/connection query proto

* updated annotations

* updated annotations

* annotation changes

* ommitted ibc module

* updated go.mod

* fixed lint issue

* review changes

* review changes

* review changes

* review changes

* go sum changes

* updated annotations

* annotation changes

* Fix proto lint issues

* review changes

* review changes

* review changes

* discussion changes

* review changes

* fixed conflicts

* review changes

* updated gw files

* lint

* lint

* lint

* added missing annotations

* review changes

* review changes

* review changes

* review changes

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-08-14 10:05:35 +00:00
Amaury Martiny 134e1dcecd
Protobuf Audit: Genesis states (#6978)
* Remove some casttypes

* Add more comments

* Finish remaining modules

* Fix lint

* Revert customname

* Revert evidence

* Review nits

* Consistent doc for genesis state

* Make proto-gen

* Update docs for capability

* Remove useless customtype

* Update proto/cosmos/auth/v1beta1/genesis.proto

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>

* Add godoc

* Update proto/cosmos/evidence/v1beta1/genesis.proto

Co-authored-by: Marie <marie.gauthier63@gmail.com>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Marie <marie.gauthier63@gmail.com>
2020-08-12 15:48:22 +00:00
Cory 61a97ef347
Audit / Refactor proto packages layout (#6905)
* create base proto package, move ValAddresses to staking

* move tx, crypto, query proto packages into base; mark module level packages as beta

* new cosmos/base/abci.proto file, refactor some message names

* add comments to TxResponse

* refactor RegisterInterface calls to new proto package names

* fix bug in merge commit

* move missing module proto packages to beta, move cosmos.kv to cosmos.base.kv

* add tx.proto files, holding proto messages for module Msgs

* rm old generated pb.go files

* cosmos/base/base.proto -> cosmos/base/coin.proto

* mark genutil proto package as beta

* Fix conflicts

* Restructure proto files

* Re put signing

* Fix test

* Update slashing genesis

* Ignore confio proto files

* Fix interface register

* Make proto-gen

* Fix lint

* Put tx service into tx.v1beta1

* Use v1beta1 in interface registry

* Remove to cosmos.base.store

* Remove extra confio in buf

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 11:49:45 +00:00
Amaury Martiny 6e3c268a72
Protobuf audit: Queries (#6967)
* Add required fields for queries, p1

* Add comments

* Remove required

* More modules

* 2 to go

* Finish all modules

* Fix typo

* Fix test

* Make proto-gen

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-10 08:12:59 +00:00
atheeshp b33b1e9052
x/{distribution, staking, bank, mint, crisis} genesis protobuf migration (#6835)
* distribution genesis types migrated to proto

* removed types from types/genesis.go

* fix lint

* added new line proto

* staking genesis migrated to proto

* fix lint

* x/bank: genesis types migrated to proto

* fix lint

* x/mint: genesis types changed to proto

* x/crisis: genesis types changed to proto

* Migrate genesis state of x/crisis

* add new lines

* whitespace

* Fix bad merge

* added missing field

* fixed error

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
2020-07-28 09:20:17 +00:00
dauTT 5a7e22022c
Implement ADR 024 - Coin Metadata (#6821)
* Implement ADR 024 - Coin Metadata

* Fix lint

* Fix proto lint

* Index metadata by denom

* Fix test

* Fix proto comments

* Add GetAllDenomMetaData help method and refactor code accordingly

* Add x/bank/keeper/genesis_test.go

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-28 07:49:56 +00:00
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
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
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