Commit Graph

593 Commits

Author SHA1 Message Date
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
Jack Zampolin 4f52797931
Update DefaultHistoricalEntries to 100 (#6059)
* Update DefaultHistoricalEntries to 1000

* hist entries sims and comment on simapp

* changelog and godoc

* update sim param change

* update default to 100

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

* update app

* evidence store decoder

* add evidence to sim import export

* fix test

* prevent zero values on randomized genesis

* return empty evidences for genesis state

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

* add random consensus params

* make format

* make random pass

* remove comment

* revert change

* update ub key types

* extract Evidence params from state

* extract the random parameters from state

* clean the code

* update imports!

* mispelled back

* mispelled back

* add misspelled command

* update changelog

* remove useless linter to avoid misspell

* remove function

* use tendermint constants

* update import test

* remove debug comment

* Update baseapp/baseapp.go

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 18:24:13 +00:00
Alexander Bezobchuk b737e7f7f9
Remove JSON marshaler for base account (#6054)
* Remove JSON marshaler for base account

* Add changelog entries
2020-04-22 14:01:20 +00:00
Alexander Bezobchuk 37c92c5f39
Revert "Add consensus params into Simulation (#6002)" (#6046)
This reverts commit 65048683b5.
2020-04-21 21:46:34 +00:00
Federico Kunze 3ee975c57b
Merge PR #6037: refactor simulation decoder 2020-04-21 17:33:56 -04:00
Jonathan Gimeno 65048683b5
Add consensus params into Simulation (#6002)
* temporal commit

* add random consensus params

* make format

* make random pass

* remove comment

* revert change

* update ub key types

* extract Evidence params from state

* extract the random parameters from state

* clean the code

* update imports!

* mispelled back

* mispelled back

* add misspelled command

* update changelog

* remove useless linter to avoid misspell

* remove function

* use tendermint constants

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-21 18:28:43 +00:00
Mikhail Kornilov c15f112cf1
x/auth/ante: AccountKeeper expected interface used instead of the str… (#6040)
* x/auth/ante: AccountKeeper expected interface used instead of the strict auth.AccountKeeper dependency

* CHANGELOG.md update
2020-04-21 16:56:18 +00:00
Alexander Bezobchuk fea231556a
Move ModuleAccount to x/auth (#6029)
* Move ModuleAccount to x/auth

* Update x/auth module

* Update x/staking

* Update x/mint

* Update x/gov

* Update x/distribution

* Update simapp

* Update x/bank

* Update std codec

* Add changelog entries

* Update CHANGELOG.md

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

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-20 19:32:10 +00:00
Alexander Bezobchuk 1083fa948e
Merge PR #6010: Merge x/supply into x/bank 2020-04-20 11:22:12 -04:00
Federico Kunze 397ffbe119
x/ibc: update ICS09 Loopback Client (#6018)
* x/ibc: update ICS09 Loopback Client

* ibc/09-localhost: client state errors

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

* x/ibc: BeginBlocker for localhost client

* test fixes

* update client REST

* add tests
2020-04-17 22:36:12 -04:00
Greg Hill de00a7fed1
x/ibc: implement 09-localhost per specification (#5769)
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
2020-04-17 10:36:47 -04:00
Alexander Bezobchuk 4da4bb64df
Merge PR #6005: x/params: Raw Parameter Querying 2020-04-16 12:22:58 -04:00