Heze -- Networking¶
Note: This document is a work-in-progress for researchers and implementers.
- Introduction
- Modifications in Heze
- Preset
- Configuration
- Helpers
- The gossip domain: gossipsub
- The Req/Resp domain
Introduction¶
This document contains the consensus-layer networking specifications for Heze.
The specification of these changes continues in the same format as the network specifications of previous upgrades, and assumes them as pre-requisite.
Modifications in Heze¶
Preset¶
Type-specific SSZ bounds¶
| Name | Value |
|---|---|
MAX_SIGNED_EXECUTION_PAYLOAD_BID_SIZE_HEZE |
Uint64(196934) (= ~192 KiB) |
MAX_SIGNED_INCLUSION_LIST_SIZE |
Uint64(8348) (= ~8 KiB) |
Configuration¶
| Name | Value | Description |
|---|---|---|
MAX_REQUEST_INCLUSION_LIST |
2**4 (= 16) |
Maximum number of inclusion lists in a single request |
MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS |
1 |
Minimum slot range over which a node must serve inclusion lists |
MAX_BYTES_PER_INCLUSION_LIST |
2**13 (= 8,192) |
Maximum size of the inclusion list's transactions in bytes |
Helpers¶
Modified compute_fork_version¶
The gossip domain: gossipsub¶
Topics and messages¶
The execution_payload_bid topic is modified to support Heze bids.
The new topics along with the type of the data field of a gossipsub message
are given in this table:
| Name | Message Type |
|---|---|
inclusion_list |
SignedInclusionList |
Global topics¶
Modified execution_payload_bid¶
The following validations are added, assuming the alias
bid = signed_execution_payload_bid.message:
- [IGNORE]
bid.inclusion_list_bitsis inclusive of the node's view of inclusion lists for the slot preceding the bid's slot -- i.e.is_inclusion_list_bits_inclusive(get_inclusion_list_store(), state, Slot(bid.slot - 1), bid.inclusion_list_bits, only_timely=False)returnsTrue, wherestateis the head state corresponding to processing the block up to the current slot as determined by the fork choice.
New inclusion_list¶
This topic is used to propagate signed inclusion list as SignedInclusionList.
The following validations MUST pass before forwarding the inclusion_list on
the network, assuming the alias message = signed_inclusion_list.message:
- [REJECT] The size of
message.transactionsis within upperboundMAX_BYTES_PER_INCLUSION_LIST. - [IGNORE] The slot
message.slotis equal to the current slot (with aMAXIMUM_GOSSIP_CLOCK_DISPARITYallowance), i.e.message.slot == current_slot. - [IGNORE] The
messageis either the first or second valid message received from the validator with indexmessage.validator_index. - [REJECT] The message's validator index is in
get_inclusion_list_committee(state, message.slot), wherestateis the head state corresponding to processing the block up to the current slot as determined by the fork choice. - [REJECT] The
message.inclusion_list_committee_rootis equal tohash_tree_root(get_inclusion_list_committee(state, message.slot)). - [REJECT] The signature of
signed_inclusion_list.signatureis valid with respect to the validator's public key.
The Req/Resp domain¶
Messages¶
BeaconBlocksByRange v2¶
Protocol ID: /eth2/beacon_chain/req/beacon_blocks_by_range/2/
The Heze fork-digest is introduced to the context enum to specify Heze beacon
block type.
fork_version |
Chunk SSZ type |
|---|---|
GENESIS_FORK_VERSION |
phase0.SignedBeaconBlock |
ALTAIR_FORK_VERSION |
altair.SignedBeaconBlock |
BELLATRIX_FORK_VERSION |
bellatrix.SignedBeaconBlock |
CAPELLA_FORK_VERSION |
capella.SignedBeaconBlock |
DENEB_FORK_VERSION |
deneb.SignedBeaconBlock |
ELECTRA_FORK_VERSION |
electra.SignedBeaconBlock |
FULU_FORK_VERSION |
fulu.SignedBeaconBlock |
GLOAS_FORK_VERSION |
gloas.SignedBeaconBlock |
HEZE_FORK_VERSION |
heze.SignedBeaconBlock |
BeaconBlocksByRoot v2¶
Protocol ID: /eth2/beacon_chain/req/beacon_blocks_by_root/2/
The Heze fork-digest is introduced to the context enum to specify Heze beacon
block type.
fork_version |
Chunk SSZ type |
|---|---|
GENESIS_FORK_VERSION |
phase0.SignedBeaconBlock |
ALTAIR_FORK_VERSION |
altair.SignedBeaconBlock |
BELLATRIX_FORK_VERSION |
bellatrix.SignedBeaconBlock |
CAPELLA_FORK_VERSION |
capella.SignedBeaconBlock |
DENEB_FORK_VERSION |
deneb.SignedBeaconBlock |
ELECTRA_FORK_VERSION |
electra.SignedBeaconBlock |
FULU_FORK_VERSION |
fulu.SignedBeaconBlock |
GLOAS_FORK_VERSION |
gloas.SignedBeaconBlock |
HEZE_FORK_VERSION |
heze.SignedBeaconBlock |
InclusionListsByIndices v1¶
Protocol ID: /eth2/beacon_chain/req/inclusion_lists_by_indices/1/
[New in Heze:EIP7805]
Request Content:
Response Content:
Requests inclusion lists by slot, inclusion_list_committee_root and
inclusion list committee indices. The response is a list of
SignedInclusionList whose length is less than or equal to the number of
requested inclusion lists. It may be less in the case that the responding peer
is missing inclusion lists.
No more than MAX_REQUEST_INCLUSION_LIST may be requested at a time.
InclusionListsByIndices is primarily used to fetch inclusion lists that may
have been missed on gossip (e.g. when producing an execution payload for a slot
for which some inclusion lists are missing).
The request MUST be encoded as an SSZ-container.
The response MUST consist of zero or more response_chunk. Each successful
response_chunk MUST contain a single SignedInclusionList payload.
Clients MUST support requesting inclusion lists since minimum_request_slot,
where
minimum_request_slot = max(current_slot - MIN_SLOTS_FOR_INCLUSION_LISTS_REQUESTS, compute_start_slot_at_epoch(HEZE_FORK_EPOCH)).
If slot in the request content references a slot earlier than
minimum_request_slot, peers MAY respond with error code
3: ResourceUnavailable or not include the inclusion lists in the response.
Clients MUST respond with at least one inclusion list, if they have it. Clients MAY limit the number of inclusion lists in the response.
Clients SHOULD include an inclusion list in the response as soon as it passes
the gossip validation rules. Clients SHOULD NOT respond with inclusion lists
that fail the gossip validation rules. Clients SHOULD NOT respond with inclusion
lists from equivocators for the requested slot and
inclusion_list_committee_root.
For each successful response_chunk, the ForkDigest context epoch is
determined by compute_epoch_at_slot(signed_inclusion_list.message.slot).
Per fork_version = compute_fork_version(epoch):
fork_version |
Chunk SSZ type |
|---|---|
HEZE_FORK_VERSION |
heze.SignedInclusionList |