Commit Graph

3025 Commits

Author SHA1 Message Date
Robert Zaremba 85b5fa9b71
appcreator: Reuse encoding config instead of recreating it (#8250)
* appcreator: Reuse encoding config instead of recreating it

* Update tests

* merge tests

* fix export_test.go

* fix genesis_test.go

* fix withGenesis flag

* fix setup parameters

* Update server/README.md

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Update server/README.md

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-01-06 15:20:12 +00:00
Cory 893f2262a7
Fix upgrade tx commands not showing up in CLI (#8261)
* add upgrade tx subcommands to cli

* update CLI help to direct to cosmovisor repo
2021-01-05 19:52:49 -03:00
Robert Zaremba e481f13ff3
docs: cache-wrapping and virtual store (#8102)
* docs: cache-wrapping and virtual store

* Finish the docs update

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

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

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

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

Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-01-05 15:57:33 +00:00
Amaury 46b697ca23
Fix gentx command setting wrong amount (#8255)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-05 15:08:56 +00:00
Aditya f67eac6840
Fix ConsensusStates grpc query (#8246)
* fix consensus states grpc query

* Update x/ibc/core/02-client/keeper/grpc_query.go

* simplify
2021-01-04 15:03:11 +00:00
Anil Kumar Kammari 6a9b0caa57
Add grpc gateway missing endpoints to swagger docs (#8232)
* Add missing endpoints

* Fix swagger gen

* update

* Update static.go

* Fix format

* Fix tests
2021-01-01 13:45:09 -03:00
MD Aleem ed7bd245b8
Add script to generate proto-docs (#8238)
* init protobuf-docs

* update template

* update docs/core/README.md

* update proto files

* update template

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-12-31 16:10:13 +00:00
vincent faad49688e
x/distribution: fix setting withdraw address (#8240) 2020-12-31 12:04:28 -03:00
Prathyusha Lakkireddy 91774980a5
x/ibc: minor channel fixes (#8229) 2020-12-23 15:54:23 -03:00
Prathyusha Lakkireddy f9dc082059
simulation: close opened files and check for error while creating files (#8217)
* Read gentx amount as argument

* Update gentx command usage

* Update gentx tests

* Update docs of gentx

* Close opened files and check for error while creating files

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
2020-12-22 13:46:42 +00:00
colin axnér 25bb17db8a
fix timeout bug (#8200) 2020-12-18 19:01:01 +00:00
Anil Kumar Kammari 4e7c5e9291
update x/upgrade docs (#8196) 2020-12-18 15:06:18 +00:00
Robert Zaremba b18a033a17
Clean Any interface (#8167)
* Clean Any interface

+ removed Any.Pack method. This method is not needed, because we have specialized
  functions for createing new Any values. It could be used inappropriately with existing
  Any objects.

* removed deprecated PackAny function

* fix linter issue

* update nil handling

* NewAnyWithValue returns error on nil instead of panic

* NewMsgCreateValidator: handle nil pubkey

* Remove AsAny and tx builder workarounds

* fix linter issue

* Add AsAny methods to TxBuilder and StdTxConfig, but keep intoAny interface private

* remove tx.PubKeyToAny

* cosmetic updates

* fix method interface

* move ProtoTxProvider to x/auth/tx
2020-12-18 14:55:25 +00:00
Jack Zampolin 75bc312ffd
Update default historical header number for stargate (#8178)
* Update default historical header number

* Update x/staking/types/params.go

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

* fix tests

* duh

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-12-17 19:50:03 +00:00
Aditya 731be71379
Fix IBC upgrade: manually tested (#8187)
* commit at plan.Height key

* fix upgrade tests

* remove debugging prints

* Update x/ibc/light-clients/07-tendermint/types/upgrade.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-12-17 17:32:19 +00:00
Prathyusha Lakkireddy be573cb0ce
change gentx cmd amount field to arg from flag (#8183)
* Read gentx amount as argument

* Update gentx command usage

* Update gentx tests

* Update docs of gentx

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-12-17 17:27:30 +01:00
Jordan Sexton 3781028e85
docs: typo fix (#8172)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-16 13:44:34 +00:00
Federico Kunze 1c6881def8
x/ibc: fix ClientUpdateProposal unpacker (#8170)
* x/ibc: fix ClientUpdateProposal unpacker

* rm duplicate line
2020-12-16 10:41:20 +01:00
colin axnér 829e068545
x/upgrade: fix software upgrade proposals from automatically failing, add unpackinterfaces function (#8169)
* fix unpack interfaces bug

* remove unnecessary ;
2020-12-15 19:06:09 +01:00
Jun Kimura 039036f1cd
add Increment method to Height interface (#8157)
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-12-15 12:26:43 +00:00
Amaury cf86c567c7
Add msg on CLI for migrating GenesisDoc (#8164)
* Add msg on CLI for migrating GenesisDoc

* Fix build

* Better indentation

* Add table tests

* typo

* Rename variables

* Fix validate tests

* Add warning println

Co-authored-by: Cory <cjlevinson@gmail.com>
2020-12-14 22:51:23 +00:00
Robert Zaremba a3ae6e3704
Combine client.ReadTxCommandFlags with GetClientContextFromCmd (#8155)
* Update codebase to simplify clientCtx loading from cmd

* make ReadTxCommandFlags and ReadQueryCommandFlags private

* fix build error

* fix conflicts
2020-12-14 22:09:51 +00:00
Robert Zaremba 3a9e696bbf
fix: Signature only flag bug on tx sign command 7632 (#8106)
* fix: Signature only flag bug on tx sign command 7632

* Update client/context.go

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

* Update client/context.go

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

* use named return value and closure (#8111)

This is to correctly handle deferred Close()
calls on writable files.

* set the right 'append' logic for signing transactions

* cleanup

* update tx.Sign interface by adding overwrite option

* Update Changelog

* sign command cleanup

* implementation and changelog update

* fix SignTx and tx.Sign calls

* fix: sign didn't write to a file

* update flags description

* Add tx.Sign tests

* fix grpc/server_test.go

* Update client/tx/tx.go

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

* changelog update

* Add test to verify matching signatures

* cli_test: add integration tests for sign CMD

* add output-file flag test

* add flagAmino test

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

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

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

* update amino serialization test

* TestSign: adding unit test for signing with different modes

* Add test with Multi Signers into Robert's TxSign PR (#8142)

* Add test with Multi Signers

* remove true false

* Use SIGN_MODE_DIRECT

* Fix litn

* Use correct pubkeys

* Correct accNum and seq

* Use amino

* cleanups

* client.Sign: raise error when signing tx with multiple signers in Direct

+ added more unit tests

* add more tests

* Update client/tx/tx_test.go

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

* fix TestGetBroadcastCommand_WithoutOfflineFlag

* Any.UnsafeSetCachedValue

* fix note packed messages in tx builder

* reorder unit tests

* Changelog update

* cleaning / linting

* cli_tes: copy validator object instead of modifying it's shared codec

* x/auth cli_test: remove custom codec creation in tests

* Update CHANGELOG.md

* updates to CHANGELOG.md

* remove unused method

* add new instance of transaction builder for TestSign

Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-14 21:44:15 +00:00
Aditya 5aaae12b6d
support upgrade on same revision (#8165)
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-12-14 19:31:45 +00:00
Andrey Kuprianov a821fe4a61
Model-based tests for relay functions of ICS-20 token transfer (#8145)
* start on MBT for ICS20: setting and checking bank balances

* add bank struct for subtracting banks

* reconstruct ibc denominations in the bank

* add some static tests with bank changes tracking

* small fixes

* better error handling

* add Jsonatr transform from Apalache conterexample into OnRecvPacket test

* add example Apalache CE and transformed test

* changed apalache-to-recv-test.json to output arrays instead of records

* add datastructures for parsing TLA+ tests

* remove accidentally committed code

* add conversion from TLA+ structs to Go structs

* encode abstract ids into addresses via hashes

* first run of auto-generated MBT tests

* first run of auto-generated MBT tests: fix ports and channels

* fix small inconsistencies

* fix mbt_relay_test by not setting the bank balances in every iteration

* add test for onTimeoutPacket

* add handling of OnRecvAcknowledgement to mbt relay test

* add handling of SendTransfer

* add relay-test.json

* revert manual changes in relay-test.json

* fix handling of denominations for SendTransfer

* setup two test channels A-B, B-C; fix escrow address encoding

* a test for all handlers passing

* generalize denom handling to arbitrary length + failing denom test

* rename test function

* MBT test for unsecrow tokens

* add model-based generated tests

* add model-based tests (prev commit: addded model)

* transformed json tests with jsonatr

* modify mbt_relay_test.go to execute all MBT tests

* cleanup

* move jsonatr transforms into another dir

* add MBT_README.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-12-11 17:35:44 +00:00
Amaury bce5da0e84
Use SignModeLegacyAminoJSON when signer is ledger key (#8136)
* Use SignModeLegacyAminoJSON when signer is ledger key

* Fix tests

* Fix lint

* Fix tests

* Add warning message

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-12-11 13:54:50 +00:00
Aleksandr Bezobchuk 521380abd6
x/auth: atlas manifest (#8140) 2020-12-10 17:02:29 +01:00
Aleksandr Bezobchuk 10f846217d
atlas: x/auth v0.39.1 (#7996) 2020-12-10 10:40:42 -05:00
Aleksandr Bezobchuk 9104a72d50
x/bank: update atlas manifest (#8137) 2020-12-10 16:12:09 +01:00
Alessio Treglia 056f416d2b
use testutil in test cases (#8130)
Also replace defer calls with
testing.T.Cleanup()
2020-12-10 12:56:55 +00:00
Anil Kumar Kammari e321317c20
add page flags for staking validators (#8103)
* add page flags for staking validators

* add test

* fix test

* add build flag

Co-authored-by: aleem1413 <aleem@vitwit.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-10 12:26:44 +00:00
Alessio Treglia f51f5e6784
testutil: new TempFile function, simplify WriteToNewTempFile (#8123)
Files returned by WriteToNewTempFile are cleaned up
automatically at the end of a test case execution.
WriteToNewTempFile now relies on the TB.TempDir()
function provided by the testing std package.

TempFile returns a temporary file that can be used
within a test case and is automatically removed
at the end of the test execution.
2020-12-09 18:27:20 +00:00
colin axnér af401359eb
fix ibc-transfer receiving denom bug (#8119)
* fix receiving denom bug

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

* add testing sending 2 hops and back one

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-12-09 15:02:59 +00:00
Amaury 58491a5660
Add UnpackInterfaces to BroadcastReq (#8118)
* add test case for decoding & re-encoding a full transaction using amino

* drop equal assertion for tx and txRequest

* Fix BroadcastReq UnpackInterfaces

* Remove unrelated files

* order imports

* sort imports again

Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-09 11:05:12 +00:00
Robert Zaremba fe41718047
Robert/api clientctx (#8107)
* rename clientCtx.PrintOutput to PrintObject

* rename clientCtx.PrintOutputLegacy to PrintObjectLegacy

* Changelog update

* Rename PrintObject to PrintProto
2020-12-08 20:17:40 +00:00
Riccardo Montagnin e843878920
Recover private validator key (#8099)
* Recover private validator key
Added the ability to recover the private validator key from a given mnemonic when initializing the node

* Added CHANGELOG entry

* Reverted dependencies

* Added tests

* Fixed mnemonic checking as suggested and added tests

* Run make format and fixed go.sum checksum

* Run make format

* fix imports

* fix TestInitializeNodeValidatorFilesFromMnemonic

* Update CHANGELOG.md

Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
2020-12-08 17:22:43 +00:00
Emmanuel T Odeke e38a6df9cd
x/ibc/light-clients: simplify max time comparison (#8089)
The prior code that tried to get the newest/larger time
between the too performed:
* 2 time.Time.UnixNano() retrievals: 2 multiplications, 2 additions
* 1 math.Max comparison
* 1 time.Unix(0, minTime) creation

but really this code could just use native operations on:
time.Time.After() simply.

This now becomes a single operation, single comparison for the same effect.
2020-12-08 13:47:20 +01:00
Robert Zaremba b219c54c2d
Move and update codec.MarshalAny functions to codec.Marshaler interface (#8080)
* Changelog update

* Rename codec.MarshalAny

* move codec.MarshalInterface to codec.Marshaler

* fix tests

* Update amino_codec for compliance with MarshalerInterface

* update tests and comments

* add tests

* change order of args in UnmarshalInterface to a canonical one

* uplift MarshalInterface to take ProtoMessage as an argument

* wip

* add nil check

* make tests working

* tests cleanup

* add support for *JSON methods

* Update changelog

* linter fixes

* fix test types

* update evidence genesis_test

* adding test

* review updates

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-08 09:27:08 +00:00
Sunny Aggarwal da6b7f7755
removed gov docs bug (#8105) 2020-12-07 21:33:27 +00:00
Emmanuel T Odeke 291d966fe9
x/ibc/core/23-commitment/types: fix MerkleProof.Empty comparisons (#8092)
* x/ibc/core/23-commitment/types: fix MerkleProof.Empty comparisons

Fixes invalid pointer creation, reduces on unnecessary allocations
inside MerkleProof.Empty, and changes the method to a pointer; the
invalid pointer creation was symptomatic of broad use of values.

With this change we have improvements whose benchmarks produce:

```shell
name     old time/op    new time/op    delta
Empty-8     311ns ± 5%     232ns ± 5%  -25.49%  (p=0.000 n=20+19)

name     old alloc/op   new alloc/op   delta
Empty-8     56.0B ± 0%      8.0B ± 0%  -85.71%  (p=0.000 n=20+20)

name     old allocs/op  new allocs/op  delta
Empty-8      3.00 ± 0%      1.00 ± 0%  -66.67%  (p=0.000 n=20+20)
```

Fixes #8091

* Move Empty godoc to right place + add comments for blank*
2020-12-07 20:57:15 +00:00
Aditya 971d253214
Implement Connection-specified delay (#8069)
* start with initialization and metadata

* start by fixing delay period during connection handshake

* fix connection handshake tests

* add delay period logic to packet verification

* proto format

* fix err issue

* appease linter

* document upgrade special case

* Update x/ibc/light-clients/07-tendermint/types/client_state.go

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

* Update x/ibc/light-clients/07-tendermint/types/store.go

* add sanity check

* fix build

* fix tests

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>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
2020-12-07 12:13:06 +00:00
Mark Jackson de114773ee
fix typo (#8097)
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-07 11:26:09 +00:00
Emmanuel T Odeke a8c3b4414d
x/bank/keeper: fix a missing gRPC error in AllBalances (#8085)
* x/bank/keeper: fix a missing gRPC error in AllBalances

Fixes an incoherent return which had:
    (non-nil value, non-nil-non-grpc error)
to
    (nil value, non-nil-gRPC error)

and it is a follow-up of PR #7814.

* types/query: fix pagination test (#8096)

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-12-07 01:32:59 -08:00
colin axnér c8a9da1d27
increase ibc basic genesis validation (#8081)
* increase client basic genesis validation

* add connection/channel genesis validation

* fix tests

* apply @AdityaSripal suggestion

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-12-05 21:10:15 +00:00
Anil Kumar Kammari 4a233b8dcf
Rename GRPCRouter (#8079)
* rename GRPCRouter

* Update store/types/store.go

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

* Fix gofmt

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2020-12-04 15:06:50 +00:00
Frojdi Dymylja 7ec3bcd23a
fix: bank gRPC error status codes (#7814)
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-12-04 12:19:29 +00:00
Amaury 1b00c01b70
Audit through legacy endpoints to find breaking changes (#8037)
* Add error msg on staking

* Add tests for legacy staking and gov

* Add test for encode

* Fix broadcast too

* Add comments

* update changelog

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-03 23:33:32 +00:00
Aleksandr Bezobchuk 5291a8ff31
Refactor Logging using Zerolog (#8072)
* init commit

* server: use flags

* server: godoc++

* updates

* baseapp: update logging

* logging updates

* x/bank: update logging

* logging updates

* lint++

* logging updates

* logging updates

* logging updates

* logging updates

* cl++
2020-12-03 23:17:21 +00:00
SaReN 183593ff6d
Update signbatch multisig to work online (#7801)
* add test for signbatch multisig

* update test

* fix sign batch multisig

* update offline usage

* address comments

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-12-03 09:48:17 +00:00
Robert Zaremba 6040d1b88b
fix: Metadata is not initialized in x/bank InitGenesis #7951 (#8065)
* fix: Metadata is not initialized in x/bank InitGenesis #7951

* remove commented code

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-12-03 08:39:11 +00:00
Aleksandr Bezobchuk bac31becb3
evidence: fix query command (#8066)
* evidence: fix query command

* evidence: add CLI tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-02 18:08:16 +00:00
MD Aleem b6c8d5ea9f
Add tx broadcast gRPC endpoint (#7852)
* WIP tx/broadcast grpc endpoint

* fix lint

* fix proto lint

* Update service.proto

* resolve conflicts

* update service.proto

* Update service.proto

* review changes

* proto lint

* Switch to txraw

* Add check breaking at the end

* Fix broadcast

* Send Msg on SetupSuite

* Remove proto-check-breaking

* 1 validator in test

* Add grpc server tests for broadcast

* Fix grpc server tests

* Add some changes

* Add ress comments

* Add table tests for tx service

* Add test for mode

* Add simulate tests

* Add build flag back

* Revert custom stringer for enum

* Remove stray logs

* Use /txs/{hash}

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-12-02 17:50:40 +00:00
MD Aleem a51eac4f15
Fix QueryByEvents with multiple events and empty pagination request (#8029)
* fix pagination issue

* Fix querying with multiple events

* reuse ParsePagination

* update tests

* change event type to array

* fix test

* review changes

* add test case for escape params

* review changes

* resolve conflicts

* fix test

* fix test

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-01 04:18:35 +00:00
Amaury 7ad2aab2c4
Add panic handler on queries (#8039)
* Add test that panics

* Add panic in abci query

* Move proto gen files to correct place

* Add panic handler in grpc server

* Fix test

* Fix build

* Use %v

* Better panic message

* Fix tests

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-11-30 16:59:35 +00:00
colin axnér bcb3240d06
Use generated client identifiers (#8034)
* add client identifier generation

* update proto and start fixing tests

* fix ibc tests

* fix auth rest test

* update spec

* fix lint

* add parsing tests and fix bugs

* fix regexp

* add godoc

* address @AdityaSripal review suggestions for identifier parsing

* address rest of @AdityaSripal's review comments

* remove unnecessary comment

* typos

* fix lint

* Apply suggestions from code review

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

* add more heigh tests as per @AdityaSripal suggestion

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-11-30 15:52:45 +00:00
Sunny Aggarwal 9635a99e2f
Merge branch 'master' into gov_split_vote_weighted_vote 2020-11-26 13:54:24 -05:00
colin axnér ed9fc058f1
Add an IBC prefix to transfer escrow addresses (#7967)
* add IBC prefix to escrow addresses

* use ADR 028 AddressHash construction

* remove extra space

* apply @AdityaSripal suggestion; prefix from ibc -> ibc-transfer-escrow-prefix

* Use alternative 1 proposed by @andrey-kuprianov

* anticpate necessary build fix

* add escrow address issue link into module.go

* Update x/ibc/applications/transfer/types/keys.go

Co-authored-by: Andrey Kuprianov <59489470+andrey-kuprianov@users.noreply.github.com>

* Update x/ibc/applications/transfer/types/keys.go

Co-authored-by: Andrey Kuprianov <59489470+andrey-kuprianov@users.noreply.github.com>

* apply @andrey-kuprianov review suggestions

Deduplicate code into a helper function as suggested. Add unit tests for max transfer channels test.

Co-authored-by: Andrey Kuprianov <59489470+andrey-kuprianov@users.noreply.github.com>
2020-11-26 13:44:54 +00:00
yihuang 512b533242
cli: ParseCoin doesn't do normalize (#7954)
follow up on https://github.com/cosmos/cosmos-sdk/pull/7777
ParseCoin need to be treated similarly.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-25 18:02:10 +00:00
Amaury a9dd334c34
Fix legacy querying tx ("unregistered type" bug) (#7992)
* Add tests for query txs

* Add test for IBC

* Refactor checkSignModeError

* Fix lint

* Add successful IBC test

* Remove logs

* break

* Remove known errors

* Update error message

* Better comments

* Revert variable renaming

* Fix lint

* Add mention of gRPC as TODO
2020-11-25 12:02:31 +00:00
Amaury 1b3ce2c1d1
CLI `migrate` command for x/{upgrade,params} proposals (#7875)
* Add v038 upgrade types

* Add migrate x/upgrade

* remove nolint

* Add ParameterChangeProposal

* Revert change

* Don't register crypto twice

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-24 23:32:32 +00:00
Aditya c15884a204
Rename Version to Revision in IBC Height (#8020)
* rename Version to Revision in ibc Height

* lint

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-24 15:38:24 +00:00
colin axnér 88e03e4f40
Deterministic connection and channel identifiers (#7993)
* add generate identifier functions for connection and channel

* update proto types and begin open init changes

remove unnecessary field from open init msgs. Update connectionopeninit handshake, begin updating channel handshake

* finish connection handshake chanes and some channel handshake changes

Finish updating connection handshake changes, update genesis for connection and channel, some channel handshake changes, fix build for tests but still failing

* finish channel handshake changes

* fix more tests

* fix connection handshake tests

* fix more tests

* fix build

* changes from self review

* address @fedekunze review suggestions

* update spec

* fix build

* fix tests

* Update x/ibc/testing/chain.go

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

* Update x/ibc/core/03-connection/types/msgs.go

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

* address @AdityaSripal comments

* reflect spec changes

* address @AdityaSripal review suggestions

* nit

* add connection/channel identifier parsing and validation as per @AdityaSripal suggestion, cc @fedekunze

* Fix auth rest test

Change dummy channel id to a valid channel id given the updated stricter channel identifier checks cc @amaurymartiny

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-11-24 15:28:20 +00:00
Amaury 13bc504bec
docs: Add REST endpoints migration guide (#8011)
* Add REST endpoints migration guide

* add bank, distrib, evidence

* Add slashing, mint

* Add staking

* Add query

* Add todo

* Typos

* Add link to interact node

* grammar

* Better wording

* Update docs/migrations/rest.md

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

* Update docs/migrations/rest.md

* Add footnote

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2020-11-24 14:34:20 +00:00
Aditya 53294f5269
check clients against params and consensus against clients (#8016)
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-11-24 12:27:35 +00:00
Aditya def3c5ba71
Add ConsensusState to IBC Upgrades (#7919)
* upgrade progress

* fix build minus cli

* write state at block before upgrade height

* refix build

* Apply suggestions from code review

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

* fix upgrade and start with tests

* fix tendermint tests

* add tests and remove unnecessary relayer options on upgradedClient

* fix all tests except weird msg panic

* add invalid final client test and codec stuff

* fix everything but msg issue

* remove problematic test for now

* safer self validation

* upgrade fixes

* proto-linting

* remove unnecessary last height

* add timestamp to committed upgrade consensus state

* address final nits

* address nit

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-11-24 11:45:33 +00:00
Amaury 74435137e9
Show height on legacy REST endpoints (#7997)
* Fix showing height in rest endpoints

* Fix query height

* Manually inject req.Height

* Small tweaks

* Use withHeight

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-24 10:28:12 +00:00
colin axnér 966e26d23d
Fix tendermint misbehaviour trusted consensus state age check (#8006)
* use TrustingPeriod instead of UnbondingPeriod when verifying the age of the trusted consensus state

* update comment
2020-11-23 16:10:25 +01:00
Aleksandr Bezobchuk a7296d3d4e
Bump Tendermint v0.34.0 (#7995)
* init commit

* ibc: remove redundant casting

* ci: attempt fix liveness job
2020-11-20 19:00:11 +01:00
SaReN 07cfed4178
Merge branch 'master' into robert/bech32-pubkey-slashing 2020-11-20 01:23:54 +05:30
Aleksandr Bezobchuk 4be5cd3454
docs: x/bank: Atlas Doc (#7961) 2020-11-19 11:57:10 -05:00
Robert Zaremba a4130f5821 remove unused function 2020-11-19 02:19:19 +01:00
Robert Zaremba 0034e48458 Bech32 PubKey: use protobuf in slashing keeper 2020-11-19 01:10:11 +01:00
Federico Kunze 87315a6aab
ibc: commit packet and hash (#7808)
* ibc: commit packet and hash

* minor changes

* fix build

* update err msgs

* don't use Any

* update commitment hash to used fixed length preimage

The commitment hash will now use 8 bytes timeout timestamp + 8 bytes timeout height version number + 8 bytes timeout height version height + sha 256 hash of data

* remove error from CommitPacket return values

* update godoc

* rm proto-tools-stamp

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-11-18 19:01:22 +00:00
colin axnér f02a46263f
update transfer error messages (#7968)
* update transfer err messages

* apply @AdityaSripal review suggestion
2020-11-18 14:56:26 +01:00
Marie Gauthier 1cc8af8d9b
[docs]: update building modules section to reflect ADR31 (#7702)
* Revert "Revert "Update old ref of RegisterQueryService""

This reverts commit 03e4c56de53938ccbf025a441e54b9842f7c4544.

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

* Update messages-and-queries

* Update handler

* Update structure

* Add doc related to RegisterMsgServiceDesc

* Update docs/building-modules/handler.md

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

* Update docs/building-modules/handler.md

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

* Update docs/building-modules/handler.md

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

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

* Update handler.md

* Rename handler.md to msg-services.md

* Update legacy msgs wording

* Update messages-and-queries.md

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

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

* Update docs/building-modules/intro.md

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

* Remove handler mention from intro.md

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

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

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

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

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

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

* Update docs/building-modules/keeper.md

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

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

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

* Address review comments

* Use tag

* Update docs/building-modules/intro.md

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

* Update docs/building-modules/intro.md

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

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

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

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

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

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

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

* Update docs/core/transactions.md

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

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

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

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

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

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

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

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

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

* Remove framework related explanation from docs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Update docs/core/baseapp.md

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

* Update docs/core/baseapp.md

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

* Update beginblock-endblock.md

* Update docs/core/baseapp.md

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

* Update docs/core/transactions.md

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

* Add deprecated notice

* Update tx-lifecycle.md

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-17 20:41:43 +00:00
colin axnér 03c8fb313d
add domain separation between port and channel (#7960)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-17 15:37:20 +00:00
colin axnér a7435d03eb
fix validate basic check (#7962)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-17 15:18:16 +00:00
colin axnér 715933b5f3
reduce redundancy (#7959)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-17 15:01:34 +00:00
atheeshp ab7104865d
improve error messages for legacy rest endpoints (#7856)
* improve error messages for legacy rest endpoints

* add test

* review changes

* review changes

* refactor

* Update x/auth/client/rest/query.go

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-11-17 14:46:24 +00:00
Emmanuel T Odeke 9369a00557
x/simulation: make signals channel buffered to avoid missing signals (#7952)
Invoking:

    c := make(chan os.Signal)
    signal.Notify(c, signals...)

is explicitly called out as a bug in the os/signal docs
and should instead make that channel buffered lest
a signal could be lost.

Fixes #7950

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-11-17 14:27:12 +00:00
colin axnér 0647d897f5
add is frozen client state check to send packet (#7957)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-17 12:55:33 +00:00
colin axnér e93b18e60e
self height uses GTE in self client check (#7945)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-17 11:40:12 +00:00
Jun Kimura f962f3a28c
Fix int64 overflow error for height comparison (#7944)
* fix int64 overflow for height comparison

* apply suggestions from review

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-17 10:42:06 +00:00
Sunny Aggarwal 479ad6be45
Merge branch 'master' into fix_power_reduction_test_cast_int64 2020-11-16 12:19:39 -04:00
colin axnér be10bcb163
counterParty -> counterparty (#7946)
* nit

* fix spec and docs
2020-11-16 15:06:55 +00:00
yihuang 54201d11e6
cli: convert coins to smallest unit registered (#7777)
* cli: convert coins to smallest unit registered

fixes: #7623

- test order of decimal operations
- support both int and decimal coins, truncate when normalizing to
  base unit

* Update types/coin_test.go

* Update types/coin_test.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-16 11:34:54 +00:00
colin axnér cd29fd642a
Fix connection path validation and remove unused PathValidator function (#7930)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-16 09:30:57 +00:00
Callum Waters 6b62d266bb
use verifycommitlight (#7936) 2020-11-16 09:14:21 +00:00
Sunny Aggarwal e239504bc0
Merge branch 'master' into gov_split_vote_weighted_vote 2020-11-16 01:53:13 -04:00
colin axnér 7e6978ae55
ibc: tendermint misbehaviour should use block hash for equality check (#7928)
* check block hash equality

* update err msg

* valid commit now uses block id hash

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-13 19:01:33 +00:00
Sunny Aggarwal 9e9dbf315d
Merge branch 'master' into fix_power_reduction_test_cast_int64 2020-11-13 11:49:39 -04:00
Sunny Aggarwal 8bc429d288 fix int64 2020-11-13 11:48:06 -04:00
vincent 6e3fab854f
Fix upgrade store loader (#7817)
* fix upgrade store loader

* fix test

* resolve comment

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 15:27:52 +00:00
Sunny Aggarwal 5a95db669b
Merge branch 'master' into fix_power_reduction_test_cast_int64 2020-11-13 11:07:02 -04:00
colin axnér 0b1a3eed39
add docs and make prefix a const (#7926)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 14:32:33 +00:00
colin axnér ddc777cf6f
remove chainid from ibc tm misbehaviour (#7932)
* remove chainid from misbehaviour

* update err msg

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 14:16:51 +00:00
Federico Kunze e77c9506c8
ibc: packet fixes (#7810)
* ibc: msg validation fields

* msg tests

* rename proof

* rename proofs

* check seq ≠ 0

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-11-13 13:58:13 +00:00
Aditya 4b529a41cf
Capability Fixes (#7918)
* add cap and name checks

* Update x/capability/keeper/keeper.go

* address reviews

* fix missing trim

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-13 11:13:59 +00:00
Ethan Buchman 15103b63a1
x/ibc/24-host: fix some comments (#7923)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 10:33:33 +00:00
Amaury 6f5eaba95b
Add support for TM secp256k1 (#7838)
* Add secp256k1 support

* Fix test

* Add test in handler_test

* Use table tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 10:15:29 +00:00
colin axnér c0d7233141
Minor fixes for ibc tendermint (#7916)
* remove nil checks in getter functions for ibc tm header

* remove redundant registration

* add upgrade height version height check

* fix err msg

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-12 19:01:22 +00:00
colin axnér 956e1cf68f
move sdk denom validation to top of validateibcdenom (#7917) 2020-11-12 18:44:02 +00:00
colin axnér 96f239db1c
remove timestamp check from solomachine misbehaviour (#7915)
* remove timestamp check from solomachine misbehaviour

* add more documentation
2020-11-12 16:15:33 +00:00
MD Aleem f3e4964f2f
Add TxsByEvent gRPC endpoint (#7842)
* add service definition for TxsByEvents

* add TxsByEvent gRPC endpoint

* fix lint

* fix test

* review changes

* review changes

* fix proto descriptions

* review changes

* fix lint

* review changes

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

* review changes

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-12 14:22:54 +00:00
colin axnér c8afb2cbe7
Remove consensus params from IBC tm client (#7891)
* remove consensus params

* fix build

* fix build

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-12 10:08:04 +00:00
Marko 104a2031ab
docker: proto (#7893)
* migrate fully to buf

* run protoc-gen-cosmos in script

* migrate to docker container

* Update Makefile

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Update scripts/protocgen.sh

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

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-11-12 09:49:46 +00:00
colin axnér e9f19225a9
IBC Upgrades function interface return client/consensus (#7895)
* return client and consensus state on upgrades

* fix build
2020-11-11 18:06:37 +00:00
antstalepresh 4515b8782d Merge branch 'master' of github.com:cosmos/cosmos-sdk into fix_power_reduction_test_cast_int64 2020-11-12 02:52:59 +10:00
antstalepresh 0b20e23f21 fix random values testing 2020-11-12 02:05:03 +10:00
colin axnér 76ffdccb03
IBC Fraction for trust level changed to uints (#7892)
* fraction uses uint now

* Update proto/ibc/lightclients/tendermint/v1/tendermint.proto

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-11 15:52:11 +00:00
antstalepresh 0eb0cbec65 set PowerReduction=10^18 for staking tests 2020-11-12 01:48:42 +10:00
Federico Kunze 136f3ade88
ibc: client params allowlist (#7855)
* ibc: client params allowlist

* genesis and gRPC

* client

* lint

* spec

* fixes

* validate localhost client

* move client types back to exported

* update genesis

* sort clients by id
2020-11-11 11:07:29 +00:00
colin axnér 116d0460fc
solo machine GetPubKey returns an error instead of panicing (#7883)
* solo machine public key now returns an error instead of panicing

* apply @fedekunze review suggestions

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-11 10:09:57 +00:00
colin axnér 0bd46574f4
fix mismatched solomachine signature data type verification (#7882)
* fix mismatched signature data type verification

* update godoc

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-10 20:37:10 +00:00
Federico Kunze bcdd6ee15c
ibc: fix grpc gateway routes (#7881) 2020-11-10 17:50:53 +00:00
colin axnér 300b7393ad
Update IBC host keys + cleanup (#7873)
* init changes

* cleanup keys and remove redunancdy

* revert unintentional changes

* KeyChannel -> ChannelKey
2020-11-10 17:05:21 +00:00
antstalepresh 67b3f9071c fix build issues && telemetry.SetGaugeWithLabels int64 range validation 2020-11-11 02:07:40 +10:00
antstalepresh 4582dcd08f remove comment 2020-11-11 01:38:54 +10:00
antstalepresh 705e26e98c give enough balance to operations test validator based on TokensFromConsensusPower to consider PowerReduction 2020-11-11 01:28:39 +10:00
antstalepresh cc96ee3a3b fix staking cli, grcp_query, keeper test for power reduction 2020-11-11 00:40:25 +10:00
Aditya fdcb028636
ibc: proof fixes (#7869)
* change proof proto def

* progress fixing tests

* complete proof restructure

* remove use of KeyPath

* improve error msgs

* docs and lint

* Apply suggestions from code review

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

* address code review

* fix string tests

* add ConvertProofs tests

* 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>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-11-10 15:39:09 +01:00
antstalepresh 7bc08c419c Disable telemetry.SetGaugeWithLabels when amount overflow int64 && Update CreateValidator, CreateValidatorMsg, Delegate helper functions to fix int64 overflow 2020-11-10 23:05:15 +10:00
colin axnér 55772aec8c
update err to match others (#7857)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-09 17:12:00 +00:00
Marie Gauthier 90e9370bd8
Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419)
* WIP on removing tm pub/privkey

* Fix part of crypto tests

* Add PrivKeyLedgerSecp256K1 proto type

* Use BasePrivKey for ledger priv key type

* Refacto continued

* First round

* x/staking

* Continue porting

* x/* done

* Make build pass

* More conversion

* Remove IntoTmPubKey

* Fix test

* Remove crypto.PubKey in some other places

* Revert ledger changes

* Fix comment

* Remove useless function

* Add To/FromTmPublicKey

* Add migrate tests

* Fix test

* Fix another test

* Rename tm conversion functions

* Less code

* Rename BasePrivKey to LedgerPrivKey

* Add changelog

* Rename functions

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-09 16:01:43 +00:00
antstalepresh ebb7698339 status update for power reduction test 2020-11-10 00:14:10 +10:00
Federico Kunze 70fa17b55a
ibc: spec overview (#7853) 2020-11-09 12:44:20 +01:00
Federico Kunze f294db9ccf
x/ibc: transfer specs (#7580)
* x/ibc: transfer specs

* update titles and list todos

* denom trace and client UX

* add UX recommendations and locked funds section

* metrics

* state transitions

* Apply suggestions from code review

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

* address comments from review

* jack suggestions

* add example

* fix

* address comments from call with @zakimanian

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

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

* add comment about verification

* address comments from review

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-11-09 08:49:16 +00:00
Ethan Buchman dd9ef120f3
x/cap: fix comments, SetIndex, and some tests (#7845)
* x/cap: fix comments and some tests

* fix lint

* Apply suggestions from code review

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-07 20:38:26 +00:00
Sunny Aggarwal 138ae178ff
Merge branch 'master' into gov_split_vote_weighted_vote 2020-11-06 12:33:13 -04:00
antstalepresh be1012c8d1 remove cast to int64 for amount multiplied by PowerReduction 2020-11-07 00:57:07 +10:00
Cory 56c08d1117
Bump to tendermint v0.34-rc6 (#7828)
* bump to tendermint v0.34-rc6

* update go.mod

* tendermint version is now accessible as tmversion.TMCoreSemVer

* add changelog entry

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-11-06 10:13:52 +00:00
Aditya 03a46181c6
Merge Packet Functions (#7813)
* start implementation and debugging tests

* fix some issues, continue debugging

* fix IBC tests

* remove print statement and fix docs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-05 14:07:15 +00:00
Federico Kunze 97963c71df
ibc: remove GetClientConsensusStateLTE (#7812) 2020-11-05 14:46:00 +01:00
Aditya 432afb274b
ibc: minor fixes from audit (#7807) 2020-11-04 13:16:20 +01:00
SaReN 286e9bfbef
Remove duplicate tx commands for auth (#7788)
* remove duplicate commands

* add changelog

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-04 09:58:11 +00:00
antstalepresh 267148291c
Merge pull request #39 from antstalepresh/gov_split_vote
Governance split vote
2020-11-04 10:31:55 +10:00
Aditya 30efa5ab16
Host Key changes (#7783)
* change host keys on sequences

* fix prefix names

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-03 14:35:54 +00:00
antstalepresh 381d1b0e70 fix deprecated function use after merging cosmos master 2020-11-03 22:32:49 +10:00
antstalepresh eb992a4490 Merge branch 'master' of https://github.com/sikkatech/cosmos-sdk into gov_split_vote 2020-11-03 22:27:58 +10:00
antstalepresh 350f88c0ca fix lint issues 2020-11-03 22:21:23 +10:00
antstalepresh ee1988a4ba split MsgVote and MsgWeightedVote for backwards compatibility 2020-11-03 21:48:53 +10:00
Federico Kunze 72ab03b3ef
ibc: validate signer address (#7781)
* ibc: validate signer address

* comment

* validate channel handshakes and transfer signers
2020-11-03 10:07:32 +00:00
Aditya 6559e19764
Remove BatchProofs implementation (#7784)
* remove batch proofs

* Apply suggestions from code review

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-11-03 09:37:55 +00:00
Robert Zaremba c201963e41
Update x/banking and x/crisis InitChain re slow Gaia startup (#7764)
* add more logs during the initialization process

* initializtion: move profiling to the top of the startProcess function

* x/bank InitGenesis: remove k.ValidateBalance

* debug: add logs and telemetry to x/bank and x/crisis

* make x/crisis AssertInvariants optional during InitGenesis

* Add module init flags mechanism

* update changelog

* remove debug fmt.Print

* fix testutil/network/

* fix log message

* update test NewApp calls

* review changes

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-11-02 19:10:14 +00:00
Federico Kunze 4420fe2d52
ibc: remove root from verification funcs (#7780)
* ibc: remove root from verification funcs

* fix VerifyClientConsensusState

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-02 17:16:22 +00:00
Aditya e9801edb99
Async Ack Fixes (#7735)
* Add function to query ack proofs

* fix bugs

* fix swagger

* fix final queries

* docs and add test case

* Rename QueryUnrelayedAcks to more accurate QueryUnreceivedAcks

* Apply suggestions from code review

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

* address rest of reviews

* consistent spelling

Co-authored-by: Jack Zampolin <jack.zampolin@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-11-02 15:13:48 +00:00
yihuang aff88bbe99
Fix #7640: tally calculation precision error (#7641)
Solution:
- change `(a / b) * c` to `a * b / c`

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-02 14:50:33 +00:00
Aditya 88e4acac6b
Don't claim channel capability on crossing hellos (#7763)
* don't claim capability on crossing hellos

* clarify comment
2020-11-02 14:32:32 +00:00
Amaury Martiny 194d2aa196
Fix fetch txs by height on legacy REST endpoint (#7730)
* Add test

* Fix potential flakiness in sequence

* Remove test with ?height

* Fix test

* Fix tests

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Zaki Manian <zaki@manian.org>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
2020-11-02 11:52:52 +00:00
Marie Gauthier bd6c16b462
Handle ServiceMsg in StdTxBuilder.SetMsgs (#7731)
* Handle ServiceMsg in StdTxBuilder.SetMsgs

* Add test
2020-10-30 15:27:12 +00:00
antstalepresh 5a082584c9 Remove Div operation on tally() considering sum(Weight)=1 2020-10-30 23:28:34 +10:00
antstalepresh 73c757dc4f refactor SubVote to WeightedVoteOption && add utility for NewNonSplitVoteOption 2020-10-30 23:14:39 +10:00
Amaury Martiny 1961935fc7
Add GetTx gRPC endpoint (#7688)
* Add empty TxByHash

* Fix search & replace

* Renname to GetTx

* Make getTx grpc work

* Hash as string

* Add todo comment

* /tx

* Make tests pass

* Put into function

* Add changelog

* Fix lint

* RegisterTxService in server

* Remove comment

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

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

* Create new protoCdc

* Move tx service to x/auth

* Small tweaks

* Link gh issue

* Fix lint

* Update x/auth/tx/service.go

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

Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-10-30 12:32:02 +00:00
Jack Zampolin b2bc32f3c9
Add function to query ack proofs (#7732)
* Add function to query ack proofs

* Fix compilation issue

Co-authored-by: Aditya <adityasripal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-29 22:19:01 +00:00
antstalepresh a59ac3e31a fix integration and rest test 2020-10-29 23:52:21 +10:00
antstalepresh b3d86e1a8d update msg vote validate basic and test 2020-10-29 22:43:08 +10:00
colin axnér 1a15713289
remove proof path from IBC queries (#7725)
* remove proof path

* make proto-all with old install

* fix build
2020-10-29 12:42:12 +00:00
antstalepresh e7d3549068 fix lint issues 2020-10-29 22:30:42 +10:00
antstalepresh 7e87b5d998 add cli, grpc, keeper test for new split vote 2020-10-29 22:24:55 +10:00
Aditya b7b925a1ac
Sort validators like tendermint in HistoricalInfo (#7691)
* sort validators like tendermint

* address comments

* switch ordering in tests

* change sort logic in error case

* don't change test validators array order

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-29 12:17:37 +00:00
Cory 536eb689dc
Add Deprecation headers for legacy rest endpoints (#7686)
* add deprecation headers for legacy rest endpoints

* add deprecation headers for missing tx routes

* rm handler-level deprecation headers

* switch to middleware Route.Use method for setting deprecation Headers

* set deprecation headers using subrouter

* cleanup gofmt

* goimports

* Update client/rest/rest.go

* update deprecation headers to be set on each module individually

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-29 11:37:46 +00:00
antstalepresh 0cb2c70b4d add subvotes parser from string 2020-10-29 19:26:51 +10:00
Amaury Martiny 82f15f306e
RegisterInterfaces registers service Msg type_urls (#7671)
* Add RegisterMsgServiceDesc

* Refactor newSendTxMsgServiceCmd

* Add test

* Register in all modules

* Remove RegisterMsgServiceDesc from baseapp

* Add explicit error message

* Add comment

* Update comment

* Add test

* Update comment

* Remove duplicate import

* Fix lint

* Forgot vesting

* Fix lint

* Fix test

* Put in types/module

* Put in types/msgservice

* Add comment about panic

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Add comment

* Add better test

* Update baseapp/msg_service_router.go

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

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 19:20:45 +00:00
Federico Kunze 1b0d6540d8
ibc: internal audit part 1 (#7704)
* ibc: internal audit part 1

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

* gofmt

* fix tests

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
2020-10-28 15:57:48 +00:00
antstalepresh c504784489 Fix build errors and tests after struct modification 2020-10-28 22:05:35 +10:00
Anil Kumar Kammari 51ac6f876b
Rename RegisterGRPCRoutes (#7696)
* Rename

* Fix missing

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 11:39:49 +00:00
yihuang afb6771726
fix inconsistent flag names in upgrade proposal command (#7697)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 10:41:55 +00:00
Robert Zaremba bd9af94174
Use embedded lib key type in sdk pub keys instead of bytes. (#7672)
* Remove duplicate print message on keys add command (#7654)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* ed25519: use stdlib/crypto types

* use standard package testing

* use crypto/ed25519 instead of golang.org/x/crypto/ed25519

In Go 1.13 the new crypto/ed25519 package implements the Ed25519 signature scheme.
This functionality was previously provided by the golang.org/x/crypto/ed25519 package,
which becomes a wrapper for crypto/ed25519 when used with Go 1.13+.

* use standard package testing for secp256k1 tests

* secp256k1: add cross packages signature checks

* ed25519: rollback the _test package name

* rename underlyingSecp256k1 to btcSecp256k1

* package update

Co-authored-by: Denis Fadeev <denis@fadeev.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 10:24:41 +00:00
Federico Kunze 426d195387
ibc: Connection Version changed from string to proto definition (#7644)
* ibc: Version to proto Any

* change version string to struct

* various version fixes

* fix build

* reorder code

* update spec

* rename to ProtoVersionsToExported and ExportedVersionsToProto

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-10-28 09:41:54 +00:00
colin axnér e306a852ff
update core IBC docs (#7560)
* update state

* add empty concept fields, update callbacks and messages

* update client creation, update and upgrade section

* add packet lifecycle concepts

* add host and proof section

* add connection handshake section

* add channel handshakes

* state transitions

* self review fixes

* Apply suggestions from code review

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

* apply @fedekunze review suggestions

* packet data section

* Apply suggestions from code review

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

* add @cwgoes and @fedekunze review suggestions

* fix typos

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 14:51:47 +00:00
colin axnér 3d46c672f6
Fix Optimistic Channel Handshake bugs (#7678)
* fix optimistic handshake bugs and add crossing hello test

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 14:34:25 +00:00
Federico Kunze 7ccd2675d7
ibc: refactor proto files (#7689)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 14:14:07 +00:00
Jack Zampolin 9befc6ced8
Wrap ProtoCodec in interface (#7637)
* WIP encoding change

* Add test that describes issue

* WIP debugging

* remove extra code

* Update codec/proto_codec.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-10-27 13:53:54 +00:00
antstalepresh 09a282dda3 basic migration for SubVote type 2020-10-27 21:50:11 +10:00
Aditya 48c72230f0
Create separate Write-Ack Event (#7683)
* use separate type for write ack

* change event-type

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 11:48:28 +00:00
Robert Zaremba 9bd42ace6b
simapp: rename MakeEncodingConfig to MakeTestEncodingConfig (#7681)
* simapp: rename MakeEncodingConfig to MakeTestEncodingConfig

* Updating the Changelog

+ Adding DEPRECATED attribute.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-27 11:33:48 +00:00
antstalepresh da0c3910a3 modify vote type on proto 2020-10-27 19:23:15 +10:00
colin axnér e4378e747d
IBC: panic on GetSignBytes and remove SubModuleCdc (#7645)
* panic on GetSignBytes and remove SubModuleCdc where possible

* fix build

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-10-23 17:14:12 +00:00
colin axnér c6cbe3a3db
Fix IBC Query cmds (#7648)
* fix query

* update comment
2020-10-23 16:31:32 +00:00
Robert Zaremba 6bc8ff2dfe
Use any as validator pubkey (#7597)
* protobuf pubkey type update

* wip2

* wip3

* solving types.NewValidator issues

* remove bech32 from validator type assignment

* update Validator interface

* Changelog update

* wip4

* update genutil

* fix simapp & x/ibc/testing tests

* update staking

* changelog update

* fix import cycle in tests

* fix amino panic on TestValidatorMarshalUnmarshalJSON

* fix TestValidatorMarshalUnmarshalJSON consensus_pubkey check

* Add UnpackInterfaces to HistoricalInfo

* fix TestHistoricalInfo

* update todos

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

* fix linter issues

* Fix migrate test

* Update CHANGELOG.md

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

* review comments

* cosmetic changes

* add UnpackInterfaces got GenesisRandomized test

* Validator.Equal reuses Validator.MinEqual

* fix test

* use Validator.Equal in tests

* Fix staking simulation TestRandomizedGenState

* Remove TODO

* use HistoricalInfo.Equal

* use proto.Equal

* rename Validator.GetConsPubKey to TmConsPubKey

* prefer require.Equal over reflect.DeepEqual

* SetHistoricalInfo using a pointer

* Fix TestQueryDelegation test

* Fix TestQueryValidators test

* Fix TestSimulateMsgUnjail test

* experiement with LegacyAmino instances

* Register codecs in all simapp tests

* Fix cli_test compilation problems

* fix typo sdk -> std

* fix typo

* fix TestPlanStringer

* Rename to MakeEncodingConfig

* Remove RegisterCodecsTests

* Use gRPC in GetCmdQueryValidators

* Empty status

* fix info log check

* linter fixes

* rename simapparams to simappparams

* Update simapp/test_helpers.go

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

* comments updates

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

Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-23 12:07:52 +00:00
yys 1542ecb18d
Bugfix gov votes querier to use votes params (#7589)
* bugfix gov votes querier to use votes params

* move partially used statement to the proper block

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-20 17:35:44 +00:00
Amaury Martiny 3c43370d0c
Add CommunitySpendProposals in migration (#7607)
* Add CommunitySpendProposals in migration

* Fix lint

* Avoid double registration

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-20 13:19:04 +00:00
atheeshp 155a6ad7fd
Refactor x/ibc to ADR 031 (#7576)
* WIP: Refactor x/ibc to ADR 031

* updated handler

* removed unsued

* fix

* Add proto service for ibc/transfer

* lint

* remove old upgrade handler

* added doc

* review changes

* fix tests

* formatter

* Add MsgServer wiring in RegisterServices

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 18:21:53 +00:00
Marie Gauthier eba4c8a264
Handle nil *Any in UnpackAny and add panic handler for tx decoding (#7594)
* Handle nil any in UnpackAny

* Add test

* Add flag back

* Update runTx signature

* Update Simulate signature

* Update calls to Simulate

* Add txEncoder in baseapp

* Fix TestTxWithoutPublicKey

* Wrap errors

* Use amino in baseapp tests

* Add txEncoder arg to Check & Deliver

* Fix gas in test

* Fix remaining base app tests

* Rename to amionTxEncoder

* Update codec/types/interface_registry.go

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

* golangci-lint fix

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 18:04:44 +00:00
Aaron Craelius 9e7eb0da00
Add MsgServer to Configurator for ADR 031 wiring (#7584)
* Add MsgServer to Configurator for ADR 031 wiring

* Add docs, wire up evidence & staking

* Add integration test

* Add comments

* Doc strings

* Update types/module/configurator.go

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

* Update types/module/configurator.go

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

* Wire up vesting

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 17:46:10 +00:00
Jun Kimura ba2799ec6d
fix sequence checks in solomachine (#7586)
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-10-19 13:35:52 +00:00
Robert Zaremba 8eaf2ececc
Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526)
* testing: refactore Validation and Delegation handling of x/staking

This Changeset introduces set of improvements for writing tests.

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

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

* add validator checks

* type change fixes

* use deprecated

* adding test slashing

* new network comment update

* working on tests

* Fix TestMsgPkDecode test

* Add UnpackInterfaces to MsgCreateValidator

* Fix tests

* Convert bech32 pubkey to proto

* Fix test

* fix v039/migrate_test/TestMigrate

* fix tests

* testslashing: rename Service to Helper

* file rename

* update TestMsgDecode

Co-authored-by: blushi <marie.gauthier63@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
2020-10-19 13:04:55 +00:00
colin axnér 0f8fdf60df
Remove ClientType func and update consensus state path (#7573)
* update paths and remove unused func

* fix bug

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 09:59:31 +00:00
colin axnér 6fa73998bd
Fix solomachine cmds (#7581)
* fix solo machine cli cmds

* polish

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 09:40:29 +00:00
Cory 8138605aed
Refactor x/auth/vesting to use ADR-031 (#7551)
* update auth/vesting module to use proto msg services

* rm accidental tmp files

* Update x/auth/vesting/msg_server.go

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

* golangci-lint fix

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 09:22:56 +00:00
colin axnér c40f3d02a0
remove id in localhost (#7577)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-10-17 21:05:26 +00:00
Amaury Martiny 58eabcb71f
Refactor x/evidence to ADR-031 (#7538)
* Refactor x/evidence to ADR-031

* Add hash in response

* Update changelog

* Update x/evidence/keeper/keeper.go

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

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

* Use msgServer struct

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-16 16:05:25 +00:00
atheeshp 18ef33caff
Refactor x/staking according to ADR 031 (#7556)
* Refactor x/staking according to ADR 031

* lint

* review changes

* review changes

* review changes

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-10-16 14:53:49 +00:00
atheeshp 6e569e1255
Refactor x/{gov, crisis} according to ADR 031 (#7533)
* Refactor x/gov according to ADR 31

* fix tests

* Refactor x/crisis according to ADR 031

* fix lint

* lint

* lint

* review changes

* lint

* review change

* fic doc

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-16 13:04:02 +00:00
Amaury Martiny 69e2b7df16
docs: Revert SPEC-SPEC and update x/{auth,bank,evidence,slashing} (#7407)
* Revert some changes from #7404

* Update x/slashing

* Address review comments

* Small tweak

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-16 12:42:48 +00:00
colin axnér 7818867163
ibc: update solo machine client command (#7579)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-10-16 09:24:48 -03:00
SaReN 332d8ec038
update upgrade query (#7567) 2020-10-15 19:02:45 +00:00
Zaki Manian c735a8eb81
Add the option of emitting amino encoded json from the CLI (#7221)
* Add the option of emitting amino encoded json

* Update AMINO JSON serialization with ConvertTxToStdTx

* Make the Amino flag more self documenting by serializing the BroadcastRequest type instead of StdTx

* Handle amino encoding error

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

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

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

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Apply suggestions from code review

Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* Fix go format

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-10-15 15:12:35 +00:00
Marie Gauthier c59a04d70f
[x/slashing] Implement Protobuf Msg Services (#7557)
* Update x/slashing to use proto msg service

* Fix proto-gen

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-15 14:38:15 +00:00
Federico Kunze 503b518efc
client: add GetAccount and GetAccountWithHeight to AccountRetriever (#7558)
* client: add GetAccount and GetAccountWithHeight to AccountRetriever

* update ADR

* address comments from review
2020-10-15 14:19:57 +00:00