Commit Graph

68 Commits

Author SHA1 Message Date
Raul Jordan
10f38662e5
Standardize File Permissions in Accounts-V2 (#6934)
* standardize file permissions
* Gaz
* no petname
* Merge refs/heads/master into file-perms
2020-08-07 22:14:07 +00:00
Ivan Martinez
6351d187ef
Accounts V2: Remove unused passwords-dir and deprecate flag (#6916)
* Remove passwords dir
* Deprecate flag
* Merge branch 'master' of github.com:prysmaticlabs/prysm into remove-passwords-dir
* Properly deprecate flag
* Merge branch 'master' into remove-passwords-dir
* Merge refs/heads/master into remove-passwords-dir
* Merge refs/heads/master into remove-passwords-dir
2020-08-07 00:02:30 +00:00
Raul Jordan
2502b812fc
Sort by Derivation Path in File Name When Importing (#6918)
* add sort by derivation in file name

* Update validator/accounts/v2/accounts_import_test.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

* imports

* fixed var

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-08-06 18:40:49 -05:00
Raul Jordan
6b4e4bcf96
Fail Immediately if Importing Accounts from Empty Directory (#6915)
* fail on import from empty directory
* Merge refs/heads/master into fail-on-empty-dir
2020-08-06 22:40:14 +00:00
Raul Jordan
ac82308e03
Allow for Different Language Mnemonic Recovery (#6913)
* allow for different language mnemonics

* imports
2020-08-06 15:33:28 -05:00
Nishant Das
5b75f4e6be
add feature config support (#6904) 2020-08-06 20:49:41 +08:00
Raul Jordan
ac0237e9cf
Return Err in Wallet.HasDir function (#6878)
* fix panic in has dir
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* return err
2020-08-05 02:07:41 +00:00
Raul Jordan
1f9d155f0e
Fix Panic in Wallet HasDir() (#6857)
* fix panic in has dir
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
2020-08-04 23:23:15 +00:00
Preston Van Loon
bc883aab9e
Return an error when wallet is nil rather than panic (#6875) 2020-08-04 15:53:34 -07:00
Raul Jordan
6af950f001
Add Back Displaying Deposit Data + Misc Bugs (#6856)
* show deposit data tx
* display
* improve logic for derived
* further improve experience
* imports
* gaz
2020-08-03 20:17:34 +00:00
Raul Jordan
700d82236b
Fix Critical Account Keystores Bugs (#6854)
* no need for pass in new account create
* disallow duplicates
* deduplicate and test
* gaz
* fix up broken tests
* unit test for no duplicates
* Merge branch 'master' into fix-account-create
* fix import
* Merge refs/heads/master into fix-account-create
* Merge branch 'fix-account-create' of github.com:prysmaticlabs/prysm into fix-account-create
2020-08-03 18:58:04 +00:00
Raul Jordan
eef0d058ec
Refactor Direct Keymanager to One-Shot Decrypt (#6823) 2020-08-02 13:02:04 -07:00
terence tsao
eb0ad0669f
Fix empty wallet check (#6819) 2020-07-31 17:08:40 -07:00
Raul Jordan
4dfe02d919
Fix Accounts List Show Deposit Data When Coming From Eth2.0 Deposit CLI (#6811)
* amend accounts list when coming from launchpad
* Merge refs/heads/master into fix-accounts-list
* Merge refs/heads/master into fix-accounts-list
* Merge refs/heads/master into fix-accounts-list
* Merge refs/heads/master into fix-accounts-list
* Merge refs/heads/master into fix-accounts-list
2020-07-31 22:08:13 +00:00
Preston Van Loon
821f2ec029
Accounts V2: Allow user to override password-dir set in the wallet config (#6817)
* Accounts V2: Log a warning when a user specifies --password-dir when it has already been set.
* Override wallet config, as user intended
* gofmt
* Merge refs/heads/master into av2-flag-improvement
2020-07-31 21:20:56 +00:00
Preston Van Loon
dbd2d9a0bb
Accounts V2: improve progressbar feedback (#6814)
* Accounts V2: improve progressbar feedback
* gofmt
* Merge refs/heads/master into pb-improvements
2020-07-31 20:46:03 +00:00
Preston Van Loon
3f983e2a96
Accounts V2: Allow for user to specify single file rather than directory for keystore import (#6813)
* Fix public key formatting
* Accounts V2: Allow for user to specify single file rather than directory
* Merge branch 'master' into fix-pubkey-formatting
* Merge refs/heads/master into fix-pubkey-formatting
2020-07-31 20:17:39 +00:00
Preston Van Loon
bf82683d4f
Fix public key formatting (#6809)
* Fix public key formatting
2020-07-31 19:23:08 +00:00
terence tsao
f7c8ae5aa6
Config flag: onyx (#6789)
* Config/flags: add onyx back
* Sync with master
* Merge refs/heads/master into onyx
* Merge refs/heads/master into onyx
* onyx flag
* Merge refs/heads/master into onyx
* Merge refs/heads/master into onyx
2020-07-31 01:23:37 +00:00
Raul Jordan
18f8578d73
Derived Keymanager Has No Need to Store Accounts to Disk (#6790)
* tests pass
* Merge branch 'master' into derive-no-store
* Merge refs/heads/master into derive-no-store
* gaz
* Merge branch 'derive-no-store' of github.com:prysmaticlabs/prysm into derive-no-store
* Merge refs/heads/master into derive-no-store
2020-07-30 23:23:18 +00:00
Raul Jordan
b2ae4243fd
Concurrent Decryption of Direct Keymanager Accounts With Progress Bar (#6788)
* progress bar add

* Update validator/keymanager/v2/direct/direct.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* Update validator/keymanager/v2/direct/direct.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* fix test

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-30 17:54:15 -05:00
Raul Jordan
bd7046c790
Improve Speed of Accounts Import (#6785)
* improve speed of import
* better format
* imports
* Merge branch 'master' into fast-import
* Merge refs/heads/master into fast-import
* Merge refs/heads/master into fast-import
* Merge refs/heads/master into fast-import
* Merge refs/heads/master into fast-import
2020-07-30 19:42:16 +00:00
Ivan Martinez
48bfffbb3e
Accounts-V2: Cleanup password entry and disable export (#6778)
* Cleanup prompts
* Merge branch 'master' of github.com:prysmaticlabs/prysm into cleanup-accounts-v2
* Fix
* add todo
* Merge branch 'master' of github.com:prysmaticlabs/prysm into cleanup-accounts-v2
* Clean
* Merge refs/heads/master into cleanup-accounts-v2
* Merge refs/heads/master into cleanup-accounts-v2
* Change with error
* Merge branch 'cleanup-accounts-v2' of github.com:prysmaticlabs/prysm into cleanup-accounts-v2
* Merge refs/heads/master into cleanup-accounts-v2
* cleanup and remove deposit tx file
* display deposit data
2020-07-30 15:30:19 +00:00
terence tsao
bcea2c1b22
Config/flag: medalla as default (#6770)
* config: use medalla as default

* Tests: align with medalla spec

* Config/flag: deprecate medalla feature flag

* Update shared/featureconfig/flags.go

* Spectest: set genesis forkversion to 0,0,0,0

* Config: set medalla as defat in Configure

* Extra space

* Shard: use copy

* Revert a p2p fork test

* Update default medalla for tools

* Use medalla config for e2e

* Fix E2E

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-07-30 08:45:00 -05:00
Raul Jordan
bde18f0329
Resolve Remaining Accounts Bugs (#6769)
* fix cases
* fix up imports
* ask until successful
* fixed imports flow
* fully utilize progress bar
* tidy
* grpc
* add round trip test fix
* properly use seeds
* update deps
* update deps
* tidy
* rem print
* fix bazel tests
* rem extraneous log
* gaz
* go mod tidy
* grpc version
* fix deps
* Merge branch 'master' into empty-or-nonexistent
* deps
* tidy
* option show bytes
* Merge refs/heads/master into empty-or-nonexistent
2020-07-29 23:54:23 +00:00
Raul Jordan
e5f3a30226
Allow Relative Imports in Accounts-v2 (#6758)
* add abs imports tests

* relative imports now work

* misc

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-29 11:33:28 +03:00
Ivan Martinez
fac5e19a17
Accounts-V2: Replace promptui with shared/promptutil (#6759)
* Add promptutil to shared/promptutil
* fixes
* comment
* Implement promptutil into accounts-v2
* gaz
* Merge branch 'master' of github.com:prysmaticlabs/prysm into implement-promptutil
* Apply suggestions from code review
* gofmt and fix all scanned input
* Merge refs/heads/master into implement-promptutil
2020-07-29 04:55:26 +00:00
Raul Jordan
9d08ba49de
Accounts Revamp Fixes: "Overall" Wallet Improvements (#6736)
* change default wallet dir path to not be hidden

* gaz + pass wallet dir

* gaz + move const to flags

* move to flags

* move to flags

* use filepath join in order to create a valid dir name

* add wallet dir

* return err no wallet found issues

* fix up edit remote

* all tests passing

* fix test

* create or open wallet

* ivan feedback

* enter password for account with pubkey

* Update validator/accounts/v2/accounts_create.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

* works

* preston feedback

* nothing to export

* fmt

* test for create or open

* gaz

Co-authored-by: shayzluf <thezluf@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-07-28 20:20:13 -05:00
Ivan Martinez
3a609f44b9
Accounts-V2: Minor fixes for logging (#6751)
* Fixes for accounts-v2
* Merge branch 'master' into fixes
* Undo wallet changes
* Merge branch 'fixes' of github.com:prysmaticlabs/prysm into fixes
* Merge refs/heads/master into fixes
2020-07-28 22:58:11 +00:00
Ivan Martinez
ee1adddd24
Accounts V2: Fix issues reported by rkapka (#6725)
* Fix accounts v2 runtime
* Accounts V2: Fix issues found by rkapka
* Add to help
* Merge refs/heads/master into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Fixes
* add back error
* Make new wallet error cleaner
* Fix text
* Fix log
* Add case for normal error
* Update validator/flags/flags.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Fix comment
* Merge refs/heads/master into fix-v2-runtime
* fix comment
* Fix test
* Merge branch 'master' into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
* Merge refs/heads/master into fix-v2-runtime
2020-07-28 19:23:53 +00:00
Nishant Das
8a69d34b96
Fix Accounts Creation Error (#6748)
* add check
* Merge refs/heads/master into fixAccountsError
* Merge refs/heads/master into fixAccountsError
2020-07-28 16:06:18 +00:00
Nishant Das
7861005990
Allow Multiple Selection For Exports (#6749)
* add changes
* Merge branch 'master' into fixExports
* last request
* Merge branch 'fixExports' of https://github.com/prysmaticlabs/geth-sharding into fixExports
2020-07-28 15:31:37 +00:00
Ivan Martinez
607d5fdf4e
Accounts-V2: Change accounts-v2 import to use directory of keystores (#6742)
* Finish implementation of importing dir of keystores

* Fix

* Fix importing

* Finish testing import account

* Update validator/accounts/v2/accounts_import.go

* Fix

* Fix

* fix

* Fix prompt

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-07-28 09:18:22 -05:00
Ivan Martinez
0cd80bb970
Accounts-V2: Change keystore filename to include timestamp (#6741)
* Change keystore filename to include timestamp
* Fix test
* Merge branch 'master' into change-keystore-filename
* Fix comment
* Merge branch 'change-keystore-filename' of github.com:prysmaticlabs/prysm into change-keystore-filename
* Request comments
* Comment
* Add comment
* Fix test
* Fix test
* Add test for AccountTimestamp
2020-07-28 00:02:29 +00:00
Ivan Martinez
7fff4ec411
Accounts V2: Add --num-accounts to HD wallet commands (#6721)
* Add num-accounts to wallet recover and account create for derived wallets

* Fix

* Test derived accounts

* Stuff

* Gaz

* Fix

* Fix

* Fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-27 09:03:30 -05:00
Ivan Martinez
dfdff37a3e
Accounts V2: Fix import command (#6707)
* Fix import
* Merge branch 'master' into fix-import-v2
* Fix
* Merge branch 'fix-import-v2' of github.com:prysmaticlabs/prysm into fix-import-v2
* Fix for comments
* Merge refs/heads/master into fix-import-v2
* Merge branch 'master' into fix-import-v2
2020-07-24 03:19:28 +00:00
Ivan Martinez
3974104a20
Accounts V2: Rename new->create, rename files and usage text fixes (#6695)
* Accounts V2: Renames and usage text fixes

* Fix
2020-07-23 21:18:36 -05:00
Raul Jordan
a5b408769a
Accounts V2: Resolve Remaining Keymanager Bugs (#6706)
* v2 fix bugs
* better doc
* include wallet build fix
* fixed broken list test
* add round trip recover seed unit test
* imports
* implement list with tests
* add altona flags
* tests for unicode
* added is valid unicode tests
* fixed up tests to ensure wallet is persisted after everything works
* resolve confs and integrate medalla testnet
* fix build
* add medalla
* fixed import spacing
2020-07-24 00:43:01 +00:00
Ivan Martinez
c72db6f96a
Accounts V2: Refactor prompts, deduplicate into directory and password (#6674)
* Refactor input code, deduplicate into directory and password
* Change to filepath
* Rename
* Make consts visible to whole validator package
* Fix
* Try commands and fix
* Fix defaults
* Fixes
* Merge branch 'master' into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Remove consts and add comment
* Merge branch 'refactor-input-prompts' of github.com:prysmaticlabs/prysm into refactor-input-prompts
* Undo
* Fixes
* Update validator/accounts/v2/prompt.go
* Merge refs/heads/master into refactor-input-prompts
* gofmt
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Merge branch 'master' into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Fix
* Merge refs/heads/master into refactor-input-prompts
* Merge refs/heads/master into refactor-input-prompts
* Accounts V2: Simplify Wallet Save/Read To and From Disk Functions (#6686)

* simplify wallet functions

* fix build

* futher simplify wallet

* simplify read/write methods

* move direct functions to direct keymanager

* further move direct km specific funcs

* cleanup

* simplify the direct tests

* fixed tests

* lint

* further simplify

* tidy

* fix config write

* fixed test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* conflict resolution
* trim
2020-07-23 03:10:23 +00:00
Raul Jordan
7c52ef8c2b
Accounts V2: Simplify Wallet Save/Read To and From Disk Functions (#6686)
* simplify wallet functions

* fix build

* futher simplify wallet

* simplify read/write methods

* move direct functions to direct keymanager

* further move direct km specific funcs

* cleanup

* simplify the direct tests

* fixed tests

* lint

* further simplify

* tidy

* fix config write

* fixed test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-22 21:12:51 -05:00
Victor Farazdagi
0006377aec
Applies assertion funcs to validator tests (#6694)
* Applies assertion funcs to validator/keymanager/v1 tests
* gazelle
* Applies assertion funcs to validator/keymanager/v2 tests
* Applies assertion funcs to validator/misc tests
* Applies assertion funcs to validator/misc tests
* Merge branch 'master' into validator-apply-testutils-assertions
* gazelle
* Merge branch 'master' into validator-apply-testutils-assertions
* Merge branch 'master' into validator-apply-testutils-assertions
* Merge refs/heads/master into validator-apply-testutils-assertions
2020-07-23 01:13:52 +00:00
Ivan Martinez
cf57db910c
Accounts V2: Remove traces from command errors (#6692)
* Remove traces from errors for accounts command
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
* Merge refs/heads/master into remove-stack
2020-07-23 00:11:00 +00:00
Ivan Martinez
73a9429f1e
Accounts V2: Remove CanUnlockAccounts from Wallet (#6693)
* Remove CanUnlockAccounts from Wallet
* Merge refs/heads/master into remve-canunlockaccounts
* Merge refs/heads/master into remve-canunlockaccounts
* Merge refs/heads/master into remve-canunlockaccounts
2020-07-22 23:26:39 +00:00
Raul Jordan
cab89c37f1
Accounts V2: Remove Mnemonic Confirm From Direct Keymanager (#6696)
* remove mnemonic from direct
* Merge refs/heads/master into remove-mnemonic-direct
2020-07-22 22:52:31 +00:00
Raul Jordan
4017743f7f
Accounts V2: Refactor Wallet Open / Close and Keymanager Initialization (#6668)
* refactoring create account

* dep

* much easier, create a derived account by simply unlocking wallet

* revert changes to new

* make open wallet smarter and utilize cli ctx

* remove the wallet config

* successfully build

* simplify ctx creation for tests

* tests should pass individually

* tests pass

* fixed up to allow for wallet password file input

* fix broken tests

* formatting

* fmt

* simplify recover

* fixed up tests

* implicit use of default wallet path working

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-21 23:49:04 -05:00
Ivan Martinez
e0d11ff1d2
Accounts V2: Wallet Recover (#6661)
* Implement derived wallet recover
* Fix log
* Fix tests
* Comments
* Merge branch 'master' of github.com:prysmaticlabs/prysm into derived-recover
* Remove log
* Comments
* Fix fatal
* add comment
* Merge refs/heads/master into derived-recover
* Merge refs/heads/master into derived-recover
* Merge refs/heads/master into derived-recover
* Merge refs/heads/master into derived-recover
2020-07-22 02:41:39 +00:00
Ivan Martinez
8a65af168d
Accounts V2: Change fatal logs to return errors (#6672)
* Change logging out errors to returns
* Merge branch 'master' of github.com:prysmaticlabs/prysm into change-logs-to-return
* Lint
* Merge branch 'master' into change-logs-to-return
2020-07-22 02:04:08 +00:00
Raul Jordan
3023f5dbd3
Accounts V2: Derived Keymanager Sign (#6667)
* amend derived with secret keys cache
* all tests for sign
* Merge branch 'master' into sign-derived
* formatting
* Merge branch 'sign-derived' of github.com:prysmaticlabs/prysm into sign-derived
* initialize
* use seed
* fix build
* Merge refs/heads/master into sign-derived
* Merge refs/heads/master into sign-derived
* Update validator/keymanager/v2/derived/derived.go
2020-07-21 21:15:47 +00:00
Raul Jordan
e97d310453
Accounts V2: Derived Keymanager List Accounts (#6662)
* begin on list derived accounts
* begin on list derived accounts
* continued work on listing derived accounts
* deterministic pet name
* petnames
* finished list
* display deposit data
* lint
* use direct km
* tidy
* begin on revising tests for accounts list
* fix direct list test
* gaz
* tests all passing for derived list
* gaz
2020-07-21 05:06:11 +00:00
Raul Jordan
bc16fa9f50
Accounts V2: Derived Keymanager, Wallet & Account Creation (#6624)
* initialize derived wallet
* derived wallet + account creation
* initialize wallet seed
* encrypted seed file creation
* generate next acct
* create seed from pass
* properly creating derived accounts
* fix up formatting
* prep for review
* start tests for derived create account
* add derived test
* linter
* gaz
* derived keymanager create account test complete
* Merge branch 'master' into derived-keymanager
* tests pass
* gaz
* fix list test
* Merge refs/heads/master into derived-keymanager
* ivan feedback
* skip mnemonic confirm
* Merge branch 'derived-keymanager' of github.com:prysmaticlabs/prysm into derived-keymanager
* comment
* tidy
* fmt
* organize
* test interface conformity
* Update validator/accounts/v2/iface/wallet.go
* ivan comments
* Merge branch 'derived-keymanager' of github.com:prysmaticlabs/prysm into derived-keymanager
* Merge refs/heads/master into derived-keymanager
* Merge branch 'master' of github.com:prysmaticlabs/prysm into derived-keymanager
* Fix
* Fix test
* Merge refs/heads/master into derived-keymanager
* fix errs
* imports
* Gaz
2020-07-21 02:05:23 +00:00