Skip to content
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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

AgeManning
Copy link
Contributor

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.

@@ -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
Copy link
Contributor

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?

Copy link
Member

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
Copy link
Contributor

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?

@Scutua
Copy link

Scutua commented Oct 8, 2024

Anyway, I have, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants