Fulu -- Honest Validator¶
- Introduction
- Prerequisites
- Configuration
- Custody setting
- Helpers
BlobsBundle
- Modified
GetPayloadResponse
- Protocol
ExecutionEngine
- Beacon chain responsibilities
- Validator custody
- Block and sidecar proposal
Introduction¶
This document represents the changes to be made in the code of an "honest validator" to implement Fulu.
Prerequisites¶
This document is an extension of the Electra -- Honest Validator guide. All behaviors and definitions defined in this document, and documents it extends, carry over unless explicitly noted or overridden.
All terminology, constants, functions, and protocol mechanics defined in Fulu -- Beacon Chain and Fulu -- Data Availability Sampling Core are requisite for this document and used throughout.
Configuration¶
Custody setting¶
Name | Value | Description |
---|---|---|
VALIDATOR_CUSTODY_REQUIREMENT |
8 |
Minimum number of custody groups an honest node with validators attached custodies and serves samples from |
BALANCE_PER_ADDITIONAL_CUSTODY_GROUP |
Gwei(32 * 10**9) |
Effective balance increment corresponding to one additional group to custody |
Helpers¶
BlobsBundle
¶
[Modified in Fulu:EIP7594]
The BlobsBundle
object is modified to include cell KZG proofs instead of blob
KZG proofs.
Modified GetPayloadResponse
¶
[Modified in Fulu:EIP7594]
The GetPayloadResponse
object is modified to use the updated BlobsBundle
object.
Protocol¶
ExecutionEngine
¶
Modified get_payload
¶
The get_payload
method is modified to return the updated GetPayloadResponse
object.
Beacon chain responsibilities¶
Validator custody¶
[New in Fulu:EIP7594]
A node with validators attached downloads and custodies a higher minimum of
custody groups per slot, determined by
get_validators_custody_requirement(state, validator_indices)
. Here, state
is
the latest finalized BeaconState
and validator_indices
is the list of
indices corresponding to validators attached to the node. Any node with at least
one validator attached, and with the sum of the effective balances of all
attached validators being total_node_balance
, downloads and custodies
total_node_balance // BALANCE_PER_ADDITIONAL_CUSTODY_GROUP
custody groups per
slot, with a minimum of VALIDATOR_CUSTODY_REQUIREMENT
and of course a maximum
of NUMBER_OF_CUSTODY_GROUPS
.
This higher custody is advertised in the node's Metadata by setting a higher
custody_group_count
and in the node's ENR by setting a higher
custody_group_count
. As with the regular custody requirement, a node with
validators MAY still choose to custody, advertise and serve more than this
minimum. As with the regular custody requirement, a node MUST backfill columns
when syncing.
A node SHOULD dynamically adjust its custody groups (without any input from the
user) following any changes to the total effective balances of attached
validators. If the node's custody requirements are increased, it SHOULD only
advertise the updated custody_group_count
after
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
epochs. The node SHOULD NOT backfill
custody groups as a result of this change. After
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
epochs, the node will be able to respond
to any DataColumnSidecar
request within the retention period. If the node's
custody requirements are decreased, the node MAY update its
custody_group_count
to reflect this. However, it SHOULD NOT prune existing
custody columns until after the usual period of
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
epochs. Nodes SHOULD be able to
appropriately handle multiple changes to custody requirements within the same
retention period (e.g., an increase in one epoch and a decrease in the next
epoch).
Block and sidecar proposal¶
Constructing the sidecars¶
[New in Fulu:EIP7594]
For a block proposal, blobs associated with a block are packaged into many
DataColumnSidecar
objects for distribution to the associated sidecar topic,
the data_column_sidecar_{subnet_id}
pubsub topic. A DataColumnSidecar
can be
viewed as vertical slice of all blobs stacked on top of each other, with extra
fields for the necessary context.
get_data_column_sidecars
¶
The sequence of sidecars associated with a block and can be obtained by first
computing
cells_and_kzg_proofs = [compute_cells_and_kzg_proofs(blob) for blob in blobs]
and then calling
get_data_column_sidecars_from_block(signed_block, cells_and_kzg_proofs)
.
Moreover, the full sequence of sidecars can also be computed from
cells_and_kzg_proofs
and any single sidecar
, by calling
get_data_column_sidecars_from_column_sidecar(sidecar, cells_and_kzg_proofs)
.
This can be used in distributed blob publishing, to reconstruct all sidecars
from any sidecar received on the wire, assuming all cells and kzg proofs could
be retrieved from the local execution layer client.
get_data_column_sidecars_from_block
¶
get_data_column_sidecars_from_column_sidecar
¶
Sidecar publishing¶
The subnet_id
for the data_column_sidecar
is calculated with:
- Let
column_index = data_column_sidecar.index
. - Let
subnet_id = compute_subnet_for_data_column_sidecar(column_index)
.
After publishing all columns to their respective subnets, peers on the network may request the sidecar through sync-requests, or a local user may be interested.
Sidecar retention¶
The validator MUST hold on to sidecars for
MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS
epochs and serve when capable, to
ensure the data-availability of these blobs throughout the network.
After MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS
nodes MAY prune the
sidecars and/or stop serving them.