2727 - [ ` DepositRequest ` ] ( #depositrequest )
2828 - [ ` PendingBalanceDeposit ` ] ( #pendingbalancedeposit )
2929 - [ ` PendingPartialWithdrawal ` ] ( #pendingpartialwithdrawal )
30- - [ ` ExecutionLayerWithdrawalRequest ` ] ( #executionlayerwithdrawalrequest )
30+ - [ ` WithdrawalRequest ` ] ( #executionlayerwithdrawalrequest )
3131 - [ ` ExecutionLayerConsolidationRequest ` ] ( #executionlayerconsolidationrequest )
3232 - [ ` PendingConsolidation ` ] ( #pendingconsolidation )
3333 - [ Modified Containers] ( #modified-containers )
9191 - [ Voluntary exits] ( #voluntary-exits )
9292 - [ Updated ` process_voluntary_exit ` ] ( #updated-process_voluntary_exit )
9393 - [ Execution layer withdrawal requests] ( #execution-layer-withdrawal-requests )
94- - [ New ` process_execution_layer_withdrawal_request ` ] ( #new-process_execution_layer_withdrawal_request )
94+ - [ New ` process_withdrawal_request ` ] ( #new-process_withdrawal_request )
9595 - [ Deposit requests] ( #deposit-requests )
9696 - [ New ` process_deposit_request ` ] ( #new-process_deposit_request )
9797 - [ Execution layer consolidation requests] ( #execution-layer-consolidation-requests )
@@ -227,12 +227,12 @@ class PendingPartialWithdrawal(Container):
227227 amount: Gwei
228228 withdrawable_epoch: Epoch
229229```
230- #### ` ExecutionLayerWithdrawalRequest `
230+ #### ` WithdrawalRequest `
231231
232232* Note* : The container is new in EIP7251: EIP7002 .
233233
234234``` python
235- class ExecutionLayerWithdrawalRequest (Container ):
235+ class WithdrawalRequest (Container ):
236236 source_address: ExecutionAddress
237237 validator_pubkey: BLSPubkey
238238 amount: Gwei
@@ -336,7 +336,7 @@ class ExecutionPayload(Container):
336336 excess_blob_gas: uint64
337337 deposit_requests: List[DepositRequest, MAX_DEPOSIT_REQUESTS_PER_PAYLOAD ] # [New in Electra:EIP6110]
338338 # [New in Electra:EIP7002:EIP7251]
339- withdrawal_requests: List[ExecutionLayerWithdrawalRequest , MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD ]
339+ withdrawal_requests: List[WithdrawalRequest , MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD ]
340340 # [New in Electra:EIP7251]
341341 consolidation_requests: List[ExecutionLayerConsolidationRequest, MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD ]
342342```
@@ -1075,7 +1075,7 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None:
10751075 for_ops(body.bls_to_execution_changes, process_bls_to_execution_change)
10761076 for_ops(body.execution_payload.deposit_requests, process_deposit_request) # [New in Electra:EIP6110]
10771077 # [New in Electra:EIP7002:EIP7251]
1078- for_ops(body.execution_payload.withdrawal_requests, process_execution_layer_withdrawal_request )
1078+ for_ops(body.execution_payload.withdrawal_requests, process_withdrawal_request )
10791079 # [New in Electra:EIP7251]
10801080 for_ops(body.execution_payload.consolidation_requests, process_execution_layer_consolidation_request)
10811081```
@@ -1236,16 +1236,16 @@ def process_voluntary_exit(state: BeaconState, signed_voluntary_exit: SignedVolu
12361236
12371237##### Execution layer withdrawal requests
12381238
1239- ###### New ` process_execution_layer_withdrawal_request `
1239+ ###### New ` process_withdrawal_request `
12401240
12411241* Note* : This function is new in Electra following EIP-7002 and EIP-7251.
12421242
12431243``` python
1244- def process_execution_layer_withdrawal_request (
1244+ def process_withdrawal_request (
12451245 state : BeaconState,
1246- execution_layer_withdrawal_request : ExecutionLayerWithdrawalRequest
1246+ withdrawal_request : WithdrawalRequest
12471247) -> None :
1248- amount = execution_layer_withdrawal_request .amount
1248+ amount = withdrawal_request .amount
12491249 is_full_exit_request = amount == FULL_EXIT_REQUEST_AMOUNT
12501250
12511251 # If partial withdrawal queue is full, only full exits are processed
@@ -1254,7 +1254,7 @@ def process_execution_layer_withdrawal_request(
12541254
12551255 validator_pubkeys = [v.pubkey for v in state.validators]
12561256 # Verify pubkey exists
1257- request_pubkey = execution_layer_withdrawal_request .validator_pubkey
1257+ request_pubkey = withdrawal_request .validator_pubkey
12581258 if request_pubkey not in validator_pubkeys:
12591259 return
12601260 index = ValidatorIndex(validator_pubkeys.index(request_pubkey))
@@ -1263,7 +1263,7 @@ def process_execution_layer_withdrawal_request(
12631263 # Verify withdrawal credentials
12641264 has_correct_credential = has_execution_withdrawal_credential(validator)
12651265 is_correct_source_address = (
1266- validator.withdrawal_credentials[12 :] == execution_layer_withdrawal_request .source_address
1266+ validator.withdrawal_credentials[12 :] == withdrawal_request .source_address
12671267 )
12681268 if not (has_correct_credential and is_correct_source_address):
12691269 return
0 commit comments