Commit Graph

380 Commits

Author SHA1 Message Date
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
Robert Zaremba 8eaf2ececc
Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526)
* testing: refactore Validation and Delegation handling of x/staking

This Changeset introduces set of improvements for writing tests.

The idea is to create a testing subpackage which will provide functions
to make tests more dev-friendly and wrap higher level use-cases.
Here is a show-up of of creating a service for staking module
for tests.

This PR also changes the `x/staking/types.MsgCreateValidator.Pubkey` from string
to types.Any. This change motivated the other change to show the pattern I'm describing here.

* add validator checks

* type change fixes

* use deprecated

* adding test slashing

* new network comment update

* working on tests

* Fix TestMsgPkDecode test

* Add UnpackInterfaces to MsgCreateValidator

* Fix tests

* Convert bech32 pubkey to proto

* Fix test

* fix v039/migrate_test/TestMigrate

* fix tests

* testslashing: rename Service to Helper

* file rename

* update TestMsgDecode

Co-authored-by: blushi <marie.gauthier63@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
2020-10-19 13:04:55 +00:00
Amaury Martiny 55242a659c
Add ADR 031 BaseApp and codec infrastructure (#7519)
* Refactor RegisterQueryServices -> RegisterServices

* Cleaner proto files

* Fix tests

* Add MsgServer

* Fix lint

* Remove MsgServer from configurator for now

* Remove useless file

* Fix build

* typo

* Add router

* Fix test

* WIP

* Add router

* Remove test helper

* Add beginning of test

* Move test to simapp?

* ServiceMsg implement sdk.Msg

* Add handler by MsgServiceRouter

* Correct signature

* Add full test

* use TxEncoder

* Update baseapp/msg_service_router.go

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

* Push changes

* WIP on ServiceMsg unpacking

* Make TestMsgService test pass

* Fix tests

* Tidying up

* Tidying up

* Tidying up

* Add JSON test

* Add comments

* Tidying

* Lint

* Register MsgRequest interface

* Rename

* Fix tests

* RegisterCustomTypeURL

* Add changelog entries

* Put in features

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Address review comments

* Address nit

* Fix lint

* Update codec/types/interface_registry.go

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

* godoc

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-15 13:07:59 +00:00
yihuang f260ca4319
shutdown gracefully without os.Exit (#7480)
* shutdown gracefully without os.Exit

* Update server/util.go

Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-14 15:13:48 +00:00
Marko 2323f1ac0e
tendermint: update sdk to rc5 (#7527)
* update sdk to rc5

* Update baseapp/params.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-10-14 06:20:52 +00:00
Aaron Craelius 228728cce2
Refactor RegisterQueryServices -> RegisterServices (#7518)
* Refactor RegisterQueryServices -> RegisterServices

* Fix tests
2020-10-12 16:31:51 +00:00
Amaury Martiny 647ad0dd3c
docs: Update "Basics" section (#7416)
* Prettier

* docs: Update "Basics" section

* appcli -> appd

* Better wording

* Fix to appCodec

* Add gRPC mention

* Add grpc

* Reference simapp code

* Update docs/basics/accounts.md

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

* Add section about gRPC query services

* Optional LegacyQuerierHandler

* Clearer docs

* Update docs/basics/app-anatomy.md

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

* Update docs/basics/app-anatomy.md

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

* Address comments

* Address comments

* Update docs/basics/accounts.md

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-10-12 15:31:25 +00:00
Amaury Martiny 33e7297c79
Use enum instead of int32 for BondStatus (#7499)
* Migrate staking module

* Add gov legacy

* Add comments

* Add x/distrib

* x/crisis

* x/mint

* Fix test

* migrate x/genutil

* Fix lint

* Fix staking constants

* Fix test

* Update x/genutil/legacy/v040/migrate.go

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

* Add migrate script instead of change BondStatus constants

* Change staking bondStatus to enum

* Fix test

* Fix another test

* Remove staking exported

* fix references

* Better constants

* Fix build

* Fix lint

* Remove buf version

* Fix tests

* Fix test

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-10-12 13:56:02 +00:00
Federico Kunze 7474a19bb9
simapp: use tmjson on InitChainer (#7514)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-12 13:13:17 +00:00
colin axnér a87d6ea3ab
baseapp: fix err message and use valid default consensus params values (#7471)
* update err msg and add passing default in simapp

* fix default

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-07 12:56:11 +00:00
Federico Kunze 2c93ec7a0c
ibc: core restructure (#7434)
* ibc: protobuf v1

* update codec

* core client

* core connection

* core host

* core commitment

* core port

* core channel

* core ibc module files

* core exported

* core types & simulation

* core spec

* make proto-all

* ibc alias
2020-10-02 06:03:02 -03:00
Federico Kunze 92ffed01bb
ibc: applications restructure (#7425)
* ibc: applications refactor

* update proto files

* try fix castrepeated

* fix proto

* update spec

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-10-01 15:32:53 +00:00
Akhil Kumar P 25f3c2ac41
Fix keyring backend issue in AddGenesisAccountCmd (#7426)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-01 10:16:39 +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
Marie Gauthier 91ca8ad3c1
Migrate BaseAccount PubKey to use Any (#7268)
* WIP on BaseAccount protobuf pub_key

* WIP on BaseAccount.PubKey

* WIP on BaseAccount pub key

* Update PubKey

* Update Account

* Docs

* WIP on protobuf keys

* Use Type() and Bytes() in sr25519 pub key Equals

* Add tests

* Add few more tests

* Update other pub/priv key types Equals

* Fix PrivKey's Sign method

* Rename variables in tests

* Fix infinite recursive calls

* Use tm ed25519 keys

* Add Sign and VerifySignature tests

* Remove ed25519 and sr25519 references

* proto linting

* Add proto crypto file

* Implement some of the new multisig proto type methods

* Add tests for MultisigThresholdPubKey

* Add tests for pubkey pb/amino conversion functions

* Move crypto types.go and register new proto pubkeys

* Add missing pointer ref

* Address review comments

* panic in MultisigThresholdPubKey VerifySignature

* Fix compile errors

* Remove pk conversion in ante handler

* Use internal crypto.PubKey in multisig

* Add tests for MultisigThresholdPubKey VerifyMultisignature

* Only keep LegacyAminoMultisigThresholdPubKey and move to proto keys to v1

* Remove conversion functions and introduce internal PubKey type

* Override Amino marshaling for proto pubkeys

* Merge master

* Make proto-gen

* Start removal of old PubKeyMultisigThreshold references

* Fix tests

* Fix solomachine

* Fix ante handler tests

* Pull latest go-amino

* Remove ed25519

* Remove old secp256k1 PubKey and PrivKey

* Uncomment test case

* Fix linting issues

* More linting

* Revert tests keys values

* Add Amino overrides to proto keys

* Add pubkey test

* Fix tests

* Use threshold isntead of K

* Standardize Type

* Revert standardize types commit

* Fix build

* Fix lint

* Fix lint

* Add comment

* Register crypto.PubKey

* Add empty key in BuildSimTx

* Simplify proto names

* Unpack interfaces for signing desc

* Fix IBC tests?

* Format proto

* Use secp256k1 in ibc

* Fixed merge issues

* Uncomment tests

* Update x/ibc/testing/solomachine.go

* UnpackInterfaces for solomachine types

* Remove old multisig

* Add amino marshal for multisig

* Fix lint

* Correctly register amino

* One test left!

* Remove old struct

* Fix test

* Fix test

* Unpack into tmcrypto

* Remove old threshold pubkey tests

* Fix register amino

* Fix lint

* Use sdk crypto PubKey in multisig UnpackInterfaces

* Potential fix?

* Register LegacyAminoPubKey

* Register our own PubKey

* Register tmcrypto PubKey

* Register both PubKeys

* Register interfaces in test

* Refactor fiels

* Add comments

* Remove old cosmos-sdk/crypto/keys reference

* Use anil's suggestion

* Add norace back

* Use our own ed25519

* Fix pubkey types

* Fix network tests

* Fix more tests

* Make ibc work?

* Use TM pubkey in NewValidator

* Fix lint

* Put interface in tpyes

* rerun CI

* Better name register

* Remove stray code

* Add ed25519 tests

* Check nil

* Correct interface impl assert

* rerun CI

* Add fix for Bech32

* Address comments

* FIx lint

* Add tests for solomachine unpack interfaces

* Fix query tx by hash

* Better name in amino register

* Fix lint

* Add back ed25519 test (fixes #7352)

* go mod tidy

* Fix merge issues

* Sort import

* Add test for backwards-compatibility

* Fix tests

* Fix merge issue

* Update client/context.go

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

* Update types/address.go

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

* Address feedback

* Add comment

* Fix BaseAccount SetPubKey and address further comments

* Lint

* Remove unnecessary use of copy in getPubKeyFromString

* Update comment

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-25 08:41:16 +00:00
Robert Zaremba f5afdd0117
Robert/move amino stdtx (#7301)
* x/auth: move amino StdTx... to a legacy package

* legacytx: move RegisterLegacyAminoCodec from init to tests/init

* merge fixes

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-22 14:35:18 +00:00
Amaury Martiny 7cd25abb87
Proto Tx with Any (#7276)
* WIP on protobuf keys

* Use Type() and Bytes() in sr25519 pub key Equals

* Add tests

* Add few more tests

* Update other pub/priv key types Equals

* Fix PrivKey's Sign method

* Rename variables in tests

* Fix infinite recursive calls

* Use tm ed25519 keys

* Add Sign and VerifySignature tests

* Remove ed25519 and sr25519 references

* proto linting

* Add proto crypto file

* Implement some of the new multisig proto type methods

* Add tests for MultisigThresholdPubKey

* Add tests for pubkey pb/amino conversion functions

* Move crypto types.go and register new proto pubkeys

* Add missing pointer ref

* Address review comments

* panic in MultisigThresholdPubKey VerifySignature

* Use internal crypto.PubKey in multisig

* Add tests for MultisigThresholdPubKey VerifyMultisignature

* Only keep LegacyAminoMultisigThresholdPubKey and move to proto keys to v1

* Remove conversion functions and introduce internal PubKey type

* Override Amino marshaling for proto pubkeys

* Merge master

* Make proto-gen

* Start removal of old PubKeyMultisigThreshold references

* Fix tests

* Fix solomachine

* Fix ante handler tests

* Pull latest go-amino

* Remove ed25519

* Remove old secp256k1 PubKey and PrivKey

* Uncomment test case

* Fix linting issues

* More linting

* Revert tests keys values

* Add Amino overrides to proto keys

* Add pubkey test

* Fix tests

* Use threshold isntead of K

* Standardize Type

* Revert standardize types commit

* Fix build

* Fix lint

* Fix lint

* Add comment

* Register crypto.PubKey

* Add empty key in BuildSimTx

* Simplify proto names

* Unpack interfaces for signing desc

* Fix IBC tests?

* Format proto

* Use secp256k1 in ibc

* Fixed merge issues

* Uncomment tests

* Update x/ibc/testing/solomachine.go

* UnpackInterfaces for solomachine types

* Remove old multisig

* Add amino marshal for multisig

* Fix lint

* Correctly register amino

* One test left!

* Remove old struct

* Fix test

* Fix test

* Unpack into tmcrypto

* Remove old threshold pubkey tests

* Fix register amino

* Fix lint

* Use sdk crypto PubKey in multisig UnpackInterfaces

* Potential fix?

* Register LegacyAminoPubKey

* Register our own PubKey

* Register tmcrypto PubKey

* Register both PubKeys

* Register interfaces in test

* Refactor fiels

* Add comments

* Use anil's suggestion

* Add norace back

* Check nil

* Address comments

* FIx lint

* Add tests for solomachine unpack interfaces

* Fix query tx by hash

* Better name in amino register

* Display StdTx instead of proto Tx

* Remove useless check

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: blushi <marie.gauthier63@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-09-21 16:48:28 +00:00
Anil Kumar Kammari ca7b31dd5d
Register swagger API (#7246)
* init

* Fix statik gen

* Fix swagger

* Change swagger url

* Fix swagger serve

* remove ibc swagger from legacy docs

* Add old routes config

* Move swagger api to app.go

* add godoc

* Fix inputs

* Fix swagger dir

* Fix statik

* refactor

* fmt

* fix doc

* Fix swagger config check
2020-09-19 00:34:56 +00:00
Alessio Treglia 3e616a60d5
replace testutil.NewTestCaseDir() with Go1.15's T.TempDir() (#7014)
Override go's default version with go 1.15.
2020-09-18 12:08:24 +01:00
colin axnér b2d48a9e81
Merge PR #7327: remove resulting value return from AddCoins and SubtractCoins 2020-09-16 08:40:47 -04:00
Alexander Bezobchuk 7ae84898de
Merge PR #7265: Tendermint Block Pruning 2020-09-14 10:12:49 -04:00
Alessio Treglia f413d3a5d0
use os.UserHomeDir() to get user's home dir (#7288) 2020-09-13 12:18:02 +01:00
Alessio Treglia 9544718d7e
Merge PR #7286: simapp: merge node and client config directories
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-09-12 10:03:20 -04:00
Alexander Bezobchuk 325be6ff21
Merge PR #7209: Create Vesting Account Message 2020-09-08 09:09:50 -07:00
Erik Grinaker 4faeefebd2
Add state sync support (#7166)
* Add state sync support

* fix incorrect test tempdir

* proto: move and update Protobuf schemas

* proto: lint fixes

* comment tweaks

* don't use type aliasing

* don't call .Error() when logging errors

* use create terminology instead of take for snapshots

* reuse chunk hasher

* simplify key encoding code

* track chunk index in Manager

* add restoreDone message for Manager

* add a ready channel to Snapshotter.Restore()

* add comment on streaming IO API

* use sdkerrors for error handling

* fix incorrect error

* tweak changelog

* syntax fix

* update test code after merge
2020-09-08 09:05:44 +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
dauTT b52ffa08e1
Implement ADR 026 (#7029)
* Add allow_governance_override_after_expiry flag to tendermint NewCreateClientCmd

* 1) Add LatestTimestamp to ClientState struct by adding a new attribute latest_timestamp to the message ClientState in proto/ibc/tendermint/tendermint.proto
2) Autogenerate x/ibc/07-tendermint/types/tendermint.pb.go by running 'make proto-gen'. Strangely, as a side effect x/distribution/types/genesis.pb.go, x/evidence/types/genesis.pb.go were also modified by the command 'make proto-gen'
3) Add Expired() function

* Fix tests

* 1) Add allow_governance_override_after_expiry flag to tendemint clientStatus
2) Add allow_governance_override_after_misbehaviour flag to tendermint ClientStatus

* Cosmetic changes

* Fix tests

* Add Unfreeze function

* Add new ClientUpdateProposal type

* Add minor fixes

* Add NewClientUpdateProposalHandler unit tests

* Fix proto-lint-docker

* Delete x/ibc/07-tendermint/tendermint_test.go

* Follow convention to put signer last in msg function signature

* 1) Add GetLatestTimestamp function  to ClientStatus interface
2) Change Expired() signature to Expired(now time.Time)

* 1) Add override flag to UpdateClient function
2) Fix tests

* Refactor HandleClientUpdateProposal

* 1) Extend exported Header interface with MarshalBinaryBare and UnmarshalBinaryBare methods
2) Move ClientUpdateProposal message to from ibc.proto to client.proto
3) Refactoring code
4) Add override flag to UpdateClient method
5) Fix tests

* 1) Uncomment tests and clean up code
2) Add basic validation of the header (ValidateBasic) when the override flag is true

* Cosmetic changes

* Add TODO comments

* Fix header MarshalBinaryBare, UnmarshalBinaryBare by using protobuf encoding/decoding

* Fix proto comments

* Fix override logic

* undo gettimestamp for solo machine and localhost

* add update after proposal func, some major refactoring in progress, various issues addressed

* fix tendermint proposal update handling

* run make proto-gen

* remove timestamp from tendemint client

* fix build issue for tm types

* apply various review comments

* add tests for 02-client functionality

* self review fixes

* typo

* update tests slightly

* update tendermint proposal handling tests

* Update x/ibc/02-client/keeper/proposal.go

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

* Update x/ibc/07-tendermint/types/proposal_handle.go

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

* Update x/ibc/07-tendermint/types/proposal_handle.go

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

* apply most of @fedekunze and some of @AdityaSripal suggestions

* convert test to bools

* update docs and increase code cov

* fix build

* fix typo, remove omitempty

* add switch

* apply @fedekunze latest suggestions

* fix lint

* Update x/ibc/02-client/keeper/proposal_test.go

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-04 20:59:22 +00:00
Amaury Martiny 3b9b58c931
Add height in exported genesis (#7089)
* Add height in exported genesis

* +1

* Add test

* Refactor ctx in setupApp

* Use amino in export

* Use tmjson

* Add custom initialVersion (set to 0 for now)

* Add comment

* Add mount in initChainer

* app.LastBlockheight

* InitializeAndSeal in InitChain?

* Revert create store with initial version

* Update to latest iavl

* Check height in test

* Make it work

* Add more tests

* Rename interface

* Use struct isntead of 6 args

* Fix lint

* Remove stray fmt

* Revert go mod/sum

* Install iavl rc3

* Update comments

* Add fee in network

* Typo

* Fix logic in commit

* Fix tests

* Only set initial version on > 1

* Genesis block num = 1

* Fresh chain, genesis block = 0

* Add comments

* Revert Mutable/ImmutableTree

* Allow for zero height

* Fix restart

* Add comments

* Add comments, fix test

* Fix remaining one test

* Add panic test

* Update comment

* Add test for --height

* No cast

* Add check that genesis file exists

* Remove duplicate imports

* Fail early

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
2020-09-03 10:11:46 +00:00
colin axnér 843bd24bca
Add a mock application module to test core IBC (#7187)
* update setup to use channeltype and add mock app module

* rm print statement

* claim channel cap

* fix up test

* Update x/ibc/testing/coordinator.go

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

* apply @fedekunze review suggestions

Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-31 13:58:23 +00:00
Aditya 5ee4fad501
Remove Evidence handler from IBC (#7196)
* fix builds

* fix tests

* lint

* Update x/ibc/02-client/handler.go

* Update x/ibc/handler.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-08-29 14:20:48 +00:00
SaReN 23a9f46aad
Update tm pubkey references (#7102)
* Update pubkey references

* Update ledger_mock

* Migrate encoding from tm

* Update pubkey prefix

* revert ed25519 to tendermint key

* random account revert

* Revert ed25519 references

* revert secp key name

* test revert

* remove ed25519

* Update x/staking/types/validator.go

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

* Revert "remove ed25519"

This reverts commit 66d2e1d061aeae81c4c0a3daf718536b09dda19e.

* remove ed25519 & sr25519

* Apply suggestions from code review

* remove codec

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-08-28 16:02:38 +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
colin axnér 56f4ccfd26
Fix AfterImport and update black/white list variable namings (#7159)
* fix sim bug and rename remaining references of black/white list

* make server export command flags public

* make missed flag public

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-25 15:55:19 +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
Amaury Martiny 3d969a1ffd
Implement gRPC Simulate endpoint (#7035)
* Implement simulate endpoint

* Add GetProtoTx()

* Add signing in test

* Add txBuilderFromProto

* Remove stray println

* Update to master

* Merge master

* Fix tests

* Make tests pass

* Integrate in router

* Make proto-gen

* Fix lint

* Really fix lint

* Refactor to fix import cycles

* Rename builder -> wrapper

* Update proto/cosmos/base/reflection/v1beta1/reflection.proto

* Fix after merge

* t->w

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-24 14:41:08 +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
Amaury Martiny 50bab8f820
Put AccountSequence in SignerInfo (#6997)
* WIP test the grounds

* Update ADR020

* Fix compile errors

* Fix ADR

* Make ante tests pass

* Fix remaining ante handler tests

* Simplify code

* Fix x/bank app_test

* Fix tests

* Remove useless accSeq from signerdata

* Fix test

* Update simapp/helpers/test_helpers.go

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

* Update simapp/helpers/test_helpers.go

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

* Update x/auth/client/cli/tx_multisign.go

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

* Address rewview

* Update x/auth/ante/sigverify.go

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Update x/auth/ante/sigverify_test.go

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Update x/auth/tx/builder_test.go

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Update x/auth/tx/builder_test.go

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Update x/auth/tx/direct_test.go

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* Update x/auth/tx/builder_test.go

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>

* AccSeq -> Seq

* Address reviews

* Better variable naming

* Fix variable assign

* Remove old SetSignerInfo

* Fix test

* proto-gen

* Make proto-gen

* Reput gw comment

* Add Changelog

* Update x/bank/app_test.go

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

* Update x/bank/app_test.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
2020-08-21 14:20:47 +00:00
Aditya 97df8b605c
Verify Client on Connection Handshake (#7057)
* verify client state

* add client state to msgs and retrieve in handler

* fix connection msgs

* fixed handshake tests

* fix tests

* fix sim tests

* revert pb edit

* add ValidateClient tests

* Apply suggestions from code review

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

* fix tests

* fixed msgs test

* use ibctesting for client state consts

* Apply suggestions from code review

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* address rest of comments

* rename to ValidateSelfClient and update spec

* lint

* Update x/ibc/02-client/keeper/keeper_test.go

* Update x/ibc/02-client/keeper/keeper_test.go

* complete rest of review

* improve cov

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-20 22:05:41 +00:00
Alexander Bezobchuk f0d2c86f0b
Merge PR #7121: Support Event Indexing 2020-08-20 12:19:16 -04:00
SaReN 24bc89183e
Fix add-genesis-account in simd (#7069)
* Update genaccounts to use encoding/json

* Fix add genesis accounts

* Add test for genaccounts

* Code cleanup
2020-08-17 21:32:16 +00:00
Aaron Craelius 3f81c0a18d
gRPC interface reflection. (#6722)
* WIP on gRPC interface reflection.

* Update docs in proto

* Add tests

* Add test

* Add route inside router

* Address nits

* ListInterfaces -> ListAllInterfaces

* Fix proto lint

* Remove stray println

* Update proto/cosmos/base/reflection/v1beta1/reflection.proto

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

* Update codec/types/interface_registry.go

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

* Update codec/types/interface_registry.go

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

* Add godoc

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-17 17:02:13 +00:00
Alexander Bezobchuk c25b3b9c44
testnet: fix initGenFiles (#7072) 2020-08-17 15:23:37 +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
Amaury Martiny f3c6ed61b4
Use encoding/json for genesis (#7037)
* Use encoding/json for genesis

* Fix typo

* WIP Add test

* Add integration test

* byebye singleton

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-15 08:52:33 +00:00
Marko 8de96d16f9
tendermint: update to rc3 (#6892)
* modify light imports

* change abci.header to tmproto.header

* use rc

* rc

* fix import

* Merge PR #6893: fix key imports

* fix rc2

* tendermint: update 3 (#6899)

* tendermint: update 4 (#6919)

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

* tendermint: update 5 (#6923)

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

* bump to latest master

* tendermint: update (#6972)

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>

* Update x/ibc/07-tendermint/types/test_utils.go

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

* address comment

* go mod

* bring back things

* fix test

* update tm proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-14 13:58:53 -04:00
Aditya 3735b182bc
Modular IBC Client (#7028)
* start modular client work

* fix panic

* reuse keeper marshal methods

* readd TODO

* add nil checks for misbehaviour

* address reviews

* address rest of reviews and fix builds

* fixed tests

* address rest of reviews

* fix expired blocks bug

* fix expired bug
2020-08-14 04:47:13 -04:00
Alexander Bezobchuk 6a7cf4442e
Merge PR #7006: auth: Update AccountRetriever 2020-08-13 10:22:16 -04:00
Aaron Craelius 816c5a37bd
Enable proto JSON generally and remove HybridCodec (#6859)
* Remove HybridCodec

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* WIP on fixing proto JSON issues

* Test fixes

* Delete hybrid_codec.go

* Fixes

* Fixes

* Fixes

* Test fixes

* Test fixes

* Test fixes

* Lint

* Sim fixes

* Sim fixes

* Revert

* Remove vesting account JSON tests

* Update CHANGELOG.md

* Lint

* Sim fixes

* Sim fixes

* Docs

* Migrate more amino usages

* Remove custom VoteOption String() and json marshaling

* Fix tests

* Add comments, update CHANGELOG.md

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-13 13:20:02 +00:00
Federico Kunze 308c879b11
custom testnet cmd signing algorithms (#7012)
* custom testnet cmd signing algorithms

* update testutil network Config

* keyring options

* fix test

* typo
2020-08-12 08:34:10 +00:00
Aaron Craelius 20c5ee3624
Enable proto JSON for genesis (#7000)
* Enable proto JSON for genesis

* Test fixes

* Cleanup

* Cleanup

* Cleanup

* Update CHANGELOG.md

* Protogen

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-08-11 14:22:30 +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
Alexander Bezobchuk 9ae17669d6
Tx Height Timeout (#6089)
* Implement TxHeightTimeoutDecorator

* Update error message

* rename type

* set height timeout

* update tests

* update *SignDoc)

* rename

* remove dup

* fix build

* cli updates

* rest updates

* cl++

* Update x/auth/ante/basic.go

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

* Update x/auth/ante/basic.go

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

* Update x/auth/ante/basic.go

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

* Update x/auth/ante/basic.go

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

* rename

* rename

* remove TimeoutHeight from SignDoc

* updates

* fix tests

* update IBC cmd flags

* use omitempty

* update godoc

* add test case to TestStdSignBytes

Co-authored-by: colin axnér <25233464+colin-axner@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-08-07 23:32:22 +00:00
atheeshp ceba0cb45d
x/ibc migrate genesis proto (#6878)
* migrated channel genesis types to proto

* connection genesis types migrated to proto

* client proto migration

* failing tests due to tendermint part incomplete

* add genesis test

* x/ibc: ClientState Any

* add genesis test

* suite NotPanics

* comment tests

* update export logic

* refactor

* update test

* fix non-determinism

* castrepeated

* x/ibc: migrate simulations to protobuf

* add proto genesis

* add UnpackInterfaces func to genclientstate

* add unpackinterfaces for consensus states

* formatting

* fix genesis tests

* add modified genesis test

* update comments

* remove localhost register codec

* use app registry

* fix bug

* Update simapp/app.go

* Update x/ibc/02-client/types/genesis.go

* unmarshaler interface

Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-07 08:33:47 +00:00
Alexander Bezobchuk 89097a00d7
Merge PR #6968: fix sign command 2020-08-06 12:25:54 -04:00
Jonathan Gimeno fe8c8b83aa
add default node home into server helpers (#6962) 2020-08-06 14:58:41 +00:00
SaReN 04cb1fb05f
Fix clientCtx intialization (#6955) 2020-08-05 21:22:33 +00:00
Alexander Bezobchuk 801b64868d
Merge PR #6935: Fix Testnet Command 2020-08-04 12:51:27 -04:00
Aditya 9b61e0947e
Remove Last Header from ClientState (#6873)
* implement features, fix tendermint tests

* allow test headers to pass in custom nextvalidatorset

* allow updates to previous heights and test

* remove unnecessary testing feature

* fix client tests

* fix ibc tests, and updating consensus state

* fix ibc-transfer tests

* appease linter

* Apply suggestions from code review

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

* add chainID test case

* fix expPass value

* Apply suggestions from code review

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

* address rest of @colin-axner review

* fix bug and errors

* Apply suggestions from code review

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

* address rest of @colin-axner review

* implement updating before frozen height

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-08-04 05:05:03 -04:00
Aaron Craelius 6d937443b2
Reject unknown fields in TxDecoder and sign mode handlers (#6883)
* WIP on unknown field rejection in TxDecoder

* WIP on unknown field rejection in TxDecoder

* WIP

* WIP

* WIP

* WIP

* Fix bugs with RejectUnknownFields

* Fix tests

* Fix bug and update docs

* Lint

* Add tests

* Add unknown field tests

* Lint

* Address review comments
2020-08-03 19:47:25 +00:00
Aaron Craelius 7e2eea84c6
Fix the one remaining proto tx bug and flip the switch (#6902)
* Fix the one remaining proto tx bug and flip the switch

* Update github CI

* Wrap TxDecoder errors

* Add test

* Cleanup
2020-07-30 18:58:26 +00:00
Marko 617b822efa
types: add kv type (#6897)
* add kv type

* add changelog entry

* fix build

* replace sdkkv with kv

* revert change

* fix some tests

* proto-gen

* fix tests

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-30 14:53:02 +00:00
SaReN 72ebafeeca
Update auth cli commands (#6717)
* add utils

* update sign cmd

* update multisign cmd

* update sign batch cmd

* update genutil cmd

* add wrap tx builder

* update gentx cli

* update validate sigs cmd

* fix lint

* add flag reader to cli

* update marshaler for batchscan

* add register query server

* update to master

* remove depricated methods

* fix keyring issue

* update wraptx

* Fix batch scan

* fix register interfaces issue

* update printOutput

* Update Validate Sigs test

* WIP on signature JSON

* Cleanup

* Cleanup

* Test fixes

* Test fixes

* Fixes

* WIP on tests

* Fix gov tests

* fix lint

* fix MultiSign tests

* fix tests

* refactor tests

* Cleanup

* Address review comments

* Update encode

* Test fix

* Rename SignData func

* Fix lint

* Fix lint

* Revert ReadTxCommandFlags

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
2020-07-29 22:33:42 +00:00
Marie bc7e943158
x/auth genesis protobuf migration (#6880)
* Add auth genesis.proto and related changes

* Add UnpackInterfaces method to auth GenesisState

* Remove unrelevant test case

* Update proto/cosmos/auth/genesis.proto

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

* Add test for auth types ConvertAccountsAny

* Apply naming suggestions

* Update x/auth/types/genesis_test.go

Co-authored-by: Federico Kunze <31522760+fedekunze@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-29 16:00:15 +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
Aaron Craelius e9534b0935
Add gRPC server & reflection (#6463)
* Add gRPC proxy

* Make GRPC disabled by default

* WIP on integration tests

* WIP on integration tests

* Start setting up in process tests

* Start setting up in process tests

* Make it compile

* Add start server to network util

* Add Println

* Use go routine

* Fix scopelint

* Move to proxy_test

* Add response type cache

* Remove proxy

* Tweaks

* Use channel to handle error

* Use error chan

* Update server/start.go

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

* Use %w

* Add sdk.Context

* Add comments

* Fix lint

* Add header and tests

* Address comments

* Factorize some code

* Fix lint

* Add height and prove in req metadata

* Add reflection test

* Fix lint

* Put grpc test in server/grpc

* Update baseapp/grpcserver.go

* Update baseapp/grpcserver.go

* Remove proof header

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-07-27 17:57:15 +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
Anil Kumar Kammari 1f8cc450c4
Add missing cancel-software-upgrade cmd (#6840)
* Add cancel software upgrade cmd

* add proposal cancel handler

* Fix gofmt
2020-07-24 17:39:52 +00:00
Aaron Craelius 1538e65478
Fix module interface registration (#6834) 2020-07-23 22:45:34 -04:00
Aaron Craelius 0a498d8c18
Add protobuf Tx unit tests (#6614)
* Enable proto tx by default and add test_amino build flag.

* Enable proto TxDecoder

* update makefile

* fix conflicts

* Revert AminoCodec change

* Make test-unit-amino default for now

* Make test-unit-amino default for now

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-23 17:31:42 +00:00
Alexander Bezobchuk 61d69a978f
Merge PR #6806: Docs & Cleanup 2020-07-21 11:28:43 -04:00
colin axner 79fa06b26c
remove IBC ante handler in favor of using handler (#6793)
* remove IBC ante handler, add calls to handler

* move some events upstream to handler

* remove change log entry

* move ante handler tests to handler

* fix build

* update docs

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-20 15:25:57 +00:00
Jonathan Gimeno 54141887b5
Add home default to other commands. (#6789)
* Add home default to other commands.

* add defaultNodeHome to rest of commands

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 15:12:33 +00:00
Amaury Martiny 5c0e3b4de5
x/auth/ante: Migrate tests to use the new client.TxConfig (#6661)
* WIP: using encoding config

* Make it compile, test fails

* test should be okay

* Make tests pass

* Add comments

* Convert more tests

* Make TestAnteHandlerSigErrors work

* Make first 2 tests pass

* TestAnteHandlerAccountNumbers

* Use table tests

* Remove print

* Use test table

* TestAnteHandlerSigErrors

* TestAnteHandlerAccountNumbers

* TestAnteHandlerAccountNumbers

* Refactor TestAccount

* Refactor getSignBytes

* TestAnteHandlerAccountNumbersAtBlockHeightZero

* TestAnteHandlerSequences

* TestAnteHandlerFees

* TestAnteHandlerMultiSigner

* TestAnteHandlerBadSignBytes

* TestAnteHandlerSetPubKey

* TestAnteHandlerSigLimitExceeded

* TestCustomSignatureVerificationGasConsumer

* TestAnteHandlerReCheck

* Make all tests pass

* Refactor a little bit more

* Fee test

* SetupTest

* All tests pass

* Refactor to RunTestCase

* Don't use StdFee

* Revert some little stuff

* Finish up last couple of test cases

* Less verbose

* s/TxGenerator/TxConfig

* Add comments

* Indent

* Move KeyTestPubAddr to testdata

* Move testdata to /testutil

* Revert to use signature: nil step in signing

* Add comments

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-20 08:30:12 -04:00
Alexander Bezobchuk e59781eca7
Merge PR #6765: x/auth: Finish CLI Refactor 2020-07-17 16:20:45 -04:00
Jonathan Gimeno cdcb51a922
Merge PR #6750: Revert to allow to set DefaultNodeHome as a param in genutil CLI cmds 2020-07-17 10:20:31 -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
SaReN b9f86dd7fe
Update simapp helpers to use Tx generator (#6655)
* update helpers to use tx generator

* update modules to use tx generator

* add todo

* update ibc to use txG

* fix lint

* Eliminate panics from Gentx

* update module ops

* fix lgtm alert

* update ibc with txG

* Remove todo

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

* move simapp/helpers to test_helpers

* revert simapp/helpers to test_helpers

* revert renaming

* address suggestion

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

* fix tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-14 17:33:31 +00:00
Alexander Bezobchuk e7554bb3b0
Fix Gas Flag Usage + CLI Flag APIs (#6685)
* Use new APIs

* fix usage

* fix usage of gas flag

* tests: TestParseGasSetting
2020-07-11 08:13:46 +00:00
Jonathan Gimeno 6ceedc9e4f
Remove TxBuilder references to viper. (#6653)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-10 11:05:35 +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
Alessio Treglia 57ac28c814
client/flags: remove NewCompletionCmd() (#6632)
The functionality was adopted tendermint upstream, see
* https://github.com/tendermint/tendermint/pull/4665
2020-07-07 19:29:30 +02: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
Alexander Bezobchuk 8670a10564
Merge PR #6595: Single Binary & Command Refactor 2020-07-07 11:40:46 -04:00
Jonathan Gimeno 3c76084bf5
Merge PR #6596: Genutil remove global viper 2020-07-06 17:48:54 -04: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
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
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
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
Alexander Bezobchuk 37cc04081e
Fix Current Integration Tests (#6570)
* fix attempt

* fix test
2020-07-01 18:37:59 +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
Alexander Bezobchuk d5049413ef
Merge PR #6525: x/bank: Refactor CLI & Tests 2020-06-30 16:59:21 -04:00
colin axner 43b4f2f120
remove alias.go from 02-client (#6542) 2020-06-30 10:37:05 +00:00
Aaron Craelius c0e48e1c43
Update ante handlers to use SignatureV2 (#6428)
* Update ante handlers to use SignatureV2

* WIP on test fixes

* WIP on test fixes

* Debugging CLI Tests

* CHANGELOG.md

* CHANGELOG

* Add missing tests for ante

* Add tests for verify signatures

* Update verify tests

* Fix register codec issue

* debug

* Cleanup

* Fix verify signature tests

* Remove viper

* remove keyring usage

* Fix review changes

* Fix simapp

* Fix ante tests

* Add reference issue

* Add test for multisignature

* Wrap sign error with sig

* Fix verify sign test

* Fix CHANGELOG.md

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-29 20:48:41 +00:00
colin axner 43837b16e7
Refactor 04-channel/keeper tests to ibc testing pkg (#6400)
* update testing pkg and first keeper test

* fix version bug

* add more helper testing funcs

* move create header to testing pkg

* fix connection state bug

* add staking genesis state

* update simapp with setting validator helper func

* update simapp with valset helper

* fix app hash issue

* update to query from correct iavl proof height

* first keeper test passing

* second test passing 🎉

* fix build

* update tests in all keeper_test

* fix lint

* begin refactoring querier test

* update first querier test and update testing helpers

* finish updating rest of querier tests

* rename ChannelID in TestChannel to ID

* remove usage of chain id for calling helper funcs

* update openinit and opentry tests

* finish opening channel handshake tests

* finish handshake tests

* general testing pkg cleanup

* finish packetsend refactor

* update recvpacket

* packet executed refactored

* finish packet test 🎉

* all tests passing

* cleanup and increase code cov

* remove todos in favor of opened issue #6509

* bump invalid id to meet validation requirements

* bubble up proof height + 1

* Apply suggestions from code review

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

* fix uninit conn test

* fix compile and address various pr review issues

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

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

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

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

* address @AdityaSripal comments and increase cov

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-26 16:36:04 +00:00
Alexander Bezobchuk 0d1a7293b7
cmd/simd: Use server.GetPruningOptionsFromFlags (#6508) 2020-06-25 13:57:41 +00:00
Alexander Bezobchuk cb6c552e05
init commit (#6503) 2020-06-24 14:07:26 +00:00
Alexander Bezobchuk 4716260a6e
Merge PR #6475: Pruning Refactor 2020-06-22 16:31:33 -04: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
Alexander Bezobchuk 5040ff87c4
Merge PR #6449: Initial Metrics 2020-06-18 14:12:44 -04: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
colin axner eb3f7e6473
rename blacklist to blocked (#6455)
* rename blacklisted to cannotSendTo

* add changelog

* rename to blockedAddrs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-17 13:32:49 +00:00
Jonathan Gimeno c134e8974e
Move some Param types from Keeper to Types in staking (#6451) 2020-06-16 19:59:36 +02:00
Alexander Bezobchuk 8ee7d1f403
Merge PR #6399: SDK Telemetry 2020-06-16 11:11:02 -04:00
Alexander Bezobchuk 6a05b83069
Merge PR #6426: Migrate API Server 2020-06-15 13:39:09 -04:00
dauTT 24b9be0ef8
x/bank: remove alias.go usage (#6439)
* x/bank: remove alias.go usage

* Fix simd_test.go
2020-06-14 23:06:16 +00:00
dauTT 8cf8098861
x/capability: remove alias.go usage (#6438) 2020-06-14 19:05:45 +02:00
dauTT 6e9ffc1a0e
x/crisis: remove alias.go usage (#6437) 2020-06-14 13:59:25 +00:00
dauTT 190bee27cb
x/distribution: remove alias.go usage (#6436) 2020-06-14 11:01:47 +00:00
dauTT cc42a82c86
x/evidence: remove alias.go usage (#6435) 2020-06-14 11:58:48 +02:00
dauTT 0286a4a5dc
x/ibc-transfer: remove alias.go usage (#6427)
* x/ibc-transfer: remove alias.go usage

* Fix formatting

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-06-13 16:20:38 -04:00
dauTT 560398cfdc
x:ibc: remove alias.go usage (#6429)
* x:ibc: remove alias.go usage

* Replace ibc24host with ibchost
2020-06-13 14:29:00 +00:00
dauTT 1783f5ef1e
x/gov: remove alias.go usage (#6432) 2020-06-13 11:07:51 +02:00
dauTT c3ff8c0c06
x/genutil: remove alias.go usage (#6433) 2020-06-13 07:41:45 +00:00
dauTT 73bdb7d190
Merge PR #6424: x/mint - remove alias.go usage 2020-06-12 20:26:19 -04:00
Alexander Bezobchuk 7871910359
Simapp Localnet (#6421)
* Setup localnet

* Fix compose

* Fix file perms

* Fix build

* Codec + lint updates

* lint++
2020-06-12 16:23:08 +00:00
dauTT 14e3aa1265
x/staking: remove alias.go usage (#6397)
* x/staking: remove alias.go usage

* Fix formatting and Add entry in CHANGELOG.md

* Add missing end curly parenthesis

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-12 14:54:37 +00:00
dauTT df68b1512c
x/slashing: remove alias.go usage (#6417)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-12 14:25:12 +00:00
dauTT 3228c3b12a
x/params: remove alias.go usage (#6415) 2020-06-12 09:52:04 -04:00
dauTT 82afd52981
x/upgrade: remove alias.go usage (#6382)
* x/upgrade: remove alias.go usage

* Simplify code

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-06-10 18:54:15 +00:00
Alessio Treglia 65ea305336
x/auth: add sign-batch command (#6350)
The command processes list of transactions from file
(one StdTx each line), generate signed transactions
or signatures and print their JSON encoding, delimited
by '\n'. As the signatures are generated, the command
increments the sequence number automatically.

Author: @jgimeno
Reviewed-by: @alessio
2020-06-08 17:19:29 +02:00
Aaron Craelius 4e0a475751
Make client.Context implement gRPC ClientConn (#6342)
* Add QueryConn to client.Context

* Add integration test

* imports

* spelling

* Make client.Context implement grpc ClientConn

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-08 13:41:30 +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
Aaron Craelius 70767c87c4
Update x/gov to use Any (#6147)
* Update x/gov to use Any

* Fixes

* Remove MsgSubmitProposalLegacy

* Update CHANGELOG.md

* Add RegisterInterfaces for x/distribution, x/params, & x/upgrade

* Fix query JSON issue

* Fix gov tests

* Revert custom Any Equals

* Re-remove types

* Rename receivers

* Fix imports in gov

* Sort imports

* Make amino JSON signing work with Any

* Run proto-gen

* Create full amino wrapper

* Fix errors

* Fixes

* Fix tests

* Test fixes

* Fix tests

* Linting

* Update ADR 019 and CHANGELOG

* Updated ADR 019

* Extract Marshal/UnmarshalProposal

* fix error

* lint

* linting

* linting

* Update client/keys/parse.go

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

* linting

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Update docs/architecture/adr-019-protobuf-state-encoding.md

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

* Address review feedback

* Add godocs

* Fix errors

* fix errors

* revert file

* Address review feedback

* Address review feedback

* Stacktrace debug flag

* Fix tests

* Address review feedback

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +00:00
Federico Kunze 3dcdc582af
x/ibc-transfer: move ICS20 out from x/ibc (#6222)
* x/transfer: move ICS20 out from x/ibc

* rename to ibc-transfer
2020-05-15 20:36:47 +00:00
Federico Kunze c9ec0ff087
x/ibc: default genesis state for sims (#6158)
* x/ibc: default genesis state for sims

* add ibc and transfer module to simulations

* minor update

* remove TODO

* add validation to transfer genesis

* fix transfer init genesis

* address @alexanderbez comments
2020-05-14 22:47:11 +00:00
Marko 54ed8d7a2c
lint: official action (#6156)
* switch from review dog to official golangci action

* fix release

* disable nolintlint and wsl

* fix linting issues

* have name adhere to required

* add timeout

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-07 09:40:49 +00:00
Federico Kunze d7ebee74e7
x/ibc: proto migration pt 1 (#6097)
* x/ibc: proto migration pt 1

* fix tests

* fixes and godoc

* yaml tags

* rm changelog

* address comments from review

* fix some tests

* fix tests

* add _UNSPECIFIED suffix for default enums

* Update app

* protobuf Any fixes

* use gogoproto

* fix tests

* wrap all messages

* address @alexanderbez comments

* update proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-05-06 11:17:50 -04:00
Alexander Bezobchuk 2f718c8d66
Remove evidence codec (#6146) 2020-05-05 19:13:36 +00:00
Aaron Craelius 386217209d
Merge PR #6076: Proto Any init + evidence 2020-05-05 10:28:20 -04:00
Aditya 687d4246e5
Fix cap initialization by writing to uncached context (#6136) 2020-05-04 18:52:35 +00:00
Alessio Treglia 2414e5bdd4
x/auth: turn sign --validate-sigantures into a standalone command (#6108)
--validate-signatures should not be a flag of the sign command
as the operation performed (transaction signatures verification)
is logically distinct.

cli_test is and has always been an horrible name for package
directory as it's very much Go anti-idiomatic - _test is the
suffix used by test packages, not directories. Plus, CLI test
cases can and should live alongside other testcases that don't
require binaries to be built beforehand. Thus:

x/module/client/cli_test/*.go -> x/module/client/cli/

Test files that require sim{cli,d} shall be tagged with // +build cli_test

With regard to cli test auxiliary functions, they should live in:

x/module/client/testutil/

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-04 13:55:16 +00:00
Federico Kunze 930802e7a1
x/capability: simulations (#6062)
* x/capability: simulations

* update logs

* validate genesis state

* InitGenesis and ExportGenesis functions

* update validation func

* fix import-export sim

* remove nondeterminism from capability genesis

* Update x/capability/types/genesis.go

* Update x/capability/types/genesis.go

* fix tests

* fix merge

* consistency updates

* try fix nondeterminism

* fix conditional

* Fix random index logic

* lint

* lint

Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-30 15:07:43 +00:00
Aaron Craelius cc90f2e002
Merge pull request #6085: Move codec/std to std 2020-04-27 15:40:50 -04:00
Jack Zampolin 4f52797931
Update DefaultHistoricalEntries to 100 (#6059)
* Update DefaultHistoricalEntries to 1000

* hist entries sims and comment on simapp

* changelog and godoc

* update sim param change

* update default to 100

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-23 15:06:30 +00:00
Federico Kunze 8c736bb72f
x/evidence: StoreDecoder simulation (#6035)
* x/evidence: simulations

* update app

* evidence store decoder

* add evidence to sim import export

* fix test

* prevent zero values on randomized genesis

* return empty evidences for genesis state

* address comments from review
2020-04-23 14:51:03 +00:00
Jonathan Gimeno 550c3e9ef0
Jonathan/5988 sim params consensus 2 (#6051)
* temporal commit

* add random consensus params

* make format

* make random pass

* remove comment

* revert change

* update ub key types

* extract Evidence params from state

* extract the random parameters from state

* clean the code

* update imports!

* mispelled back

* mispelled back

* add misspelled command

* update changelog

* remove useless linter to avoid misspell

* remove function

* use tendermint constants

* update import test

* remove debug comment

* Update baseapp/baseapp.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 18:24:13 +00:00
Aditya 5e40869705
x/capability: start global capability index at 1 (#6047)
* start index at 1

* Update x/capability/keeper/keeper.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-21 21:04:11 -04: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
SaReN 50f81b173b
Add simd and simcli commands (#5998)
Reference: #5951
2020-04-20 15:17:21 +02:00
Federico Kunze 397ffbe119
x/ibc: update ICS09 Loopback Client (#6018)
* x/ibc: update ICS09 Loopback Client

* ibc/09-localhost: client state errors

* ibc/09-localhost: add messages for create client

* x/ibc: BeginBlocker for localhost client

* test fixes

* update client REST

* add tests
2020-04-17 22:36:12 -04:00