Commit Graph

66 Commits

Author SHA1 Message Date
Alexander Bezobchuk 8670a10564
Merge PR #6595: Single Binary & Command Refactor 2020-07-07 11:40:46 -04:00
Jonathan Gimeno 3c76084bf5
Merge PR #6596: Genutil remove global viper 2020-07-06 17:48:54 -04:00
Aaron Craelius 2f44fbf2ab
Add support for protobuf TxGenerator and SIGN_MODE_DIRECT (#6385)
* Add TxWrapper, encoder, decoder and DirectModeHandler

* fix pkg name

* Update API and leave test TODO's

* Update TxWrapper API

* tests for tx wrapper (#6410)

* WIP: added test for direct mode handler

* updated code

* Add msg

* Update TxWrapper API

* Fix pubkey declaration

* Add pubkey for tests

* Fix SetFee

* Remove logs

* Avoid global var declaration for tests

* Add test for GetPubKeys

* Fix direct signing tests

* Add more test cases for GetSignBytes

* Revert SetFee API

* Remove logs

* Refactor tests

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>

* Refactoring

* Refactoring

* Integrate SignatureV2 API

* Fix wrapper tests

* Fix tests

* Linting and API tweaks

* Update API

* WIP on updating API

* Fix tests

* Update to new SigVerifiableTx

* Rename

* Update docs to reflect ADR 020

* proto-gen

* proto docs

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* Add tests

* Refactor and improving test coverage

* WIP on test coverage

* WIP on test coverage

* proto-gen

* Fix CompactBitArray.Size() bug

* Rename

* Remove Builder interface

* Address review comments

* Update x/auth/tx/sigs.go

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

* Update x/auth/tx/encoder.go

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

* Update x/auth/tx/encoder.go

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

* Address review feedback

* Fix build issues

* Resolve conflicts

* Fix ValidateBasic test coverage

* Add test for malicious multisig

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-06 17:03:45 +00:00
Alexander Bezobchuk 51df2f2033
Module Viper Removal (#6604)
* Remove viper

* Remove viper

* Remove viper

* Skip TestCLIValidateGenesis

* remove cruft leftover

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-06 10:12:00 +00:00
Alexander Bezobchuk 37cc04081e
Fix Current Integration Tests (#6570)
* fix attempt

* fix test
2020-07-01 18:37:59 +00:00
Alexander Bezobchuk 35312d098e
JSON Codec Updates (#6444)
* Initial commit

* More updates

* Fix tests

* CLI test updates

* Updates

* Updates
2020-06-16 00:20:50 +00:00
dauTT 1783f5ef1e
x/gov: remove alias.go usage (#6432) 2020-06-13 11:07:51 +02:00
dauTT 73bdb7d190
Merge PR #6424: x/mint - remove alias.go usage 2020-06-12 20:26:19 -04:00
atheeshp 4ecbd00436
missing cli tests for distr and mint (#6349)
Add cli tests for distribution and mint modules.

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-06-11 13:03:43 +02:00
SaReN 0786e68296
Add proto compatible community spend cli tx (#6215)
* Add NewSubmitProposal for x/distribution

* Addressed comments

* Fix description for fund tx

* Remove old splitAndApply

* Update utils

* Add missing flag

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-09 10:18:44 +00: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
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
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
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
Alessio Treglia aeee097b2f
spring cleanup (#5991)
* Make format

* Fix golangci-lint warnings

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-14 19:13:15 +00:00
SaReN 192f259e77
Merge PR #5967: Fixed cliCtx in tx cli 2020-04-09 10:00:10 -04:00
SaReN ed9f488fd9
Merge PR #5941: Add proto compatible x/distribution tx cli 2020-04-08 11:05:14 -04:00
Marko d657513741
lint: various linting fixs (#5825)
* lint: various linting fixs

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* more linting

* more linting fixes

* more errchecking

* comment out errcheck for now

* undo error check

* address some comments

* remore require error

* change delete to batch delete

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-20 19:24:18 +00:00
Jonathan Gimeno 8c7bb89549
Implementing --offline flag (#5810)
Closes: #5448
2020-03-19 02:49:33 +01:00
Jonathan Gimeno 382e5021b2 update cli documentation distribution 2020-03-11 18:06:39 +01:00
Jonathan Gimeno 36554e73e2 refactor cli tx for distribution param change request 2020-03-11 18:03:47 +01:00
Alessio Treglia b647824716
Refactor x/auth/client/utils/ (#5555)
Packages named utils, common, or misc provide clients with no
sense of what the package contains. This makes it harder for
clients to use the package and makes it harder for maintainers
to keep the package focused. Over time, they accumulate dependencies
that can make compilation significantly and unnecessarily slower,
especially in large programs. And since such package names are
generic, they are more likely to collide with other packages
imported by client code, forcing clients to invent names to
distinguish them.

 cit. https://blog.golang.org/package-names
2020-01-24 16:40:56 +00:00
Alexander Bezobchuk 214024431f
Merge PR #5508: Fix and Return Height in x/distribution REST Handlers 2020-01-10 16:10:37 -05:00
Alexander Bezobchuk bf41deac62
Merge Pr #5506: Refactor use of parameters in x/distribution to match module spec 2020-01-10 15:08:14 -05:00
Ferenc Fabian 8353680115 Merge PR #5442: Remove of the client/alias.go 2019-12-23 11:05:47 -05:00
kaustubhkapatral d12919987a Modified examples in distribution module (#5441) 2019-12-21 15:40:03 -03:00
Alexander Bezobchuk bcca045caf
Merge PR #5384: Fund Community Pool -- Part II 2019-12-10 23:02:15 -05:00
Riccardo Montagnin 09bd174a49 Merge PR #5249: Support for sending funds to the community pool - Part I 2019-12-10 14:09:22 -05:00
Alessio Treglia d4c831e63a Drop on-disk keybase in favor of keyring (#5180)
* Switch keys commands to keyring

* Replace NewKeybase with NewKeyring

* Fix delete test

* Purge dead code

* Override COSMOS_SDK_TEST_KEYRING envvar to switch to a test keyring

* s/unningOnServer/unningUnattended/

C'ing @tnachen

* Add deprecated warning, output looks like the following:

```
$ gaiacli keys update --help
Command "update" is deprecated, it takes no effect with the new keyring
based backend and is provided only for backward compatibility with the
legacy LevelDB based backend.
Refer to your operating system's manual to learn how to change your
keyring's password.

Change the password used to protect private key

Usage:
  gaiacli keys update <name> [flags]

Flags:
  -h, --help   help for update

Global Flags:
      --chain-id string   Chain ID of tendermint node
  -e, --encoding string   Binary encoding (hex|b64|btc) (default "hex")
      --home string       directory for config and data (default "/home/alessio/.gaiacli")
  -o, --output string     Output format (text|json) (default "text")
      --trace             print out full stack trace on errors
```

* Update multisign command

* Modify server.GenerateSaveCoinKey()

* GenerateSaveCoinKey more modifications

* Update docs

* Update upgrade module
2019-11-14 15:17:21 +01:00
Santatic 0425f97f24 Fix typo on commission flag (#5307) 2019-11-13 10:20:13 +01:00
Alexander Bezobchuk 745f2eb7e3
Merge PR #4872: Disable "withdraw-all-rewards" command when "--generate-only" is supplied 2019-08-08 11:51:54 -04:00
Aayushi Jain 1a7f31f7c8 Merge PR #4678: Clean YAML output 2019-07-05 19:25:56 -04:00
Alessio Treglia c530c1cbb7
Remove auth's AccountDecoder type (#4588)
AccountDecoder is now entirely redundant.
client package now does no longer depend on x/auth.

Context: #4488
2019-06-19 16:20:27 +02:00
Alessio Treglia 73700df8c3 Merge PR #4555: Move client/{tx,rest,utils} into x/auth/client 2019-06-15 14:34:11 +02:00
colin axner 95f3d32250 Merge PR #4536: Return account queries with height 2019-06-13 15:54:17 +02:00
Alexander Bezobchuk 3180e68c7b
Merge PR #4499: Remove Client Codec Redundancy 2019-06-06 11:43:15 -04:00
Alexander Bezobchuk 1ccf0c2e8d
Merge PR #4494: Fix validator-outstanding-rewards command 2019-06-06 09:43:13 -04:00
frog power 4000 5f9c3fdf88 Merge PR #4451: Client and Module Modularization 2019-06-05 19:26:16 -04:00
Juan Leni 68036ec71f Merge PR #4384: allow splitting withdrawal txs
* allow splitting withdrawal txs

* updating .pending

* small cleanup

* fixing build issue

* Update x/distribution/client/cli/tx.go

Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>

* updating usage text

* fixing merge issue

* changes based on the review

* adding unit tests

* Update x/distribution/client/cli/tx.go

Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* adjustments from review
2019-05-23 19:00:26 -04:00
Christopher Goes dd89c32951 Community pool spend proposal (#4329)
Implement the "CommunityPoolSpendProposal" as described in Cosmos Hub proposal 7.

Also a useful test of Git flow for merging features passed in governance proposals.
2019-05-21 11:02:10 +01:00
Alexander Bezobchuk cfe31c4090
Merge PR #4372: Use Build's Client/Server Name 2019-05-18 19:06:08 -04:00
Alessio Treglia 71d71f2206
Remove gaia (#4347)
Gaia is removed from cosmos-sdk repository.

Few changes were required to make sure no packages depend on gaia subpackages.

CI config is amended accordingly.

Unnecessary targets are removed from Makefile.

Simulations run through a lightweight version of gaia renamed to simapp.

Closes: #4104
2019-05-18 10:42:24 +02:00
Alexander Bezobchuk 85ffce5f58
Merge PR #4306: Allow generate-only to fully operate offline 2019-05-08 16:06:05 -04:00
Alessio Treglia 769370801d Merge PR #4101: Return per-validator rewards when querying delegator rewards 2019-04-16 09:43:08 -04:00
Jack Zampolin 38b7c0705c Implement client functionality for the community pool (#3939)
Fixes: #3937
2019-03-28 01:05:36 +00:00
Christopher Goes 4c50380181
Merge PR #3750: Outstanding per-validator rewards; correctly handle same-BeginBlock redelegation-double-slash 2019-03-06 19:54:12 +01:00
Alessio Treglia e7e3c32204 Merge PR #3553: Code cleanup, take #1
* add a bunch of tests, add DONTCOVER text tag

- Also fix flaky test (closes: #3559). Don't test values
  returned by queries since there's no way to query a
  specific height via REST.

* GetTempDir -> NewTestCaseDir
2019-02-08 22:45:41 +01:00
Jack Zampolin 408484e6d4
Merge PR #3503: CLI flags to args 2019-02-06 16:15:37 -08:00
Alessio Treglia a2b73c8ab4 Merge PR #3460: Implement fee distribution RESTful endpoints 2019-02-04 16:45:18 -08:00
Alexander Bezobchuk 3864d5b1bd Query all Delegator Distribution Rewards (#3433) 2019-01-29 16:06:38 -08:00