Commit Graph

24 Commits

Author SHA1 Message Date
Amaury 5d13b1fc63
InitGenesis in migrations when fromVersion==0 (#9007)
* InitGenesis in migrations when fromVersion==0

* Add test

* Fix test

* Fix comment

* cdc=>codec

* Don't break Configurator

* Remove method

* Add comments

* Add more comments

* Update types/module/module.go

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>

* Update types/module/module.go

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>

* Update types/module/module.go

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>

Co-authored-by: technicallyty <48813565+technicallyty@users.noreply.github.com>
2021-04-02 15:41:35 +00:00
Robert Zaremba e0e16f62f9
Remove duplicated Module.Route calls (#7716)
* Remove duplicated Module.Route calls

* make a proper test for registering empty route

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-29 22:01:09 +00:00
Aaron Craelius 9e7eb0da00
Add MsgServer to Configurator for ADR 031 wiring (#7584)
* Add MsgServer to Configurator for ADR 031 wiring

* Add docs, wire up evidence & staking

* Add integration test

* Add comments

* Doc strings

* Update types/module/configurator.go

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

* Update types/module/configurator.go

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

* Wire up vesting

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 17:46:10 +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
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
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
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
Alexander Bezobchuk 61d69a978f
Merge PR #6806: Docs & Cleanup 2020-07-21 11:28:43 -04:00
Jonathan Gimeno ddbb9a2321
run make format (#6416) 2020-06-12 10:17:36 -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
Alessio Treglia 3db39cda3c
Fix various linter warnings (#5824) 2020-03-18 12:59:08 +00:00
Alessio Treglia 39f416faa3
Simplify flaky test case and disable parallelism (#5793)
* Simplify flaky test casea and disable parallelism

* Fix failing test

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-03-12 14:46:55 +00:00
Alessio Treglia 2de4775a25
types/rest: add unit tests (#5779)
* types/rest: add unit tests

Drop unused functions:
- ParseQueryParamBool()
- ParseInt64OrReturnBadRequest()

* Fix test

* Disable parallelism

* Reintroduce @fedekunze ParseQueryParamBool

* Don't count Name() calls to fix flaky tests
2020-03-10 18:53:25 +00:00
Alessio Treglia e4209bd1f1
Attempt to fix flaky tests 2020-03-05 16:37:27 +00:00
Alessio Treglia 3349c971ae
increase types/module coverage up to 80% (#5740)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-03 13:38:46 +00:00
frog power 4000 5f9c3fdf88 Merge PR #4451: Client and Module Modularization 2019-06-05 19:26:16 -04:00