Subscribe to PeerDAS topics on Fulu fork (#6849)

`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
- https://github.com/sigp/lighthouse/pull/5899/files


  Include PeerDAS topics as part of Fulu fork in `fork_core_topics`.
This commit is contained in:
Lion - dapplion
2025-02-03 03:07:39 -03:00
committed by GitHub
parent a088b0b6c4
commit 55d1e754b4
5 changed files with 62 additions and 50 deletions

View File

@@ -708,11 +708,17 @@ impl<E: EthSpec> Network<E> {
}
// Subscribe to core topics for the new fork
for kind in fork_core_topics::<E>(&new_fork, &self.fork_context.spec) {
for kind in fork_core_topics::<E>(
&new_fork,
&self.fork_context.spec,
&self.network_globals.as_topic_config(),
) {
let topic = GossipTopic::new(kind, GossipEncoding::default(), new_fork_digest);
self.subscribe(topic);
}
// TODO(das): unsubscribe from blob topics at the Fulu fork
// Register the new topics for metrics
let topics_to_keep_metrics_for = attestation_sync_committee_topics::<E>()
.map(|gossip_kind| {