Problem Statement / Feature Objective
Validator consolidation (EIP-7251) allows operators to merge multiple validators into fewer, larger-stake validators. Operators with thousands of validators need a dashboard that scans their entire fleet, identifies consolidation-eligible validator pairs/groups, computes the optimal merge strategy to minimize operational overhead, and estimates gas cost savings.
Technical Invariants & Bounds
- Consolidation eligibility requires both source and target validator to have the same withdrawal credentials
- Optimal merge grouping: minimize validator count while respecting the 2048-ETH effective balance cap per consolidated validator
- Gas savings estimation = (current_validator_count - merged_validator_count) × avg_gas_per_validator_per_epoch × 365.25 days
- Fleet scanning must support up to 10,000 validators without blocking the main thread (web worker + chunked processing, 500 validators per chunk)
- Results must be sortable by: potential savings (desc), validator count, and consolidation readiness score
- Readiness score = 0.5 × (matching_withdrawal_creds_ratio) + 0.3 × (balance_proximity_to_32) + 0.2 × (activation_epoch_proximity)
Codebase Navigation Guide
src/hooks/useConsolidationEligibility.ts – hook for eligibility scanning
src/workers/consolidationScannerWorker.ts – web worker for chunked fleet scanning
src/components/validators/ConsolidationDashboard.tsx – main dashboard component
src/utils/gasEstimator.ts – gas calculation utilities
src/utils/ethMath.ts – base Ethereum math operations
src/pages/validators/ValidatorDashboard.tsx – integration point
Implementation Blueprint
- Create
src/utils/consolidationEligibility.ts – core algorithm that groups validators by withdrawal credentials, finds optimal merge sets under 2048-ETH cap, and computes readiness scores
- Build
src/workers/consolidationScannerWorker.ts – processes validators in chunks of 500, returns merge recommendations via postMessage
- Implement
src/hooks/useConsolidationEligibility.ts – manages worker lifecycle, aggregates chunk results, handles loading/error states
- Create
src/components/validators/ConsolidationDashboard.tsx with sortable table showing (group_id, current_count, merged_count, savings, readiness_score)
- Add
src/utils/gasEstimator.ts – estimates per-validator gas costs for attestations, proposals, and withdrawals
- Mount in
ValidatorDashboard.tsx as a new tab "Consolidation" alongside existing tabs
Problem Statement / Feature Objective
Validator consolidation (EIP-7251) allows operators to merge multiple validators into fewer, larger-stake validators. Operators with thousands of validators need a dashboard that scans their entire fleet, identifies consolidation-eligible validator pairs/groups, computes the optimal merge strategy to minimize operational overhead, and estimates gas cost savings.
Technical Invariants & Bounds
Codebase Navigation Guide
src/hooks/useConsolidationEligibility.ts– hook for eligibility scanningsrc/workers/consolidationScannerWorker.ts– web worker for chunked fleet scanningsrc/components/validators/ConsolidationDashboard.tsx– main dashboard componentsrc/utils/gasEstimator.ts– gas calculation utilitiessrc/utils/ethMath.ts– base Ethereum math operationssrc/pages/validators/ValidatorDashboard.tsx– integration pointImplementation Blueprint
src/utils/consolidationEligibility.ts– core algorithm that groups validators by withdrawal credentials, finds optimal merge sets under 2048-ETH cap, and computes readiness scoressrc/workers/consolidationScannerWorker.ts– processes validators in chunks of 500, returns merge recommendations via postMessagesrc/hooks/useConsolidationEligibility.ts– manages worker lifecycle, aggregates chunk results, handles loading/error statessrc/components/validators/ConsolidationDashboard.tsxwith sortable table showing (group_id, current_count, merged_count, savings, readiness_score)src/utils/gasEstimator.ts– estimates per-validator gas costs for attestations, proposals, and withdrawalsValidatorDashboard.tsxas a new tab "Consolidation" alongside existing tabs