Commit Graph

49 Commits

Author SHA1 Message Date
Robert Zaremba be4a965599
codec: Rename codec and marshaler interfaces (#9226)
* codec: Rename codec and marshaler interfaces, ref: 8413

* codec: remove BinaryBare

* changelog update

* Update comments and documentation

* adding doc string comments

* Update CHANGELOG.md

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

* Update codec/codec.go

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-29 10:46:22 +00:00
Gianguido Sora 93965e0bcc
Write back account changes after tracking delegation/undelegation for vesting accounts (#8865)
Delegations and undelegations calculations performed during
accounting operations for vesting accounts were correct but
were not written back to the account store.

closes: #8601
closes: #8812

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Frojdi Dymylja <frojdi.dymylja@gmail.com>
Co-authored-by: Adam Bozanich <adam.boz@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2021-04-08 16:20:29 +01:00
Alessio Treglia f2ee972e31
various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
Amaury dfc8dd813e
Add in-place store migrations (#8485)
* Add 1st version of migrate

* Put migration logic into Configurator

* add test to bank store migration

* add test for configurator

* Error if no migration found

* Remove RunMigrations from Configurator interface

* Update spec

* Rename folders

* copy-paste from keys.go

* Fix nil map

* rename function

* Update simapp/app.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update simapp/app_test.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Adderss reviews

* Fix tests

* Update testutil/context.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update docs for ConsensusVersion

* Rename to forVersion

* Fix tests

* Check error early

* Return 1 for intiial version

* Use MigrationKeeper

* Fix test

* Revert adding marshaler to Configurator

* Godoc updates

* Update docs

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2021-02-10 17:49:31 +00:00
Marie Gauthier 1cc8af8d9b
[docs]: update building modules section to reflect ADR31 (#7702)
* Revert "Revert "Update old ref of RegisterQueryService""

This reverts commit 03e4c56de53938ccbf025a441e54b9842f7c4544.

* Update intro, module-manager and messages-and-queries

* Update messages-and-queries

* Update handler

* Update structure

* Add doc related to RegisterMsgServiceDesc

* Update docs/building-modules/handler.md

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update docs/building-modules/handler.md

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update docs/building-modules/handler.md

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Update docs/building-modules/messages-and-queries.md

* Update handler.md

* Rename handler.md to msg-services.md

* Update legacy msgs wording

* Update messages-and-queries.md

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/intro.md

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

* Remove handler mention from intro.md

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/keeper.md

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

* Update docs/building-modules/msg-services.md

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

* Address review comments

* Use tag

* Update docs/building-modules/intro.md

Co-authored-by: Cory <cjlevinson@gmail.com>

* Update docs/building-modules/intro.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/core/transactions.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/messages-and-queries.md

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

* Remove framework related explanation from docs

* Update docs/building-modules/messages-and-queries.md

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

* Update docs/building-modules/module-manager.md

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

* Update docs/building-modules/module-manager.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/building-modules/msg-services.md

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

* Update docs/core/baseapp.md

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

* Update docs/core/baseapp.md

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

* Update beginblock-endblock.md

* Update docs/core/baseapp.md

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

* Update docs/core/transactions.md

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

* Add deprecated notice

* Update tx-lifecycle.md

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-17 20:41:43 +00:00
SaReN 286e9bfbef
Remove duplicate tx commands for auth (#7788)
* remove duplicate commands

* add changelog

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-04 09:58:11 +00:00
Anil Kumar Kammari 51ac6f876b
Rename RegisterGRPCRoutes (#7696)
* Rename

* Fix missing

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 11:39:49 +00:00
Robert Zaremba 6bc8ff2dfe
Use any as validator pubkey (#7597)
* protobuf pubkey type update

* wip2

* wip3

* solving types.NewValidator issues

* remove bech32 from validator type assignment

* update Validator interface

* Changelog update

* wip4

* update genutil

* fix simapp & x/ibc/testing tests

* update staking

* changelog update

* fix import cycle in tests

* fix amino panic on TestValidatorMarshalUnmarshalJSON

* fix TestValidatorMarshalUnmarshalJSON consensus_pubkey check

* Add UnpackInterfaces to HistoricalInfo

* fix TestHistoricalInfo

* update todos

* fix: Expecting ed25519.PubKey to implement proto.Message

* fix linter issues

* Fix migrate test

* Update CHANGELOG.md

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

* review comments

* cosmetic changes

* add UnpackInterfaces got GenesisRandomized test

* Validator.Equal reuses Validator.MinEqual

* fix test

* use Validator.Equal in tests

* Fix staking simulation TestRandomizedGenState

* Remove TODO

* use HistoricalInfo.Equal

* use proto.Equal

* rename Validator.GetConsPubKey to TmConsPubKey

* prefer require.Equal over reflect.DeepEqual

* SetHistoricalInfo using a pointer

* Fix TestQueryDelegation test

* Fix TestQueryValidators test

* Fix TestSimulateMsgUnjail test

* experiement with LegacyAmino instances

* Register codecs in all simapp tests

* Fix cli_test compilation problems

* fix typo sdk -> std

* fix typo

* fix TestPlanStringer

* Rename to MakeEncodingConfig

* Remove RegisterCodecsTests

* Use gRPC in GetCmdQueryValidators

* Empty status

* fix info log check

* linter fixes

* rename simapparams to simappparams

* Update simapp/test_helpers.go

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

* comments updates

* use valAddr1 instead of sdk.ValAddress(pk1.Address().Bytes())

Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-23 12:07:52 +00:00
Aaron Craelius 228728cce2
Refactor RegisterQueryServices -> RegisterServices (#7518)
* Refactor RegisterQueryServices -> RegisterServices

* Fix tests
2020-10-12 16:31:51 +00:00
Anil Kumar Kammari 64b6bb5270
rename RegisterCodec to RegisterLegacyAminoCodec (#7243)
* rename RegisterCodec to RegisterLegacyAminoCodec

* Add changelog

* gofmt

* rename codec.New() to codec.NewLegacyAmino()

* Add change log

* Update CHANGELOG.md

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

* Fix

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-09-07 14:47:12 +00:00
atheeshp 5df7dbc182
Register gRPC Gateway routes (#7173)
* added unimplemeted code

* added a test for bank get balances

* fixed lint

* Fix decode error

* fixed tests

* added missing gRPC tests for x/bank

* added tests for params, rewards in x/distribution

* added tests for x/distr grpc tests

* added todos

* removed register grpc routes

* registered x/ibc client handlers

* updated todos

* fixed error

* fixed tests

* review changes

* review change

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-09-04 08:24:19 +00:00
Marie 7f59723d88
Make JSONMarshaler methods require proto.Message (#7054)
* Make JSONMarshaler require proto.Message

* Use &msg with MarshalJSON

* Use *LegacyAmino in queriers instead of JSONMarshaler

* Revert ABCIMessageLogs String() and coins tests

* Use LegacyAmino in client/debug and fix subspace tests

* Use LegacyAmino in all legacy queriers and adapt simulation

* Make AminoCodec implement Marshaler and some godoc fixes

* Test fixes

* Remove unrelevant comment

* Use TxConfig.TxJSONEncoder

* Use encoding/json in genutil cli migrate/validate genesis cmds

* Address simulation related comments

* Use JSONMarshaler in cli tests

* Use proto.Message as respType in cli tests

* Use tmjson for tm GenesisDoc

* Update types/module/simulation.go

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

* Update types/module/module_test.go

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

* Add godoc comments

* Remove unused InsertKeyJSON

* Fix tests

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-26 09:39:38 +00:00
atheeshp 78194e1cdd
gRPC gateway init (#7019)
* WIP: grpc server setup

* add register grpc routes

* updated go mod

* updated grpc for all modules

* added pb file for grpc gateway

* udpated gw file

* added a test for grpc route

* fixed conflicts

* added grpc server

* grpc tests added

* cleanup

* Fix gateway forward issue

* Add godoc

* updated tests

* fix lint

* fix tests

* fix tests

* fix tests

* fixed test

* Add grpc headers

* Fix error handling

* Fix tests - hacky

* Fix lint

* remove debug logs

* Fix review comments

* move grpc tests into a separate file

* Fix protobuf version

* Update x/capability/module.go

* Fix godoc

* Fix review suggestions

* Fix codec

* Add query params test for gateway request

* Fix gofmt

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-25 15:44:13 +00:00
Federico Kunze 3e148a9ce7
fix hardcoded auth sims (#7135)
* fix hardcoded auth sims

* changelog

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-24 10:55:42 +00:00
dauTT 20c80cfd44
Rename *codec.Codec to *codec.LegacyAmino (#6991)
* Rename *codec.Codec to *codec.LegacyAmino

* Implement requested changes

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-08-10 19:41:21 +00:00
Marie f59df68a97
Migrate x/genutil to use TxConfig (#6734)
* Update genutil collect and gentx to use TxGenerator

* Remove print statement

* Use Tx in genutil DeliverGenTxs

* Use Tx in genutil genesis_state

* Use Tx in ValidateGenesis

* Use amino txJSONDecoder and txBinaryEncoder in genutil InitGenesis

* Use TxConfig in place of TxGenerator

* Add gentx tests

* Remove commented line

* Test fixes

* Apply suggestions from code review

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

* Fixes

* Fixes

* Fixes

* Fixes

* Remove unneeded test case (doesn't apply to proto marshaling)

* linting

* Refactor to use new TxEncodingConfig interface in genutil module

* Replace golang/protobuf with gogo/protobuf package

* Use TxEncodingConfig in InitTestnet

* Remove old amino.go file

* Use TxJSONDecoder in genutil ValidateGenesis

* Add parameter to ValidateGenesis to resolve the tx JSON decoder issue

* Address review feedback

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-25 08:10:04 +00:00
Anil Kumar Kammari 3bafd8255a
Remove hybrid codec usage (#6843)
* remove hybrid codec for slashing, staking and upgrade

* Remove hybridcodec from params and mint

* revert staking

* Fix gov

* Fix ibc and evidence

* Fix ibc-transfer

* Fix staking

* remove evidence json marshaling

* Fix tests

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-25 08:03:58 +00:00
Aaron Craelius 80f7ff62f7
Start removing HybridCodec (init + auth, bank, distribution) (#6838)
* Start to remove HybridCodec

* Rename

* Fixes

* Test fixes

* Cleanup
2020-07-24 19:04:29 +00:00
Aaron Craelius 1538e65478
Fix module interface registration (#6834) 2020-07-23 22:45:34 -04:00
atheeshp 470465d792
x/auth: cli gRPC migration (#6809)
* migrated auth cli to use grpc query client

* unpacker added for account command

* fxed tests
2020-07-21 17:48:37 +00:00
Alexander Bezobchuk 61d69a978f
Merge PR #6806: Docs & Cleanup 2020-07-21 11:28:43 -04:00
Amaury Martiny 8e61ef86c3
x/{gov,params,upgrade,distribution} CLI: In-Process test & use grpc query service (#6664)
* refactor CLI to use grpc query service

* In process CLI for gov

* ReadQueryCommandFlags

* gov tx

* Fix compiler errors

* Formatting

* x/distribution: use gRPC query

* Consistent

* Fix x/distrib test

* Update x/gov

* Add ReadQueryCommandFlags

* Fix lint

* Revert x/params

* x/params use grpc query

* Fix tests

* Use page request

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-20 13:09:57 +00:00
Alexander Bezobchuk e59781eca7
Merge PR #6765: x/auth: Finish CLI Refactor 2020-07-17 16:20:45 -04:00
Jonathan Gimeno 351192aa0b
x/auth: in-process test refactor (#6573)
* remove unused functions

* create helper func to send tx

* refactor to use test help to send tx by client

* Commit before getting backend.

* Temporal commit

* temp commit

* remove the creation of txbuilder from cli

* fix imports

* update changelog

* Remove unused function.

* Add flag home into tx sign command.

* migrade TestCLIValidateSignatures to use new test suite

* migrate test one

* Add changes to make sign batch.

* make test pass

* refactor common logic

* First part of cli sign.

* Add test for sign batch.

* refactor a little and improve the test

* migrate broadcast command

* fix linter

* Remove printf for debug in bank module.

* Fix unused err var.

* fix linter

* fix test

* fix tests client

* Fix linter.

* Temp commit signature.

* encode tx

* migrate tests

* Fix imports.

* Remove changelog

* fix tests

* Fix tests.

* Update x/bank/client/testutil/cli_helpers.go

* Remove alias.

* Remove wait for N block func.

* export callCmd function into its own file.

* fix imports

* bring back to inner functions

* apply mock io

* the helpers use mockio

* fix bug

* Add Helpers.

* return to put the function in testutil package

* return BufferWriter in ExecTestCLICmd

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-14 18:37:14 +00:00
Aaron Craelius 712d23740f
Migrate x/auth cmd's to TxGenerator marshaling (#6391)
* Migrate encode, decode, and broadcast cmd's to use TxGenerator marshal methods

* Fix tests, add EncodingConfig

* Add simapp/encoding.go and wire up with simcli

* add godocs

* fix tests

* Debugging CLI Tests

* Fix integration test

* 6391 - lint issues and code coverage (#6414)

* fixed lint issue of "txEncodeRespStr"

* added tests for encode.go

* WIP: added tests for decode.go

* added txEncoder at bytes

* updated decode test

* updated txBytes to use TxEncoder in decoder test

* added a require after TxEncoder

* removed file save

* debug decode command

* fixed decode tests

* added decode cli

* updated encode and decode in a single file

* separated decode test from encode test

* review changes

* removed register interface

* review change

* Fix tests

* WIP add test for tx sign

* removed commented code

* Fix flags

* WIP add test for sign

* Address review suggestions

* fixed command issue

* Add tests for TxEncoder

* Revert sign changes

* Fix TxEncoder tests

* Fix GetSign Cmd

* Add tx test

* Remove duplicate validation

* Add tests for TxDecoder

* Fix tests

* Fix tests

* Output to clientCtx.Output

* Fix cli_tests

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-18 20:29:41 +00:00
dauTT 32278d9a2b
x/auth: remove alias.go usage (#6440)
* x/auth: remove alias.go usage

* Fix simd_test.go and formatting

* Fix app.go formatting

* Fix cli_test.go

* Fix lint warnings

* Undo accidental deletion during merge

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-17 14:42:27 -04:00
Jonathan Gimeno 49597b19ec
module: pass route by value (#6404)
* use instance

* add some comments

* Update types/router.go

* rename Nil to Empty

* run make mocks

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-11 15:37:23 +00:00
Jonathan Gimeno 79c308ae4a
Concept PR simplify Module (#6231)
* add test of alternative impl

* simplify query route too

* change name querier

* simplify register routes

* revert change

* add route

* add router

* first step refactor

* refactor

* update documentation

* update

* add format

* simplify appmodule

* update changelog

* rename vars

* remove interface

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-10 18:48:16 +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 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
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
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
Federico Kunze 3ee975c57b
Merge PR #6037: refactor simulation decoder 2020-04-21 17:33:56 -04:00
Alexander Bezobchuk fea231556a
Move ModuleAccount to x/auth (#6029)
* Move ModuleAccount to x/auth

* Update x/auth module

* Update x/staking

* Update x/mint

* Update x/gov

* Update x/distribution

* Update simapp

* Update x/bank

* Update std codec

* Add changelog entries

* Update CHANGELOG.md

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-20 19:32:10 +00:00
Alexander Bezobchuk 1083fa948e
Merge PR #6010: Merge x/supply into x/bank 2020-04-20 11:22:12 -04:00
Jonathan Gimeno 49102b1d98
Remove dependency of types/module package on x/simulation (#5835)
Closes: #5724
2020-03-23 12:55:44 +01:00
Jonathan Gimeno e45be08eb1 create module account on init for FeeCollectorName and tests for other module accounts 2020-03-05 22:11:05 +01:00
Alexander Bezobchuk 794a496892
Merge PR #5533: Protobuf: x/auth & x/supply 2020-02-18 13:50:13 +01:00
Alexander Bezobchuk 3df3887597
Merge PR #5499: Cleanup genesis state validation + Genutil 2020-01-09 15:14:23 -05:00
Federico Kunze 722a633f54
Sim refactor 3: move weighted operations to modules (#4869)
* move GenesisState generators to modules

* minor change on slashing genState generator

* move simulation params back to modules (#4839)

move simulation params back to modules (#4839)

* cleanup params

* various fixes

* move store decoders to modules

* fix

* module pattern

* split generators for param change

* param changes

* revert util pkg

* banksim

* compile

* update Decoders params

* fix

* address @colin-axner comments

* move weighted operations to modules

* cleanup

* cleanup

* Update cmd_test.go

* simulation manager

* mino fixes

* cleanup

* add GenerateGenesisState to simulation manager

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* address @rigelrozanski comments

* changelog

* Apply suggestions from code review

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* restructure modules simulation pkgs

* remove cycle deps

* rename funcs and add missing params

* modularize simulator param changes

* build

* fix params keys

* make format

* various fixes

* fix tests

* minor updates to sim_test

* cleanup

* more cleanup

* modularize genesis generators

* minor cleanup

* remove cdc from generators

* remove cdc

* add get or generate

* fix non-determinism in simulation

* changelog and x/simulation godoc

* cleanup operations

* 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

* build

* add WeightedOperations to AppModuleSimulation

* define each module proposals content as part of the module pattern

* 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

* modularized sim operations working

* changelog

* Update types/module/simulation.go

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* Update x/simulation/params.go

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* Update x/simulation/params.go

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* update /types/module

* 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

* remove unused func

* build fixes

* move weights to the same file

* scopelint

* changelog

* address @AdityaSripal comments

* address @alexanderbez comments
2019-12-05 10:29:54 +01:00
Federico Kunze 45b25ceaae Merge PR #4838: Sim refactor 2 - Move GenesisState generators to modules 2019-08-28 10:58:25 -04:00
Federico Kunze c441ce2fab Merge PR #4847: Sim refactor 1 move store decoders to modules
* move store decoders to modules

* fix

* module pattern

* compile

* update Decoders params

* fix

* address @colin-axner comments

* Update cmd_test.go

* simulation manager

* mino fixes

* cleanup

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* address @rigelrozanski comments

* changelog

* Apply suggestions from code review

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* restructure modules simulation pkgs

* address @alexanderbez comments

* fix
2019-08-13 18:16:03 -04:00
Federico Kunze 352678438c Merge PR #4255: Supply Module 2019-06-28 16:11:27 -04:00
Alexander Bezobchuk 67f6b02118 Merge PR #4541: Events Tracking / Tendermint v0.32.0 Update
* Update Tendermint to v0.32.0-dev0

* Initial refactor of tags

* Update event types and add unit tests

* Refactor context

* Update module manager

* Update result godoc

* Implement ToABCIEvents

* Update BaseApp

* Minor cleanup

* Fix typo

* Update x/bank message handler

* Update x/bank keeper

* Update x/bank

* Update x/bank events docs

* Update x/crisis module events

* Reset context with events on each message exec

* Update x/distribution events and docs

* Update BaseApp to not set empty events manually

* Implement simple event manager

* Update module manager

* Update modules to use event manager

* Update x/gov module to use events

* Update events docs

* Update gov queries and crisis app module

* Update bank keeper

* Add events to minting begin blocker

* Update modules to use types/events.go

* Cleanup x/mint

* Update x/staking events

* Update x/staking events

* Update events to have sender part of message.sender

* Fix build

* Fix module unit tests

* Add pending log entry

* Update deps

* Update x/crisis/types/events.go

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

* Update x/bank/internal/types/events.go

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

* Update x/distribution/types/events.go

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

* Update x/mint/internal/types/events.go

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

* Update x/slashing/types/events.go

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

* Update x/staking/types/events.go

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

* Update x/gov/handler.go

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

* Update x/gov/handler.go

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

* Update x/mint/abci.go

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

* Update x/mint/abci.go

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

* Update x/slashing/handler.go

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

* Update x/staking/handler.go

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

* Update x/slashing/handler.go

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

* Update x/staking/handler.go

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

* Update x/staking/handler.go

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

* Update x/staking/handler.go

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

* Upgrade TM to v0.32.0-dev1

* Update events as strings

* Update Tendermint to v0.32.0-dev2

* Fix BaseApp unit tests

* Fix unit tests

* Bump tendermint version to v0.32.0

* typos
2019-06-26 18:03:25 +02:00
frog power 4000 1a2a54029c Merge PR #4502: InvariantRouter -> InvariantRegistry 2019-06-06 16:32:38 -04:00
Alexander Bezobchuk 3180e68c7b
Merge PR #4499: Remove Client Codec Redundancy 2019-06-06 11:43:15 -04:00
frog power 4000 5f9c3fdf88 Merge PR #4451: Client and Module Modularization 2019-06-05 19:26:16 -04:00
frog power 4000 3fe5869148
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 11:25:32 -04:00