Commit Graph

606 Commits

Author SHA1 Message Date
Alexander Bezobchuk dacbcef54d
cl & deps++ (#6582)
* cl & deps++

* Use PersistentPreRunE

* revert x/bank/client/cli/tx.go

* move to root level

* Use block mode by default

* Skip x/auth CLI tests
2020-07-02 19:35:42 +00:00
Jonathan Gimeno 8f96ec0585
REST bank transfers fail due to encoding. (#6536)
Bank module REST endpoint bank/accounts/{addr}/transfers
was returning invalid StdTx format.
2020-07-02 05:16:39 +02:00
Jonathan Gimeno 6a52c5a569
Remove DefaultParamspace and simplify simapp creation. (#6564)
* Remove DefaultParamspace and simplify simapp creation.

* Update changelog.

* Create function that inits ParamsKeeper.

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-01 13:57:29 +00:00
Alexander Bezobchuk d5049413ef
Merge PR #6525: x/bank: Refactor CLI & Tests 2020-06-30 16:59:21 -04:00
Aaron Craelius c0e48e1c43
Update ante handlers to use SignatureV2 (#6428)
* Update ante handlers to use SignatureV2

* WIP on test fixes

* WIP on test fixes

* Debugging CLI Tests

* CHANGELOG.md

* CHANGELOG

* Add missing tests for ante

* Add tests for verify signatures

* Update verify tests

* Fix register codec issue

* debug

* Cleanup

* Fix verify signature tests

* Remove viper

* remove keyring usage

* Fix review changes

* Fix simapp

* Fix ante tests

* Add reference issue

* Add test for multisignature

* Wrap sign error with sig

* Fix verify sign test

* Fix CHANGELOG.md

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-29 20:48:41 +00:00
Michael FIG 6251d28389
Merge PR #6529: Export validator addresses 2020-06-29 14:56:08 -04:00
Alexander Bezobchuk 9bf3ff75f5
Merge PR #6489: Test Network Testing Framework 2020-06-26 12:30:49 -04:00
Jonathan Gimeno 7c0fa69748
Add TimeIotaMs to export GenesisFile (#6510)
* Add TimeIotaMs to export GenesisFile.

* include changelog entry

* Fix changelog.

* add test for exporting consensus params

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-26 08:26:11 +00:00
Marko 67d079e68a
store/rootmulti: add SimpleProofsFromMap (#6481)
* add sipleproofs from map to sdk

* bring changes from tendermint pr

* bring back tmhash

* add changelog

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-23 08:05:36 +00:00
colin axner eb3f7e6473
rename blacklist to blocked (#6455)
* rename blacklisted to cannotSendTo

* add changelog

* rename to blockedAddrs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-17 13:32:49 +00:00
Aaron Craelius c13809062a
Update TxBuilder to use SignatureV2 (#6443)
* Update TxBuilder to use SignatureV2

* Fix unit tests

* Lint

* lint

* Cleanup

* Address review feedback

* Add Sign tests

* Add more cases for sign tests

* Fix lint

* Fix gofmt

* Deprecate StdTx

* Undeprecate StdTx, but leave a comment to use the protobuf Tx

* Address review comment

Co-authored-by: anilCSE <anil@vitwit.com>
2020-06-16 19:57:37 +00:00
Jonathan Gimeno c134e8974e
Move some Param types from Keeper to Types in staking (#6451) 2020-06-16 19:59:36 +02:00
Alexander Bezobchuk 6a05b83069
Merge PR #6426: Migrate API Server 2020-06-15 13:39:09 -04:00
Aaron Craelius 60f7edfe3d
Add SignatureV2 infrastructure (#6373)
* Updte tx generator

* Add sigv2, PublicKeyCodec

* revert changes

* revert changes

* updates

* Updates

* Integrate multisig support

* Undo move

* remove func

* undo

* godocs

* godocs, cleanup

* Cleanup

* godocs, tests

* lint

* Re-enable VerifyBytes

* Address comments

* Fix imports

* Update crypto/types/multisig/multisignature.go

* Add test for MultiSignatureData

* Add nested multisig case

* Add test for AddSignatureV2

* Add changelog

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
2020-06-12 18:13:20 +00:00
dauTT 14e3aa1265
x/staking: remove alias.go usage (#6397)
* x/staking: remove alias.go usage

* Fix formatting and Add entry in CHANGELOG.md

* Add missing end curly parenthesis

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-12 14:54:37 +00:00
Aditya d82c2e6a94
Enforce ProofSpecs in 23-Commitment (#6374)
* enforce spec ordering

* modify clients to pass in specs to verify functions

* start fixing tests

* Apply suggestions from code review

* enforce spec length and proof length match

* fix all tests

* add argument to constructor:

* fixed msg client and tests

* appease linter

* Apply suggestions from code review

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

* finish fixes from review

* add back proof-specific checks

* Apply suggestions from code review

* more robust proof spec checks

* add CHANGELOG entries

* do not hardcode proofspecs in 23-commitment

* fix client modules

* fix tests

* appease linter

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-12 10:45:40 +00:00
Jonathan Gimeno b09d6728ec
Rename all methods IsEmpty to Empty to be consistent with all codebase (#6409)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-11 23:32:24 +02:00
Federico Kunze 0215b5c6cd
client: fix signing algorithm (#6405)
* crypto/keyring: fix signing algorithm

* client: tests

* minor fixes

* changelog

* address @alexanderbez comments

* Update crypto/keyring/keyring.go

* Update crypto/keyring/signing_algorithms.go

* Update crypto/keyring/keyring.go

* Update crypto/keyring/signing_algorithms.go

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

* fix test

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-11 14:30:42 +00:00
Jonathan Gimeno 79c308ae4a
Concept PR simplify Module (#6231)
* add test of alternative impl

* simplify query route too

* change name querier

* simplify register routes

* revert change

* add route

* add router

* first step refactor

* refactor

* update documentation

* update

* add format

* simplify appmodule

* update changelog

* rename vars

* remove interface

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-10 18:48:16 +00:00
Aditya e12fa58e14
Convert simple proof to ics23 proof (#6390)
* convert simple proof to ics23 proof

* add CHANGELOG entries

* Apply suggestions from code review

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-10 13:23:40 -04:00
Alexander Bezobchuk c0aff2e1f5
baseapp: Enhance Tx Message Data (#6384)
* Enhance tx message data

* Fix allocation

* cl++

* Fix lint
2020-06-10 04:02:01 -04:00
Aditya d9e1497e89
Switch IAVL Store query to use ics proofs (#6324)
* switch iavl store to use ics proof

* fix proofs to return for correct height

* appease linter

* Register commitment op correctly

* Make CommitmentOp generic over all ics23 specs (#6331)

* Make the CommitmentOp generic over all ics23 ProofSpecs, using Type to distinguish

* Register SimpleMerkle ics23 proof op as well

* Addressed linter issues

* move commitment proof to types

* Apply suggestions from code review

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

* address review comments:

* Apply suggestions from code review

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

* allow proofs against empty store

* address review comments

* Update store/types/proof.go

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

* add changelog

Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-06-08 15:02:25 -04:00
Alessio Treglia 65ea305336
x/auth: add sign-batch command (#6350)
The command processes list of transactions from file
(one StdTx each line), generate signed transactions
or signatures and print their JSON encoding, delimited
by '\n'. As the signatures are generated, the command
increments the sequence number automatically.

Author: @jgimeno
Reviewed-by: @alessio
2020-06-08 17:19:29 +02:00
Jonathan Gimeno 626f9b62c5
add pagination (#6163)
* add pagination

* make test pass with validators

* add pagination option

* unbonding delegations test added

* test unbondedvalidators pagination

* clean test

* remove comment

* remove comment

* add page and limit to unbonding delegations

* add flag limit and page for delegations-to command

* refactor hardcoded string values

* udpate page and limit for validator

* update changelog

* add pagination option

* add defaults

* Update CHANGELOG.md

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-06 17:32:15 +00:00
Aaron Craelius 43947ca2ef
Add RegisterQueryService to AppModule (#6336)
* Add RegisterQueryService to AppModule

* Update CHANGELOG.md

* Update CHANGELOG.md

* Wire up BaseApp, fix tests

* Add mock test

* add missing file

* Update types/module/module.go

* Update CHANGELOG.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-06 07:59:57 +00:00
Mikhail Kornilov ced080af95
Baseapp recovery middleware (#6053)
* baseapp: custom panic handling withing app.runTx method

* baseapp: recovery middleware chain unit test added

* CHANGELOG.md update

* ADR-22 link added; godocs update

* CHANGELOG.md: ADR-022 url fix

* CoreDocs added for custom panic recovery middleware
2020-06-05 16:48:18 +00:00
Aaron Craelius 81d647e505
Move codec.RegisterCrypto and codec.Cdc to new packages (#6330)
* Move codec.Cdc to legacy_global.Cdc

* Update CHANGELOG.md

* Updates

* nit

* Fix imports

* Updates

* Use cosmos multisig instead of tendermint multisig everywhere

* Fix tests

* Rename legacy_global -> legacy

* Add doc.go

* Linting, move all RegisterCrypto calls to crypto/codec

* Update crypto/codec/amino.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-04 10:38:24 +00:00
Aaron Craelius fed0c2317d
Change GetQueryCmd to take client.Context (#6326)
* Change GetQueryCmd to take a client.Context

* Update CHANGELOG

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-03 20:15:11 +00:00
Aaron Craelius 2e11c81668
Make sdk.Msg implement proto.Message (#6327)
* Make sdk.Msg implement proto.Message

* Cleaning up

* Cleaning up

* Update CHANGELOG.md

* Lint fixes

* Lint fixes

* fix tests

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-03 19:52:05 +00:00
Marko 8d12c948b2
Merge PR #6332: add changelog entry 2020-06-03 10:19:08 -04:00
SaReN 39f53ac22f
client: rename CliContext to Context (#6290)
* Refactor CliContext as Context

* Fix lint issues

* Fix goimports

* Fix gov tests

* Resolved ci-lint issues

* Add changelog

* Rename cliCtx to clientCtx

* Fix mocks and routes

* Add changelog

* Update changelog

* Apply suggestions from code review

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

* merge client/rpc/ro{ot,utes}.go

* Update docs

* client/rpc: remove redundant client/rpc.RegisterRPCRoutes

* regenerate mocks

* Update ADRs

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-01 12:46:03 +00:00
vincent 74329c619f
Fix typo (#6295)
* fix typo

* add changelog

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-29 13:58:44 +00:00
ahmedaly113 f3962eb29b
fix #6287 sending multiple transactions from an account make nonce sequence stuck (#6291)
* fix #6287 sending multiple transactions from an account make nonce sequence stuck

* add change log

* fix ante unit test after #6287 fix

* Update x/auth/ante/sigverify.go

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-28 21:07:12 +00:00
vincent 71770b5a78
Merge PR #6283: Save account for multi sending 2020-05-27 23:00:01 -04:00
Alessio Treglia 37882fbf4a
x/auth: remove unused passphrase arguments (#6270)
The new keyring does not handle passphrases anymore.
2020-05-22 13:34:15 +00:00
Aaron Craelius 850419fffd
Tx CLI proto module interface (#5989)
* WIP

* WIP

* WIP on removing x/auth dependency from client/tx

* Revert unneeded changes

* Simplify cli tx UX

* Wire up bank tx REST routes

* Fix assignment issue

* Wire up bank NewSendTxCmd

* fix lint

* revert file

* revert file

* fix simcli

* Refactor AccountRetriever

* Fix build

* Fix build

* Fix build

* Fix integration tests

* Fix tests

* Docs, linting

* Linting

* WIP on all modules

* Implement other module new tx cmd's

* Fix cmd's

* Refactor existing GetTxCmd

* Fix cmd

* Removing deprecated code

* Update ADR 020 & CHANGELOG

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Lint

* Fix client/tx tests

* Fix mocks

* Fix tests

* Lint fixes

* REST tx migration

* Wire up REST

* Linting

* Update CHANGELOG, docs

* Fix tests

* lint

* Address review feedback

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* group vars

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-21 21:29:34 +00:00
Alexander Bezobchuk 970e009653
cl++ (#6265) 2020-05-21 14:29:55 +00:00
Marko a201967fd1
multisig: add type and bitarray (#6241)
* add multisig and bitarray

* remove random message

* add changelog entry

* bring back the concrete type

* move changelog entry

* move bitarray to crypto/types

* fix build

* remove commented code

Co-authored-by: Aaron Craelius <aaron@regen.network>
2020-05-20 20:10:49 +00:00
Aaron Craelius 70767c87c4
Update x/gov to use Any (#6147)
* Update x/gov to use Any

* Fixes

* Remove MsgSubmitProposalLegacy

* Update CHANGELOG.md

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

* Fix query JSON issue

* Fix gov tests

* Revert custom Any Equals

* Re-remove types

* Rename receivers

* Fix imports in gov

* Sort imports

* Make amino JSON signing work with Any

* Run proto-gen

* Create full amino wrapper

* Fix errors

* Fixes

* Fix tests

* Test fixes

* Fix tests

* Linting

* Update ADR 019 and CHANGELOG

* Updated ADR 019

* Extract Marshal/UnmarshalProposal

* fix error

* lint

* linting

* linting

* Update client/keys/parse.go

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

* linting

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

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

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

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

* Address review feedback

* Add godocs

* Fix errors

* fix errors

* revert file

* Address review feedback

* Address review feedback

* Stacktrace debug flag

* Fix tests

* Address review feedback

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +00:00
Aleksander Kochetkov 62147290c1
Merge PR #6212: Remove Get* Prefixes from Key Construction Functions 2020-05-13 17:23:00 -04:00
Federico Kunze 6d7fc911c2
x/distribution: register MsgFundCommunityPool (#6211) 2020-05-13 12:14:45 -04:00
Yongwoo Lee d4882606d5
Merge PR #6195: Add codespace to broadcast(sync/async) response 2020-05-12 11:26:54 -04:00
Federico Kunze 80be50319c
baseapp: track events emitted from AnteHandler (#6187)
* baseapp: append AnteHandler events to tx result

* changelog

* baseapp tests

* fix test

* update changelog

* update log

* move event out from conditional

* minor update

* fix panic

* add switch case

* remove result on error

* change conditional

* check for event len

* update tests
2020-05-11 18:23:41 -04:00
Alexander Bezobchuk fe9fe87693
REST: Add 'max-body-bytes' Flag (#6167)
* Add max-body-bytes flag for REST service

* Add changelog entries

* Change types
2020-05-07 17:49:08 +00:00
Marko 1db967bd2e
Merge PR #6150: update master with release changelog 2020-05-05 16:10:48 -04:00
Sebastien La Duca 18890a225b
add string method to gas meter (#6137)
* add string method to gas meter

* update changelog

* Update store/types/gas.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-04 19:23:44 +00:00
Alessio Treglia 2414e5bdd4
x/auth: turn sign --validate-sigantures into a standalone command (#6108)
--validate-signatures should not be a flag of the sign command
as the operation performed (transaction signatures verification)
is logically distinct.

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

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

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

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

x/module/client/testutil/

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-04 13:55:16 +00:00
Anton Kaliaev f0b72b93be
server: remove deprecated UpgradeOldPrivValFile (#6079)
* server: remove deprecated UpgradeOldPrivValFile

OldFilePV was deprecated in Tendermint Core v0.28 and will be removed in
upcoming v0.34.5 release.

* remove imports

* Add changelog entries

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-04-27 16:08:44 +00:00
Alexander Bezobchuk d90b2e7a99
Allow Unjail of Non-Bonded Jailed Validator (#6061)
* Use correct API and add TODO

* Allow unjail without signing info

* Add unit test

* Update godoc

* Add changelog entries

* Fix TestUndelegateSelfDelegationBelowMinSelfDelegation

* Fix delegation tests

* Revert API call
2020-04-26 17:38:33 +00:00
Federico Kunze e9b5fc9716
ibc/03-connection: import export GenesisState (#6067)
* ibc/03-connection: import export GenesisState

* add connection paths

* add genesis to ibc module root package

* genesis tests

* iterator and fixes

* changelog

* lint fixes

* godoc

* revert validation
2020-04-24 15:52:07 +00:00