# EPF5 Week 8 Updates (EIP-7732 implementation)
This week has been a productive week for me, I learned a lot about prysm codebase and implemented a modified version of process_withdrawal for ePBS.
I also wrote tests for IndexedPayloadAttestation and got it merged into ePBS branch
## Prs Raised
### Indexed Payload Attestation Tests
1) https://github.com/prysmaticlabs/prysm/pull/14299 (merged)
### Process Withdrawal fn implementation
2) https://github.com/prysmaticlabs/prysm/pull/14297
### Sync Package payload attestation tests
3) https://github.com/prysmaticlabs/prysm/pull/14307
The first one got merged and the second one is waiting for a wrapper fn needed for ePBS version to test process_withdrawal for ePBS fork test is passing for other forks.
And third one is wip for this week
## Process_withdrawal implementation
Now let's talk about how I implemented process_withdrawal since I can't talk much about tests because they are fairly simple nothing new. So till Electra we used to get the withdrawal root from the Executiondata taken as an argument to process_withdrawal
```
func ProcessWithdrawals(st state.BeaconState, executionData interfaces.ExecutionData) (state.BeaconState, error)
```
But in EPBS we don't directly have wdroot in executionData as we are modifying the way we used to send payload by adding a layer of protection called Executionpayloadenvelope. That too contains bids for the proposer without any payload so for that reason we directly set the withdrawal root by fetching from the state.
Also in EPBS if the IsparentBlockfull() which essentially returns true if the last committed payload header was fulfilled i.e. if both the beacon block and payload were present. And returns an error if it is called by block from previous versioned blocks
```
# python pseudocode
if st.version() >= version.EPBS :
if not is_parent_block_full(state): # [New in EPBS:EIP7732]
return
expected_withdrawals, partial_withdrawals_count = get_expected_withdrawals(state)
state.latest_withdrawals_root = hash_tree_root(expected_withdrawals)
```
But the real catch was after this when you have to write code that is compatible with all the forks because potuz said you don't need to write separate process_withdrawal for epbs we can just modify it and for epbs we will pass executiondata as nil or nothing.
So I needed to refactor the code to be compatible with all the forks which took me a while and potuz helped me a lot by reviewing my code and also modifying test for epbs but another hurdle in my path that's a nil pointer dereferencing error because I was passing nil in executionData arg which is an interface so we needed a wrapper fn which can process a nil interface and can be passed to the fn to test.
So potuz said he is working on that once it is done my Pr becomes ready to be merged
So this is my update for week 9.👋
See you in the next update.