Skip to content

Commit

Permalink
Merge branch 'develop' into peerDAS
Browse files Browse the repository at this point in the history
  • Loading branch information
nalepae committed Jan 22, 2025
2 parents 242c2b0 + 7872223 commit 632a060
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions beacon-chain/p2p/subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (s *Service) nodeFilter(topic string, index uint64) (func(node *enode.Node)
return s.filterPeerForAttSubnet(index), nil
case strings.Contains(topic, GossipSyncCommitteeMessage):
return s.filterPeerForSyncSubnet(index), nil
case strings.Contains(topic, GossipBlobSidecarMessage):
return s.filterPeerForBlobSubnet(), nil
case strings.Contains(topic, GossipDataColumnSidecarMessage):
return s.filterPeerForDataColumnsSubnet(index), nil
default:
Expand Down Expand Up @@ -277,6 +279,14 @@ func (s *Service) filterPeerForSyncSubnet(index uint64) func(node *enode.Node) b
}
}

// returns a method with filters peers specifically for a particular blob subnet.
// All peers are supposed to be subscribed to all blob subnets.
func (s *Service) filterPeerForBlobSubnet() func(_ *enode.Node) bool {
return func(_ *enode.Node) bool {
return true
}
}

// returns a method with filters peers specifically for a particular data column subnet.
func (s *Service) filterPeerForDataColumnsSubnet(index uint64) func(node *enode.Node) bool {
return func(node *enode.Node) bool {
Expand Down
3 changes: 3 additions & 0 deletions changelog/manu_blob_subnets_node_filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- `nodeFilter`: Implement `filterPeerForBlobSubnet` to avoid error logs.

0 comments on commit 632a060

Please sign in to comment.