From b2a3ee4bbc030266fee15bae1299319fc122bac6 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Mon, 25 Feb 2019 09:36:52 -0700 Subject: [PATCH] skip bad proof of possession deposits --- specs/core/0_beacon-chain.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 06b4cfb4f..6bff0f705 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1235,7 +1235,7 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None: """ deposit_input = deposit.deposit_data.deposit_input - assert bls_verify( + proof_is_valid = bls_verify( pubkey=deposit_input.pubkey, message_hash=signed_root(deposit_input, "proof_of_possession"), signature=deposit_input.proof_of_possession, @@ -1245,6 +1245,9 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None: DOMAIN_DEPOSIT, ) ) + + if not proof_is_valid: + return validator_pubkeys = [v.pubkey for v in state.validator_registry] pubkey = deposit_input.pubkey