From a48cdfa90fb0c14188be96a703477fedef5a721a Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Wed, 4 Sep 2024 16:27:34 +0800 Subject: [PATCH] Revert "Change Custody Count to Uint8 (#14386)" (#14415) This reverts commit bd7ec3fa976c49cbe67c16f9f20cb8cfcaf882b2. --- beacon-chain/core/peerdas/helpers.go | 2 +- beacon-chain/p2p/custody.go | 2 +- beacon-chain/p2p/custody_test.go | 4 +- beacon-chain/p2p/discovery.go | 2 +- beacon-chain/p2p/discovery_test.go | 6 +- beacon-chain/p2p/subnets.go | 3 +- beacon-chain/sync/rpc_metadata.go | 4 +- beacon-chain/sync/rpc_metadata_test.go | 12 +-- consensus-types/wrapper/BUILD.bazel | 1 - consensus-types/wrapper/metadata.go | 9 +-- encoding/bytesutil/integers.go | 8 -- .../v1alpha1/metadata/metadata_interfaces.go | 2 +- proto/prysm/v1alpha1/non-core.ssz.go | 21 ++--- proto/prysm/v1alpha1/p2p_messages.pb.go | 77 +++++++++---------- proto/prysm/v1alpha1/p2p_messages.proto | 2 +- 15 files changed, 66 insertions(+), 89 deletions(-) diff --git a/beacon-chain/core/peerdas/helpers.go b/beacon-chain/core/peerdas/helpers.go index 40a7c8f6ad6c..91c128101d0d 100644 --- a/beacon-chain/core/peerdas/helpers.go +++ b/beacon-chain/core/peerdas/helpers.go @@ -34,7 +34,7 @@ const ( ) // https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7594/p2p-interface.md#the-discovery-domain-discv5 -type Csc uint8 +type Csc uint64 func (Csc) ENRKey() string { return CustodySubnetCountEnrKey } diff --git a/beacon-chain/p2p/custody.go b/beacon-chain/p2p/custody.go index 33b1c3651c2d..6fbeb28e20ba 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 uint64(custodyCount) + return custodyCount } } diff --git a/beacon-chain/p2p/custody_test.go b/beacon-chain/p2p/custody_test.go index d9064615c255..7ae6be9bdeb8 100644 --- a/beacon-chain/p2p/custody_test.go +++ b/beacon-chain/p2p/custody_test.go @@ -126,12 +126,12 @@ func TestCustodyCountFromRemotePeer(t *testing.T) { // Define a metadata with zero custody. zeroMetadata := wrapper.WrappedMetadataV2(&pb.MetaDataV2{ - CustodySubnetCount: []byte{0}, + CustodySubnetCount: 0, }) // Define a nominal metadata. nominalMetadata := wrapper.WrappedMetadataV2(&pb.MetaDataV2{ - CustodySubnetCount: []byte{uint8(expectedMetadata)}, + CustodySubnetCount: expectedMetadata, }) testCases := []struct { diff --git a/beacon-chain/p2p/discovery.go b/beacon-chain/p2p/discovery.go index 97f691e0bcf0..5d0823d9e385 100644 --- a/beacon-chain/p2p/discovery.go +++ b/beacon-chain/p2p/discovery.go @@ -261,7 +261,7 @@ func (s *Service) RefreshPersistentSubnets() { // Get the custody subnet count in our metadata. inMetadataCustodySubnetCount := s.Metadata().CustodySubnetCount() - isCustodySubnetCountUpToDate := custodySubnetCount == inRecordCustodySubnetCount && custodySubnetCount == uint64(inMetadataCustodySubnetCount) + isCustodySubnetCountUpToDate := (custodySubnetCount == inRecordCustodySubnetCount && custodySubnetCount == 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 f5c608eb6d57..4ae4c0e26f49 100644 --- a/beacon-chain/p2p/discovery_test.go +++ b/beacon-chain/p2p/discovery_test.go @@ -537,7 +537,7 @@ type check struct { metadataSequenceNumber uint64 attestationSubnets []uint64 syncSubnets []uint64 - custodySubnetCount *uint8 + custodySubnetCount *uint64 } func checkPingCountCacheMetadataRecord( @@ -606,7 +606,7 @@ func checkPingCountCacheMetadataRecord( if expected.custodySubnetCount != nil { // Check custody subnet count in ENR. - var actualCustodySubnetCount uint8 + var actualCustodySubnetCount uint64 err := service.dv5Listener.LocalNode().Node().Record().Load(enr.WithEntry(peerdas.CustodySubnetCountEnrKey, &actualCustodySubnetCount)) require.NoError(t, err) require.Equal(t, *expected.custodySubnetCount, actualCustodySubnetCount) @@ -629,7 +629,7 @@ func TestRefreshPersistentSubnets(t *testing.T) { eip7594ForkEpoch = 10 ) - custodySubnetCount := uint8(params.BeaconConfig().CustodyRequirement) + custodySubnetCount := params.BeaconConfig().CustodyRequirement // Set up epochs. defaultCfg := params.BeaconConfig() diff --git a/beacon-chain/p2p/subnets.go b/beacon-chain/p2p/subnets.go index 5c270f7c0535..2adead9cff19 100644 --- a/beacon-chain/p2p/subnets.go +++ b/beacon-chain/p2p/subnets.go @@ -346,13 +346,12 @@ 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: cscBytes, + CustodySubnetCount: custodySubnetCount, }) } diff --git a/beacon-chain/sync/rpc_metadata.go b/beacon-chain/sync/rpc_metadata.go index d46f5075fb26..5b0e72ce7f2c 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: []byte{0}, + CustodySubnetCount: 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: []byte{0}, + CustodySubnetCount: 0, }) } } diff --git a/beacon-chain/sync/rpc_metadata_test.go b/beacon-chain/sync/rpc_metadata_test.go index 56c6c92fd7a6..005269c3005d 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: []byte{custodySubnetCount}, + CustodySubnetCount: 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: []byte{custodySubnetCount}, + CustodySubnetCount: 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: []byte{0}, + CustodySubnetCount: 0, }), }, { @@ -238,7 +238,7 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: []byte{0}, + CustodySubnetCount: 0, }), }, { @@ -250,13 +250,13 @@ func TestMetadataRPCHandler_SendMetadataRequest(t *testing.T) { SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: []byte{custodySubnetCount}, + CustodySubnetCount: custodySubnetCount, }), expected: wrapper.WrappedMetadataV2(&pb.MetaDataV2{ SeqNumber: seqNumber, Attnets: attnets, Syncnets: syncnets, - CustodySubnetCount: []byte{custodySubnetCount}, + CustodySubnetCount: custodySubnetCount, }), }, } diff --git a/consensus-types/wrapper/BUILD.bazel b/consensus-types/wrapper/BUILD.bazel index cb3bfd541c85..d4e5da022448 100644 --- a/consensus-types/wrapper/BUILD.bazel +++ b/consensus-types/wrapper/BUILD.bazel @@ -6,7 +6,6 @@ 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 6f050f8f2218..adbbc81e4c50 100644 --- a/consensus-types/wrapper/metadata.go +++ b/consensus-types/wrapper/metadata.go @@ -2,7 +2,6 @@ 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" @@ -38,7 +37,7 @@ func (m MetadataV0) SyncnetsBitfield() bitfield.Bitvector4 { } // CustodySubnetCount returns custody subnet count from the metadata. -func (m MetadataV0) CustodySubnetCount() uint8 { +func (m MetadataV0) CustodySubnetCount() uint64 { return 0 } @@ -132,7 +131,7 @@ func (m MetadataV1) SyncnetsBitfield() bitfield.Bitvector4 { } // CustodySubnetCount returns custody subnet count from the metadata. -func (m MetadataV1) CustodySubnetCount() uint8 { +func (m MetadataV1) CustodySubnetCount() uint64 { return 0 } @@ -226,8 +225,8 @@ func (m MetadataV2) SyncnetsBitfield() bitfield.Bitvector4 { } // CustodySubnetCount returns custody subnet count from the metadata. -func (m MetadataV2) CustodySubnetCount() uint8 { - return bytesutil.FromBytes1(m.md.CustodySubnetCount) +func (m MetadataV2) CustodySubnetCount() uint64 { + return m.md.CustodySubnetCount } // InnerObject returns the underlying metadata protobuf structure. diff --git a/encoding/bytesutil/integers.go b/encoding/bytesutil/integers.go index 37c117250f1a..cded88f1266e 100644 --- a/encoding/bytesutil/integers.go +++ b/encoding/bytesutil/integers.go @@ -66,14 +66,6 @@ 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 64c6840f0b9f..b57a8753ceb7 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() uint8 + CustodySubnetCount() uint64 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 77a4acd7f438..bceb435606b5 100644 --- a/proto/prysm/v1alpha1/non-core.ssz.go +++ b/proto/prysm/v1alpha1/non-core.ssz.go @@ -578,11 +578,7 @@ func (m *MetaDataV2) MarshalSSZTo(buf []byte) (dst []byte, err error) { dst = append(dst, m.Syncnets...) // Field (3) 'CustodySubnetCount' - if size := len(m.CustodySubnetCount); size != 1 { - err = ssz.ErrBytesLengthFn("--.CustodySubnetCount", size, 1) - return - } - dst = append(dst, m.CustodySubnetCount...) + dst = ssz.MarshalUint64(dst, m.CustodySubnetCount) return } @@ -591,7 +587,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 != 18 { + if size != 25 { return ssz.ErrSize } @@ -611,17 +607,14 @@ func (m *MetaDataV2) UnmarshalSSZ(buf []byte) error { m.Syncnets = append(m.Syncnets, buf[16:17]...) // Field (3) 'CustodySubnetCount' - if cap(m.CustodySubnetCount) == 0 { - m.CustodySubnetCount = make([]byte, 0, len(buf[17:18])) - } - m.CustodySubnetCount = append(m.CustodySubnetCount, buf[17:18]...) + m.CustodySubnetCount = ssz.UnmarshallUint64(buf[17:25]) return err } // SizeSSZ returns the ssz encoded size in bytes for the MetaDataV2 object func (m *MetaDataV2) SizeSSZ() (size int) { - size = 18 + size = 25 return } @@ -652,11 +645,7 @@ func (m *MetaDataV2) HashTreeRootWith(hh *ssz.Hasher) (err error) { hh.PutBytes(m.Syncnets) // Field (3) 'CustodySubnetCount' - if size := len(m.CustodySubnetCount); size != 1 { - err = ssz.ErrBytesLengthFn("--.CustodySubnetCount", size, 1) - return - } - hh.PutBytes(m.CustodySubnetCount) + hh.PutUint64(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 4a963cffe4e4..796dc5d3c038 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 []byte `protobuf:"bytes,4,opt,name=custody_subnet_count,json=custodySubnetCount,proto3" json:"custody_subnet_count,omitempty" ssz-size:"1"` + CustodySubnetCount uint64 `protobuf:"varint,4,opt,name=custody_subnet_count,json=custodySubnetCount,proto3" json:"custody_subnet_count,omitempty"` } 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() []byte { +func (x *MetaDataV2) GetCustodySubnetCount() uint64 { if x != nil { return x.CustodySubnetCount } - return nil + return 0 } 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, 0x8f, + 0xb5, 0x18, 0x01, 0x31, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x88, 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,43 +630,42 @@ 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, 0x37, 0x0a, 0x14, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x79, 0x6e, 0x63, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x30, 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, 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, + 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, 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, 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, } var ( diff --git a/proto/prysm/v1alpha1/p2p_messages.proto b/proto/prysm/v1alpha1/p2p_messages.proto index 83979d7a759e..0ea6a4772760 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"]; - bytes custody_subnet_count = 4 [(ethereum.eth.ext.ssz_size) = "1"]; + uint64 custody_subnet_count = 4; } /*