* recover wallet rpc support - first attempt
* removed redundant check
* separate createwallet into imported and derived. Recover is derived
* added unit test for recover. Recover is the createWallet for derived
* so proto does CamelCase!
* fixed issues related to unit testing
* expose ValidateMnemonic from accounts to be used by the rpc module
* added Mnemonic25Support and test to ensure it is not et is not empty
* added skipMnemonic25thword support and unit test
* Update proto/validator/accounts/v2/web_api.proto
Proper naming convention
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* ran goimports,changed variable to SkipMnemonic_25ThWord
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update validator/rpc/wallet.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* fixed variable and text msgs naming convention as per the review
* added unit test for strong password on recover
* Update proto/validator/accounts/v2/web_api.proto
Co-authored-by: Nishant Das <nish1993@hotmail.com>
* Update validator/rpc/wallet.go
Co-authored-by: Nishant Das <nish1993@hotmail.com>
* goimports -w on root proto
* added comments after exposing ValidateMnemonic to by used by rpc.RecoverWallet
* language should be case insensitive
* need to goimports before update protobuf scripts
* Update validator/rpc/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/rpc/wallet.go
comments need to be consistant
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/rpc/wallet_test.go
consistent comments
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* fix comments
* remove the skipMnemonic from rpc, just check if passphrase is empyt
* defer call to set the writePassword flag on web boarding
* gofmt
* fixed the password write test after recovering a wallet. Needed to have two defers. One to set to true then one back to false
* restore powchain.pb.go and finalized_block_root_container.pb.go
* revert beacon messages.pb.go
* revert unrelated files
* revert unrelated files
* revert unrelated files
* unlreated files
* restored the imports
* Update validator/rpc/wallet_test.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Nishant Das <nish1993@hotmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* added the removed RPC delete account to accounts.go and the rpc in proto
* reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go
* strong password defined elsewhere- removed
* Update validator/rpc/accounts_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* added PublicKeys Nil test case
* changed ss to s. ss was a bad name inthe first place
* goimports -w root
* fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete
* removed unneeded comment
* added test case for derived, changed delete account to be for both imported and derived
* gofmt
* unrelated files
* unrelated files
* unrelatedfiles restored
* revert unrelated files
* changed the last ss
* restore imports
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update rules_go and fix proto conflicts
* gaz
* Update generated code
* more emptypb fixes
* gaz
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Make 1 occurence of 'foo', 'bar' and 'fizz!'
* Make 1 occurence of 'merkleizing list that is too large, over limit' string
* Limit password occurrences
* Make only 1 occurence of 'strongPass'
* Limit testMnemonic occurrences
* Limit expected epoch error messages
* Rename errors and use constant
* Update bazel dependencies
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* initial implementation
* remove listening for changes from wallet creation
* goimports
* test fix
* more goimports
* listen for changes when initializing wallet through gRPC
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* persist wallet password to wallet dir if onboarded via web
* add flag
* gaz
* add test
* fmt
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* even more cors
* auth fixes for web v1
* ensure web works
* include web ui v1 release
* new site data
* fmt
* test
* tests pass
* gaz
* build fix
* no ssz
* unused type
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* begin hd wallet refactor
* further simplify the new derived keymanager
* make it almost a full wrapper around an imported keymanager
* fix up the EIP test
* deprecated derived
* fixing keymanager tests
* fix up derived tests
* refactor initialize keymanager
* simplify hd
* pass some tests
* pass accounts list test
* gaz
* regenerate protos without create account privilege
* enforce account recovery on wallet create
* allow accounts delete to work
* remove mentions of accounts create
* resolve comments and go mod
* fix up tests
* build fixes
* remove insecure warning
* revert
* fix proto file
* remove create account message
* gaz
* remove account create
* update web api protos
* fix up imports
* change func sig
* tidy
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* add --enable --disable flags for validator accounts
* refactor DeleteAccountConfig into AccountConfig to be used for enable and disable feature
* add `disable` flag for validator accounts
* [wip] add method to disable account
* refactor account delete
* add disable & enable with proper filters
* fix keymanager unit tests
* update DisabledPublicKeys to be a string instead of [][]byte
* fix FetchValidatingPrivateKeys to only fetch active keys with new string format
* fix FetchValidationPrivateKeys with new DisabledPublicKeys format (as a string)
* rename file + update AccountsConfig to include Disable, Enable and Delete distinct attributes
* rename accounts_activation -> accounts_enable_disable
* revert changes from using string to [][]byte for DisabledPublicKeys
* add FetchAllValidatingPublicKeys to preserve the functionality for accounts list, backup and delete
* fix unit tests
* convert publickeys from [][]byte to str before passing it to pb message
* add unit tests for disable keys
* add unit tests for EnableAccounts
* revert WORKSPACE LLM for now
* ran gazelle
* move function to convert KeymanagerOpts to Config inside rpc and run gazelle
* add unit tests for FetchAllValidatingPublicKeys
* fix keymanageropts for InteropKey
* Fix mistake for enable accounts
* add docstring to DisableAccountsCli and EnableAccountsCli
* remove previous testnet and add toledo & pyrmont
* fix build from source
* clean up
* update again
* change everything
* workaround for now
* fix versioning
* all passing now
* fix build issues
* clean up
* revert use of MulVerify
* gaz
* stub
* Apply suggestions from code review
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* fix all
* fix test
* todo
* fix stub
* revert back
* make deep source happy
* Update shared/bls/herumi/public_key.go
* Update shared/bls/blst/signature.go
* Update shared/bls/blst/signature_test.go
* imports
* move iface to common, export errors
* rm iface build
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* advanced functionality, enable 25th word mnemonic passphrase
* 25th word passphrase
* add test
* added test to ensure differences when using the mnemonic 25th word
* better message
* passing tests
* fix up logic
* 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>
* begin with delete accounts impl
* delete tests passing
* started backup, delete tests all passing
* implement backup using zip
* backup implementation done with unzip tests
* full tests done
* used proper error codes
* remove comment
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* implement the import function
* begin tests for import keystores and add preconditions
* import implementation done
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* 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>
* 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
* 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