Commit Graph

2803 Commits

Author SHA1 Message Date
colin axnér 4d9c32f44f
Remove UNINITIALIZED usage from connection and channel (#7297)
* remove UNINITALIZED connection state

* remove uninit channel state

* add back uninitalized def in proto file

* fix typo

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-14 21:41:23 +00:00
colin axnér 813be217e3
Remove GetHeight from ConsensusState (#7274)
* remove height from tm consensus state

* various updates to removing dep on GetHeight

* inital addition of wrapper around consensus state with height

* fix tests

* remove GetHeight interface func

* wip test

* add test

* apply @AdityaSripal comments

* apply @fedekunze suggestions

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-09-14 18:16:42 +00:00
Alessio Treglia 46a8e94740
run make format && go mod tidy (#7298) 2020-09-14 12:42:09 +01:00
Alessio Treglia c26ef79ed0
move client/testutil -> x/auth/testutil (#7292)
We should never break the
top-level-packages-do-not-depend-on-x-packages rule.
2020-09-14 03:21:29 +01:00
Anil Kumar Kammari cfb5fc03e5
Merge PR #7094: Add x/auth cli tests 2020-09-13 09:52:09 -04:00
Murthy Vitwit 1c3172576c
Add staking CLI tests (#7111)
* add cli test to GetQueryCmdValidator, Pool and Params methods

* modify TestGetQueryCmdValidator testcase

* add test script for GetQueryCmdValidators method

* added tests for x/staking delegation commands

* fix tests

* added tests for queries

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-11 22:39:53 +00:00
SaReN b2348180b8
Migrate {x/auth, x/gov, x/staking} missing CLI queries to proto (#6994)
* Fix error code

* Fix decoder

* Fix typo

* Fix decode

* refactor

* Migrate SearchTxsResult to proto

* fix MarkEventsToIndex

* lint++

* Fix output

* Add QueryTxCmd cli test

* Add fmt

* Put txBuilder in types/tx

* Add GetAnyTx in TxBuilder

* Add new IsAnyTx

* Rename to IntoAny

* Fix bug

* fmt

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

* Fix ibc CLI to use proto

* Fix any MarshalJSON

* Fix test

* Make tx.Tx implement sdk.Tx

* Register sdk.Tx

* Fix lint

* Allow DefaultJSONTxEncoder to take tx.Tx

* refactor

* Rename variable

* remove fmt

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Marie <marie.gauthier63@gmail.com>
2020-09-10 18:26:47 +00:00
colin axnér d84296a5fc
add zero height (#7270)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-09 15:25:49 +00:00
colin axnér ec74416276
x/ibc: move solo machine sequence to client state (#7271)
* update proto

* move solo machine sequence to client state

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-09-09 12:14:11 -03:00
colin axnér b4f146b62d
Add standard acknowledgement to channels and apply usage in ibc transfer (#7263)
* gen ack proto type

* remove transfer ack

* change ics20 ack to use standard type

* update commented tests

* small typo fix

* revert back to module cdc

* update docs

* fix lint

* nit

* update ack event emission

* Update x/ibc-transfer/spec/01_concepts.md

* add comment for onacknowledgement

* Update proto/ibc/channel/channel.proto

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-09-09 10:01:28 +00:00
Robert Zaremba 1755bf3b46
FromABCIEvidence function parameter rename (#7269) 2020-09-09 09:32:58 +00:00
Robert Zaremba 9856327d95
Merge PR #7251: Cleanup of evidence types 2020-09-08 09:33:53 -07:00
Alexander Bezobchuk 325be6ff21
Merge PR #7209: Create Vesting Account Message 2020-09-08 09:09:50 -07:00
dauTT fcf5186717
Enforce ICS 20 (transfer) to only use UNORDERED channels (#6992)
* Enforce ICS 20 (transfer) to only use UNORDERED channels

* Cosmetic changes

* Fix tests

* revert and fix test issue

* add tests

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: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-08 14:04:54 +00:00
dauTT d61fa43108
x/ibc: mock own privValidator rather than relying on the one from tendermint (#7241)
* 1) Create PrivValidator mock in x/ibc/testing/mock/privval.go
2) Adjust tests accordingly

* Add tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-07 21:44:23 +00:00
Jack Zampolin 2539f6e488
Ensure unpacking of connection interfaces in msgs (#7252) 2020-09-07 17:08:11 +00:00
colin axnér 221a28f876
Abstract Tendermint ABCI proof queries for IBC into a single function (#7250)
* add single query function

* fix lint
2020-09-07 15:39:46 +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
Anil Kumar Kammari ebfb616d88
Migrate missing `x/distribution` CLI queries to proto (#7244)
* migrate CommunityPoolSpendProposalJSON to proto

* migrate NewWithdrawAllRewardsCmd to proto

* fix ineffectual issue

* refactor

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-07 13:14:00 +00:00
Federico Kunze 2f25c9a0d8
x/ibc: solo machine signature format (#7237)
* x/ibc: solo machine signature format

* update tests and verification

* diversifier updates

* update tests

* fix lint

* Update x/ibc/light-clients/solomachine/types/header_test.go

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

* Apply suggestions from code review

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

* update test

* misbehaviour sign bytes

* consensus state tests

* fix tests

* more fixes

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-09-07 12:46:48 +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 bae1399ebc
Add `SkipSequenceCheck` flag in SignatureV2 for Amino signatures (#7234)
* Add SkipSequenceCheck

* Fix test

* Fix test

* Add explicit amino test

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-09-04 17:49:07 +00:00
MD Aleem 18ac096a54
Register `x/mint` gRPC gateway routes (#7214)
* Add grpc-gateway mint module test script

* Add grpc-gateway mint module test script

* Add grpc inflation test-case

* Fix `x/mint` grpc test-case

* review changes

Co-authored-by: aleem1314 <aleem.rgukt123@gmail.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-09-04 16:48:46 +00:00
atheeshp c1b975eecb
Register grpc routes for x/{slashing, params} (#7223)
* Register grpc routes for x/{slashing, params}

* added todos

* review changes

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-04 15:07:02 +00:00
atheeshp e9a0e82895
Adds grpc tests for x/staking (#7204)
* added staking grpc tests

* updated tests

* added todos

* lint

* lint

* review changes

* review chnages

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-04 11:59:02 +00:00
Aditya 12d95de096
7211 followup (#7235)
* address chris comment and cleanup

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-04 09:22:08 +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
Aditya 4f9e31ea21
x/ibc: implement Height interface (#7211)
* change interfaces

* fix tendermint client interfaces

* fix other clients interfaces

* fix queries

* fix tendermint build

* fix builds of clients

* fix 02-build

* start fixing connection and make queries non-nullable

* fix connection keepers and queries

* fix connection build

* fix channel build

* fix all non-test files

* fix testing build

* cleanup

* lint

* fix timeout height interface

* fix tendermint tests

* fix rest of clients

* fix connection tests

* fix client tests

* fix channel tests

* fix all ibc tests

* fix transfer tests:

* docs

* fix connection query

* Apply suggestions from code review

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

* wrap-up review

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-03 16:23:20 -04: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
Aaron Craelius 9e85e81e0e
Remove GetSignatures from SigVerifiableTx (#6550)
* Remove GetSignatures from SigVerifiableTx

* Fix conflicts

* update client tests

* fix x/auth tests

* add MultiSignatureData test case for ConsumeTxSizeGasDecorator test

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-02 20:41:13 +00:00
Anil Kumar Kammari da7a8e603f
Fix query validator UBDs (#7228)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-02 16:47:29 +00:00
colin axnér 979e8144fb
move IBC exported files to one location to avoid circular deps (#7224)
* move exported files to one location to avoid circular deps

* gofmt

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-02 16:38:50 +00:00
Calvin Lau 4b2024cf30
Fix vesting link in auth module (#7227) 2020-09-02 18:18:29 +02:00
Jack Zampolin 7d64086d33
Ensure IBC Proto Registration (#7210)
* init commit

* Add simulation request

* Push progress

* ensure exported interfaces and their concrete implementations are registered in ibc modules

* revert CalculateGas changes

* Fix simulation response unmarshal

* ensure exported interfaces and their concrete implementations are registered in ibc modules

* Passing tests

* Fix lint issues

* Update client/tx/tx.go

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-01 20:59:48 +00:00
Federico Kunze b52131d60c
ibc: remove GetChainID (#7219)
* ibc: remove GetChainID

* update

* test

* Update x/ibc/09-localhost/types/client_state.go

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-09-01 17:57:19 +00:00
colin axnér d7175e12c2
remove old client messages (#7218) 2020-09-01 12:38:40 -04:00
colin axnér 5560a12416
Fix 02-client message marshal and unmarshal issues (#7217)
* add test for encoding issue

* add unpackinterfaces for msg create client

* add unpackinterface and tests for update client and misbehaviour
2020-09-01 09:43:14 -04:00
Federico Kunze 0fffaf589b
ibc: modular client messages (#7160)
* ibc: modular client messages

* more updates

* remove client messages

* fixes

* fix tests

* lint

* Apply suggestions from code review

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

* codec.go tests

* cleanup exported

* MsgCreateClient test

* msg tests

* Apply suggestions from code review

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

* fix tests

* proto files update

* errors

* address comments

* spec changes

* add sanity check test cases

* add additional sanity check

* fix expPass

* fix build and remove unnecessary test since validatebasic is checked in the msg

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Aditya Sripal <adityasripal@gmail.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
2020-09-01 10:40:31 +00:00
Aditya 1c9158b746
quick fix (#7212) 2020-09-01 08:00:36 +00:00
Aditya d208d2bed8
Make clients use proto Height (#7184)
* start using Height in TM client

* fix client tests

* fix client tests

* fix connection tests

* fix rest of tests

* Apply suggestions from code review

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

* fix simple issues

* add and use LTE and GTE methods

* remove TM-specific height semantics from 02-client

* fix lint and build

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-31 17:57:08 +00:00
colin axnér fc75d14c88
Rename PacketExecuted to ReceiveExecuted (#7206)
* update ibc-transfer

* rename PacketExecuted -> ReceiveExecuted
2020-08-31 15:36:01 +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
atheeshp d02cd16219
Add swagger for gRPC REST (#7075)
* swagger gen command added

* proto file changed

* Add filter for swagger files

* Remove loop

* Add go-swagger installation

* Add swagger mixer command

* add swagger options

* remove files

* Fix swagger-combine

* Fix description

* remove unnecessary config option

* remove go-swagger dependency

* refactor

* Add proto-gen-swagger installation tool

* fix tool

* refactor

* don't push individual swagger files to repo

* refactor

* Fix doc

* move proto-swagger-gen to a separate target

* Fix permissions

* Add ibc swagger gen

* Update swagger generation doc

* cleanup

* gofmt

* refactor

* update Makefile

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-28 18:49:08 +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
Aditya 41bc9fb8e6
Fix setting NextSequenceAck (#7181)
* Fix setting NextSequenceAck

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

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: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-27 19:01:12 +00:00
Aditya 9fc0dbbe05
Rename Evidence to Misbehaviour in IBC (#7151)
* rename Evidence to Misbehaviour in IBC code

* tidy go.sum

* remove more references to evidence

* Apply suggestions from code review

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

* Update x/ibc/07-tendermint/client/cli/tx.go

* nit and doc

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-26 17:51:13 +00:00
colin axnér e09c8d9360
Fix AcknowledgePacket and AcknowledgementExecuted bug + update testing pkg (#7170)
* upstream cosm wasm testing pkg fixes

* fix bug, tests and undo rand addition

* fix lint

* go mod tidy
2020-08-26 12:11:31 +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
Anil Kumar Kammari b5bc864862
Fix `status` filter (#7167)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-26 07:42:25 +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
colin axnér 1f7a2787aa
Final IBC migration and Amino removal (#7157)
* migrate tm messages and change header/evidence to pointers

* remove amino

* add nil checks and test for pointer changes

* fix format
2020-08-25 10:17:38 -04:00
colin axnér d52c17bb74
migrate tm evidence to proto (#7145)
* migrate tm evidence to proto

* Update proto/ibc/tendermint/tendermint.proto

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-24 21:12:47 +00:00
colin axnér 49e4d059ae
Allow localhost to be created (#7148)
* revert localhost not being created

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-24 18:37:11 +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
colin axnér 46927c31cf
implement solo machine client (#6267)
* pause work until client refactor resolved

* continued scaffolding

* add msgs and evidence

* add update and misbehaviour functionality

* implement cli

* various types compile issues

* add sig proof and various bug fixes

* added rest routes

* verification funcs now update sequence number

* add sm suite and header test

* msgcreateclient and msgupdateclient tests

* add basic evidence test

* evidence validate basic test

* consensus state tests

* rm accidental file

* add verify con state and channel state, pause work for counterparty commitment type

* client state tests added

* update clienttype numbers

* update test added

* add misbehaviour tests

* update alias

* update cli tx

* update import alias

* cleanup code

* remove todo, tested by evidence tests

* add info to err msg

* wrapf

* Update x/ibc/06-solomachine/client/cli/tx.go

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

* Update x/ibc/06-solomachine/client/cli/tx.go

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

* Update x/ibc/06-solomachine/client/cli/tx.go

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

* Update x/ibc/06-solomachine/client/cli/tx.go

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

* Update x/ibc/06-solomachine/update.go

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

* Update x/ibc/23-commitment/types/signature.go

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

* Update x/ibc/06-solomachine/types/header.go

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

* apply most of the review suggestions from @fedekunze

* remove alias.go

* update cli context with master changes

* merge selective downstream changes from colin/solomachine

* fix build issues

* remove signature proof

* try to migrate to proto

* rm go structs for consensus state and header

* address @fedekunze review and continue proto migration

* fix proto issues

* fix compile bugs in types, proto panics on getpubkey currently

* add timestamp

* update pubkey to be type sdkcrypto.PublicKey

* update timestamp handling

* begin removing amino, migrate to proto

* fix various build issues

* fix most test in types

* change sanitize to produce, fix bug, types test passing

* begin updating cli

* move solomachine into light-clients/

* fix merge issue

* update proto and fix cli

* more fixes and update proto again

* update pubkey to be any

* fix string func issue

* update tests to use testing pkg

* update from tm crypto keys ref to sdk

* fix tests 🎉

* increase codecov

* address TODOs

* address most of @fedekunze comments

* add test case for misbehaviour frozen client

* fix lint

* fix proto lint?

* rename Signature to TimestampedSignature

* remove chainID

* rename FrozenHeight to FrozenSequence

* apply verify consensus state changes requested by @AdityaSripal

* remove dup check

* fix typo in proto file comment

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-08-24 10:06:48 +00:00
Aditya 6798b66785
improve coverage (#7136) 2020-08-22 08:24:36 +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
Alexander Bezobchuk 22e874a4d9
update text (#7130) 2020-08-21 13:17:49 +00:00
Federico Kunze 0234ad324e
ibc-transfer: sims updates (#7123)
* ibc-transfer: sims updates

* params and genesis

* sim tests

* update module.go

* remove dontcover

* Update x/ibc-transfer/simulation/decoder.go

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

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-21 04:52:46 -04: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
colin axnér be0cc63808
Migrate IBC tendermint header to proto (#7120)
* gen header proto file

* fix tm type to proto conversion issues

* fix tendermint type tests

* fix remaining tests

* fix lint

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

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

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

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

* apply @fedekunze review suggestions

* fix build

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-20 11:46:11 -04:00
Federico Kunze 3368dae5f5
x/ibc: final gRPC migration (#7077)
* x/ibc: final gRPC migration

* grpc test

* query client consensus states

* remove dup type

* query constructors

* CLI queries

* missing cmd

* latest consensus state

* parser test

* register query service

* Update x/ibc/02-client/client/cli/query.go

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

* Update x/ibc/module.go

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

* few grpc tests

* fix tests

* final gRPC tests

* rm comment

* address @colin-axner comment

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-20 10:23:19 -04:00
Federico Kunze 16435a0f4d
ibc: TimeoutOnClose support (#7066)
* ibc: TimeoutOnClose support

* revert added callback

* update proto

* update spec and add msg test

* update handler and add test

* apply self-review changes

* apply @fedekunze review suggestion

Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-20 07:19:57 -04:00
Jonathan Gimeno bf0142b272
Merge cosmosd (#6820)
Closes: #6521

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-08-19 16:58:43 +01:00
Aditya 8f51c150de
#7028 followup (#7104)
* use cleaner helper function

* fix error strings

* lint

* typos

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-19 14:39:17 +00:00
Cory f02b0b5745
Protobuf audit: base package, module packages, tx/Msg's (#7059)
* proto audits auth, bank, crisis, distribution

* audit module proto files

* audit base proto package

* make protogen

* golint

* fix gov genesis test

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

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

* update coin metadata protos & documentation

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-08-19 07:36:41 +00:00
Aaron Craelius 94b3cc50b4
Add RejectExtensionOptionsDecorator (#6988)
* Add RejectExtensionOptionsDecorator

* Fix error code

* Fix lint

* Add ExtensionOptionsTxBuilder

* Add tests

* Add tests

* Update tests

* Docs

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-18 13:44:56 +00:00
Federico Kunze 740a4c50c7
ibc: remove legacy REST endpoint support (#7083) 2020-08-18 08:39:40 -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
Simon Warta 574c7d2d7f
Merge PR #7053: Add address length validation to MsgSend and MsgMultiSend 2020-08-17 10:07:27 -04:00
Alexander Bezobchuk 7d2062b674
x/bank: gRPC Params Route (#7070)
* update x/bank proto gRPC query service

* fix path

* update keeper

* add godoc

* add test

* lint++
2020-08-17 13:55:04 +00:00
SaReN 77124da21a
Add cli test for query Account (#6973)
Closes: #7007

Ref: #6571

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-08-17 13:47:31 +01:00
Federico Kunze 23cabc0786
ibc-transfer: split params (#7068) 2020-08-17 08:16:24 -04:00
Neeraj Murarka 2079576cbe
Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references (#7056)
* Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references

* Ran make format target

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-17 09:04:50 +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
Federico Kunze 3022fe9044
x/ibc-transfer: ADR001 source tracing implementation (#6871)
* x/ibc-transfer: ADR001 source tracing implementation

* gRPC proto file

* validation

* fix validation

* import export genesis

* relay.go updates

* gRPC service methods

* client CLI

* update implementation

* build

* trace test

* fix CLI tx args

* genesis import/export tests

* update comments

* update proto files

* GRPC tests

* remove field from packet

* fix coin validation bug

* more validations

* update comments

* minor refactor

* update relay.go

* try fix test

* minor updates

* fix tests

* fix test

* ADR updates and comments

* build

* Apply suggestions from code review

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

* address a few comments from review

* gRPC annotations

* update proto files

* Apply suggestions from code review

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

* address comments

* docs and changelog

* sort traces

* final changes to ADR

* client support for full path denom prefixes

* address @AdityaSripal comments

* address TODO

* increase test timeouts

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-08-14 17:46:26 -04: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
atheeshp f87624e9de
Add Grpc gateway annotations (#6918)
* grpc for bank module

* edit module.go

* added annotations for x/auth query proto

* generated gw file

* added grpc gateway for x/staking query proto

* added annotations for evidence

* added annotations for gov query proto

* added annotations

* added annotations for slashing module

* updated annotations

* added annotations for staking module

* added annotations for upgrade query

* annotations added for x/ibc/channel query proto

* added annotations for ibc/connection query proto

* updated annotations

* updated annotations

* annotation changes

* ommitted ibc module

* updated go.mod

* fixed lint issue

* review changes

* review changes

* review changes

* review changes

* go sum changes

* updated annotations

* annotation changes

* Fix proto lint issues

* review changes

* review changes

* review changes

* discussion changes

* review changes

* grpc for bank module

* edit module.go

* added annotations for x/auth query proto

* generated gw file

* added grpc gateway for x/staking query proto

* added annotations for evidence

* added annotations for gov query proto

* added annotations

* added annotations for slashing module

* updated annotations

* added annotations for staking module

* added annotations for upgrade query

* annotations added for x/ibc/channel query proto

* added annotations for ibc/connection query proto

* updated annotations

* updated annotations

* annotation changes

* ommitted ibc module

* updated go.mod

* fixed lint issue

* review changes

* review changes

* review changes

* review changes

* go sum changes

* updated annotations

* annotation changes

* Fix proto lint issues

* review changes

* review changes

* review changes

* discussion changes

* review changes

* fixed conflicts

* review changes

* updated gw files

* lint

* lint

* lint

* added missing annotations

* review changes

* review changes

* review changes

* review changes

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-08-14 10:05:35 +00:00
Federico Kunze 1b08e1032c
types: update coin regex (#7027)
* types: update coin regex

* more tests

* fix test case

* increase coverage

* changelog

* fix tests

* support unicode letters and numbers

* remove ToUpper

* Update types/coin.go

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

* Validate function

* fix ICS20 test

* table tests and revert unicodes

* add test case

* add test cases and comment

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-08-14 09:09:53 +00:00
Amaury Martiny 5559af8b97
Proto Auditing: Replace ID with Id (#7032)
* Proto Auditing: Replace ID with Id

* make proto-gen

* Update docs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-14 08:55:54 +00: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
Jonathan Gimeno 4c762db64e
upgrade proposal needs tx flags. (#6981)
* upgrade proposal needs tx flags

* use AddTxFlagToCmd to every proposal command

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-13 15:46:12 +00: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
Amaury Martiny 134e1dcecd
Protobuf Audit: Genesis states (#6978)
* Remove some casttypes

* Add more comments

* Finish remaining modules

* Fix lint

* Revert customname

* Revert evidence

* Review nits

* Consistent doc for genesis state

* Make proto-gen

* Update docs for capability

* Remove useless customtype

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

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

* Add godoc

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

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Marie <marie.gauthier63@gmail.com>
2020-08-12 15:48:22 +00:00
Alexander Bezobchuk dda9bd8333
Fix mint metric (#7024)
* remove metric

* only emit when valid int64

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-12 15:10:53 +00:00
colin axnér 3a4e608930
Add clientState and consensusState gRPC support to connection (#7017)
* add proto querys for connection

* add client state and consensus state grpc for connection

* update client utils
2020-08-12 08:54:38 -04:00
colin axnér d752a7b21f
ConsensusState is retrieved by light clients in verifyXYZ as necessary (#7005)
* move con state retrieval to verify funcs

* refactor tm client state tests

* fix build

* Apply suggestions from code review

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

* apply @fedekunze review comments

* apply @AdityaSripal review comment

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aditya <adityasripal@gmail.com>
2020-08-12 05:20:29 -04:00
Aditya 7ea6467678
Misbehaviour Followup (#6989)
* cherry-pick first commit and fix conflicts

* fix final issues in client_test

* Apply suggestions from code review

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

* fix rest of comments

* add validatebasic check and fix tests

* fix godoc

* Update x/ibc/07-tendermint/misbehaviour.go

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

* address final nits

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-08-11 16:38:17 +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
colin axnér 1744194e71
x/ibc: migrate rest of 04-channel to gRPC (#6964)
* migrate channel querier to grpc

* fix various issues in channel grpc migration

* remove querier and add tests

* fix lint

* update utils based on self review

* Update x/ibc/24-host/keys.go

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

* apply @fedekunze review suggestions

* fix build

* fix build

* run make proto gen again

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 08:29:29 -04:00
Cory 61a97ef347
Audit / Refactor proto packages layout (#6905)
* create base proto package, move ValAddresses to staking

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

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

* add comments to TxResponse

* refactor RegisterInterface calls to new proto package names

* fix bug in merge commit

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

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

* rm old generated pb.go files

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

* mark genutil proto package as beta

* Fix conflicts

* Restructure proto files

* Re put signing

* Fix test

* Update slashing genesis

* Ignore confio proto files

* Fix interface register

* Make proto-gen

* Fix lint

* Put tx service into tx.v1beta1

* Use v1beta1 in interface registry

* Remove to cosmos.base.store

* Remove extra confio in buf

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 11:49:45 +00:00
Alexander Bezobchuk 0f44d1af23
store: Remove Amino (#6984)
* Update kv pair to proto

* updates

* fix LastCommitID

* lint++

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-11 10:09:16 +00:00
Alessio Treglia 99f8b54cfd
fix 0.3{8,9} migrations and migration test case (#7002)
These fixes were applied to Launchopad 0.39.1 RC and
never ported to master.
2020-08-11 05:51:47 -04:00
Aaron Craelius 0faf545221
Add simulation gRPC service definition (#6872)
* WIP on TxService

* WIP on TxService

* Update docs

* WIP on simulation service

* WIP on simulate service

* Simplify interface

* Simplify interface

* proto-gen

* Update docs

* Update docs

* Simplify

* proto-gen

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 07:33:35 +00:00
Aaron Craelius 7de8ef75b3
Require proto.Message in client.Context.PrintOutput (#6999)
* Enable proto JSON json for cli tx & query

* WIP on tests

* Test fixes, cleanup

* Cleanup

* Address review comments

* Update client/context.go

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

* Fixes

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-08-11 03:19:49 -04: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
Amaury Martiny 6e3c268a72
Protobuf audit: Queries (#6967)
* Add required fields for queries, p1

* Add comments

* Remove required

* More modules

* 2 to go

* Finish all modules

* Fix typo

* Fix test

* Make proto-gen

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-10 08:12:59 +00:00
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
colin axnér 6ebc476474
don't create localhost (#6974) 2020-08-07 12:42:12 +00:00
atheeshp 3322e269a1
Add pagination response for commands (#6825)
* migrated auth cli to use grpc query client

* unpacker added for account command

* fxed tests

* added grpc register in module.go

* fixed grpc failing issue

* page resonse added for console

* added reference

* paginations res added for commands

* Fix auth cli tests

Co-authored-by: SaReN <sahithnarahari@gmail.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 10:20: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
colin axnér 0e4d67601f
Migrate Consensus State to being proto encoded/decoded in 02-client (#6960)
* flip switch to proto on consensus state in 02-client

* change consensus state to pointer

* fix bug

* remove amino from connection

* some test cleanup
2020-08-06 07:06:14 -04:00
colin axnér 3076a8b12e
Migrate tendermint consensus state to proto (#6957)
* migrate tm consensus state to proto

* update con state

* register con state

* add confio to proto lint exclude

* Update proto/ibc/tendermint/tendermint.proto

* casttype to hexbytes

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-06 05:21:56 -04:00
SaReN ba140c90f5
Fix x/bank genesis non-determinism (#6940)
* Sort coins in x/bank genesis

* Sort address before looping

* GetAccountsBalances

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-06 09:10:07 +00:00
Aditya e3391ff447
Remove ValidatorSet from ConsensusState (#6942)
* fix stash merge

* fix build errors

* fix tendermint types test

* fix tendermint tests

* fix client tests

* fix rest of ibc tests

* include TrustedHeight in Header

* fix all tests

* fix all tests

* remove validatorshash from consensus state

* lint

* add evidence checks

* 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>

* refix build

* remove redundant hashing in tests

* complete rest of minor review requests

* make format

* suite.valsetHash

* fix test

* Update x/ibc/07-tendermint/misbehaviour.go

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

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: Federico Kunze <federico.kunze94@gmail.com>
2020-08-06 08:32:19 +00:00
SaReN 4835cdc178
Remove TxBuilder and usages (#6941) 2020-08-05 18:28:33 +00:00
SaReN 95cf3c95a6
Remove old tx code from rest (#6939)
* Cleanup rest txs

* Remove nolint

* Update x/ibc to use WriteGeneratedTxResponse

* Update marshaler usages

* Fix PostProcessResponse test

* Update PostProcessResponse
2020-08-05 18:08:13 +00:00
colin axnér 1a531cb645
x/ibc: migrate 02-client to use proto encoded/decoded client states (#6948)
* begin migration

* make client state a pointer

* fix build

* fixes from self review and rename cdctypes -> codectypes

* add godoc
2020-08-05 11:14:24 -04:00
Alexander Bezobchuk 801b64868d
Merge PR #6935: Fix Testnet Command 2020-08-04 12:51:27 -04:00
colin axnér 79cee06967
Migrate Tendermint client state to proto (#6932)
* add tm client state proto file

* migrate tm client state to proto

* bump ics23 dep

* add issue link to makefile
2020-08-04 16:31:50 +00:00
atheeshp 662aa7fa01
Slashing genesis types proto migration (#6881)
* slashing genesis types migrated to proto

* review changes

* fixed lint

* review change

* review change

* review changes

* Update proto messgaes

* Add test for ExportGenesis

* Address naming suggestions

* Update genesis

* Fix genesis test

* Add GetMissedBlocks

* Update genesis test

* Address review suggestions

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-08-04 12:58:36 +00:00
colin axnér cb5c93213c
remove GetCommitmentType and register commitment interfaces (#6927)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-04 09:12:52 +00: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
Jonathan Gimeno 0daf3c3271
Fix problem with Gen TX (#6924)
Closes: #6908
2020-08-04 08:41:58 +02: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
colin axnér 57cd7d62b3
migrate localhost client state to proto (#6925)
* migrate localhost to proto

* localhost returns err on verify consensus state

* fix lint
2020-08-03 09:45:15 -04:00
colin axnér 00961f2082
x/ibc: remove parts of amino (#6819)
* remove amino from channel types

* fix unmarshal error

* fix msgs_test

* update msgs test with underscore json encoding

* remove amino from connections

* purge amino from ibc-transfer

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-03 08:08:41 -04:00
dauTT 4c4538947f
Allow empty version strings (#6909)
* Allow empty version strings (left over from PR #6904)

* Update spec

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-08-03 03:50:40 -04:00
Emmanuel T Odeke 10d330e5b1
x/params/types: make KeyTable.RegisterType fully dereference pointers (#6915)
Use a for loop to correctly and fully dereference and
extract the type for the type of ParamSetPair.Value.

Fixes #6785

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-02 20:18:28 +00:00
colin axner b3bbca343f
fix ibc-transfer source bug (#6865)
* update proto and refactor types test

* cleanup SendTransfer

* fix build and prep to update handler tests

* fix handler tests

* fix tests

* update spec

* fix lint

* Apply suggestions from code review

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

* rename amount to token

* merge send transfer and createOutgoingPacket

* apply rest of @fedekunze review suggestions

* apply review suggestions from @AdityaSripal

* update spec to token renaming

* split token in denom and amount when creating fungible token packet

* remove source flag, add prefix on recv

* fix lint

* fix proto numbers

* Update x/ibc-transfer/keeper/relay.go

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>

* apply @cwgoes review suggestions

* Apply suggestions from code review

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

* apply @fedekunze suggestions

* Apply suggestions from code review

* fix lint

* apply @AdityaSripal review requests

* Update x/ibc-transfer/types/coin.go

* apply @AdityaSpripal last suggestions

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-08-01 09:16:22 +00:00
dauTT 8e67a5d23b
Allow empty version strings (#6904)
* Allow empty version strings

* Restore empty version.Identifier check

* Fix test

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-31 18:18:05 +00:00
Alexander Bezobchuk 9a3fd7cac5
Refactor x/staking Unbonding Validator Queue (#6844)
* init commit

* revise GetValidatorQueueKey

* add order test

* update UnbondAllMatureValidators

* update APIs

* fix build

* cl++
2020-07-31 12:55:32 -04:00
Federico Kunze 25c539aade
x/ibc: fix log (#6903)
* x/ibc: fix log

* Update x/ibc/05-port/keeper/keeper.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-30 21:00:58 +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
Alexander Bezobchuk 9ccec075e2
cli: refactor flag reading (#6884)
* cli: refactor ReadPersistentCommandFlags

* updates

* fix tetts

* cover all cases

* fix tests

* fix tests

* fix tests

* fix tests

* godoc++

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-07-30 16:44:22 +00:00
SaReN e15d0322dc
Migrate remaining x/auth tx tests to proto (#6898)
* Fix ReadTx

* Migrate batch scanner tests

* add TODO

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>
2020-07-30 15:36:36 +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 c7ad21d162
REST tx endpoint backwards compatibility (#6801)
* update rest endpoints

* Add conversion logic for auth encode/decode/broadcast

* Cleanup

* Add tx conversion to legacy REST tx endpoints.

* Cleanup

* Add tests

* Add tests for ConvertAndEncodeStdTx

* Fix for StdSignature

* Test coverage improvements

* Add integration test for REST broadcast

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-07-30 10:45:18 -04:00
Amaury Martiny 8283165600
Revert `SetSignerInfo` (#6894)
* Fix TestCLIMultisign tests

* Fix lint

Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-07-30 13:22:31 +00:00
colin axner fe6a341b4e
fix nil check bug (#6895) 2020-07-30 08:25:03 -04:00
Aaron Craelius ef6dc2f180
Revert change of StdSignature PubKey to []byte (#6885)
* Revert change of StdSignature.PubKey to []byte

* Fixes
2020-07-30 09:29:43 +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 2da954ff61
x/evidence genesis protobuf migration (#6864)
* Migrate evidence genesis state to proto

* Fix lint error

* Remove commented code

* Clean up

* Add UnpackInterfaces to evidence GenesisState

* Add cosmos_proto.accepts_interface to evidence any and fix lint error

* Add test for x/evidence ExportGenesis and use table tests

* Update x/evidence/types/genesis.go

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

* Update proto/cosmos/evidence/evidence.proto

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

* Keep []Evidence as return type in GenEvidences

* Add GenesisState Validate tests

* Add test case for NewGenesisState

* Add tests for GenesisState UnpackInterfaces

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-29 18:22:51 +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
Aaron Craelius 9592f34cde
Fully remove StdTx usage in ante handler tests (#6845)
* WIP on removing StdTx from ante handler tests

* Fix recheck

* Fix basic_test

* Don't use StdTx in ante_test

* Use TxConfig sign mode handler in anteHandler

* Fix TestAnteHandlerAccountNumbers

* Amino don't panic

* Fix more tests

* All proto ante tests pass

* Fix last tests

* Amino register concrete

* Add tests

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-07-29 15:52:22 +00:00
Emmanuel T Odeke b0c73ae994
codec: implement protobuf unknown fields checker (#6557) 2020-07-29 11:31:23 -04:00
atheeshp a4d1f306c0
x/{capability, genutil} genesis types migrated to proto (#6867)
* x/capability genesis types migrated to proto

* added docs

* x/genutil: genesis proto migration

* fixed package issue

* review changes

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-29 15:01:20 +00:00
Aditya c7dab51192
remove ack length limit (#6874)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-29 10:46:44 +00:00
SaReN 804b80a82c
Migrate gov, ibc-transfer genesis state to proto (#6866)
* Migrate gov genesis state

* Migrate ibc-transfer genesis state

* format genesis proto
2020-07-28 19:57:09 +00:00
Alexander Bezobchuk 72f6bf0893
Fix 0.39 x/auth Migration Types (#6870)
* types: add coins to JSON

* add migrate test

* finish test

* Add panic

* fix test
2020-07-28 19:18:07 +00:00
Alexander Bezobchuk 3ff3e58240
Launchpad Migration (#6829)
* fix migration

* add 039 pkg

* lint

* Fix pkg name

* add v0.39 auth types

* remove file

* updates

* updates

* update godoc

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-28 15:28:23 +00:00
SaReN 919e906866
Minor Code Cleanup - gRPC queries (#6862)
* add missing RegisterQueryService

* Update generated proto files

* Update grpc tests for auth,bank

* Make format

* fix godoc

* Address suggestions

* Update godoc
2020-07-28 12:53:35 +00:00
atheeshp b33b1e9052
x/{distribution, staking, bank, mint, crisis} genesis protobuf migration (#6835)
* distribution genesis types migrated to proto

* removed types from types/genesis.go

* fix lint

* added new line proto

* staking genesis migrated to proto

* fix lint

* x/bank: genesis types migrated to proto

* fix lint

* x/mint: genesis types changed to proto

* x/crisis: genesis types changed to proto

* Migrate genesis state of x/crisis

* add new lines

* whitespace

* Fix bad merge

* added missing field

* fixed error

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
2020-07-28 09:20:17 +00:00
Federico Kunze 2651427ab4
x/ibc-transfer: use ibc testing package (#6641)
* x/ibc-transfer: use ibc testing package

* coin denom failure

* update handler tests

* refactor first test in relay

* update onrecvtest, failing tests expected due to existing bug

* update on acknowledgement test, failing test is expected

* refactor timeout test

* revert coin validation changed, comment out tests

* minor fix

* update coordinator.go

* update coordinator.go

* add comment to fix handler test

* add link to issue in handler test

* fix test

Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-28 08:24:13 +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
Aditya 5676e7293f
Remove ID from ClientState (#6823)
* remove id from clients, build works

* fix client state tests

* fix tests

* address @fedekunze review

* Apply suggestions from code review

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

* lint

* remove commented-out test case

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

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
2020-07-27 18:43:09 +00:00
Aaron Craelius 20488b4f8e
Make all IBC Msg types use pointers (#6857)
* Make IBC Msg types use pointers

* Fix tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-27 16:21:24 +00:00
Aaron Craelius bb8aabd4e1
Migrate pieces of x/genutil missed in #6734 (#6860)
* Migrate pieces of x/genutil missed in 6734

* Fix tests

* Fix lint

* Add test
2020-07-27 15:41:20 +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
SaReN 928f7fccff
Add wrap tx builder to TxConfig (#6836)
* Add wrap tx builder

* Add tests

* update for StdTx

* fix StdTxConfig

* Update generator

* Add godoc

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-24 22:24:57 +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
Anil Kumar Kammari e906c012a0
add page flag for CLI queries (#6824)
* add page flag for CLI queries

* fix review suggestions

* Fix `page` flag default value

* fix offset calc

* Apply suggestions from code review

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

* fix review suggestions

* refactor

* fix returning error

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-24 08:17:11 +00:00
Aaron Craelius 1538e65478
Fix module interface registration (#6834) 2020-07-23 22:45:34 -04:00
Marko e6a56226a8
context: remove verifier & trust node (#6805)
* remove verifier

* more removal of trustnode flag

* add todo

* fix lint

* remove file

* remove viper and add link to issue

* remve mention of trustnode
2020-07-23 06:44:18 +00:00
Alexander Bezobchuk 2224be5c67
Merge PR #6818: x/upgrade: Fix ReadUpgradeInfoFromDisk 2020-07-22 12:22:00 -04:00
Alexander Bezobchuk ab664e9a43
Merge PR #6815: Code & Doc Cleanup 2020-07-22 11:02:36 -04:00
colin axner ef0a7344af
x/ibc: remove ID from ConnectionEnd (#6814)
* remove connection id

* various test and code fixes

* fix tests

* Update proto/ibc/connection/connection.proto

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

* rename utils.go to parse.go in host

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-22 09:59:15 -04:00
colin axner e9627abc54
bump identifier maximum to 64 characters (#6812)
* bump identifier maximum to 64 characters

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-22 10:20:41 +00:00
colin axner 35a59b1573
rename MsgPacket to MsgRecvPacket (#6813) 2020-07-22 10:01:57 +00: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
colin axner 97a83e9c78
Update IBC events docs and code (#6798)
* update msgs type from opaque

* update spec for createclient

* update events spec for handshake cals

* update packet events for spec and code

* add relayer events doc

* update ibc-transfer events

* fix build

* small fix from self review

* update channel msgs types

* acknowledgement_packet -> acknowledge_packet

* Apply suggestions from code review

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

* fix spec issues for ibc and ibc-transfer

* add golang relayer link

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-21 12:56:14 -04:00
atheeshp 9ee14ee985
Add pagination flags to x{ibc, bank} (#6804)
* updated pagination flags

* updated all balances pagination flags

* updated all balances

* some doc updates

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-21 15:36:45 +00:00
Alexander Bezobchuk 61d69a978f
Merge PR #6806: Docs & Cleanup 2020-07-21 11:28:43 -04:00
Amaury Martiny 61d0c4adcd
proto: Consistent naming for Params (#6803)
* Use consistent "Params" in proto

* Update comments

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-21 14:04:51 +00:00
Alexander Bezobchuk 0ccc48d2a3
CLI/Tests: Remove Fixtures (#6799)
* remove fixtures

* setup tests

* update x/mint

* cli: update x/staking commands

* tests: convert x/staking CLI tests

* tests: fix x/auth CLI tests

* cli updates

* fix buiild

* fix build

* Update x/gov/client/cli/cli_test.go

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

* remove GenerateOrBroadcastTx

* move TestCLIQueryConn

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-07-21 13:54:07 +00:00
dauTT efa73c7edb
Merge PR #6800: Cosmetic changes 2020-07-20 16:22:46 -04:00
Amaury Martiny 69bbb8b327
Rename proto Req/Res to Pagination (#6796)
* Rename proto Req to Pagination

* Change Res to Pagination

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-20 16:51:16 +00:00
Alexander Bezobchuk 515b25b94e
Context: Remove Init/New (#6797)
* init commit

* remove new/init functions

* update CLI commands

* tests: fix TestCLIQueryConn

* remove viper
2020-07-20 16:42:46 +00:00
billy rennekamp cde3f46d52
Add validation to prevent empty store keys (#6754)
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 18:05:01 +02: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
dauTT 2247465fa3
x/distribution/simulation/operations.go: add unit tests (#6764)
* x/distribution/simulation/operations.go: add unit tests

* Use NewDecCoins constructor instead of the DecCoins struct

* Refactor code to use a testing suite

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-20 15:05:41 +00: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
colin axner 1d6344888e
Fix query unrelayed packets logic (#6733)
* add some query functions to channel keeper

* update grpc queries and cli cmd and tests

* rerun proto gen after merging master

* fix build broken from merge conflicts

* add test and update proto

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-20 12:42:36 +00:00
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
Finn cc96e5c16f
x/staking: add call to iterator Close method (#6791)
Co-authored-by: FinnZhang <>
2020-07-20 04:30:09 -04:00
dauTT b3838394e7
x/gov/simulation/params.go: add unit tests (#6738)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-19 21:57:14 +00:00
atheeshp 3123d07ad9
Update x/{mint,slashing,evidence} cli to use gRPC query client (#6704)
* changes cli to use gRPC in mint, slashing

* added command for signing infos

* gRPC query client migration of evidence

* review changes

* added unpack any

* fixed build error

* fixed failing tests issue

* added read flags

* added pagination flags

* updated docs

* fixed tests issue

* failing tests

* fixed tests

* review changes

* review changes

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-07-19 06:16:57 -04:00
dauTT 13b5a8d670
Merge PR #6771: x/bank/simulation/operations.go: add unit tests 2020-07-18 19:47:22 -04:00
Alexander Bezobchuk b9f533d51f
Merge PR #6778: fix TestGetCmdQueryCommunityPool 2020-07-18 19:12:51 -04:00
dauTT 5a5a402518
Merge PR #6775: x/auth/simulation/genesis.go: add unit tests 2020-07-18 13:46:56 -04:00
dauTT f59ea26941
Merge PR #6774: x/auth/simulation/params.go: add unit tests 2020-07-18 13:23:37 -04:00
dauTT d5bd38fa3d
Merge PR #6773: x/bank/simulation/params.go: add unit tests 2020-07-18 13:06:21 -04:00
dauTT 9262319caf
Merge PR #6772: x/bank/simulation/genesis.go: add unit tests 2020-07-18 12:53:39 -04:00
dauTT 4b07cb6cc4
Merge PR #6768: x/distribution/simulation/params.go: add unit tests 2020-07-18 12:47:22 -04:00
dauTT 0033f24650
Merge PR #6770: x/capability/simulation/genesis.go: add unit tests 2020-07-18 12:40:08 -04:00
dauTT 07a6bd4321
Merge PR #6769: x/distribution/simulation/genesis.go: add unit tests 2020-07-18 12:34:15 -04:00
dauTT 6b5733918b
Merge PR #6767: x/distribution/simulation/proposals.go: add unit tests 2020-07-18 12:19:00 -04:00
Alexander Bezobchuk e59781eca7
Merge PR #6765: x/auth: Finish CLI Refactor 2020-07-17 16:20:45 -04:00
Adam Bozanich f33749263f
Merge PR #6761: telemetry: use UTC() in wrappers 2020-07-17 15:33:50 -04:00
Cory 32de79d0aa
refactor auths broadcast cmd in alignment with #6216 (#6713)
* refactor auths broadcast cmd in alignment with #6216

* add TxResponse proto definition, and related refactoring

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

* cleanup TxResponse tests to handle nil return values

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-17 17:17:21 +00:00
Alexander Bezobchuk 5c86ecd1f8
Fix measure since (#6759)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-17 15:34:37 +00:00
atheeshp c37f683cc1
x/staking: cli migration to use gRPC query client (#6728)
* migrated to use gRPC query client

* removed codecs usage

* review change

* added read command flags

* added pagination flags

* fixed limit issue

* added helper function for default pagination flags

* review changes

* review change

* review changes

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-17 15:23:42 +00: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
colin axner 10783f27d0
remove unnecessary func (#6746) 2020-07-16 14:31:06 +00:00
dauTT ebc3ad6843
x/evidence/simulation/genesis.go: add unit tests (#6740)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 09:42:06 +00:00
atheeshp 28269908d9
x/gov: gRPC query Service (#6491)
* WIP: adding gRPC for gov

* removed passing new store

* fixed error

* added register query service in module

* order of imports changed

* order of imports changed

* Fix proto file

* added get all proposals grpc

* added more tests

* added doc in tests

* added grpc for votes

* Added grpc for Deposits

* updated protos

* added grpc for proposal, vote, deposit, tally

* WIP: adding params grpc

* added params in gRPC

* updated error messages

* fixed error check

* added more tests

* updated tests

* added yaml types

* review changes and lint issues

* updated tests

* code cleanup

* removed cosmos.gov prefixes

* added more checks

* added more test checks

* added filtered pagination

* removed test check

* added tests for filtered pagination

* Fix Proposals

* lint

* fixed error in tests

* lint issues

* Add nil check for params

* Added unpacker

* removed casttypes

* review changes

* use suite in grpc query tests

* migrated tests to use suite

* fix non-determinism

* tests migrated to table driven tests

* fixed doc typo

* revert change

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

* review changes

* review changes

* review changes

* review change

* review changes

* docs updated

* review change

* review changes

* review changes

* review changes

* Update x/gov/keeper/keeper_test.go

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 09:16:23 +00:00
dauTT ab162a6d38
x/gov/simulation/proposals.go: add unit tests (#6737)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 08:56:18 +00:00
dauTT ffff6a21cd
x/gov/simulation/genesis.go: add unit tests (#6739)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 08:45:45 +00:00
Marko de08dc4288
bump versiion of ci linter fix (#6743) 2020-07-16 08:38:29 +00:00
Emmanuel T Odeke 1d711f537c
x/auth/signing/direct: increase test coverage to 100% from 83.3% (#6731)
Ensure that all known routes for GetSignBytes are explored for
DirectHandler.
2020-07-16 03:48:36 -04:00
colin axner a65bcdd7e5
add custom relative and absolute timeouts to ibc-transfer (#6724)
* add custom relative and absolute timeouts

* fix misspell

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-15 13:32:09 +00:00
dauTT 6f928e1c4d
x/gov/simulation/operations.go: add unit tests (#6723)
* Rename SimulateSubmitProposal to SimulateMsgSubmitProposal to keep naming convention the same as in other similar cases

* x/gov/simulation/operations.go: add unit tests

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-15 05:44:53 -04:00
Alexander Bezobchuk 44f14828d4
x/params: CLI Refactor & In-Process Tests (#6720)
ref: #6423
2020-07-14 22:52:31 +02: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 5656e8647b
x/staking: gRPC query Service (#6490)
* Add types for staking grpc

* Update module.go

* Update staking query types

* Add grpc query methods

* Add delegation response to proto

* Add queriers for delegations

* Add queriers for unbonding

* Add queriers for redelegations

* Add cases for redelegations

* Add test for grpc validators

* Update staking types to proto

* Update staking query proto

* Add tests for grpc

* Add tests for grpc pool, parameters

* Fix lint issues

* Add grpc redelegation tests

* Add more tests

* Add docs for query proto

* Add docs for query types

* Modify redel querier

* Add debugging statements

* Revert debugging

* Fix proto lint errors

* Add wrapper for keeper

* Embed keeper in querier

* Add more tests

* Add tests for validator unbondings

* Add redel tests

* fix queryRedelegationsFromSrcValidator

* Fix Redelegation tests

* update godoc

* Update args

* Update tests with suite

* Fix lint

* Remove redundant types

* Refactor tests

* fix test

* refactor query proto

* Fix tests

* address review comments

* lint staking proto

* add godoc

* Update tests to table driven tests

* add debugging

* Fix grpc tests

* address comments

* address whitespace suggestions

* Add more tests

* add tests for invalid redels

* update error messages

* address review suggestions

* add tests

* move suite to keeper_test

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-14 17:41:30 +00:00
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 6bd36c8719
Merge PR #6702: x/slashing: In-Process CLI Integration Tests 2020-07-14 11:55:19 -04:00
dauTT 3b2edb75d6
x/mint/simulation/genesis.go: add unit tests (#6706)
* x/mint/simulation/gemesis.go: add unit tests

* Rename file

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-14 15:00:12 +00:00
Federico Kunze eb72ee042a
x/staking: wrap denom error (#6718) 2020-07-14 10:38:35 -04:00
colin axner 5dfc4a2ec9
Standardize connection versioning + channel versioning docs (#6640)
* update connection versions with feature set flag

* make connection version modular to support channel versioning and registering

* revert IBCVersion renaming, add channel versioning logic

* fix channel version flag

* remove unnecessary godoc

* remove unused func

* fix lint and version test

* add test and fix error

* revert changes

* update docs

* remove unnecessary godoc

* Apply suggestions from code review

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

* update doc

* add test cases for unchecked lines

* go fmt

* begin migration to standardized version

* revert proto changes

* restructure versioning to go from string to proto

* update versionStr to encodedVersion naming

* fix version test build

* fix keeper tests

* fix various tests

* fixes from self review

* update docs

* fix lint

* add more code cov

* rename ToString funcs to Encode/DecodeVersion + GetCompatibleEncodedVersions renaming

* update spec docs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-14 08:43:26 +00:00
dauTT 56ba2d8672
x/ibc/simulation/genesis_test.go: add unit tests (#6712)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-14 04:09:36 -04:00
dauTT 8a62e1ab81
x/mint/simulation/params.go: add unit tests (#6708)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-13 22:40:32 +00:00
atheeshp be111ef036
x/distribution: gRPC query service (#6600)
* WIP: adding grpc

* added grpc for query withdraw address

* Fix outstanding rewards query

* added inteerface registry

* added gRPC for delegation rewards

* added remaining commands

* lint issue

* added tests

* added test for community pool

* fixed error

* added test for delegator validators

* updated to use test suite

* updated tests

* more test checks added

* updated tests

* Add sdk wrap

* removed pagination for outstanding rewards

* fixed distr tests issue

* fixed slashes issue

* migrated tests to table driven tests

* docs updated

* review changes

* review changes

* review changes

* Update x/distribution/keeper/grpc_query.go

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-13 20:01:16 +00:00
dauTT 7678f8a913
x/ibc-transfer/simulation/genesis.go: add unit tests (#6709) 2020-07-13 15:54:43 -04:00
dauTT 666527170c
Merge PR #6705: x/params/simulation/proposals.go: add unit tests 2020-07-13 14:10:34 -04:00
dauTT f5c274f076
x/slashing/simulation/genesis.go: add unit tests (#6696)
* x/slashing/simulation/genesis.go: add unit tests

* rename variable stakingGenesis to slashingGenesis

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-13 11:08:24 +00:00
dauTT 1caf9174ae
x/slashing/simulation/params.go: add unit tests (#6698)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-13 11:01:45 +00:00
dauTT 946383e1fe
x/params/simulation/operations.go: add unit tests (#6699)
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-13 10:55:33 +00:00
Alexander Bezobchuk 5d50e13425
cleanup x/bank and x/crisis (#6697) 2020-07-13 06:55:58 +00:00
dauTT c80ebf3ab7
x/slashing/simulation/operations.go: add unit tests (#6695)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-07-12 14:56:53 +00:00
dauTT 2de851d5bd
Merge PR #6693: x/staking/simulation/params.go: add unit tests 2020-07-11 22:26:38 -04:00
dauTT d6e0888ea6
Merge PR #6692: x/staking/simulation/genesis.go: add unit tests 2020-07-11 22:15:31 -04:00
dauTT 3ab823c587
x/staking/simulation/operations.go: add unit tests (#6690) 2020-07-12 01:56:28 +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
Alexander Bezobchuk e1476c1f9d
x/distribution: CLI & Module Tweaks (#6684)
* init commit

* cleanup methods

* fix
2020-07-10 19:59:26 +00:00
Alexander Bezobchuk 400c3cb08e
Merge PR #6652: x/distribution: In-Process Testing & CLI Refactor 2020-07-10 10:45:46 -04:00
Marie 1e23679066
x/evidence: gRPC query service (#6593)
* Add basic grpc query service for x/evidence

* Add grpc query test for AllEvidences query

* linting

* Add AnyUnpacker to query test helper and some var renaming

* Add test to check Evidence query result

* Update proto/cosmos/evidence/query.proto

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

* Use table tests

* Use NewQueryEvidenceRequest in place of QueryEvidenceParams

* Remove ConvertEvidence

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-10 13:52:59 +00:00
Amaury Martiny d23c779b87
Fix godocs for NewTxBuilderFromFlags (#6676) 2020-07-10 11:55:17 +02: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
Alessio Treglia 255ed06eb4
testutil: add ApplyMockIODiscardOutErr, simplify existing functions (#6665) 2020-07-10 08:55:48 +02:00
colin axner 03fdc9d744
x/ibc: update error messages (#6659)
* update errors in 02-client

* update errors in 03-connection

* update 04-channel errors + fixes to 03 changes

* update ibc handler errors

* tm, commitment, and verify error updates

* update ics20

* remove unnecessary wrapping

* fix various build issues
2020-07-09 12:06:08 -04:00
Alessio Treglia a940214a49
testutil cleanup and reorg (#6658)
Prepare migrating testing auxiliary functions from tests
to testutil.

Remove local duplicates on testutil.WriteToNewTempFile().

Always favor testutil.NewTestCaseDir() over ioutil.TempDir().

Add test cases for the testing auxiliary functions.
2020-07-09 14:21:20 +02:00
Amaury Martiny f8df05f6f1
x/upgrade: Refactor CLI to use protobuf query (#6623)
* x/upgrade: Refactor CLI to use protobuf query

* Import lint

* Use table tests

* Small tweak in setup

* Address bez cli refactor

* Address fede's review

* Remove useless func args

* Add back clientCtx to tx command

* Update comments

* Update docs

* Small refactor

* remove Init()

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-08 22:00:56 +00:00
Jonathan Gimeno a417b38926
Remove viper in Staking module. (#6631) 2020-07-08 22:00:34 +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
Akhil Kumar P 674845c7f6
x/params: query gRPC service (#6585)
* Add grpc queries in x/params

* Modify grpc query tests format

* Modify query request and revert changes in querier

* Fix protobuf lint issues
2020-07-08 15:33:55 +00:00
Federico Kunze 3fc5a4dfc6
x/ibc: update CLI queries (#6647) 2020-07-08 10:57:42 -04:00
Alessio Treglia 67be012e3f
x/genutil: use HomeDir stored in ClientCtx (#6646)
Follow-up of #6636
2020-07-08 16:41:46 +02:00
Alexander Bezobchuk 33decc9779
Remove context param (#6645) 2020-07-08 14:25:02 +00:00
Akhil Kumar P 4536ca22bb
x/auth: gRPC query service (#6565)
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-07-08 13:12:38 +02:00