Commit Graph
477 Commits
Author SHA1 Message Date
Alessio TregliaandJonathan Gimeno a1feca39c2 Enter the new keyring interface (#5904)
crypto/keyring:

`Keybase` interface gives way to its successor: `Keyring`. `LegacyKeybase`
interface is added in order to guarantee limited backward compatibility with
the old `Keybase` interface for the sole purpose of migrating keys across
the new keyring backends.

The package no longer depends on the `github.com/types.Config`
singleton.

`SupportedAlgos` and `SupportedLedgerAlgos` methods have been removed.
The keyring just fails when trying to perform an action with an unsupported
algorithm.

crypto/ subdirs reorganization:

`crypto/keys/hd` was moved to `crypto/hd`, which now groups together
all HD wallets related types and utilities.

client/input:

* Removal of unnecessary `GetCheckPassword`, `PrintPrefixed` functions.
* `GetConfirmation`'s signature changed to take in a io.Writer for better integration
  with `cobra.Command` types.

client/context:

* In-memory keyring is allocated in the context when `--gen-only` flag is passed
  in. `GetFromFields` does no longer silently allocate a keyring, it takes one as
  argument.

Co-authored with @jgimeno

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2020-04-08 11:38:28 +02:00
Alexander Bezobchuk 7b21c54359 Fix IncrementSequenceDecorator (#5950)
* Fix IncrementSequenceDecorator

* Update PR #

* Update godoc

* Add TestIncrementSequenceDecorator test
2020-04-07 18:32:37 +00:00
Alexander Bezobchuk 22422c6de1 Merge PR #5927: Fix parseQueryResponse 2020-04-03 10:59:46 -04:00
Alessio Treglia ca19fbc5f8 types/rest: add convenience functions for error checking (#5900) 2020-04-01 09:50:22 +02:00
Alessio Treglia 35e15521dc x/auth: use validateMaxMemoCharacters() for memo fields (#5898)
Add test cases.
2020-03-31 16:18:02 +02:00
Federico Kunze 6a6fd1c7ac patch auth register cdc (#5892)
* readd RegisterAccountTypeCodec

* fix

* remove seal

* update BaseAccount and StdSig to use amino codec

* remove comments

* rename

* changelog

* rename
2020-03-30 22:09:28 +00:00
Alexander Bezobchuk 37885b8d38 Merge branch 'master' into bez/tx-client-proto-i 2020-03-25 14:25:58 -04:00
Federico Kunze 9cce836c08 crypto/keys: move keybase and keyring to crypto/keyring/ dir (#5866)
* crypto/keys: move keybase and keyring to crypto/keyring/ dir

* Update client/keys/root.go

* Update crypto/keyring/errors.go

* Update crypto/keyring/keybase.go

* Update crypto/keyring/options.go

* format

* changelog

* fix build

* format

* lint
2020-03-25 15:20:36 +00:00
Aleksandr Bezobchuk 486fa5b4b0 Fix constructors 2020-03-24 18:55:53 -04:00
Jonathan Gimeno 49102b1d98 Remove dependency of types/module package on x/simulation (#5835)
Closes: #5724
2020-03-23 12:55:44 +01:00
MarkoandAlexander Bezobchuk 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
Federico Kunze 2cf816d457 minor test change 2020-03-19 22:48:20 -03:00
Federico Kunze 51d9045152 authclient: fix tests 2020-03-19 22:46:35 -03:00
Federico Kunze 38f4b084c1 authclient: update godoc for gas adjusted 2020-03-19 22:42:34 -03:00
Federico Kunze 3d2746434f authclient: update txBuilder to return sdk.SimulationResponse 2020-03-19 22:40:07 -03:00
Jonathan Gimeno 8c7bb89549 Implementing --offline flag (#5810)
Closes: #5448
2020-03-19 02:49:33 +01:00
Alessio Treglia 3db39cda3c Fix various linter warnings (#5824) 2020-03-18 12:59:08 +00:00
Aleksandr Bezobchuk f60cd5a2b5 Merge branch 'master' into bez/proto-client-init 2020-03-14 12:34:34 -04:00
Jonathan GimenoandAlexander Bezobchuk 2e42f9cb74 Favor marshal unmashal binare bare (#5799)
* change abci file to use BinaryBare

* change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in mint keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in auth keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in gov keeper store.

* change all calls to EncodeLengthPrefixed to BinaryBare in slashing keeper store.

* update decoder test

* migrate decoder

* migrate gov simulation decoder

* migrate baseapp_test

* refactor QuerySubspace

* refactor coedc std codec

* migrate keybase

* migrate iavl store

* migrate root multi

* migrate ante basic

* migrate tx type to bare

* migrate auth client

* update auth types

* update decoder

* migrate supply decoder

* migrate stake encoding

* migrate staking simulation

* migrate genutil

* migrate simapp test helpers

* migrate docs

* upgrade changelog

* Update CHANGELOG.md

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

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-13 19:58:43 +00:00
Aleksandr Bezobchuk 0b76411469 Update StdTx 2020-03-13 09:36:29 -04:00
Aleksandr Bezobchuk b38d3ae69a Update ADR and types 2020-03-12 15:35:22 -04:00
Aleksandr Bezobchuk 5513927778 Fix TestStdSignatureMarshalYAML 2020-03-12 13:52:55 -04:00
Aleksandr Bezobchuk 34f9fc439a Implement canonical signing 2020-03-12 13:32:03 -04:00
Aleksandr Bezobchuk 3a94f42e11 Implement app-level tx 2020-03-12 10:53:27 -04:00
Alexander Bezobchuk 1b51a043e2 Fix x/auth GET commands (#5756)
Fix x/auth GET commands.

Fix QueryParamsCmd.
2020-03-06 15:16:30 +00:00
Jonathan Gimeno 5c4ace2548 Merge branch 'jonathan/5569-create-module-account-on-init-genesis' of github.com:cosmos/cosmos-sdk into jonathan/5569-create-module-account-on-init-genesis 2020-03-05 22:11:35 +01:00
Jonathan Gimeno e45be08eb1 create module account on init for FeeCollectorName and tests for other module accounts 2020-03-05 22:11:05 +01:00
Aleksandr Bezobchuk 4dac1abebf Update imports 2020-03-05 09:40:43 -05:00
Alexander Bezobchuk 8cab43c812 Merge PR #5702: Add Param Querying to x/auth 2020-02-26 10:33:56 -05:00
Alexander Bezobchuk ec39bb3b42 Merge PR #5696: Fix x/auth proto json tags 2020-02-25 15:22:28 -05:00
Marko f7486b9395 Merge PR #5634: Protobuf - Migrate x/evidence 2020-02-24 17:05:21 +01:00
Alexander Bezobchuk 238928ed50 Merge PR #5688: Proto Option Updates 2020-02-21 11:31:16 +01:00
Alexander Bezobchuk 9b47079171 Merge PR #5682: Change pubkey to bytes 2020-02-20 17:15:22 +01:00
Jonathan Gimeno 434f539bff Merge PR #5649: Update x/params to follow module standards 2020-02-19 12:52:20 +01:00
Xuefeng Zhu 69c5b46413 Get Uin64 directly instead of Int64 (#5672) 2020-02-19 10:05:27 +01:00
Alexander Bezobchuk 1736692f3b Merge PR #5668: Fix GetAccountWithHeight 2020-02-18 16:53:11 +01:00
Alexander Bezobchuk a63de303b8 Merge PR #5665: Bump Module ABCI Error Codes 2020-02-18 14:43:00 +01:00
Alexander Bezobchuk 794a496892 Merge PR #5533: Protobuf: x/auth & x/supply 2020-02-18 13:50:13 +01:00
MarkoandAlexander Bezobchuk e44f914893 dep: bump tendermint version to 0.33.1 (#5645)
* dep: bump tendermint version to 0.33.1

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

* minor touch up

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-02-14 09:04:05 -05:00
Alexander Bezobchuk 6890feb3d2 Merge PR #5572: ADR 004 Implementation 2020-01-30 16:31:16 -05: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
Alessio Treglia d0ff973386 Merge PR #5562: Remove KeyringServiceName from the sdk.Config struct 2020-01-23 13:47:11 -05:00
Alexander Bezobchuk a4b36b9dcd Merge PR #5561: v0.38 Migration Fixes 2020-01-23 13:15:22 -05:00
Alessio Treglia 415eab7a56 Create new generic keyring constructor: NewKeyring (#5547)
Remove other convenience constructors:
 * Remove NewKeyBaseFromHomeFlag
 * Remove NewKeyringFromDir
 * Remove NewKeyringFromHomeFlag
2020-01-22 17:54:56 +00:00
Alexander BezobchukandJack Zampolin c1991e31bd Merge PR #5527: Bump Tendermint Version to v0.33.0
* Bump Tendermint version to v0.33.0

* Deprecate old cmn package with new packages

* Update update DB APIs

* More DB updates

* Bump IAVL to v0.13.0

* Handle error returned by iavl.NewMutableTree

* Fix some IAVL stuffs

* Update IAVL

* More updates

* Passing tests

* Fix unit tests

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
2020-01-16 13:46:51 -08:00
Sunny Aggarwal f367087731 Merge PR #5439: Keybase: Multiple Signature Algorithms 2020-01-14 10:40:10 -05:00
Alexander Bezobchuk 3df3887597 Merge PR #5499: Cleanup genesis state validation + Genutil 2020-01-09 15:14:23 -05:00
Alexander Bezobchuk 869531ca92 Merge PR #5495: Replace Redundant Bech32 PubKey Functions 2020-01-09 09:04:28 -05:00
Alexander Bezobchuk 25be589af6 Merge PR #5482: Update Query Txs by Events Command 2020-01-06 11:49:31 -05:00
Ferenc Fabian 066dd1114f Merge PR #5449: Add New constructor for the DecCoin 2020-01-03 15:44:53 -05:00