[][src]Module state_processing::per_block_processing

Modules

block_processing_builder
errors

Structs

BlockSignatureVerifier

Reads the BLS signatures and keys from a BeaconBlock, storing them as a Vec<SignatureSet>.

Enums

BlockSignatureStrategy

The strategy to be used when validating the block's signatures.

VerifySignatures

The strategy to be used when validating the block's signatures.

Functions

execute_transfer

Executes a transfer on the state.

get_existing_validator_index

Returns a Some(validator index) if a pubkey already exists in the validators, otherwise returns None.

get_slashable_indices

For a given attester slashing, return the indices able to be slashed in ascending order.

get_slashable_indices_modular

Same as gather_attester_slashing_indices but allows the caller to specify the criteria for determining whether a given validator should be considered slashable.

is_valid_indexed_attestation

Verify an IndexedAttestation.

per_block_processing

Updates the state for a new block, whilst validating that the block is valid, optionally checking the block proposer signature.

process_attestations

Validates each Attestation and updates the state, short-circuiting on an invalid object.

process_attester_slashings

Validates each AttesterSlashing and updates the state, short-circuiting on an invalid object.

process_block_header

Processes the block header.

process_deposit

Process a single deposit, optionally verifying its merkle proof.

process_deposits

Validates each Deposit and updates the state, short-circuiting on an invalid object.

process_eth1_data

Update the state.eth1_data_votes based upon the eth1_data provided.

process_exits

Validates each Exit and updates the state, short-circuiting on an invalid object.

process_proposer_slashings

Validates each ProposerSlashing and updates the state, short-circuiting on an invalid object.

process_randao

Verifies the randao_reveal against the block's proposer pubkey and updates state.latest_randao_mixes.

process_transfers

Validates each Transfer and updates the state, short-circuiting on an invalid object.

verify_attestation_for_block_inclusion

Returns Ok(()) if the given attestation is valid to be included in a block that is applied to state. Otherwise, returns a descriptive Err.

verify_attestation_for_state

Returns Ok(()) if attestation is a valid attestation to the chain that precedes the given state.

verify_attester_slashing

Indicates if an AttesterSlashing is valid to be included in a block in the current epoch of the given state.

verify_block_signature

Verifies the signature of a block.

verify_deposit_merkle_proof

Verify that a deposit is included in the state's eth1 deposit root.

verify_deposit_signature

Verify Deposit.pubkey signed Deposit.signature.

verify_exit

Indicates if an Exit is valid to be included in a block in the current epoch of the given state.

verify_exit_time_independent_only

Like verify_exit but doesn't run checks which may become true in future states.

verify_proposer_slashing

Indicates if a ProposerSlashing is valid to be included in a block in the current epoch of the given state.

verify_transfer

Indicates if a Transfer is valid to be included in a block in the current epoch of the given state.

verify_transfer_time_independent_only

Like verify_transfer but doesn't run checks which may become true in future states.