diff --git a/beacon-chain/p2p/gossip_topic_mappings.go b/beacon-chain/p2p/gossip_topic_mappings.go index 7bffaa454..51f891294 100644 --- a/beacon-chain/p2p/gossip_topic_mappings.go +++ b/beacon-chain/p2p/gossip_topic_mappings.go @@ -63,6 +63,8 @@ func init() { GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockAltair{})] = BlockSubnetTopicFormat // Specially handle Bellatrix objects. GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockBellatrix{})] = BlockSubnetTopicFormat - // Specially handle Capella objects + // Specially handle Capella objects. GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockCapella{})] = BlockSubnetTopicFormat + // Specially handle Deneb objects. + GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockDeneb{})] = BlockSubnetTopicFormat } diff --git a/beacon-chain/sync/subscriber.go b/beacon-chain/sync/subscriber.go index 91e22dc6d..730ea6b29 100644 --- a/beacon-chain/sync/subscriber.go +++ b/beacon-chain/sync/subscriber.go @@ -327,7 +327,7 @@ func (s *Service) subscribeStaticWithSubnets(topic string, validator wrappedVal, // Impossible condition as it would mean topic does not exist. panic(fmt.Sprintf("%s is not mapped to any message in GossipTopicMappings", topic)) } - for i := uint64(0); i < params.BeaconNetworkConfig().AttestationSubnetCount; i++ { + for i := uint64(0); i < subnetCount; i++ { s.subscribeWithBase(s.addDigestAndIndexToTopic(topic, digest, i), validator, handle) } genesis := s.cfg.clock.GenesisTime() diff --git a/consensus-types/blocks/getters.go b/consensus-types/blocks/getters.go index f71c2ebe3..3497f4a3f 100644 --- a/consensus-types/blocks/getters.go +++ b/consensus-types/blocks/getters.go @@ -119,11 +119,15 @@ func (b *SignedBeaconBlock) PbGenericBlock() (*eth.GenericSignedBeaconBlock, err case version.Deneb: if b.IsBlinded() { return ð.GenericSignedBeaconBlock{ - Block: ð.GenericSignedBeaconBlock_BlindedDeneb{BlindedDeneb: pb.(*eth.SignedBlindedBeaconBlockAndBlobsDeneb)}, + Block: ð.GenericSignedBeaconBlock_BlindedDeneb{BlindedDeneb: ð.SignedBlindedBeaconBlockAndBlobsDeneb{ + Block: pb.(*eth.SignedBlindedBeaconBlockDeneb), + }}, }, nil } return ð.GenericSignedBeaconBlock{ - Block: ð.GenericSignedBeaconBlock_Deneb{Deneb: pb.(*eth.SignedBeaconBlockAndBlobsDeneb)}, + Block: ð.GenericSignedBeaconBlock_Deneb{Deneb: ð.SignedBeaconBlockAndBlobsDeneb{ + Block: pb.(*eth.SignedBeaconBlockDeneb), + }}, }, nil default: return nil, errIncorrectBlockVersion