Move BLS verification to later step
This commit is contained in:
parent
ac3ffb3df6
commit
ae5221c4f8
|
@ -1317,12 +1317,12 @@ Verify that `len(block.body.proposer_slashings) <= MAX_PROPOSER_SLASHINGS`.
|
||||||
For each `proposer_slashing` in `block.body.proposer_slashings`:
|
For each `proposer_slashing` in `block.body.proposer_slashings`:
|
||||||
|
|
||||||
* Let `proposer = state.validator_registry[proposer_slashing.proposer_index]`.
|
* Let `proposer = state.validator_registry[proposer_slashing.proposer_index]`.
|
||||||
* Verify that `bls_verify(pubkey=proposer.pubkey, message=hash_tree_root(proposer_slashing.proposal_data_1), signature=proposer_slashing.proposal_signature_1, domain=get_domain(state.fork_data, proposer_slashing.proposal_data_1.slot, DOMAIN_PROPOSAL))`.
|
|
||||||
* Verify that `bls_verify(pubkey=proposer.pubkey, message=hash_tree_root(proposer_slashing.proposal_data_2), signature=proposer_slashing.proposal_signature_2, domain=get_domain(state.fork_data, proposer_slashing.proposal_data_2.slot, DOMAIN_PROPOSAL))`.
|
|
||||||
* Verify that `proposer_slashing.proposal_data_1.slot == proposer_slashing.proposal_data_2.slot`.
|
* Verify that `proposer_slashing.proposal_data_1.slot == proposer_slashing.proposal_data_2.slot`.
|
||||||
* Verify that `proposer_slashing.proposal_data_1.shard == proposer_slashing.proposal_data_2.shard`.
|
* Verify that `proposer_slashing.proposal_data_1.shard == proposer_slashing.proposal_data_2.shard`.
|
||||||
* Verify that `proposer_slashing.proposal_data_1.block_root != proposer_slashing.proposal_data_2.block_root`.
|
* Verify that `proposer_slashing.proposal_data_1.block_root != proposer_slashing.proposal_data_2.block_root`.
|
||||||
* Verify that `proposer.status != EXITED_WITH_PENALTY`.
|
* Verify that `proposer.status != EXITED_WITH_PENALTY`.
|
||||||
|
* Verify that `bls_verify(pubkey=proposer.pubkey, message=hash_tree_root(proposer_slashing.proposal_data_1), signature=proposer_slashing.proposal_signature_1, domain=get_domain(state.fork_data, proposer_slashing.proposal_data_1.slot, DOMAIN_PROPOSAL))`.
|
||||||
|
* Verify that `bls_verify(pubkey=proposer.pubkey, message=hash_tree_root(proposer_slashing.proposal_data_2), signature=proposer_slashing.proposal_signature_2, domain=get_domain(state.fork_data, proposer_slashing.proposal_data_2.slot, DOMAIN_PROPOSAL))`.
|
||||||
* Run `update_validator_status(state, proposer_slashing.proposer_index, new_status=EXITED_WITH_PENALTY)`.
|
* Run `update_validator_status(state, proposer_slashing.proposer_index, new_status=EXITED_WITH_PENALTY)`.
|
||||||
|
|
||||||
#### Casper slashings
|
#### Casper slashings
|
||||||
|
@ -1401,10 +1401,10 @@ Verify that `len(block.body.exits) <= MAX_EXITS`.
|
||||||
For each `exit` in `block.body.exits`:
|
For each `exit` in `block.body.exits`:
|
||||||
|
|
||||||
* Let `validator = state.validator_registry[exit.validator_index]`.
|
* Let `validator = state.validator_registry[exit.validator_index]`.
|
||||||
* Verify that `bls_verify(pubkey=validator.pubkey, message=ZERO_HASH, signature=exit.signature, domain=get_domain(state.fork_data, exit.slot, DOMAIN_EXIT))`.
|
|
||||||
* Verify that `validator.status == ACTIVE`.
|
* Verify that `validator.status == ACTIVE`.
|
||||||
* Verify that `state.slot >= exit.slot`.
|
* Verify that `state.slot >= exit.slot`.
|
||||||
* Verify that `state.slot >= validator.latest_status_change_slot + SHARD_PERSISTENT_COMMITTEE_CHANGE_PERIOD`.
|
* Verify that `state.slot >= validator.latest_status_change_slot + SHARD_PERSISTENT_COMMITTEE_CHANGE_PERIOD`.
|
||||||
|
* Verify that `bls_verify(pubkey=validator.pubkey, message=ZERO_HASH, signature=exit.signature, domain=get_domain(state.fork_data, exit.slot, DOMAIN_EXIT))`.
|
||||||
* Run `update_validator_status(state, validator_index, new_status=ACTIVE_PENDING_EXIT)`.
|
* Run `update_validator_status(state, validator_index, new_status=ACTIVE_PENDING_EXIT)`.
|
||||||
|
|
||||||
### Ejections
|
### Ejections
|
||||||
|
|
Loading…
Reference in New Issue