Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions beacon-chain/p2p/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,16 @@ func (s *Service) RefreshPersistentSubnets() {

// Get the current attestation subnet bitfield.
bitV := bitfield.NewBitvector64()
attestationCommittees := cache.SubnetIDs.GetAllSubnets()
for _, idx := range attestationCommittees {
bitV.SetBitAt(idx, true)
if flags.Get().SubscribeToAllSubnets {
// Set all 64 bits for all attestation subnets
for i := uint64(0); i < params.BeaconConfig().AttestationSubnetCount; i++ {
bitV.SetBitAt(i, true)
}
} else {
attestationCommittees := cache.SubnetIDs.GetAllSubnets()
for _, idx := range attestationCommittees {
bitV.SetBitAt(idx, true)
}
}

// Get the attestation subnet bitfield we store in our record.
Expand Down
3 changes: 3 additions & 0 deletions changelog/samcm_fix-attnets-metadata-all-subnets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- Fixed `--subscribe-all-subnets` flag to correctly advertise all 64 attestation subnets in reqresp metadata.