# Functions
ActivateValidatorWithEffectiveBalance updates validator's effective balance, and if it's above MaxEffectiveBalance, validator becomes active in genesis.
AreEth1DataEqual checks equality between two eth1 data objects.
AttestationSignatureBatch retrieves all the related attestation signature data such as the relevant public keys, signatures and attestation signing data and collate it into a signature batch object.
BatchVerifyDepositsSignatures batch verifies deposit signatures.
BatchVerifyPendingDepositsSignatures batch verifies pending deposit signatures.
BlockSignatureBatch retrieves the block signature batch from the provided block and its corresponding state.
BLSChangesSignatureBatch extracts the relevant signatures from the provided execution change messages and transforms them into a signature batch object.
Eth1DataHasEnoughSupport returns true when the given eth1data has more than 50% votes in the eth1 voting period.
GetBlockPayloadHash returns the hash of the execution payload of the block.
IsExecutionBlock returns whether the block has a non-empty ExecutionPayload.
IsExecutionEnabled returns true if the beacon chain can begin executing.
IsExecutionEnabledUsingHeader returns true if the execution is enabled using post processed payload header and block body.
IsMergeTransitionComplete returns true if the transition to Bellatrix has completed.
IsPreBellatrixVersion returns true if input version is before bellatrix fork.
IsSlashableAttestationData verifies a slashing against the Casper Proof of Stake FFG rules.
IsValidDepositSignature returns whether deposit_data is valid def is_valid_deposit_signature(pubkey: BLSPubkey, withdrawal_credentials: Bytes32, amount: uint64, signature: BLSSignature) -> bool:
deposit_message = DepositMessage( pubkey=pubkey, withdrawal_credentials=withdrawal_credentials, amount=amount, ) domain = compute_domain(DOMAIN_DEPOSIT) # Fork-agnostic domain since deposits are valid across forks signing_root = compute_signing_root(deposit_message, domain) return bls.Verify(pubkey, signing_root, signature).
NewGenesisBlock returns the canonical, genesis block for the beacon chain protocol.
ProcessAttestationNoVerifySignature processes the attestation without verifying the attestation signature.
ProcessAttestationsNoVerifySignature applies processing operations to a block's inner attestation records.
ProcessAttesterSlashing processes individual attester slashing.
ProcessAttesterSlashings is one of the operations performed on each processed beacon block to slash attesters based on Casper FFG slashing conditions if any slashable events occurred.
ProcessBlockHeader validates a block by its header.
ProcessBlockHeaderNoVerify validates a block by its header but skips proposer signature verification.
ProcessBLSToExecutionChanges processes a list of BLS Changes and validates them.
ProcessEth1DataInBlock is an operation performed on each beacon block to ensure the ETH1 data votes are processed into the beacon state.
ProcessPayload processes input execution payload using beacon state.
ProcessProposerSlashing processes individual proposer slashing.
ProcessProposerSlashings is one of the operations performed on each processed beacon block to slash proposers based on slashing conditions if any slashable events occurred.
ProcessRandao checks the block proposer's randao commitment and generates a new randao mix to update in the beacon state's latest randao mixes slice.
ProcessRandaoNoVerify generates a new randao mix to update in the beacon state's latest randao mixes slice.
ProcessVoluntaryExits is one of the operations performed on each processed beacon block to determine which validators should exit the state's validator registry.
ProcessWithdrawals processes the validator withdrawals from the provided execution payload into the beacon state.
RandaoSignatureBatch retrieves the relevant randao specific signature batch object from a block and its corresponding state.
SlashableAttesterIndices returns the intersection of attester indices from both attestations in this slashing.
ValidateBLSToExecutionChange validates the execution change message against the state and returns the validator referenced by the message.
ValidatePayload validates if payload is valid versus input beacon state.
ValidatePayloadWhenMergeCompletes validates if payload is valid versus input beacon state.
VerifyAttestationNoVerifySignature verifies the attestation without verifying the attestation signature.
VerifyAttesterSlashing validates the attestation data in both attestations in the slashing object.
VerifyBlockHeaderSignature verifies the proposer signature of a beacon block header.
VerifyBlockSignature verifies the proposer signature of a beacon block.
VerifyBlockSignatureUsingCurrentFork verifies the proposer signature of a beacon block.
VerifyBLSChangeSignature checks the signature in the SignedBLSToExecutionChange message.
VerifyDeposit verifies the deposit data and signature given the beacon state and deposit information.
VerifyExitAndSignature implements the spec defined validation for voluntary exits.
VerifyIndexedAttestation determines the validity of an indexed attestation.
VerifyProposerSlashing verifies that the data provided from slashing is valid.
# Variables
ValidatorAlreadyExitedMsg defines a message saying that a validator has already exited.
ValidatorCannotExitYetMsg defines a message saying that a validator cannot exit because it has not been active long enough.