@@ -50,7 +50,7 @@ document and used throughout.
5050| Name | Value | Description |
5151| - | - | - |
5252| ` VALIDATOR_CUSTODY_REQUIREMENT ` | ` 8 ` | Minimum number of custody groups an honest node with validators attached custodies and serves samples from |
53- | ` BALANCE_PER_ADDITIONAL_CUSTODY_GROUP ` | ` Gwei(32 * 10**9) ` | Balance increment corresponding to one additional group to custody |
53+ | ` BALANCE_PER_ADDITIONAL_CUSTODY_GROUP ` | ` Gwei(32 * 10**9) ` | Effective balance increment corresponding to one additional group to custody |
5454
5555## Helpers
5656
@@ -110,15 +110,15 @@ A node with validators attached downloads and custodies a higher minimum of cust
110110determined by ` get_validators_custody_requirement(state, validator_indices) ` . Here, ` state ` is the
111111latest finalized ` BeaconState ` and ` validator_indices ` is the list of indices corresponding to validators
112112attached to the node. Any node with at least one validator attached, and with the sum of the
113- balances of all attached validators being ` total_node_balance ` , downloads and custodies
113+ effective balances of all attached validators being ` total_node_balance ` , downloads and custodies
114114` total_node_balance // BALANCE_PER_ADDITIONAL_CUSTODY_GROUP ` custody groups per slot, with a minimum
115115of ` VALIDATOR_CUSTODY_REQUIREMENT ` and of course a maximum of ` NUMBER_OF_CUSTODY_GROUPS ` . The node
116- SHOULD dynamically adjust its custody groups following any changes to the balances of attached
117- validators.
116+ SHOULD dynamically adjust its custody groups following any changes to the effective balances of
117+ attached validators.
118118
119119``` python
120120def get_validators_custody_requirement (state : BeaconState, validator_indices : Sequence[ValidatorIndex]) -> uint64:
121- total_node_balance = sum (state.balances [index] for index in validator_indices)
121+ total_node_balance = sum (state.validators [index].effective_balance for index in validator_indices)
122122 count = total_node_balance // BALANCE_PER_ADDITIONAL_CUSTODY_GROUP
123123 return min (max (count, VALIDATOR_CUSTODY_REQUIREMENT ), NUMBER_OF_CUSTODY_GROUPS )
124124```
@@ -127,9 +127,10 @@ This higher custody is advertised in the node's Metadata by setting a higher `cu
127127and in the node's ENR by setting a higher ` custody_group_count ` . As with the regular custody
128128requirement, a node with validators MAY still choose to custody, advertise and serve more than
129129this minimum. As with the regular custody requirement, a node MUST backfill columns when syncing. In
130- addition, when the validator custody requirement increases, due to an increase in the total balance
131- of the attached validators, a node MUST backfill columns from the new custody groups. However, a
132- node MAY wait to advertise a higher custody in its Metadata and ENR until backfilling is complete.
130+ addition, when the validator custody requirement increases, due to an increase in the total
131+ effective balance of the attached validators, a node MUST backfill columns from the new custody
132+ groups. However, a node MAY wait to advertise a higher custody in its Metadata and ENR until
133+ backfilling is complete.
133134
134135* Note* : The node SHOULD manage validator custody (and any changes during its lifetime) without any
135136input from the user, for example by using existing signals about validator metadata to compute the
0 commit comments