bugfix: check for all possible credentials when processing EL withdrawal request

This commit is contained in:
Alex Stokes 2024-04-15 19:30:24 -06:00
parent 35534989ff
commit e1840a78a0
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -1109,11 +1109,11 @@ def process_execution_layer_withdrawal_request(
validator = state.validators[index]
# Verify withdrawal credentials
is_execution_address = validator.withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
has_correct_credential = has_execution_withdrawal_credential(validator)
is_correct_source_address = (
validator.withdrawal_credentials[12:] == execution_layer_withdrawal_request.source_address
)
if not (is_execution_address and is_correct_source_address):
if not (has_correct_credential and is_correct_source_address):
return
# Verify the validator is active
if not is_active_validator(validator, get_current_epoch(state)):