Repository navigation
Closed
Description
Context
The eth_keystore config field is plumbed through and validated readable at startup (crates/node/src/config/mod.rs:311-339, crates/node/src/config/types.rs:57), and decdn key-gen advertises generating an Ethereum keystore alongside the Ed25519 node key (crates/node/src/cli/key_gen.rs:7). But:
decdn key-genonly writes the Ed25519 key — the Ethereum keystore generation is a no-op (crates/node/src/commands/mod.rs:164-188).- Nothing in the runtime loads the keystore JSON into a usable
alloy::signers::local::PrivateKeySigner.
This is currently bundled into #327's "Runtime integration" bullet (Alloy provider + signer wiring). Carving it out as a narrow issue because it's genuinely independent of contract calls — anything that needs to sign EIP-712 vouchers (#319) or in-protocol messages will need this signer regardless of whether on-chain RPC is wired up.
Scope (crates/node)
decdn key-gen (extend)
- Generate a fresh secp256k1 key
- Encrypt with a user-provided password (prompt via
rpasswordor read from--password-file) - Write Web3 Secret Storage v3 JSON keystore to
<output_dir>/keystore.json - Print the derived Ethereum address
Runtime keystore loader
- New module (e.g.,
crates/node/src/identity/eth.rs) exposingload_eth_signer(path, password) -> Result<PrivateKeySigner>viaalloy::signers::local::LocalSigner::decrypt_keystore - Source the password from one of:
DECDN_KEYSTORE_PASSWORDenv var,--keystore-password-file <path>, interactive prompt (TTY-detected fallback) - Cache the loaded
PrivateKeySigneron the runtime state so it's available to anything needing to sign (vouchers, future on-chain txs)
Tests
key-genround-trip: generate → load → verify recovered address matches- Wrong-password rejection
- Keystore-not-found / unreadable / malformed JSON failure modes
- A loopback test that signs a sample EIP-712 voucher (from Implement EIP-712 payment voucher creation and verification #319) using the loaded signer and verifies it
Out of scope
- On-chain RPC, contract calls, event monitoring (stays in Implement on-chain CapacityBond and PaymentChannel contract integration #327)
- Hardware wallet / remote signer support (post-PoC)
References
- Carved out of Implement on-chain CapacityBond and PaymentChannel contract integration #327 "Runtime integration" bullet
- Consumed by Implement EIP-712 payment voucher creation and verification #319 (voucher signing) and Implement on-chain CapacityBond and PaymentChannel contract integration #327 (contract tx signing)
- ADR 003 §EIP-712 Voucher Signature
- ADR appendix: operator key rotation
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Priority
None yet
Activity
feat(incentive): add EIP-712 voucher signing, channel state, and rate…
refactor(incentive,common,cli): relocate eth_identity to incentive (#406
refactor(incentive,common,cli): archive prior keys + zeroize passwords (
feat(node,cli): load eth_keystore into a live PrivateKeySigner (#406) (…