Subscribe to PeerDAS topics on Fulu fork#6849
Conversation
2150988 to
385b061
Compare
jxs
left a comment
There was a problem hiding this comment.
overall looks good to me Lion! Left a suggesttion
| } | ||
|
|
||
| /// 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.
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.
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.
can we add fulu_core_topics too to cover the new changes?
There was a problem hiding this comment.
Added fulu_core_topics
|
This pull request has merge conflicts. Could you please resolve them @dapplion? 🙏 |
jimmygchen
left a comment
There was a problem hiding this comment.
Looks good!
Would be good to add a small test covering the changes.
385b061 to
43ae790
Compare
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.