diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index c80716009a..401696b4e7 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -165,6 +165,8 @@ DATA_COLUMN_SIDECAR_SUBNET_COUNT: 128 MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384 SAMPLES_PER_SLOT: 8 CUSTODY_REQUIREMENT: 4 +VALIDATOR_CUSTODY_REQUIREMENT: 8 +BALANCE_PER_ADDITIONAL_CUSTODY_SUBNET: 32000000000 # 2**5 * 10**9 (= 32,000,000,000) MAX_BLOBS_PER_BLOCK_EIP7594: 8 # `MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_EIP7594` MAX_REQUEST_BLOB_SIDECARS_EIP7594: 1024 diff --git a/configs/minimal.yaml b/configs/minimal.yaml index 61f4afb0dc..a4f8a7a910 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -164,6 +164,8 @@ DATA_COLUMN_SIDECAR_SUBNET_COUNT: 128 MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384 SAMPLES_PER_SLOT: 8 CUSTODY_REQUIREMENT: 4 +VALIDATOR_CUSTODY_REQUIREMENT: 8 +BALANCE_PER_ADDITIONAL_CUSTODY_SUBNET: 32000000000 # 2**5 * 10**9 (= 32,000,000,000) MAX_BLOBS_PER_BLOCK_EIP7594: 8 # `MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_EIP7594` MAX_REQUEST_BLOB_SIDECARS_EIP7594: 1024 diff --git a/specs/_features/eip7594/das-core.md b/specs/_features/eip7594/das-core.md index 6a1d2758e0..5b7f2d21a8 100644 --- a/specs/_features/eip7594/das-core.md +++ b/specs/_features/eip7594/das-core.md @@ -25,6 +25,7 @@ - [`get_data_column_sidecars`](#get_data_column_sidecars) - [Custody](#custody) - [Custody requirement](#custody-requirement) + - [Validator custody](#validator-custody) - [Public, deterministic selection](#public-deterministic-selection) - [Subnet sampling](#subnet-sampling) - [Extended data](#extended-data) @@ -75,6 +76,8 @@ The following values are (non-configurable) constants used throughout the specif | - | - | - | | `SAMPLES_PER_SLOT` | `8` | Number of `DataColumnSidecar` random samples a node queries per slot | | `CUSTODY_REQUIREMENT` | `4` | Minimum number of subnets an honest node custodies and serves samples from | +| `VALIDATOR_CUSTODY_REQUIREMENT` | `8` | Minimum number of subnets an honest node with validators attached custodies and serves samples from | +| `BALANCE_PER_ADDITIONAL_CUSTODY_SUBNET` | `Gwei(32 * 10**9)` | Balance increment corresponding to one additional subnet to custody | ### Containers @@ -226,6 +229,19 @@ A node *may* choose to custody and serve more than the minimum honesty requireme A node stores the custodied columns for the duration of the pruning period and responds to peer requests for samples on those columns. +### Validator custody + +A node with validators attached downloads and custodies a higher minimum of subnets per slot, determined by `get_validators_custody_requirement(state, validator_indices)`. Here, `state` is the current `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 balances of all attached validators being `total_node_balance`, downloads and custodies `total_node_balance // BALANCE_PER_ADDITIONAL_CUSTODY_SUBNET` subnets per slot, with a minimum of `VALIDATOR_CUSTODY_REQUIREMENT` and of course a maximum of `DATA_COLUMN_SIDECAR_SUBNET_COUNT`. + +```python +def get_validators_custody_requirement(state: BeaconState, validator_indices: Sequence[ValidatorIndex]) -> uint64: + total_node_balance = sum(state.balances[index] for index in validator_indices) + count = total_node_balance // BALANCE_PER_ADDITIONAL_CUSTODY_SUBNET + return min(max(count, VALIDATOR_CUSTODY_REQUIREMENT), DATA_COLUMN_SIDECAR_SUBNET_COUNT) +``` + +This higher custody is advertised in the node's ENR by setting a higher `custody_subnet_count`. As with the regular custody requirement, a node with validators *may* still choose to custody, advertise and serve more than this minimum. + ### Public, deterministic selection The particular columns that a node custodies are selected pseudo-randomly as a function (`get_custody_columns`) of the node-id and custody size -- importantly this function can be run by any party as the inputs are all public.