## Week 20 and Week 21 Updates: ### Progress on ePBS Implementation: #### All-in-one Fork Choice Analysis Key Components: ```golang type AvailabilityCommittee struct { Validators []ValidatorIndex VotingPeriod uint64 // 7 seconds into slot Threshold uint64 // Majority threshold } type BlockBranch struct { Empty bool // B_empty: Block without payload Full bool // B_full: Block with payload Root Root // Block root } ``` Major Improvements: - Unifies fork choice rules for ePBS, FOCIL, and DAS - Eliminates need for complex builder boost mechanisms - Introduces staged release of block data - Simplifies payment processing logic #### Critical Technical Challenges **Withdrawal Handling Issue:** ```golang // Current Challenge func get_expected_withdrawals(state BeaconState) error { if !is_parent_full(state) { return ErrIndeterminateWithdrawals } // Process withdrawals } ``` **Proposed Solutions:** 1. Client-side Caching: ```golang type BeaconNode struct { withdrawalCache map[Root][]Withdrawal } func (bn *BeaconNode) GetWithdrawals(blockRoot Root) []Withdrawal { return bn.withdrawalCache[blockRoot] } ``` 2. State-level Caching: ```golang type BeaconState struct { WithdrawalsCache []Withdrawal // Instead of just root } ``` **Builder Staking Security:** Current Risk: ```golang type Builder struct { Balance uint64 // Can potentially drain balance after bidding } ``` Proposed Solutions: ```golang // Option 1: Execution Request Based type BuilderBid struct { MaxBid uint64 ValidUntil uint64 } // Option 2: Excess Balance Only type Builder struct { MinStake uint64 // 1 ETH ExcessLimit uint64 // Maximum bid allowed } ``` ### Implementation Progress Fork Choice Updates: ```golang func (f *ForkChoice) ProcessBlock(block *BeaconBlock) error { // New dual-branch handling empty := createEmptyBranch(block) full := createFullBranch(block) // Process AC votes if hasACMajority(block) { return f.processFull(full) } return f.processEmpty(empty) } ``` ### Focus for next 2 weeks Technical Priorities: - Implement client-side withdrawal caching - Develop builder stake management system - Update validator specifications - Create test scenarios for empty block handling #### Outstanding Questions Builder Security: - How to handle builder slashing? - What's the optimal minimum stake? - How to prevent stake drainage attacks? Withdrawal Handling: - Performance implications of caching - Race condition prevention - State bloat considerations #### Client Implementation Status **Prysm:** ```golang // New implementations needed type BlockProduction struct { WithdrawalCache cache.WithdrawalCache BuilderRegistry registry.BuilderStakes ACVoteProcessor votes.ACProcessor } ``` **Other Clients:** - Teku: Aligned with client-side caching approach - Awaiting feedback from remaining clients **Misc:** - Presentation and final report for devcon