diff --git a/beacon-chain/core/peerdas/helpers.go b/beacon-chain/core/peerdas/helpers.go index efdc2d83f62a..ad431229875e 100644 --- a/beacon-chain/core/peerdas/helpers.go +++ b/beacon-chain/core/peerdas/helpers.go @@ -33,7 +33,7 @@ const ( ) // https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7594/p2p-interface.md#the-discovery-domain-discv5 -type Csc uint64 +type Csc uint8 func (Csc) ENRKey() string { return CustodySubnetCountEnrKey } diff --git a/beacon-chain/p2p/custody.go b/beacon-chain/p2p/custody.go index 6fbeb28e20ba..33b1c3651c2d 100644 --- a/beacon-chain/p2p/custody.go +++ b/beacon-chain/p2p/custody.go @@ -86,7 +86,7 @@ func (s *Service) CustodyCountFromRemotePeer(pid peer.ID) uint64 { if metadata != nil { custodyCount := metadata.CustodySubnetCount() if custodyCount > 0 { - return custodyCount + return uint64(custodyCount) } } diff --git a/beacon-chain/p2p/custody_test.go b/beacon-chain/p2p/custody_test.go index 9c94c3a2d8c7..08cb7d4f2ddc 100644 --- a/beacon-chain/p2p/custody_test.go +++ b/beacon-chain/p2p/custody_test.go @@ -121,12 +121,12 @@ func TestCustodyCountFromRemotePeer(t *testing.T) { // Define a metadata with zero custody. zeroMetadata := wrapper.WrappedMetadataV2(&pb.MetaDataV2{ - CustodySubnetCount: 0, + CustodySubnetCount: []byte{0}, }) // Define a nominal metadata. nominalMetadata := wrapper.WrappedMetadataV2(&pb.MetaDataV2{ - CustodySubnetCount: expectedMetadata, + CustodySubnetCount: []byte{uint8(expectedMetadata)}, }) testCases := []struct { diff --git a/beacon-chain/p2p/discovery.go b/beacon-chain/p2p/discovery.go index 3eb816db04b3..a0166eb70b89 100644 --- a/beacon-chain/p2p/discovery.go +++ b/beacon-chain/p2p/discovery.go @@ -175,7 +175,7 @@ func (s *Service) RefreshPersistentSubnets() { // Get the custody subnet count in our metadata. inMetadataCustodySubnetCount := s.Metadata().CustodySubnetCount() - isCustodySubnetCountUpToDate := (custodySubnetCount == inRecordCustodySubnetCount && custodySubnetCount == inMetadataCustodySubnetCount) + isCustodySubnetCountUpToDate := custodySubnetCount == inRecordCustodySubnetCount && custodySubnetCount == uint64(inMetadataCustodySubnetCount) if isBitVUpToDate && isBitSUpToDate && isCustodySubnetCountUpToDate { // Nothing to do, return early. diff --git a/beacon-chain/p2p/discovery_test.go b/beacon-chain/p2p/discovery_test.go index bb4b1eecc93d..c159717573d8 100644 --- a/beacon-chain/p2p/discovery_test.go +++ b/beacon-chain/p2p/discovery_test.go @@ -473,7 +473,7 @@ type check struct { metadataSequenceNumber uint64 attestationSubnets []uint64 syncSubnets []uint64 - custodySubnetCount *uint64 + custodySubnetCount *uint8 } func checkPingCountCacheMetadataRecord( @@ -542,7 +542,7 @@ func checkPingCountCacheMetadataRecord( if expected.custodySubnetCount != nil { // Check custody subnet count in ENR. - var actualCustodySubnetCount uint64 + var actualCustodySubnetCount uint8 err := service.dv5Listener.LocalNode().Node().Record().Load(enr.WithEntry(peerdas.CustodySubnetCountEnrKey, &actualCustodySubnetCount)) require.NoError(t, err) require.Equal(t, *expected.custodySubnetCount, actualCustodySubnetCount) @@ -565,7 +565,7 @@ func TestRefreshPersistentSubnets(t *testing.T) { eip7594ForkEpoch = 10 ) - custodySubnetCount := params.BeaconConfig().CustodyRequirement + custodySubnetCount := uint8(params.BeaconConfig().CustodyRequirement) // Set up epochs. defaultCfg := params.BeaconConfig() diff --git a/beacon-chain/p2p/subnets.go b/beacon-chain/p2p/subnets.go index 1f11b8726bc0..af5b0dda216c 100644 --- a/beacon-chain/p2p/subnets.go +++ b/beacon-chain/p2p/subnets.go @@ -239,12 +239,13 @@ func (s *Service) updateSubnetRecordWithMetadataV3( localNode.Set(custodySubnetCountEntry) newSeqNumber := s.metaData.SequenceNumber() + 1 + cscBytes := []byte{uint8(custodySubnetCount)} s.metaData = wrapper.WrappedMetadataV2(&pb.MetaDataV2{ SeqNumber: newSeqNumber, Attnets: bitVAtt, Syncnets: bitVSync, - CustodySubnetCount: custodySubnetCount, + CustodySubnetCount: cscBytes, }) } diff --git a/beacon-chain/sync/rpc_metadata.go b/beacon-chain/sync/rpc_metadata.go index 5b0e72ce7f2c..d46f5075fb26 100644 --- a/beacon-chain/sync/rpc_metadata.go +++ b/beacon-chain/sync/rpc_metadata.go @@ -104,7 +104,7 @@ func (s *Service) metaDataHandler(_ context.Context, _ interface{}, stream libp2 Attnets: metadata.AttnetsBitfield(), SeqNumber: metadata.SequenceNumber(), Syncnets: bitfield.Bitvector4{byte(0x00)}, - CustodySubnetCount: 0, + CustodySubnetCount: []byte{0}, }) case version.Altair: metadata = wrapper.WrappedMetadataV2( @@ -112,7 +112,7 @@ func (s *Service) metaDataHandler(_ context.Context, _ interface{}, stream libp2 Attnets: metadata.AttnetsBitfield(), SeqNumber: metadata.SequenceNumber(), Syncnets: metadata.SyncnetsBitfield(), - CustodySubnetCount: 0, + CustodySubnetCount: []byte{0}, }) } } diff --git a/beacon-chain/sync/rpc_metadata_test.go b/beacon-chain/sync/rpc_metadata_test.go index 005269c3005d..56c6c92fd7a6 100644 --- a/beacon-chain/sync/rpc_metadata_test.go +++ b/beacon-chain/sync/rpc_metadata_test.go @@ -153,7 +153,7 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: custodySubnetCount, + CustodySubnetCount: []byte{custodySubnetCount}, }), expected: wrapper.WrappedMetadataV0(&pb.MetaDataV0{ SeqNumber: seqNumber, @@ -200,7 +200,7 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: custodySubnetCount, + CustodySubnetCount: []byte{custodySubnetCount}, }), expected: wrapper.WrappedMetadataV1(&pb.MetaDataV1{ SeqNumber: seqNumber, @@ -221,7 +221,7 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: bitfield.Bitvector4{byte(0x00)}, - CustodySubnetCount: 0, + CustodySubnetCount: []byte{0}, }), }, { @@ -238,7 +238,7 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: 0, + CustodySubnetCount: []byte{0}, }), }, { @@ -250,13 +250,13 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: custodySubnetCount, + CustodySubnetCount: []byte{custodySubnetCount}, }), expected: wrapper.WrappedMetadataV2(&pb.MetaDataV2{ SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: custodySubnetCount, + CustodySubnetCount: []byte{custodySubnetCount}, }), }, } diff --git a/consensus-types/wrapper/BUILD.bazel b/consensus-types/wrapper/BUILD.bazel index d4e5da022448..cb3bfd541c85 100644 --- a/consensus-types/wrapper/BUILD.bazel +++ b/consensus-types/wrapper/BUILD.bazel @@ -6,6 +6,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/v5/consensus-types/wrapper", visibility = ["//visibility:public"], deps = [ + "//encoding/bytesutil:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/metadata:go_default_library", "//runtime/version:go_default_library", diff --git a/consensus-types/wrapper/metadata.go b/consensus-types/wrapper/metadata.go index adbbc81e4c50..6f050f8f2218 100644 --- a/consensus-types/wrapper/metadata.go +++ b/consensus-types/wrapper/metadata.go @@ -2,6 +2,7 @@ package wrapper import ( "github.com/prysmaticlabs/go-bitfield" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1/metadata" "github.com/prysmaticlabs/prysm/v5/runtime/version" @@ -37,7 +38,7 @@ func (m MetadataV0) SyncnetsBitfield() bitfield.Bitvector4 { } // CustodySubnetCount returns custody subnet count from the metadata. -func (m MetadataV0) CustodySubnetCount() uint64 { +func (m MetadataV0) CustodySubnetCount() uint8 { return 0 } @@ -131,7 +132,7 @@ func (m MetadataV1) SyncnetsBitfield() bitfield.Bitvector4 { } // CustodySubnetCount returns custody subnet count from the metadata. -func (m MetadataV1) CustodySubnetCount() uint64 { +func (m MetadataV1) CustodySubnetCount() uint8 { return 0 } @@ -225,8 +226,8 @@ func (m MetadataV2) SyncnetsBitfield() bitfield.Bitvector4 { } // CustodySubnetCount returns custody subnet count from the metadata. -func (m MetadataV2) CustodySubnetCount() uint64 { - return m.md.CustodySubnetCount +func (m MetadataV2) CustodySubnetCount() uint8 { + return bytesutil.FromBytes1(m.md.CustodySubnetCount) } // InnerObject returns the underlying metadata protobuf structure. diff --git a/encoding/bytesutil/integers.go b/encoding/bytesutil/integers.go index cded88f1266e..37c117250f1a 100644 --- a/encoding/bytesutil/integers.go +++ b/encoding/bytesutil/integers.go @@ -66,6 +66,14 @@ func Bytes32(x uint64) []byte { return bytes } +// FromBytes1 returns an integer from a byte slice with a size of 1. +func FromBytes1(x []byte) uint8 { + if len(x) < 1 { + return 0 + } + return x[0] +} + // FromBytes2 returns an integer which is stored in the little-endian format(2, 'little') // from a byte array. func FromBytes2(x []byte) uint16 { diff --git a/proto/prysm/v1alpha1/metadata/metadata_interfaces.go b/proto/prysm/v1alpha1/metadata/metadata_interfaces.go index b57a8753ceb7..64c6840f0b9f 100644 --- a/proto/prysm/v1alpha1/metadata/metadata_interfaces.go +++ b/proto/prysm/v1alpha1/metadata/metadata_interfaces.go @@ -11,7 +11,7 @@ type Metadata interface { SequenceNumber() uint64 AttnetsBitfield() bitfield.Bitvector64 SyncnetsBitfield() bitfield.Bitvector4 - CustodySubnetCount() uint64 + CustodySubnetCount() uint8 InnerObject() interface{} IsNil() bool Copy() Metadata diff --git a/proto/prysm/v1alpha1/non-core.ssz.go b/proto/prysm/v1alpha1/non-core.ssz.go index 9d949949848c..c03345d92d6e 100644 --- a/proto/prysm/v1alpha1/non-core.ssz.go +++ b/proto/prysm/v1alpha1/non-core.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: ac6fbb6f912d4e5a3374b91a3dc73c1d5ac1e5b4a9c32513b3d5ef9de7885be8 +// Hash: 2b6089e02fcaeb5244f5bd8568b0d90eca6cccd827a21f19affac4a07bb8d355 package eth import ( @@ -578,7 +578,11 @@ func (m *MetaDataV2) MarshalSSZTo(buf []byte) (dst []byte, err error) { dst = append(dst, m.Syncnets...) // Field (3) 'CustodySubnetCount' - dst = ssz.MarshalUint64(dst, m.CustodySubnetCount) + if size := len(m.CustodySubnetCount); size != 1 { + err = ssz.ErrBytesLengthFn("--.CustodySubnetCount", size, 1) + return + } + dst = append(dst, m.CustodySubnetCount...) return } @@ -587,7 +591,7 @@ func (m *MetaDataV2) MarshalSSZTo(buf []byte) (dst []byte, err error) { func (m *MetaDataV2) UnmarshalSSZ(buf []byte) error { var err error size := uint64(len(buf)) - if size != 25 { + if size != 18 { return ssz.ErrSize } @@ -607,14 +611,17 @@ func (m *MetaDataV2) UnmarshalSSZ(buf []byte) error { m.Syncnets = append(m.Syncnets, buf[16:17]...) // Field (3) 'CustodySubnetCount' - m.CustodySubnetCount = ssz.UnmarshallUint64(buf[17:25]) + if cap(m.CustodySubnetCount) == 0 { + m.CustodySubnetCount = make([]byte, 0, len(buf[17:18])) + } + m.CustodySubnetCount = append(m.CustodySubnetCount, buf[17:18]...) return err } // SizeSSZ returns the ssz encoded size in bytes for the MetaDataV2 object func (m *MetaDataV2) SizeSSZ() (size int) { - size = 25 + size = 18 return } @@ -645,7 +652,11 @@ func (m *MetaDataV2) HashTreeRootWith(hh *ssz.Hasher) (err error) { hh.PutBytes(m.Syncnets) // Field (3) 'CustodySubnetCount' - hh.PutUint64(m.CustodySubnetCount) + if size := len(m.CustodySubnetCount); size != 1 { + err = ssz.ErrBytesLengthFn("--.CustodySubnetCount", size, 1) + return + } + hh.PutBytes(m.CustodySubnetCount) hh.Merkleize(indx) return diff --git a/proto/prysm/v1alpha1/p2p_messages.pb.go b/proto/prysm/v1alpha1/p2p_messages.pb.go index 796dc5d3c038..4a963cffe4e4 100755 --- a/proto/prysm/v1alpha1/p2p_messages.pb.go +++ b/proto/prysm/v1alpha1/p2p_messages.pb.go @@ -356,7 +356,7 @@ type MetaDataV2 struct { SeqNumber uint64 `protobuf:"varint,1,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` Attnets github_com_prysmaticlabs_go_bitfield.Bitvector64 `protobuf:"bytes,2,opt,name=attnets,proto3" json:"attnets,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector64" ssz-size:"8"` Syncnets github_com_prysmaticlabs_go_bitfield.Bitvector4 `protobuf:"bytes,3,opt,name=syncnets,proto3" json:"syncnets,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector4" ssz-size:"1"` - CustodySubnetCount uint64 `protobuf:"varint,4,opt,name=custody_subnet_count,json=custodySubnetCount,proto3" json:"custody_subnet_count,omitempty"` + CustodySubnetCount []byte `protobuf:"bytes,4,opt,name=custody_subnet_count,json=custodySubnetCount,proto3" json:"custody_subnet_count,omitempty" ssz-size:"1"` } func (x *MetaDataV2) Reset() { @@ -412,11 +412,11 @@ func (x *MetaDataV2) GetSyncnets() github_com_prysmaticlabs_go_bitfield.Bitvecto return github_com_prysmaticlabs_go_bitfield.Bitvector4(nil) } -func (x *MetaDataV2) GetCustodySubnetCount() uint64 { +func (x *MetaDataV2) GetCustodySubnetCount() []byte { if x != nil { return x.CustodySubnetCount } - return 0 + return nil } type BlobSidecarsByRangeRequest struct { @@ -616,7 +616,7 @@ var file_proto_prysm_v1alpha1_p2p_messages_proto_rawDesc = []byte{ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, - 0xb5, 0x18, 0x01, 0x31, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x88, + 0xb5, 0x18, 0x01, 0x31, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x56, 0x32, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x07, @@ -630,42 +630,43 @@ var file_proto_prysm_v1alpha1_p2p_messages_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x08, 0x73, - 0x79, 0x6e, 0x63, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x79, 0x6e, 0x63, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x53, 0x75, - 0x62, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x42, 0x6c, - 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x42, 0x79, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, - 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, - 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, - 0x6c, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc1, 0x01, 0x0a, 0x20, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x42, 0x79, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, - 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x12, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x64, 0x79, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, + 0x73, 0x42, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x64, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc1, 0x01, 0x0a, 0x20, + 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, + 0x72, 0x73, 0x42, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x64, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x07, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x07, 0x92, + 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x42, + 0x9b, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x50, + 0x32, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, - 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, - 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, - 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x42, 0x9b, 0x01, 0x0a, 0x19, 0x6f, 0x72, 0x67, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x50, 0x32, 0x50, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, - 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x15, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/prysm/v1alpha1/p2p_messages.proto b/proto/prysm/v1alpha1/p2p_messages.proto index 0ea6a4772760..83979d7a759e 100644 --- a/proto/prysm/v1alpha1/p2p_messages.proto +++ b/proto/prysm/v1alpha1/p2p_messages.proto @@ -74,7 +74,7 @@ message MetaDataV2 { uint64 seq_number = 1; bytes attnets = 2 [(ethereum.eth.ext.ssz_size) = "8", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector64"]; bytes syncnets = 3 [(ethereum.eth.ext.ssz_size) = "1", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector4"]; - uint64 custody_subnet_count = 4; + bytes custody_subnet_count = 4 [(ethereum.eth.ext.ssz_size) = "1"]; } /*