skip bad proof of possession deposits

This commit is contained in:
Danny Ryan 2019-02-25 09:36:52 -07:00 committed by GitHub
parent fbb70e91eb
commit b2a3ee4bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1235,7 +1235,7 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
""" """
deposit_input = deposit.deposit_data.deposit_input deposit_input = deposit.deposit_data.deposit_input
assert bls_verify( proof_is_valid = bls_verify(
pubkey=deposit_input.pubkey, pubkey=deposit_input.pubkey,
message_hash=signed_root(deposit_input, "proof_of_possession"), message_hash=signed_root(deposit_input, "proof_of_possession"),
signature=deposit_input.proof_of_possession, signature=deposit_input.proof_of_possession,
@ -1246,6 +1246,9 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
) )
) )
if not proof_is_valid:
return
validator_pubkeys = [v.pubkey for v in state.validator_registry] validator_pubkeys = [v.pubkey for v in state.validator_registry]
pubkey = deposit_input.pubkey pubkey = deposit_input.pubkey
amount = deposit.deposit_data.amount amount = deposit.deposit_data.amount