Commit Graph

372 Commits

Author SHA1 Message Date
Andrei Ivasko 410d8edb38
Add client config subcommand to CLI (#8953)
* add client config

* addressed reviewers comments

* refactored,ready for review

* fixed linter issues and addressed reviewers comments

* Bump golangci-lint

* fix linter warnings

* fix some tests

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-03-31 12:04:33 +02:00
Ian Norden feed37dc56
ADR-038 Part 1: WriteListener, listen.KVStore, MultiStore and KVStore updates (#8551)
* StoreKVPair protobuf message definition and generated go types

* store WriteListener

* update MultiStore, CacheWrap, CacheWrapper interfaces

* adjust KVStores to fit new CacheWrapper interface

* new ListenKVStore

* adjust multistores to fit new MultiStore interface and enable wrapping returned KVStores with the new ListenKVStore

* typo fixes in adr

* ListenKV Store test

* update server mock KVStore and MultiStore

* multistore unit test; fix multistore constructor

* update changelog

* fix bug identified in CI

* improve codecov, minor fixes/adjustments

* review fixes

* review updates; flip set to delete in KVStorePair, updated proto-docs from running 'make proto-gen'
2021-03-30 16:13:51 -04:00
Robert Zaremba 7568b6680a
Remove bech32 PubKey support (#7477)
* Move PubKey bech32 to legacy package and migrate the usage where possible

* update /server

* wip

* move proto json encoding helper functions to internal

* update internal/marshal

* wip

* update sections which needs legacybech32

* update validators output

* fix conflicts

* slashing update

* add more tests and helper function for ANY JSON serialization

* update slashing

* Update function documentation

* Rename code any-marshal helper functions

* Update pubkey unpacking test

* Update test comments

* solve TestDecodeStore

* solve legacytx issues

* all code compiles

* keyring tests

* keyring cleanup

* remove AssertMsg

* fix some tests

* fix add_ledger_test.go

* update cli tests

* debug cli test

* rename clashed bech32 names

* linter fixes

* update tmservice tests

* linter: update legacy deprecated checks

* fix names

* linting

* legacybech32 pubkey type rename

* fix staking client

* fix test compilation

* fix TestGetCmdQuerySigningInfo

* rename NewIfcJSONAnyMarshaler

* keyring: remove duplicated information from multinfo structure

* todo cleanups

* Update Changelog

* remove some legacybech32 from tests

* remove todos

* remove printlnJSON from /server CLI and amino encoding

* remove protocdc.MarshalJSON

* client/show remove duplicated function

* remove protocdc package

* comment update

* remove legacybech32.MustMarshalPubKey from a test

* add todo

* fix TestPublicKeyUnsafe test

* review update

* fix bech32 UnmarshalPubKey

* Use codec.MarshalIfcJSON

* fix linter issues

* merging conflict: fix codec.Unmarshal calls

* cleanups

* Update CHANGELOG.md

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

* Reword changelog updates

* use pubkey.String for comparison in Test_runAddCmdLedgerWithCustomCoinType

* Update GetCmdQuerySigningInfo example

* cli: update keys add docs

* Add errors AsOf and errors.ErrIO type

* restore multisigPubKeyInfo structure bring it back to multiInfo struct

* Update codec/proto_codec.go

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

* Update crypto/keys/ed25519/ed25519_test.go

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

* Update codec/proto_codec.go

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

* move pubkey any marshaling tests

* Apply suggestions from code review

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

* review updates

* adding missing return

* errors: use IsOf instead of AsOf

* keyring: add a correct check for key not found in keyring.Get

* add checkKeyNotFound

* fix linter issues

* fix: keyring key not found check

* fix keyring tests

* fix linting issues

* cli tests

* fix: 'simd keys show <key> -p'

* fix: TestVerifyMultisignature

* rename keyring Bech32... functions to Mk...

* fix RunAddCmd

* Update pubkey display

* wip

* add more tests

* udate keyring output tests

* remove todo from ledger tests

* rename MkKeyOutput

* Changelog update

* solve liner issues

* add link to github issue

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2021-03-25 14:53:22 +00:00
Frojdi Dymylja ac48ffe748
gRPC: fix server reflection (#8945)
* add: gogoreflection

* fix: server reflection

* fix: make tests resolve imports in a transitive way

* chore: cleanup getMessageType

* chore: lint

* add: extensions reflection

* chore: update interact-node.md docs

* chore: update CHANGELOG.md

* Update server/grpc/gogoreflection/fix_registration.go

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

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-03-22 19:40:34 +00:00
Alessio Treglia 42919c8f33
server: wrap errors (#8879)
Follow-up of #8842
2021-03-15 13:50:12 +00:00
Alessio Treglia d02a39739b
server: try avoid the "address already in use" error (#8842)
Replace defer l.Close() with l.Close() to shutdown the listener
as fast as possible to avoid the "bind: address already in use"
error that so often occurs in CI build.

From: https://github.com/phayes/freeport/pull/8
Reference: #6671

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-03-15 10:15:48 +00:00
Frojdi Dymylja 288f8dda4b
[rosetta] implement balance tracking and redo tx construction (#8729)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-03-11 15:01:29 +00:00
Amaury a93edeef4c
Move QueryTx functions to x/auth/tx (#8734)
* Use x/auth/client for querying Txs

* Fix lint

* Fix small test

* Update todos

* Move QueryTx functions to x/auth/tx

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-03-01 15:57:28 +00:00
Federico Kunze cc70749b07
keyring: remove hardcoded default passphrase on NewMnemonic (#8662)
* keyring: remove hardcoded default passphrase on NewMnemonic

* minor changes

* changelog

* address @alessio's comment

* Update CHANGELOG.md

* test fixes

* update comment and test

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-23 16:49:09 +00:00
Aleksandr Bezobchuk 2f069c90b3
server: fix interceptConfigs (#8641)
* server: fix interceptConfigs

* cl++

* revert call

* update error message

* revise TestInterceptConfigsPreRunHandlerDoesNotMixConfigFiles

* remove TestInterceptConfigsPreRunHandlerDoesNotMixConfigFiles

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-22 11:51:35 +00:00
Helder Moreira c6355fdb99
utils: fix wrong filename in error message (#8643) 2021-02-19 14:46:58 +00:00
Amaury 73e38e4009
Use service Msgs in CLI tx commands (#8512)
* Use service Msgs in CLI tx commands

* Update comment

* Gracefully support amino signing

* CLI to use svc msg

* Fix lint

* Use fq method name in events

* Update tests

* Fix quering events

* Add docs

* Fix test build

* Fix events

* Fix search for events

* Handle old andd new event quering

* Use merge events

* Better encCfg

* Add page in search

* Fix tests

* Update test and comments

* Update x/auth/legacy/legacytx/stdsign.go

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>

* Fix conflict for weighted vote

* Make CopyTx actually run

* Fix CopyTx

* Fix test

* Add changelog entry

* Remove useless code

* Add msgs tests

* Remove testing proto Msg via CLI

* Fix lint

* Fix test

* Implement GetSignBytes on ServiceMsg

* Fix %T

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-18 18:00:19 +00:00
Amaury e306e5b6f5
Make gRPC requests go through tendermint Query (#8549)
* Make gRPC requests go through tendermint Query

* Remove commented code

* Dry run in InitChain?

* Save type of first run

* Add metadata in repsonse

* Factorize some code

* Fix lint

* Update comments

* Fix md test

* Fix test expected

* Don't put RunGRPCQuery as clientCtx method

* Update baseapp/grpcserver.go

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

* Address review comments

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2021-02-15 10:01:44 +00:00
Alessio Treglia 2e04f2778f
snapshots: document use of ioutil.TempDir() (#8508)
Document with inline comments the changes introduced
in https://github.com/cosmos/cosmos-sdk/pull/8475.

Run make format.
2021-02-04 09:54:01 +00:00
Michael FIG ce161c4f0c
fix: tendermint subcommands should not create missing files (#8481)
If the user specifies an incorrect `--home`, then the old behaviour
would automatically populate it with fresh values, but we should
fail instead.
2021-02-02 16:57:58 +00:00
Artur Troian c252a60ff8
fix: bind values from env variables to flags (#8337)
allows clients access values in env variables

Signed-off-by: Artur Troian <troian.ap@gmail.com>
2021-01-29 01:58:44 +00:00
Frojdi Dymylja 5ed11519e0
[appd] fix: gRPC web address default flag value (#8399)
* fix: flags grpc web default address

* chore: update CHANGELOG.md

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-01-22 04:12:22 +00:00
SaReN 57f5e96570
Rosetta API implementation (#7695)
Ref: #7492

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-01-21 09:33:02 +00:00
MD Aleem b771effc6c
gRPC-web proxy (#8077)
* init

* WIP config

* WIP add proxy server

* fmt

* WIP

* setup proxy server

* clean go.mod

* lint

* lint

* lint

* custom codec

* lint

* add comments

* change grpc-proxy port

* add grpc-web

* update server/start.go

* add tests

* add test with client

* Update server/start.go

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

* Update server/start.go

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

* Update server/start.go

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

* review changes

* review changes

* Update server/start.go

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-18 18:25:22 +00:00
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
likhita809 1e7ab564ca
update appd export (#8228)
* update appd export

* Update export.go

* Update export.go

* Update server/export.go

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

* Update export.go

Co-authored-by: Likhita Polavarapu <likhita@vitwit.xyz>
Co-authored-by: MD Aleem <72057206+aleem1314@users.noreply.github.com>
Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-04 20:12:45 +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
Aleksandr Bezobchuk 227ac45dec
server: init commit (#8144)
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-10 19:12:42 +00:00
Jonathan Gimeno c0f3039fc3
make it exit gracefully. (#8101)
* make it exit gracefully.

* add kig message

* git update error code

* exit with error code

* exit with 0

* Update server/start.go

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-12-10 11:37:57 +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
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
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
MD Aleem c58a8923a0
gRPC-gateway routes as alternative to legacy tendermint REST endpoints (#7965)
* WIP

* WIP setup

* WIP setup testsuite

* add node_info

* add GetLatestBlock,GetBlockByHeight grpc endpoints

* add GetValidatorSetByHeight, GetLatestValidatorSet

* fix lint

* fix tests

* proto format

* Update Makefile

* review changes

* Makefile format

* handle nil pagination

* rename query.go to service.go

* format Makefile

* format Makefile

* review changes

* review changes

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-25 15:58:11 +00:00
Neeraj Murarka 6c9a02bc34
Fixed help message for export's 'jail-whitelist' command to be clearer (#7885)
* Fixed help message for export's 'jail-whitelist' command to be clearer

* Update server/export.go

Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 12:53:18 +00:00
Amaury Martiny 15b285dd0d
Fix creation of local RPC node in clientCtx (#7840)
* server: only register the Tx service if the API or gRPC are enabled

Only registers the Tx service on an app, if either API or gRPC are enabled.
This is because, enabling the service starts a local Tendermint node, which
is unnecessary and expensive, if neither of those operations are explicitly
enabled.

* Fix lint

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-10 13:01:55 +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
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
Emmanuel T Odeke 9f17bc77af
baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values (#7663)
* baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values

Rejects gRPC connections that send out-of-range x-cosmos-block-height
values that previously weren't checked for. We now reject any negative
values and any value greater than max(int64) aka >9223372036854775807.

Also added an enforcement for returning an error if any negative heights
are passed into (*BaseApp).createQueryContext.

Fixes #7662

* baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values

Rejects gRPC connections that send out-of-range x-cosmos-block-height
values that previously weren't checked for. We now reject any negative
values and any value greater than max(int64) aka >9223372036854775807.

Also added an enforcement for returning an error if any negative heights
are passed into (*BaseApp).createQueryContext.

Fixes #7662

* Address Robert's feedback to extract negative height checker

* Fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-03 18:35:22 +00:00
Aleksandr Bezobchuk 854430e617
Add log_level CLI flag back (#7789) 2020-11-03 17:14:56 +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
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
Anil Kumar Kammari 51ac6f876b
Rename RegisterGRPCRoutes (#7696)
* Rename

* Fix missing

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-28 11:39:49 +00:00
Robert Zaremba 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
Aaron Craelius 73e7dad713
Use InterfaceRegistry as AnyResolver for grpc-gateway (#7646) 2020-10-23 13:49:18 +00:00
Emmanuel T Odeke c6558fbcb9
server: catch and return unhandled errors in interceptConfigs (#7587)
Catches and returns unhandled errors after stat-ing for the configFile,
instead of assuming that we'd only encounter a non-existent error.
Added a regression test to lock-in checks for unhandled errors like
Permission errors, which is representative of all the errors that
haven't been accounted for.

Fixes #7578

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 12:41:44 +00:00
Eric 8384a5a180
fix: Rework InterceptConfigsPreRunHandler to make sure configuration … (#7501)
* fix: Rework InterceptConfigsPreRunHandler to make sure configuration is pulled from all Viper sources

* docs: Add configuration documentation in a new file
2020-10-16 13:56:10 +00:00
Amaury Martiny 55242a659c
Add ADR 031 BaseApp and codec infrastructure (#7519)
* Refactor RegisterQueryServices -> RegisterServices

* Cleaner proto files

* Fix tests

* Add MsgServer

* Fix lint

* Remove MsgServer from configurator for now

* Remove useless file

* Fix build

* typo

* Add router

* Fix test

* WIP

* Add router

* Remove test helper

* Add beginning of test

* Move test to simapp?

* ServiceMsg implement sdk.Msg

* Add handler by MsgServiceRouter

* Correct signature

* Add full test

* use TxEncoder

* Update baseapp/msg_service_router.go

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

* Push changes

* WIP on ServiceMsg unpacking

* Make TestMsgService test pass

* Fix tests

* Tidying up

* Tidying up

* Tidying up

* Add JSON test

* Add comments

* Tidying

* Lint

* Register MsgRequest interface

* Rename

* Fix tests

* RegisterCustomTypeURL

* Add changelog entries

* Put in features

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Update baseapp/msg_service_router.go

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

* Address review comments

* Address nit

* Fix lint

* Update codec/types/interface_registry.go

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

* godoc

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

* Update server/util.go

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

* Update baseapp/params.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-10-14 06:20:52 +00:00
Neeraj Murarka 61d5844705
Corrected 'unsafe-reset-all' help text (#7504) 2020-10-10 13:02:12 +02:00
Anil Kumar Kammari d55c1a2665
Change `address` from bytes to bech32 strings (#7242)
* init

* Fix bank proto messages

* missing conversions

* remove casttype for addresses

* Fix tests

* Fix consaddress

* more test fixes

* Fix tests

* fixed tests

* migrate missing proto declarations

* format

* Fix format

* Fix alignment

* Fix more tests

* Fix ibc merge issue

* Fix fmt

* Fix more tests

* Fix missing address declarations

* Fix staking tests

* Fix more tests

* Fix config

* fixed tests

* Fix more tests

* Update staking grpc tests

* Fix merge issue

* fixed failing tests in x/distr

* fixed sim tests

* fixed failing tests

* Fix bugs

* Add logs

* fixed slashing issue

* Fix staking grpc tests

* Fix all bank tests :)

* Fix tests in distribution

* Fix more tests in distr

* Fix slashing tests

* Fix statking tests

* Fix evidence tests

* Fix gov tests

* Fix bug in create vesting account

* Fix test

* remove fmt

* fixed gov tests

* fixed x/ibc tests

* fixed x/ibc-transfer tests

* fixed staking tests

* fixed staking tests

* fixed test

* fixed distribution issue

* fix pagination test

* fmt

* lint

* fix build

* fix format

* revert tally tests

* revert tally tests

* lint

* Fix sim test

* revert

* revert

* fixed tally issue

* fix tests

* revert

* fmt

* refactor

* remove `GetAddress()`

* remove fmt

* revert fmt.Striger usage

* Fix tests

* Fix rest test

* disable interfacer lint check

* make proto-format

* add nolint rule

* remove stray println

Co-authored-by: aleem1314 <aleem.md789@gmail.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 10:25:37 +00:00
Anil Kumar Kammari ca7b31dd5d
Register swagger API (#7246)
* init

* Fix statik gen

* Fix swagger

* Change swagger url

* Fix swagger serve

* remove ibc swagger from legacy docs

* Add old routes config

* Move swagger api to app.go

* add godoc

* Fix inputs

* Fix swagger dir

* Fix statik

* refactor

* fmt

* fix doc

* Fix swagger config check
2020-09-19 00:34:56 +00:00