Commit Graph

820 Commits

Author SHA1 Message Date
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 Treglia 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 Bezobchuk 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
Alexander Bezobchuk 869531ca92
Merge PR #5495: Replace Redundant Bech32 PubKey Functions 2020-01-09 09:04:28 -05:00
Alexander Bezobchuk 9a183ffbcc
Merge PR #5421: Refactor Error Handling 2019-12-27 12:57:54 -05:00
Alessio Treglia 3c82b66347 Merge PR #5427: Remove code duplication in x/auth/client/cli 2019-12-27 10:23:18 -05:00
Ferenc Fabian 8353680115 Merge PR #5442: Remove of the client/alias.go 2019-12-23 11:05:47 -05:00
Austin Abell d7b0f4b9b4 apply options on newly added keyring types (#5404) 2019-12-13 11:21:49 +00:00
Austin Abell 0e28da23e7 Interchangable PrivKey implementations in keybase (#5278)
Allow for the keybase to be configured to override the implementation
of the key that is saved to the keybase.

Closes: #4941
2019-12-12 21:52:24 +00:00
Alessio Treglia 394860068d
keyring's encrypted file backend integration (#5355)
Client commands accept a new `--keyring-backend` option through which users can specify which backend should be used by the new key store:
- os: use OS default credentials storage (default).
- file: use encrypted file-based store.
- test: use password-less key store (highly insecure).
2019-12-11 09:45:26 +00:00
Alessio Treglia 0300a6f6d7
Small non-breaking UX changes to keys {list,delete} commands (#5366)
Add --list-names flag to keys command for short listing.

Make keys delete accept multiple key names at once.

Usage example:
 gaiacli keys list -n | xargs gaiacli keys delete
2019-12-05 16:07:29 +01:00
Alessio Treglia b9cb3e105d Merge PR #5345: Add dev docs for COSMOS_SDK_TEST_KEYRING 2019-11-30 09:32:08 -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
Marko 92d2dbe3ff Merge PR #5244: Add debug commands 2019-11-11 09:54:32 -05:00
Alexander Bezobchuk ede9aaed3b
Revert "Mege PR #5092: changed bench32prefixes" (#5283)
This reverts commit 5a310fabbd.
2019-11-06 10:18:48 -07:00
Elvin 5a310fabbd Mege PR #5092: changed bench32prefixes 2019-11-06 07:18:32 -07:00
Marko b9490f2d93 Merge PR #5203: Add more linters 2019-10-17 09:47:35 -04:00
Marko 9f3789157e Merge PR #5192: golangcI-lint updates & set static version to 1.19 2019-10-14 11:43:19 -04:00
Alessio Treglia ee404e96ab Merge PR #5164: Handle New{,Test}Keyring errors 2019-10-09 14:53:54 -04:00
Vladimir Evgrafov 1a33f1c8cb Merge PR #5155: Remove unused KeyBase (dead code) 2019-10-08 16:48:41 -04:00
Alexander Bezobchuk f84d9fa078
Merge PR #5136: Refactor CLIContext to allow multi-chain verifiers 2019-10-02 20:29:28 -04:00
Alessio Treglia 3e6562ce45 Merge PR #5097: Add keys migrate command
Add new command to assist users migrate their keys from the legacy
on-disk keybase to the new OS keyring-based implementation.

Ref #4754
2019-09-30 11:49:12 -04:00
Marko 01d8a230b2 Merge PR #5068: Add linter Nakedret 2019-09-19 09:21:38 -04:00
Timothy Chen ab6d0a0bae Merge PR #5023: Implement Gaia Tx Decode 2019-09-17 17:08:09 -04:00
Marko 6684cdf3e5 Merge PR #5048: Fix linters and add golint 2019-09-16 13:11:17 -04:00
Timothy Chen 5bcab79e8a Merge PR #4996: Expose precheck errors from tx 2019-09-11 14:56:36 -04:00
kevlubkcm 5c27892621 Merge PR #4917: add where to find the event tags into the swagger 2019-09-10 12:01:08 -04:00
tyldar a131570cdc Merge PR #4961: Switched keys prefixes to the config ones 2019-08-28 10:37:05 -04:00
Marko 3a4f1fc4d4 Merge PR #4881: Linting Galore 2019-08-19 12:06:27 -04:00
Alexander Bezobchuk 89b1220398
Merge PR #4924: Return Height on Query Errors + Update Account Endpoint 2019-08-19 10:58:11 -04:00
Henrik Aasted Sørensen 91b53f2698 Merge PR #4919: Fix GetConfirmation User Input Bug 2019-08-19 09:22:07 -04:00
Alexander Bezobchuk 9adb398e18
Merge PR #4905: Various Height Query Fixes 2019-08-14 12:45:11 -04:00
Federico Kunze c441ce2fab Merge PR #4847: Sim refactor 1 move store decoders to modules
* move store decoders to modules

* fix

* module pattern

* compile

* update Decoders params

* fix

* address @colin-axner comments

* Update cmd_test.go

* simulation manager

* mino fixes

* cleanup

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* address @rigelrozanski comments

* changelog

* Apply suggestions from code review

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* restructure modules simulation pkgs

* address @alexanderbez comments

* fix
2019-08-13 18:16:03 -04:00
Alexander Bezobchuk fee71e72d4
Merge PR #4876: Fix BroadcastTxCommit Response 2019-08-13 09:21:52 -04:00
Alexander Bezobchuk 46c98d396d
Merge PR #4895: Lite Client Query Height Fix 2019-08-13 09:13:34 -04:00
frog power 4000 771f8a04f3 Merge PR #4865: Add security contact to Validator description 2019-08-12 09:10:16 -04:00
Alessio Treglia cf1980273f Merge PR #4848: Rely on rpcserver.DefaultConfig() to inherit default config values 2019-08-05 13:13:29 -04:00
Alexander Bezobchuk 4b354a782b
Merge PR #4840: Various Updates for Gaia 2019-08-03 09:56:15 -04:00