-
Notifications
You must be signed in to change notification settings - Fork 811
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
Conversation
2150988
to
385b061
Compare
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.
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 { |
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.
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
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.
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); |
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.
can we add fulu_core_topics too to cover the new changes?
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.
Added fulu_core_topics
This pull request has merge conflicts. Could you please resolve them @dapplion? 🙏 |
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!
Would be good to add a small test covering the changes.
385b061
to
43ae790
Compare
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!
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
.