-
Notifications
You must be signed in to change notification settings - Fork 835
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
Feat: add new --advertise-false-custody-group-count
cli flag for PeerDAS testing
#7120
base: unstable
Are you sure you want to change the base?
Conversation
This pull request has merge conflicts. Could you please resolve them @startup-dreamer? 🙏 |
f49f770
to
83a73f5
Compare
@@ -199,8 +199,23 @@ impl<E: EthSpec> Network<E> { | |||
|
|||
// Construct the metadata | |||
let custody_group_count = ctx.chain_spec.is_peer_das_scheduled().then(|| { |
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.
Does this affect both the ENR value and the value returned in the Status ReqResp message?
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.
ENR is built with the metadata (false custody_group_count
if provided) and The metadata returned in response to METADATA requests (which is part of the ReqResp protocol) so I'd say yes it affects both.
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.
If the user restarts the node with a different value of the false_count flag, will we bump the seq_number
of the ENR?
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.
I rechecked I don't think it bumps the seq_number
of ENR, Since the ENR is built from the chain spec and the
subscribe_all_data_column_subnets
, not from the false count flag (sorry for prev comment I am still getting familiar with the codebase). Does this make sense @dapplion
lighthouse/beacon_node/lighthouse_network/src/discovery/enr.rs
Lines 256 to 264 in bf955c7
// only set `csc` if PeerDAS fork epoch has been scheduled | |
if spec.is_peer_das_scheduled() { | |
let custody_subnet_count = if config.subscribe_all_data_column_subnets { | |
spec.data_column_sidecar_subnet_count | |
} else { | |
spec.custody_requirement | |
}; | |
builder.add_value(PEERDAS_CUSTODY_SUBNET_COUNT_ENR_KEY, &custody_subnet_count); | |
} |
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.
But I think I have to give more time to understand this properly.
…emoved warning logs
7e76079
to
a111b56
Compare
@@ -199,8 +199,23 @@ impl<E: EthSpec> Network<E> { | |||
|
|||
// Construct the metadata | |||
let custody_group_count = ctx.chain_spec.is_peer_das_scheduled().then(|| { |
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.
If the user restarts the node with a different value of the false_count flag, will we bump the seq_number
of the ENR?
Co-authored-by: Lion - dapplion <[email protected]>
Issue Addressed
Closes: #6973
Proposed Changes
This PR adds a new CLI flag
--advertise-false-custody-group-count
that allows nodes to advertise a false custody group count in their metadata for PeerDAS testing purposes. This enables testing scenarios where nodes need to mislead peers about their custody group count without altering the actual RPC logic.Additional Info
When this flag is set:
<= number_of_custody_groups
), the node will log a warning and use the normal count.Future Work
This flag is intended to be temporary and will be removed before the PeerDAS release, as indicated by the TODO comment.