Compare commits

...

2 Commits

Author SHA1 Message Date
rkapka
dc47d07d3f changelog <3 2025-11-19 18:39:05 +01:00
rkapka
c72b8c15cf Move BlockGossipReceived event to the end of gossip validation. 2025-11-19 18:28:25 +01:00
2 changed files with 14 additions and 10 deletions

View File

@@ -75,17 +75,8 @@ func (s *Service) validateBeaconBlockPubSub(ctx context.Context, pid peer.ID, ms
return pubsub.ValidationReject, errors.New("block.Block is nil")
}
// Broadcast the block on both block and operation feeds to notify other services in the beacon node
// Broadcast the block on a feed to notify other services in the beacon node
// of a received block (even if it does not process correctly through a state transition).
if s.cfg.operationNotifier != nil {
s.cfg.operationNotifier.OperationFeed().Send(&feed.Event{
Type: operation.BlockGossipReceived,
Data: &operation.BlockGossipReceivedData{
SignedBlock: blk,
},
})
}
s.cfg.blockNotifier.BlockFeed().Send(&feed.Event{
Type: blockfeed.ReceivedBlock,
Data: &blockfeed.ReceivedBlockData{
@@ -247,6 +238,16 @@ func (s *Service) validateBeaconBlockPubSub(ctx context.Context, pid peer.ID, ms
blockArrivalGossipSummary.Observe(float64(sinceSlotStartTime.Milliseconds()))
blockVerificationGossipSummary.Observe(float64(validationTime.Milliseconds()))
if s.cfg.operationNotifier != nil {
s.cfg.operationNotifier.OperationFeed().Send(&feed.Event{
Type: operation.BlockGossipReceived,
Data: &operation.BlockGossipReceivedData{
SignedBlock: blk,
},
})
}
return pubsub.ValidationAccept, nil
}

View File

@@ -0,0 +1,3 @@
### Fixed
- Move `BlockGossipReceived` event to the end of gossip validation.