Rollout for adding EIP-2335 path for Prysm VC key loading - #22
Open
syjn99 wants to merge 5 commits into
Open
Conversation
The web3signer keymanager only needs its SetupConfig, but construction was routed through wallet.InitializeKeymanager, requiring a fake in-memory wallet (NewWalletForWeb3Signer) just to satisfy the interface. Construct it directly instead: - WaitForKeymanagerInitialization gains a web3SignerConfig case calling remoteweb3signer.NewKeymanager; the wallet switch loses its Web3Signer branch and InitKeymanagerConfig loses the Web3SignerConfig field. - getWallet returns no wallet for web3signer; the legacy slashing-protection database lookup keeps using the wallet dir flag for web3signer. - The RPC server derives walletInitialized and the keymanager kind from the validator service's remote signer config when no wallet exists, keeping keymanager API behavior identical for web3signer setups. - The accounts exit CLI builds the web3signer keymanager directly, matching the interop path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Decouple the local keymanager from the concrete wallet by defining an AccountStore interface (Load/Save/WatchPath) as its persistence backend, with two implementations: - walletStore wraps the legacy wallet and preserves the single encrypted all-accounts.keystore.json blob byte for byte (zero behavior change). - dirStore loads a plain directory of standalone EIP-2335 keystore files — the format shared with other consensus clients — with passwords from a shared file or Teku-style per-keystore <name>.txt files. The fsnotify refresh loop now watches the store's path (blob file vs. keys directory) and reloads through it, and imports carry the incoming keystores down so dirStore persists them verbatim (no re-encryption) with their passwords; deletes remove the per-key files. A single-listener guard ensures at most one watcher goroutine runs per keymanager. Nothing constructs a dirStore yet, so all existing wallet behavior is unchanged; this is the groundwork for direct keystore loading. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ding New flags let the validator client start from a plain directory of EIP-2335 keystore files, no wallet required. Key-source resolution in the node picks exactly one source in priority order (interop, web3signer, --validator-keys, legacy --wallet-dir); --validator-keys with --wallet-dir is a startup error, and --keystore-passwords is required alongside --validator-keys. The RPC server treats a configured account store like an initialized wallet so the keymanager API works over the new source. This completes Phase 2 of the wallet demotion plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The validator RPC server no longer gates the keymanager API on a Prysm wallet being initialized. A keymanager always exists after startup (wallet, web3signer, direct keystore dir, or, with --rpc and no source, an empty local keymanager over <datadir>/keystores), so the walletInitialized guards and the walletInitializedFeed onboarding plumbing are gone. Running headless with no key source now fails fast with an actionable error. Per the plan's recommended variant, the frozen web UI is deleted outright rather than rewired: validator/web assets, the catch-all web handler and /api rewrite, the Prysm-specific wallet HTTP endpoints (/v2/validator/wallet/*, /v2/validator/initialize), EnableWeb, and WriteWalletPasswordOnWebOnboarding. Both feature flags become deprecated no-ops. The standard keymanager API used by third-party UIs and DVT tooling is unaffected, and the auth token continues to secure it. This completes Phase 3 of the wallet demotion plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
validator accounts import/list/delete/backup/voluntary-exit now resolve their key source through keySourceForAccounts: a --validator-keys directory of EIP-2335 keystores (with --keystore-passwords) when set, otherwise the legacy wallet. Commands that only used the keymanager work unchanged; list tolerates a nil wallet, and a directly-imported private key takes its password from --account-password-file when no wallet backs the CLI. `validator wallet create|recover`, `--wallet-dir`, and opening a legacy wallet now log a deprecation notice pointing at the new flags. The wallet paths keep working through the deprecation window. This completes Phase 4 of the wallet demotion plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.