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

Subscribe to PeerDAS topics on Fulu fork #6849

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Jan 23, 2025

Issue Addressed

TODO(das) now that PeerDAS is scheduled in a hard fork we can subscribe to its topics on the fork activation. In current stable we subscribe to PeerDAS topics as soon as the node starts if PeerDAS is scheduled.

This PR adds another todo to unsubscribe to blob topics at the fork. This other PR included solution for that, but I can include it in a separate PR

Proposed Changes

Include PeerDAS topics as part of Fulu fork in fork_core_topics.

@dapplion dapplion added ready-for-review The code is ready for review das Data Availability Sampling labels Jan 23, 2025
@dapplion dapplion requested a review from jxs as a code owner January 23, 2025 14:24
@dapplion dapplion requested a review from jimmygchen January 25, 2025 10:28
@dapplion dapplion force-pushed the peerdas-topics-fulu branch from 2150988 to 385b061 Compare January 25, 2025 10:29
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good to me Lion! Left a suggesttion

@@ -183,6 +184,14 @@ impl<E: EthSpec> NetworkGlobals<E> {
.collect::<Vec<_>>()
}

/// Returns the TopicConfig to compute the set of Gossip topics for a given fork
pub fn topic_config(&self) -> TopicConfig {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can avoid double iteration by not collection bellow into a Vec and just using a reference to Hashset.
fork_core_topics can still iterate the sampling_subnets normally, see jxs@09c5f6f if you want to cherry pick the commit.
notice the as_topic_config as code convention

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! cherry-picked

};
let mut electra_core_topics =
fork_core_topics::<E>(&ForkName::Electra, &spec, &topic_config);
let mut deneb_core_topics = fork_core_topics::<E>(&ForkName::Deneb, &spec, &topic_config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add fulu_core_topics too to cover the new changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added fulu_core_topics

Copy link

mergify bot commented Jan 31, 2025

This pull request has merge conflicts. Could you please resolve them @dapplion? 🙏

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Would be good to add a small test covering the changes.

@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jan 31, 2025
@dapplion dapplion force-pushed the peerdas-topics-fulu branch from 385b061 to 43ae790 Compare January 31, 2025 20:36
@dapplion dapplion added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jan 31, 2025
@dapplion dapplion requested a review from jimmygchen January 31, 2025 20:36
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Feb 3, 2025
mergify bot added a commit that referenced this pull request Feb 3, 2025
@mergify mergify bot merged commit 55d1e75 into sigp:unstable Feb 3, 2025
31 checks passed
@dapplion dapplion deleted the peerdas-topics-fulu branch February 3, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants