Example #1
0
def get_sample_genesis_validator(index):
    return Validator(
        pubkey=int_to_bytes48(index),
        withdrawal_credentials=ZERO_HASH,
        activation_epoch=GENESIS_EPOCH,
        exit_epoch=FAR_FUTURE_EPOCH,
        withdrawable_epoch=FAR_FUTURE_EPOCH,
        initiated_exit=False,
        slashed=False,
    )
Example #2
0
    cache_state,
    verify_merkle_branch,
)
from utils.merkle_minimal import (
    calc_merkle_tree_from_leaves,
    get_merkle_proof,
    get_merkle_root,
)

from hashlib import sha256


def hash(x): return sha256(x).digest()


pubkeys = [int_to_bytes48(i) for i in range(10000)]
all_deposit_data_leaves = list()


def get_sample_genesis_validator(index):
    return Validator(
        pubkey=int_to_bytes48(index),
        withdrawal_credentials=ZERO_HASH,
        activation_epoch=GENESIS_EPOCH,
        exit_epoch=FAR_FUTURE_EPOCH,
        withdrawable_epoch=FAR_FUTURE_EPOCH,
        initiated_exit=False,
        slashed=False,
    )