Skip to content

Commit 93dba67

Browse files
authored
Merge pull request #3660 from ethereum/ralexstokes-patch-2
EIP-7002: Bugfix when processing execution layer exit request
2 parents dd2721f + 1db1c54 commit 93dba67

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

specs/_features/eip7002/beacon-chain.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None:
222222
```python
223223
def process_execution_layer_exit(state: BeaconState, execution_layer_exit: ExecutionLayerExit) -> None:
224224
validator_pubkeys = [v.pubkey for v in state.validators]
225-
validator_index = ValidatorIndex(validator_pubkeys.index(execution_layer_exit.validator_pubkey))
225+
# Verify pubkey exists
226+
pubkey_to_exit = execution_layer_exit.validator_pubkey
227+
if pubkey_to_exit not in validator_pubkeys:
228+
return
229+
validator_index = ValidatorIndex(validator_pubkeys.index(pubkey_to_exit))
226230
validator = state.validators[validator_index]
227231

228232
# Verify withdrawal credentials

0 commit comments

Comments
 (0)