Compare commits

...

3 Commits

Author SHA1 Message Date
Manu NALEPA
28a6138b86 Add changelog. 2025-09-30 12:24:05 +02:00
Manu NALEPA
ebbf9f0efc forkWatcher: Do now wait for initial sync to complete. 2025-09-30 12:19:48 +02:00
Manu NALEPA
69b0f7d734 startDiscoveryAndSubscriptions: Set s.registeredNetworkEntry. 2025-09-30 12:19:34 +02:00
3 changed files with 7 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
package sync
import (
"fmt"
"github.com/OffchainLabs/prysm/v6/beacon-chain/p2p"
"github.com/OffchainLabs/prysm/v6/config/params"
"github.com/OffchainLabs/prysm/v6/consensus-types/primitives"
@@ -12,7 +14,6 @@ import (
// Is a background routine that observes for new incoming forks. Depending on the epoch
// it will be in charge of subscribing/unsubscribing the relevant topics at the fork boundaries.
func (s *Service) forkWatcher() {
<-s.initialSyncComplete
slotTicker := slots.NewSlotTicker(s.cfg.clock.GenesisTime(), params.BeaconConfig().SecondsPerSlot)
for {
select {
@@ -46,6 +47,7 @@ func (s *Service) registerForUpcomingFork(currentEpoch primitives.Epoch) error {
}
if s.subHandler.digestExists(nextEntry.ForkDigest) {
log.WithField("digest", fmt.Sprintf("%#x", nextEntry.ForkDigest)).Debug("Already subscribed to fork")
return nil
}

View File

@@ -413,6 +413,8 @@ func (s *Service) startDiscoveryAndSubscriptions() {
return
}
s.registeredNetworkEntry = params.GetNetworkScheduleEntry(currentEpoch)
// Register respective pubsub handlers at state synced event.
s.registerSubscribers(currentEpoch, forkDigest)

View File

@@ -0,0 +1,2 @@
### Fixed
- [#15738](https://github.com/OffchainLabs/prysm/issues/15738)