Heze -- Honest Validator¶
Note: This document is a work-in-progress for researchers and implementers.
- Introduction
- Configuration
- Helpers
- New
GetInclusionListResponse - Protocols
ExecutionEngine- Beacon chain responsibilities
- Validator assignments
- Block and sidecar proposal
- Inclusion list proposal
Introduction¶
This document represents the changes to be made in the code of an "honest validator" to implement Heze.
Configuration¶
Helpers¶
New GetInclusionListResponse¶
Protocols¶
ExecutionEngine¶
Note: get_inclusion_list function is added to the ExecutionEngine protocol
for use as an inclusion list committee member.
The body of this function is implementation dependent. The Engine API may be used to implement it with an external execution engine.
New get_inclusion_list¶
get_inclusion_list returns GetInclusionListResponse with the most recent
inclusion list transactions that has been built based on the latest view of the
public mempool.
Beacon chain responsibilities¶
All validator responsibilities remain unchanged other than those noted below.
Validator assignments¶
Inclusion list committee¶
A validator may be a member of the new inclusion list committee for a given
slot. To check for inclusion list committee assignments, use
get_inclusion_list_committee_assignment(state, epoch, validator_index) where
epoch <= next_epoch, as inclusion list committee selection is only stable
within the context of the current and next epoch.
Lookahead¶
get_inclusion_list_committee_assignment should be called at the start of each
epoch to get the assignment for the next epoch (current_epoch + 1). A
validator should plan for future assignments by noting their assigned inclusion
list committee slot.
Block and sidecar proposal¶
Constructing the BeaconBlockBody¶
Signed execution payload bid¶
Note: The only change made to signed_execution_payload_bid is to require
that bid.inclusion_list_bits must satisfy is_inclusion_list_bits_inclusive()
with respect to the proposer's inclusion list view, which comprises all valid
and non-equivocating inclusion lists they have observed.
- The
bid.inclusion_list_bitsmust satisfyis_inclusion_list_bits_inclusive(get_inclusion_list_store(), state, slot - 1, bid.inclusion_list_bits, only_timely=False).
ExecutionPayload¶
prepare_execution_payload is updated from the Gloas specification to provide
the inclusion list transactions.
Note: In this section, state is the state of the slot for the block proposal
without the block yet applied. That is, state is the previous_state
processed through any empty slots up to the assigned slot using
process_slots(previous_state, slot).
Note: A proposer should produce an execution payload that satisfies the inclusion list constraints with respect to their inclusion list view at the time of payload construction, which comprises all valid and non-equivocating inclusion lists they have observed.
Inclusion list proposal¶
A validator is expected to propose a
SignedInclusionList at the beginning
of any slot for which
get_inclusion_list_committee_assignment(state, epoch, validator_index)
returns.
If a validator is in the current inclusion list committee, the validator should
create and broadcast the signed_inclusion_list to the global inclusion_list
subnet by get_inclusion_list_due_ms() milliseconds into the slot, built
against the block for the current slot if it has been processed and confirmed as
head, or against the local head returned by get_head() otherwise.
Constructing the SignedInclusionList¶
The validator creates the signed_inclusion_list as follows:
- First, the validator creates the
inclusion_list. - Set
inclusion_list.slotto the assigned slot returned byget_inclusion_list_committee_assignment. - Set
inclusion_list.validator_indexto the validator's index. - Set
inclusion_list.inclusion_list_committee_rootto the hash tree root of the committee that the validator is a member of. - Set
inclusion_list.transactionsusing the response fromExecutionEngineviaget_inclusion_list.
After building the inclusion_list, the validator obtains a signature of the
inclusion list by using:
Then the validator assembles
signed_inclusion_list = SignedInclusionList(message=inclusion_list, signature=signature)
and broadcasts it on the inclusion_list global gossip topic.