We have several points in VC key loading that can be improved.
Problem 1: Fake wallet for Web3Signer
|
// NewWalletForWeb3Signer returns a new wallet for web3 signer which is temporary and not stored locally. |
|
func NewWalletForWeb3Signer(cliCtx *cli.Context) *Wallet { |
|
walletDir := cliCtx.String(flags.WalletDirFlag.Name) |
|
// wallet is just a temporary wallet for web3 signer used to call initialize keymanager. |
|
return &Wallet{ |
|
walletDir: walletDir, // it's ok if there's an existing wallet |
|
accountsPath: "", |
|
keymanagerKind: keymanager.Web3Signer, |
|
walletPassword: "", |
|
} |
|
} |
Remote signing doesn't need keys on disk, but we simply add a "stub" wallet only to satisfy the interface. Decouple Web3Signer with the current Prysm wallet design.
Problem 2: Wallet registration should be preceded for Keymanager API
walletInitialized is the single gate that guards the Keymanager API handlers like POST /eth/v1/keystores. We can remove the blocker regardless of wallet initialization, as it is a normal workflow that users can POST keystores after running VC process.
Problem 3: Non-standard format & No direct key loading
Every other clients (Lighthouse, Lodestar) use per-key EIP-2335 files. This makes users harder to migrate from other VC to Prysm VC due to compatability issue. We can add one more "store" implementation apart from the current Prysm wallet. So the desired flags that we can have are --validator-keys and --keystore-passwords.
We have several points in VC key loading that can be improved.
Problem 1: Fake wallet for Web3Signer
prysm/validator/accounts/wallet/wallet.go
Lines 255 to 265 in f9c7a8d
Remote signing doesn't need keys on disk, but we simply add a "stub" wallet only to satisfy the interface. Decouple Web3Signer with the current Prysm wallet design.
Problem 2: Wallet registration should be preceded for Keymanager API
walletInitializedis the single gate that guards the Keymanager API handlers likePOST /eth/v1/keystores. We can remove the blocker regardless of wallet initialization, as it is a normal workflow that users canPOSTkeystores after running VC process.Problem 3: Non-standard format & No direct key loading
Every other clients (Lighthouse, Lodestar) use per-key EIP-2335 files. This makes users harder to migrate from other VC to Prysm VC due to compatability issue. We can add one more "store" implementation apart from the current Prysm wallet. So the desired flags that we can have are
--validator-keysand--keystore-passwords.