Commit Graph

116 Commits

Author SHA1 Message Date
Preston Van Loon
7cc32c4dda
Various code inspection resolutions (#7438)
* remove unused code

* remove defer use in loop

* Remove unused methods and constants

* gofmt and gaz

* nilness check

* remove unused args

* Add TODO for refactoring subscribeWithBase to remove unused arg. It seems too involved to include in this sweeping PR. https://github.com/prysmaticlabs/prysm/issues/7437

* replace empty slice declaration

* Remove unnecessary type conversions

* remove redundant type declaration

* rename receivers to be consistent

* Remove bootnode query tool. It is now obsolete by discv5

* Remove relay node. It is no longer used or supported

* Revert "Remove relay node. It is no longer used or supported"

This reverts commit 4bd7717334dad85ef4766ed9bc4da711fb5fa810.

* Delete unused test directory

* Delete unsupported gcp startup script

* Delete old k8s script

* build fixes

* fix build

* go mod tidy

* revert slasher/db/kv/block_header.go

* fix build

* remove redundant nil check

* combine func args

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-12 08:11:05 +00:00
bidlocode
0214553415
Fix config file flags in subcommands (#7475) 2020-10-11 08:26:59 -07:00
Raul Jordan
551b03d6e6
Resolve Web UI Beta Testing Bugs (#7471)
* more descriptive password validation error

* include change wallet password fixes

* balance and jwt improvements

* allow for different wallet dirs specified on startup

* ensure wallet password is always validated

* fix up prysm tests

* gaz

* test pass

* pass balances tests

* wrap up fixes

* radek feedback

* fix up tests

* cors fix

* add tests for validator status

* pass tests

* fix n

* skip content type test

* package level cache and send over feed

* package level cache for derived

* all tests passing

* gofmt

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-10 02:07:28 +00:00
dv8silencer
796c336a29
Fix wallet check for Windows by addresses differences in error message text (#7461)
* fix

* test

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-08 14:30:08 +00:00
bidlocode
7c8492e83f
Add medalla flag (#7399)
* add --medalla flag for uniformity

* add enforcing testnet flag

* fix

* fix comments

* fix sufficient err msg

* fix shared method

* fix

* fix name

* fix name

* add test

* fix e2e

* fix gofmt

* fix test

* add warning

* fix warning

* fix warning test

* fix

* fix

* fix

* fix

* fix gofmt

* fix refactor to func

* add func description

* fix exported

* fix

* fix

* fix

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-07 23:04:19 +00:00
Raul Jordan
23bce8d0c5
Include Deposit Data JSON in Wallet Create RPC Response (#7444)
* return deposit data for hd wallet create

* test added for deposit data json

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-07 02:15:54 +00:00
Raul Jordan
70f3fcdbd9
Implement Create Account via RPC (#7400)
* add ssz rules

* regenerate protos to include deposit message

* built to match the deposit cli

* derived test

* fix up nil item

* fix up more nil items

* preston suggestion

* comment

* add missing tests to build file

* fix busted tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-02 16:35:28 -05:00
Victor Farazdagi
d169b490fa
Fix ineffectual assignments (#7403)
* update rpc/beacon
* more fixes to beacon-chain/rpc
* update beacon-chain/sync
* Merge refs/heads/master into fix-ineffectual-assignments
* updates beacon-chain/p2p
* Merge branch 'fix-ineffectual-assignments' of github.com:prysmaticlabs/prysm into fix-ineffectual-assignments
* update beacon-chain/*
* fix imports
* update beacon-chain/blockchain
* more updates
* Merge refs/heads/master into fix-ineffectual-assignments
* Merge branch 'master' into fix-ineffectual-assignments
* Merge refs/heads/master into fix-ineffectual-assignments
* next round of updated
* Merge branch 'fix-ineffectual-assignments' of github.com:prysmaticlabs/prysm into fix-ineffectual-assignments
* wrap up remaining items
2020-10-01 18:53:36 +00:00
terence tsao
e07b71b81d
Add Zinken config (#7391) 2020-09-30 11:19:05 -07:00
dv8silencer
7664eab32d
Introduce checks for existing wallets into two edge cases (#7349)
* Add check for preexisting wallet

* Reminder

* Create another check.  Adjust tests

* Wording in comment

* Remove unnecessary logic.  Add another regression test.

* Spacing

* Prepare to merge master

* Refactor wallet checks

* Fixed test

* Revert back to original location of check

* Fix test

* Fix test

* Address linter feedback

* Align CreateWallet() with recent changes

* Align RecoverWallet with recent changes

* Correct test error message

* Refactor test to minimize duplication

* rename to isValid and adjust function code

* refactor

* Improve IsValid()

* Fix tests

* Remove comment

* Fix documentation of IsValid()

* Align behavior of OpenWalletOrElseCli

* Fix tests

* Realigning error msg with prior behavior

* Fix another test

* Correct logic

* small change in logic

* Fix err messages

* Create consts for repeated strings

* Add comments to new constants

* gofmt

* Adjust WalletConfig behavior so it is closer to prior-to-PR.  Adjust test accordingly

* adjust error messages

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
2020-09-30 16:13:37 +02:00
Raul Jordan
16cdcf5dec
Remove Deposit Command from Validator Client (#7379)
* remove deposit code
* Merge refs/heads/master into remove-deposit
2020-09-30 06:42:16 +00:00
Radosław Kapka
951c139cff
Fix URL to voluntary exit documentation (#7361)
* fix documentation URL
2020-09-27 22:12:28 +00:00
dv8silencer
c0c34f3d3a
Fix panic that happens if you wallet-v2 recover 1 account (#7351)
* Bugfix
* Regression test.
* Remove unnecessary code.
* Merge branch 'master' into dv8-i7350
2020-09-26 10:13:56 +00:00
Radosław Kapka
99164761f5
Make voluntary exits release-ready (#7305)
* phrase validation utility
* use passphrase from docs portal
* enable voluntary exits
* Merge branch 'master' into enable-exits
* rename 'voluntary-exit' to 'exit'
* change passphrase
* gazelle
* change constant to error variable
* Merge branch 'master' into enable-exits
* rename error variable
* build fix
* Merge refs/heads/master into enable-exits
* do not remove whitespace in the middle
* Merge refs/heads/master into enable-exits
* Merge refs/heads/master into enable-exits
* Merge refs/heads/master into enable-exits
* Merge refs/heads/master into enable-exits
* code review changes
* Merge refs/heads/master into enable-exits
* Merge refs/heads/master into enable-exits
2020-09-24 11:00:44 +00:00
Victor Farazdagi
3621b2ff25
Better naming for constructor funcs (#7316)
* sync/initial-sync
* NewBeaconClientService -> NewService
* NewSlashingProtectionService -> NewService
* NewPrometheusService -> NewService
* NewColdStartService -> NewService
* NewRegularSync -> NewService
* NewDetectionService -> NewService
* NewWallet -> New
* NewKeystore -> New
* Merge branch 'master' into better-naming
* Merge branch 'master' into better-naming
* NewDepositCache -> New
2020-09-23 08:59:49 +00:00
Nishant Das
49ae42c249
Fix Validator For Spadina (#7314)
* fix commands
* Merge refs/heads/master into fixSpadina
2020-09-23 08:03:13 +00:00
Raul Jordan
b09b1f3fa5
Disallow Creation of Multiple Wallets at Wallet Path (#7290)
* disallow multiple wallet creation
* imports
* Merge branch 'master' into disallow-multiple-wallets
* resolve conflicting test
* Merge branch 'disallow-multiple-wallets' of github.com:prysmaticlabs/prysm into disallow-multiple-wallets
* test passes
* Merge refs/heads/master into disallow-multiple-wallets
* Merge refs/heads/master into disallow-multiple-wallets
* Merge refs/heads/master into disallow-multiple-wallets
* Merge refs/heads/master into disallow-multiple-wallets
* Merge refs/heads/master into disallow-multiple-wallets
* Merge refs/heads/master into disallow-multiple-wallets
* radek feedback
* Merge branch 'master' into disallow-multiple-wallets
2020-09-22 19:02:13 +00:00
Raul Jordan
ba440abe2d
Store Hashed Password to Wallet Path (#7295)
* store wallet pass on creation
* store wallet hash
* save hash to wallet dir
* initialize wallet hash
* gaz
* imports spacing
* remove mentions of hashed pass from db schema
* simplify the wallet hash code
* comment removal
* Merge branch 'master' into fix-password-override
* pass tests
* test fix
* Merge branch 'fix-password-override' of github.com:prysmaticlabs/prysm into fix-password-override
* remove extraneous printfs
* tests passing
* require auth for create wallet
* gaz
* fix signup logic
* Merge refs/heads/master into fix-password-override
* Merge refs/heads/master into fix-password-override
* Merge refs/heads/master into fix-password-override
* Merge refs/heads/master into fix-password-override
* Merge branch 'master' into fix-password-override
2020-09-22 14:49:07 +00:00
Nishant Das
719e99ffd9
Replace Roughtime With Timeutils Across Prysm (#7301)
* remove roughtime

* change all references

* rename

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-22 19:49:58 +08:00
dv8silencer
bdf8bf7be2
Fix accounts-v2 backup so that it can backup HD wallet accounts (#7284)
* Bugfix

* Added test
2020-09-21 10:50:05 +02:00
dv8silencer
208ea56a9c
Improve error message when creating a wallet in place of one that already exists (#7268)
* Tell user if content already exists at wallet create destination
* Added test
* changed wording
* capitalization
* Merge branch 'master' into dv8-i7264
* Merge branch 'master' into dv8-i7264
* Address PR comments

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Address PR comments

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Address PR comments

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Address PR comments

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Address PR comments

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Minor fix
* Improve test by addressing PR feedback.  Change variable name
* address PR comments
2020-09-18 21:01:46 +00:00
Raul Jordan
4b4641bae3
Restructure Prysm Wallet V2 Package to Prevent Import Cycles (#7247)
* fix up tests

* fix test build

* tests pass

* imports and remove shadowing

* lint

* visibility

* lint fix

* wallet init

* remove v22

* fix imports

* fixed broken password test

* Update validator/accounts/v2/wallet_create.go

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

* Update validator/rpc/server.go

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

* Update validator/node/node.go

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

* fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-09-16 20:34:42 -05:00
dv8silencer
a97de0d474
Use passphrase for HD-wallets (#7222)
* Use wallet password
* Fix test
* Address another test
* Address linter's feedback.
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Delete temp file
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'dv8-i7213' of https://github.com/dv8silencer/prysm into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Add regression test.
* Skip mnemonic confirmation
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
2020-09-16 20:12:16 +00:00
dv8silencer
c1114fa6be
Fix issue with direct wallet's password being overwritten by incorrect password during import. (#7212)
* Maintain working password instead of overwriting it.

* Check for error first

* fix test

* Address linter

* TEMP, INCOMPLETE;  Working on regression test

* WORK IN PROGRESS - changed promptutil to create a mock password reader

* Test working now

* Address testing bugs

* Spacing

* Comments.  Fixed counter bug.

* gazelle fix

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
2020-09-15 09:52:07 -05:00
dv8silencer
f31f49582b
Fix accounts-v2 deposit and related bugs (#7219) 2020-09-14 16:04:22 -07:00
Radosław Kapka
94fa046ce1
Voluntary exit CLI/Client integration (#7162)
* rewrite of ProposeExit

# Conflicts:
#	validator/accounts/v2/accounts_exit.go

* translate todos to English

* use node client to calculate current epoch

* resolve dependency cycle

* add missing dependencies

* changed required epochs error message

* fix ProposeExit tests

* remove unused metrics

* simplify public-keys flag name

* organize CLI function

* fix incorrect list of exited keys

* fix formatting of non-exited keys

* add exit root to span attributes

* use errors instead of logs

* log info when all exits failed

* do not log stack trace for non-critical errors

* modify test asserts

* use standard way of displaying errors

* remove todo

* add missing function to wallet mock

* gazelle

* gazelle after stash

* move creating clients to separate function

* gazelle
2020-09-09 13:29:17 -05:00
Preston Van Loon
a74cf5de90
Replace context.Background() with more appropriate context (#7136)
* Replace context.Background() with more appropriate context
* replace a few context.TODO
* Merge refs/heads/master into fix-ctx
* Update validator/accounts/v2/accounts_create.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Fix tests
* fix stream tests
* gofmt
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* fix conflicts and remove ctx background uses
* fix broken test
* Merge branch 'master' into fix-ctx
* imports
* Merge branch 'fix-ctx' of github.com:prysmaticlabs/prysm into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* fix conflicts
* Merge refs/heads/master into fix-ctx
* fmt
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* fixes tests
2020-09-09 09:48:52 +00:00
Raul Jordan
f4a6864343
Prepare Validator Client for Web Usage (#7158)
* prepare validator for web usage
* wallet exists func in rpc server
* only initialize wallet if feed exists and wallet also exists
* enabling web via a feed
* wallet creation works but needs to be able to recover from mnemonic via api
* ensure logic works
* Merge branch 'master' into validator-web
* fix up tests
* test file
* wallet rpc tests
* add all tests to create wallet
* Merge branch 'master' into validator-web
* imports
* Merge branch 'validator-web' of github.com:prysmaticlabs/prysm into validator-web
* Merge refs/heads/master into validator-web
* Merge refs/heads/master into validator-web
2020-09-03 15:11:17 +00:00
RoBiK75
b4c0a89d49
Fixes incorrect output produced by the ListAccounts function (#6976) (#7095)
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-09-01 13:13:44 -05:00
Raul Jordan
ecbab20bad
Begin Dynamic Rescan of Validating Keys (#6963)
* begin on dynamic key rescan
* Merge branch 'master' into dynamic-rescan
* begin dynamic rescan
* fsnotify to listen for rescan dir changes
* recheck for slashing protection
* lint
* Merge branch 'master' into dynamic-rescan
* less aggressive recheck interval
* imports
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* resolve confs
* listen for file changes for accounts file
* reload accounts from keystore
* begin fixing rescan test
* add event feed
* fix confs
* fix conf
* fix broken tests
* Merge branch 'master' into dynamic-rescan
* simplify lines
* do nothing if no subscribers
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* fix tests
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* gaz
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* ident
* Update WORKSPACE
* gaz
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* add keys on service start
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* ensure debounce util works
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* complete refresh, debounce test, and ensure works at runtime
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* imports and remove log
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* resolve confs
* fix up e2e tests
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* fix up e2e
* Merge refs/heads/master into dynamic-rescan
2020-08-31 23:38:20 +00:00
Raul Jordan
60558b7970
Refactor Accounts and Keymanager Methods to Not Rely on CLI (#7135)
* keymanagers no longer use cli ctx
* rename important values to keymanageropts
* further refactor accounts methods to reduce cli dependency
* separating cli vs non cli methods for various accounts functions
* recover wallet cli vs non-cli mode
* ensure half of tests build
* accounts v2 package now builds
* full revamp wallet creation or opening wallets
* everything builds
* tests pass finally
* Merge branch 'master' into no-cli-keymanagers
* ensure commands work as expected
* Merge branch 'no-cli-keymanagers' of github.com:prysmaticlabs/prysm into no-cli-keymanagers
* further fix build
* account creation comments
* fix imports and comments
* fix up failing test
* fix build
* Update derived.go
* Update direct.go
* Update remote.go
* Fixed variable
* fix up red tests
* use Cli instead of CLI, fix tests, and address Radek's feedback
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
* Merge refs/heads/master into no-cli-keymanagers
2020-08-31 19:46:45 +00:00
Nishant Das
8a8edf3743
Clean Up Metadata logs (#7109)
* clean errors

* cleaner

* gazelle

* go check

* Update beacon-chain/sync/error.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-08-26 17:59:16 +08:00
Ivan Martinez
ba00c55f95
Accounts-V2: Fix wallet-v2 recover and wallet-v2 create for derived (#7104)
* Fix derived to create seed on wallet-v2 create
* Fix derived wallet recover
* Fix comment
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-derived-phrase
* Merge refs/heads/master into fix-derived-phrase
* Merge refs/heads/master into fix-derived-phrase
* Merge refs/heads/master into fix-derived-phrase
* Merge refs/heads/master into fix-derived-phrase
* Merge refs/heads/master into fix-derived-phrase
* Update validator/accounts/v2/wallet_create.go
* Merge refs/heads/master into fix-derived-phrase
2020-08-25 19:30:26 +00:00
Raul Jordan
c9c4cd9f87
Create Validator Accounts V2 Send Deposit (#7080)
* add in deposit logic
* create the deposit functionality
* import formatting and create deposit config
* proceed with retrieving user input for calling the deposit func
* actually send our the deposits
* better handling and comments
* programmatically send all
* lint
* gaz
* add progress bar
* deposit test
* better error handling
* Update validator/accounts/v2/accounts_deposit.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
* Merge refs/heads/master into send-deposit
2020-08-24 19:19:21 +00:00
Raul Jordan
e69ed7c778
Accounts V2: Implement Backup for Derived Keymanager (#7067)
* backup for derived complete
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
* Merge refs/heads/master into derived-backup
2020-08-21 19:43:03 +00:00
rkapka
89e279f9c8
Account commands cleanup (#7065)
* initial implementation of command
* Add second confirmation step
* Merge branch 'origin-master' into voluntary-exit-command
* fix variable name
* added unit tests
* Merge branch 'origin-master' into voluntary-exit-command
* add comment about stdin
* remove backup-related code from accounts_delete_test
* fix comments
* move filterPublicKeysFromUserInput to new account helper
* remove SkipMnemonicConfirmFlag
* Merge refs/heads/master into voluntary-exit-command
* Merge refs/heads/master into voluntary-exit-command
* Merge refs/heads/master into voluntary-exit-command
* Merge refs/heads/master into voluntary-exit-command
* Merge refs/heads/master into voluntary-exit-command
* Merge refs/heads/master into voluntary-exit-command
* Merge refs/heads/master into voluntary-exit-command
* code review fixes
* removed commented-out code
* Merge branch 'voluntary-exit-command' into account-commands-cleanup

# Conflicts:
#	shared/promptutil/prompt.go
* Merge branch 'origin-master' into account-commands-cleanup

# Conflicts:
#	shared/promptutil/prompt.go
#	validator/accounts/v2/BUILD.bazel
#	validator/accounts/v2/accounts_exit.go
#	validator/accounts/v2/accounts_exit_test.go
* Merge refs/heads/master into account-commands-cleanup
2020-08-20 19:14:03 +00:00
rkapka
45e4ed25a3
Voluntary exit CLI command (#7046)
* initial implementation of command

* Add second confirmation step

* fix variable name

* added unit tests

* add comment about stdin

* code review fixes

* removed commented-out code

* added log assert

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-08-20 19:53:09 +02:00
Ivan Martinez
bc20591b72
Accounts-V2: Change ListDirs() to Exists(), fix bug for derived (#7038)
* Change ListDirs() to Exists()
* Merge branch 'master' into fix-derived-pass
* Make function more accurate
* Merge branch 'fix-derived-pass' of github.com:prysmaticlabs/prysm into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
* Merge refs/heads/master into fix-derived-pass
2020-08-19 16:46:26 +00:00
Ivan Martinez
6ed0539723
Acconuts-V2: Allow importing from any valid keystore, regardless of name (#6992)
* Allow importing from any file

* Fix log

* Add test

* Fix test
2020-08-13 14:45:56 -05:00
Victor Farazdagi
74101612ce
Moves AssertLogsContains to assertions package (#6985)
* first working implementation
* assertions tests
* adds to requires
* merges assert and require tests into a single suite
* gazelle
* Merge branch 'merge-assert-require-tests' into assert-logs-contains-move-to-assertions
* gazelle
* updates references
* fixes build issue
* Merge branch 'master' into assert-logs-contains-move-to-assertions
* Merge refs/heads/master into assert-logs-contains-move-to-assertions
* Merge branch 'master' into assert-logs-contains-move-to-assertions
* fixes build issue
* Merge branch 'assert-logs-contains-move-to-assertions' of github.com:prysmaticlabs/prysm into assert-logs-contains-move-to-assertions
* Merge refs/heads/master into assert-logs-contains-move-to-assertions
* Merge refs/heads/master into assert-logs-contains-move-to-assertions
2020-08-13 16:22:25 +00:00
Ivan Martinez
5705a9a1f9
Accounts-V2: Add test for DeleteAccounts (#6982)
* Add test for DeleteAccounts
* attempt to fix
* Try to fix test
* Remove
* fixed Ivan's test
* Merge branch 'master' into add-delete-test
2020-08-13 15:23:08 +00:00
Raul Jordan
86b2bd5edd
Implement Accounts-V2 Backup for Direct Keymanager (#6936)
* progress on export feature
* Merge branch 'master' into impl-export
* rename func
* imports
* confs
* export single works
* impl export
* Merge branch 'master' into impl-export
* cleanup exports code
* rename to backup
* rename to backup
* Merge branch 'master' into impl-export
* full test for backup
* Merge branch 'impl-export' of github.com:prysmaticlabs/prysm into impl-export
* gazelle fix
* terence feedback
* merge confs
* Merge branch 'master' into impl-export
* refactor into single select accounts function
* gaz
* Merge refs/heads/master into impl-export
* victor's feedback
* validate yes or no
* confs
* close the zip file in defer
* Merge refs/heads/master into impl-export
* Merge refs/heads/master into impl-export
2020-08-11 23:15:06 +00:00
Raul Jordan
11c9699129
Allow Importing One-Off, Private Keys Into Accounts-v2 (#6929)
* import privkey done
* rem print
* tidy
* Merge refs/heads/master into import-priv-key
* Merge refs/heads/master into import-priv-key
* Merge branch 'master' into import-priv-key
* tests pass
* Merge refs/heads/master into import-priv-key
* Merge refs/heads/master into import-priv-key
* resolve confs
* Merge refs/heads/master into import-priv-key
* confs
* Merge refs/heads/master into import-priv-key
* better feedback mechanism
2020-08-11 16:32:05 +00:00
Ivan Martinez
ea9bb88d13
Accounts-V2: Add command to delete accounts (#6941)
* Add accounts-v2 delete
* Merge branch 'master' of github.com:prysmaticlabs/prysm into add-delete-command
* Gaz
* Add confirmation
* Fix build
* Fix test
* Merge branch 'master' into add-delete-command
* Add more cases for exit
* Merge branch 'master' of github.com:prysmaticlabs/prysm into add-delete-command
* Fix usage
* Fix logs
* Change to DeleteAccounts
* Remove flag
* Fix comment
2020-08-11 03:54:37 +00:00
Ivan Martinez
8b9138a76a
Accounts V2: Log and UX cleanup (#6955)
* Clena up password entry for importing
* Merge branch 'master' of github.com:prysmaticlabs/prysm into accounts-v2-cleanup
* Fix password entry
* Clean
* Merge branch 'master' of github.com:prysmaticlabs/prysm into accounts-v2-cleanup
* Change color
* Merge branch 'master' of github.com:prysmaticlabs/prysm into accounts-v2-cleanup
* Fix
* Merge branch 'master' of github.com:prysmaticlabs/prysm into accounts-v2-cleanup
* Fix
* Merge branch 'master' of github.com:prysmaticlabs/prysm into accounts-v2-cleanup
* Cleanup
* Clean go.mod
* Fix
2020-08-10 22:35:30 +00:00
Raul Jordan
cbc27e0f2e
Refactor Wallet Password Handling, Preventing Wallet Corruption (#6933)
* wallet should no longer deal with account passwords
* ensure tests are fixed
* Merge branch 'master' into corrupted-pass
* move mnemonic logic into right place
* rem fmts
* add fileutil
* gazelle
* imports
* move seed logic to derived
* fix tests
* imports
* gaz
* Merge refs/heads/master into corrupted-pass
* merge confs
* Merge refs/heads/master into corrupted-pass
* ivan's feedback
* Merge branch 'corrupted-pass' of github.com:prysmaticlabs/prysm into corrupted-pass
* gaz
* fix shared test
* Merge refs/heads/master into corrupted-pass
* resolve conflicts
* fix test build
2020-08-10 18:54:40 +00:00
Raul Jordan
a7f4293eb3
Resolve Accounts-v2 Feedback (#6953)
* Radek feedback
* Merge refs/heads/master into final-accounts-feedback
* Apply suggestions from code review
* Merge refs/heads/master into final-accounts-feedback
* Merge refs/heads/master into final-accounts-feedback
2020-08-10 18:14:10 +00:00
Shay Zluf
335d31688f
Wallet file lock (#6952)
* Wallet file lock

* lock wallet config file only in validator instance

* runtime fixes

* added test

* radek feedback

* fix test
2020-08-10 12:48:41 -05:00
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