Problem Statement / Feature Objective
Changing withdrawal credentials from BLS-withdrawal (0x00) to execution-layer-withdrawal (0x01) requires a signed BLSToExecutionChange message. For multi-sig or DAO-governed validator pools, the signing process involves multiple stakeholders. Build a pipeline that: constructs the change message, routes it through a configurable governance approval workflow (N-of-M signers), tracks approval progress, and broadcasts once threshold is met.
Technical Invariants & Bounds
- Message format:
BLSToExecutionChange{validator_index, from_bls_pubkey, to_execution_address} signed with domain DOMAIN_BLS_TO_EXECUTION_CHANGE
- Governance workflow: configurable N-of-M approval threshold; each approver must sign the same message independently
- Approval tracking: each signature is an ECDSA signature over the SHA-256 hash of the SSZ-encoded message
- Deadline: change request auto-expires after 7 days if threshold not met
- Pipeline must support concurrent change requests for up to 50 validators simultaneously
- Each request state machine: Draft → PendingApproval → Approved → Broadcast → Confirmed → Failed
- Audit log: all signature submissions and state transitions logged to IndexedDB with tamper-evident hash chain
Codebase Navigation Guide
src/hooks/useWithdrawalChange.ts – pipeline state management hook
src/components/validators/WithdrawalChangeWizard.tsx – multi-step wizard
src/utils/blsToExecutionChange.ts – message construction and validation
src/services/governanceService.ts – governance workflow configuration
src/store/changeRequestSlice.ts – request state management
src/pages/settings/ValidatorSettings.tsx – integration point
Implementation Blueprint
- Create
src/utils/blsToExecutionChange.ts – constructs SSZ-encoded BLSToExecutionChange message, computes SHA-256 hash for signing
- Build
src/services/governanceService.ts – loads governance config (N-of-M threshold, approver list) from API or local config file
- Implement
src/hooks/useWithdrawalChange.ts – manages request lifecycle through all 6 states, handles concurrent requests, implements 7-day expiry with periodic cleanup
- Create
src/components/validators/WithdrawalChangeWizard.tsx – wizard with:
- Step 1: Validator selection + new execution address input
- Step 2: Approver assignment and signing requests (email/web3 notification)
- Step 3: Approval progress bar (signatures collected vs threshold)
- Step 4: Broadcast trigger with confirmation
- Add
src/utils/auditChain.ts – append-only audit log with SHA-256 hash chain linking consecutive entries
- Implement IndexedDB persistence in
src/services/changeRequestStore.ts – stores all request state + audit chain
- Mount in
ValidatorSettings.tsx under "Withdrawal Credentials" section
Problem Statement / Feature Objective
Changing withdrawal credentials from BLS-withdrawal (0x00) to execution-layer-withdrawal (0x01) requires a signed
BLSToExecutionChangemessage. For multi-sig or DAO-governed validator pools, the signing process involves multiple stakeholders. Build a pipeline that: constructs the change message, routes it through a configurable governance approval workflow (N-of-M signers), tracks approval progress, and broadcasts once threshold is met.Technical Invariants & Bounds
BLSToExecutionChange{validator_index, from_bls_pubkey, to_execution_address}signed with domainDOMAIN_BLS_TO_EXECUTION_CHANGECodebase Navigation Guide
src/hooks/useWithdrawalChange.ts– pipeline state management hooksrc/components/validators/WithdrawalChangeWizard.tsx– multi-step wizardsrc/utils/blsToExecutionChange.ts– message construction and validationsrc/services/governanceService.ts– governance workflow configurationsrc/store/changeRequestSlice.ts– request state managementsrc/pages/settings/ValidatorSettings.tsx– integration pointImplementation Blueprint
src/utils/blsToExecutionChange.ts– constructs SSZ-encodedBLSToExecutionChangemessage, computes SHA-256 hash for signingsrc/services/governanceService.ts– loads governance config (N-of-M threshold, approver list) from API or local config filesrc/hooks/useWithdrawalChange.ts– manages request lifecycle through all 6 states, handles concurrent requests, implements 7-day expiry with periodic cleanupsrc/components/validators/WithdrawalChangeWizard.tsx– wizard with:src/utils/auditChain.ts– append-only audit log with SHA-256 hash chain linking consecutive entriessrc/services/changeRequestStore.ts– stores all request state + audit chainValidatorSettings.tsxunder "Withdrawal Credentials" section