-
Notifications
You must be signed in to change notification settings - Fork 997
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
Simplified attestation subnet mapping #3735
base: dev
Are you sure you want to change the base?
Conversation
fea5847
to
6194a23
Compare
@@ -116,8 +116,6 @@ DEPOSIT_CONTRACT_ADDRESS: 0x00000000219ab540356cBB839Cbe05303d7705Fa | |||
GOSSIP_MAX_SIZE: 10485760 | |||
# `2**10` (= 1024) | |||
MAX_REQUEST_BLOCKS: 1024 | |||
# `2**8` (= 256) | |||
EPOCHS_PER_SUBNET_SUBSCRIPTION: 256 |
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 vague recall there was a discussion on this somewhere but I couldn't find it - does the rotation not provide any benefit?
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.
It's buried here #3623
@@ -135,9 +133,6 @@ MESSAGE_DOMAIN_VALID_SNAPPY: 0x01000000 | |||
SUBNETS_PER_NODE: 2 | |||
# 2**8 (= 64) | |||
ATTESTATION_SUBNET_COUNT: 64 | |||
ATTESTATION_SUBNET_EXTRA_BITS: 0 | |||
# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS | |||
ATTESTATION_SUBNET_PREFIX_BITS: 6 |
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.
Do we want to keep this as config, and update the comment to ceillog2(ATTESTATION_SUBNET_COUNT)
, so it doesn't need to be computed in compute_subscribed_subnet
?
Anyway, I have, thank you very much. |
Overview
This is a continuation of #3623 and linked PR's and issues.
There is quite a bit of complexity in how we should map a node-id to a backbone gossipsub topic. I think a number of future PRs are required in to address each complexity in turn.
In Lighthouse, we plan to adopt this simple approach, whilst discussion can continue on potentially more complex forms of this mapping. This approach simplifies the current state of the mapping and allows us to take advantage of improved discovery searches, which is the primary motivation behind this.