Skip to content

Heze -- The Beacon Chain

Note: This document is a work-in-progress for researchers and implementers.

Introduction

Heze is a consensus-layer upgrade containing a number of features. Including:

  • EIP-7805: Fork-choice enforced Inclusion Lists (FOCIL)

Note: These EIPs are in draft and may change or be removed. Each link above points to the specific version targeted by this specification, which may differ from the latest published version of the EIPs.

Constants

Domains

Name Value
DOMAIN_INCLUSION_LIST_COMMITTEE DomainType('0x10000000')

Preset

Inclusion list committee

Name Value
INCLUSION_LIST_COMMITTEE_SIZE uint64(2**4) (=16)

Containers

New containers

InclusionList

1
2
3
4
5
class InclusionList(Container):
    slot: Slot
    validator_index: ValidatorIndex
    inclusion_list_committee_root: Root
    transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]

SignedInclusionList

1
2
3
class SignedInclusionList(Container):
    message: InclusionList
    signature: BLSSignature

Helpers

Predicates

New is_valid_inclusion_list_signature

def is_valid_inclusion_list_signature(
    state: BeaconState, signed_inclusion_list: SignedInclusionList
) -> bool:
    """
    Check if ``signed_inclusion_list`` has a valid signature.
    """
    message = signed_inclusion_list.message
    index = message.validator_index
    pubkey = state.validators[index].pubkey
    domain = get_domain(state, DOMAIN_INCLUSION_LIST_COMMITTEE, compute_epoch_at_slot(message.slot))
    signing_root = compute_signing_root(message, domain)
    return bls.Verify(pubkey, signing_root, signed_inclusion_list.signature)

Beacon state accessors

New get_inclusion_list_committee

def get_inclusion_list_committee(
    state: BeaconState, slot: Slot
) -> Vector[ValidatorIndex, INCLUSION_LIST_COMMITTEE_SIZE]:
    """
    Get the inclusion list committee for the given ``slot``.
    """
    epoch = compute_epoch_at_slot(slot)
    indices: List[ValidatorIndex] = []
    # Concatenate all committees for this slot in order
    committees_per_slot = get_committee_count_per_slot(state, epoch)
    for i in range(committees_per_slot):
        committee = get_beacon_committee(state, slot, CommitteeIndex(i))
        indices.extend(committee)
    return Vector[ValidatorIndex, INCLUSION_LIST_COMMITTEE_SIZE]([
        indices[i % len(indices)] for i in range(INCLUSION_LIST_COMMITTEE_SIZE)
    ])