-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement PeerDAS subnet decoupling (aka custody groups) #6736
Conversation
Squashed commit of the following: commit 898d05e Merge: ffbd25e 7e0cdde Author: Jimmy Chen <jchen.tc@gmail.com> Date: Tue Dec 24 14:41:19 2024 +1100 Merge branch 'unstable' into refactor-ef-tests-features commit ffbd25e Author: Jimmy Chen <jchen.tc@gmail.com> Date: Tue Dec 24 14:40:38 2024 +1100 Fix `SszStatic` tests for PeerDAS: exclude eip7594 test vectors when testing Electra types. commit aa593cf Author: Jimmy Chen <jchen.tc@gmail.com> Date: Fri Dec 20 12:08:54 2024 +1100 Refactor spec testing for features and simplify usage.
b449b85
to
d1233f8
Compare
d1233f8
to
de7293f
Compare
@dapplion @pawanjay176 I think this PR is ready for review now. The failing spec tests are new electra tests, which Pawan and Michael are currently working on, and the DAS spec tests are all passing. Please review and let me know what you think 🙏 |
beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs
Outdated
Show resolved
Hide resolved
A few comments, else looks solid and good to go |
# Conflicts: # beacon_node/beacon_chain/src/kzg_utils.rs # beacon_node/beacon_chain/src/observed_data_sidecars.rs # beacon_node/lighthouse_network/src/discovery/subnet_predicate.rs # common/eth2_network_config/built_in_network_configs/chiado/config.yaml # common/eth2_network_config/built_in_network_configs/gnosis/config.yaml # common/eth2_network_config/built_in_network_configs/holesky/config.yaml # common/eth2_network_config/built_in_network_configs/mainnet/config.yaml # common/eth2_network_config/built_in_network_configs/sepolia/config.yaml # consensus/types/src/chain_spec.rs
Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
6233f23
to
357e3e9
Compare
# Conflicts: # consensus/types/src/chain_spec.rs
@dapplion thanks for the thorough review! I've addressed all comments and resolved conflicts. |
"Custody group not found in subnet mapping"; | ||
"custody_index" => custody_index, | ||
"peer_id" => %peer_id | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should never happen as we compute subnets_by_custody_group
ourselves. Is it necessary to have a warn here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes agree that this should not happen - we also validate peer's custody_group_count
when computing custody groups.
What error handling are you suggesting? I don't think we should panic, or just swallow the error if it happens in case of a bug or invalid input that somehow slip through our validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! We can review the error conditions later
8e89570
to
283f940
Compare
# Conflicts: # beacon_node/lighthouse_network/src/peer_manager/mod.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at e98209d |
Issue Addressed
#6709
This spec change changes the custody unit from subnets to custody groups, in order to decouple networking and DAS core parameters - this allow us to tweak DAS core and network parameters in isolation, i.e. changing number of column subnets will not have a direct impact to sampling parameters & security.
Spec: ethereum/consensus-specs#3832
Proposed Changes:
On startup, we construct
NetworkGlobals
and compute sampling subnets and sampling columns fromNodeId
- this remains the same but the computation logic has been updated to compute these from custody groups. (node_id
=>custody_groups
=>subnets
andcolumns
)custody_subnet_count
(csc
) tocustody_group_count
(cgc
) inMetaData
andENR
. (spec)sampling_size
computation logic is has been updated to be base on custody groups instead of custody subnets. code (spec update)sampling_size
andcustody_group_count
logic intoChainSpec
to keep them in one place.