Commit Graph
1505 Commits
Author SHA1 Message Date
Alexander Bezobchuk bc9949e383 Merge PR #5936: Handle and return error on tx.SetMsgs 2020-04-06 10:24:40 -04:00
colin axner dfbc6cd81b Merge PR #5920: Fix validate cmd bug 2020-04-04 14:24:11 -04:00
Alessio Treglia ca19fbc5f8 types/rest: add convenience functions for error checking (#5900) 2020-04-01 09:50:22 +02:00
Alessio Treglia b239cc8bb4 client: show defaults when config help screen is displayed (#5896)
Closes: #5895

Thanks: @njmurarka for pointing this out.
2020-03-31 16:05:18 +02:00
Jonathan GimenoandAlessio Treglia e5bde0199e client: support offline flag in config command (#5856)
Update config hardcoded keys

Add test cases.

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-03-30 23:55:28 +02:00
Alessio Treglia 2a7a408d35 crypto/keyring: deprecate old keybase (#5889)
Remove the Update method from the Keybase interface.

Remove redundant lazy keybase implementation altogether.

Created LegacyKeybase interface to restrict capabilities to
only those required by keys commands that deal with
legacy keybase such as update and migrate.

Rename keyring.New() -> keyring.NewLegacy().

Rename client/keys.NewKeyBaseFromDir -> NewLegacyKeyBaseFromDir.

crypto/keyiring.NewInMemory() now returns a in-memory keyring.
BackendMemory is added yet not exposed via command line
--keyring-backend flag. keys add uses it when --dry-run flag
is on.
2020-03-30 20:30:50 +02:00
Alessio Treglia db76afe840 crypto/keyring: change addrKey to store chain-agnostic addresses (#5858)
Keyrings store keys by name and hexbytes representation
of address. This turns keyring internal storage more
chain-agnostic and types.Config independent.

Obsolete Keybase internal state representation is not affected.
2020-03-30 16:54:01 +02:00
Aleksandr Bezobchuk da400156c3 Fix tests 2020-03-26 12:50:39 -04:00
Aleksandr Bezobchuk 6135912e53 JSON Proto changes 2020-03-26 12:46:10 -04:00
Aleksandr Bezobchuk 75412d00f8 Rename to Println 2020-03-25 15:17:12 -04:00
Aleksandr Bezobchuk 6a33b424a6 Do not sanitize memo 2020-03-25 15:15:43 -04:00
Aleksandr Bezobchuk e950dd34aa Error when keybase is nil during Sign 2020-03-25 15:12:39 -04:00
Aleksandr Bezobchuk f4e6bd6ad7 Fix build 2020-03-25 14:30:42 -04:00
Alexander Bezobchuk 37885b8d38 Merge branch 'master' into bez/tx-client-proto-i 2020-03-25 14:25:58 -04:00
Aleksandr Bezobchuk 3e0cf99e81 Finish remaining x/bank REST handlers 2020-03-25 14:23:34 -04:00
Aleksandr Bezobchuk 3ecc461385 Implement and use MarshalIndentFromJSON 2020-03-25 13:03:14 -04:00
Aleksandr Bezobchuk d962526b70 Implement and use CLIContext.Print 2020-03-25 12:24:13 -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
Alessio Treglia 206a511fa9 Use cosmos' fork of github.com/bartekn/go-bip39 (#5867)
Thanks @fedekunze for pointing this out.
2020-03-25 00:46:10 +01:00
Aleksandr Bezobchuk 70d0241373 tx tests 2020-03-24 19:07:27 -04:00
Aleksandr Bezobchuk 33c090ee17 Use auth instead of func interface 2020-03-24 18:56:20 -04:00
Aleksandr Bezobchuk 0f4473936d Fix imports 2020-03-24 16:51:59 -04:00
Aleksandr Bezobchuk 8bb0cfdf6f Use JSON for SimulationResponse 2020-03-24 16:45:34 -04:00
Aleksandr Bezobchuk d4d4da4a6e Implement client and factory 2020-03-24 16:36:12 -04:00
Aleksandr Bezobchuk b0f784d8f9 Implement factory and remove tx generator from CLIContext 2020-03-24 15:55:52 -04: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
Alessio Treglia 230a1e8ba3 crypto/keys: improve documentation (#5833)
* crypto/keys: improve documentation

Remove out of date crypto/keys README.md file.

Populate client keys commands help screen with
more information regarding keyring backends.

* Fix formatting

* Fix lint warning
2020-03-19 16:58:14 +00: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 b557d4278f Update CanonicalSignBytes godoc 2020-03-16 11:52:07 -04:00
Aleksandr Bezobchuk 98f62db242 Fix linting 2020-03-15 14:10:15 -04: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 c49af0b8dd Update context 2020-03-13 13:59:14 -04:00
Aleksandr Bezobchuk b38d3ae69a Update ADR and types 2020-03-12 15:35:22 -04:00
Alessio Treglia 9bd603ae88 crypto: cleanup, more testing
crypto.LedgerShowAddress() is a ledger specific function
and should takes acc address prefix instead of depending
on a sdk.Config singleton.

crypto/keys/mintkey:
- decryptPrivKey() return error instead of os.Exit()ing.
- encryptPrivKey() should panic instead of os.Exit() when
  bcrypt.GenerateFromPassword() call fails so that the
  caller is given a chance to recover().

crypto/keys:
- SignWithLedger() does not need to be method of
  baseKeybase. Method receiver is unused.
- ledgerInfo objecta may be pointers, type switch
  should handle both to avoid panics.
- keyringKeybase should not provide Update() at all.

More test cases are added to increase package crypto
and subpackages overall coverage.
2020-03-02 11:09:52 +00:00
Alessio Treglia d7fd5b6a42 Replace defer with testing.T.Cleanup() (#5732) 2020-03-02 00:16:23 +00:00
Alessio TregliaandAlexander Bezobchuk 5a2e59ebb2 Exclude proto files from format (#5706)
* Don't change proto files on make format

The format target does not need to depend on tools.
Thus remove dependency.

* Run make format

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-02-27 07:53:22 -03:00
Marko e3dc0fd4a6 Merge PR #5671: CORS - Add a Flag for CORS 2020-02-21 12:17:27 +01:00
Gerry Agbobada 235aa6c091 Merge PR #5648: Add min-height and max-height filters to TxSearch 2020-02-17 04:17:34 -05:00
Jonathan Gimeno 242f674e78 Merge PR #5640: change default path to show swagger 2020-02-13 12:08:34 -05:00
Anthony b0c6c750df Merge PR #5618: Add test of missing verifier in cli context 2020-02-06 10:27:23 -05:00
Mircea Colonescu 43137ee893 Merge PR #5605: Update swagger.yaml 2020-02-03 09:28:32 -05:00
Federico Kunze 5a0a36a8c9 Merge Pr #5585: client and types additions for IBC 2020-01-30 10:13:42 -05:00
Alessio Treglia d0ff973386 Merge PR #5562: Remove KeyringServiceName from the sdk.Config struct 2020-01-23 13:47:11 -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 Bezobchuk 260fbc3cc8 Merge PR #5537: Fix validatorset REST pagination 2020-01-17 12:33:59 -05: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
Alexander Bezobchuk c92a7389ff Merge PR #5526: Fix migrate command 2020-01-15 12:29:36 -05:00
Sunny Aggarwal f367087731 Merge PR #5439: Keybase: Multiple Signature Algorithms 2020-01-14 10:40:10 -05:00