Remove Deprecated Request Type (#7153)

* remove deprecated type
* fix build and tests
* update log
* Merge refs/heads/master into removeBlocksByRootType
This commit is contained in:
Nishant Das
2020-09-01 21:35:30 +08:00
committed by GitHub
parent 63149a3dc3
commit d368156a08
6 changed files with 477 additions and 789 deletions

View File

@@ -46,20 +46,6 @@ func VerifyTopicMapping(topic string, msg interface{}) error {
registeredType := reflect.TypeOf(msgType)
typeMatches := registeredType.AssignableTo(receivedType)
// TODO(#6408) Allow multiple message types for topic, as we currently have 2 different
// rpc request types until issue is resolved.
if topic == RPCBlocksByRootTopic {
if typeMatches {
return nil
}
secondType := reflect.TypeOf(new(pb.BeaconBlocksByRootRequest))
secondTypeMatches := secondType.AssignableTo(receivedType)
if !secondTypeMatches {
return errors.Errorf("accompanying message type is incorrect for topic: wanted %v or %v but got %v",
registeredType.String(), secondType.String(), receivedType.String())
}
return nil
}
if !typeMatches {
return errors.Errorf("accompanying message type is incorrect for topic: wanted %v but got %v",
registeredType.String(), receivedType.String())

View File

@@ -14,7 +14,5 @@ func TestVerifyRPCMappings(t *testing.T) {
assert.NoError(t, VerifyTopicMapping(RPCMetaDataTopic, new(interface{})), "Failed to verify metadata rpc topic")
assert.NotNil(t, VerifyTopicMapping(RPCStatusTopic, new([]byte)), "Incorrect message type verified for metadata rpc topic")
// TODO(#6408) Remove once issue is resolved
assert.NoError(t, VerifyTopicMapping(RPCBlocksByRootTopic, [][32]byte{}), "Failed to verify blocks by root rpc topic")
assert.NoError(t, VerifyTopicMapping(RPCBlocksByRootTopic, new(pb.BeaconBlocksByRootRequest)), "Failed to verify blocks by root rpc topic")
}

View File

@@ -68,7 +68,7 @@ func (s *Service) beaconBlocksRootRPCHandler(ctx context.Context, msg interface{
blockRoots, ok := msg.([][32]byte)
if !ok {
return errors.New("message is not type BeaconBlocksByRootRequest")
return errors.New("message is not type [][32]byte")
}
if len(blockRoots) == 0 {
resp, err := s.generateErrorResponse(responseCodeInvalidRequest, "no block roots provided in request")

View File

@@ -6,546 +6,6 @@ import (
v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
)
// MarshalSSZ ssz marshals the Status object
func (s *Status) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(s)
}
// MarshalSSZTo ssz marshals the Status object to a target array
func (s *Status) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'ForkDigest'
if len(s.ForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, s.ForkDigest...)
// Field (1) 'FinalizedRoot'
if len(s.FinalizedRoot) != 32 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, s.FinalizedRoot...)
// Field (2) 'FinalizedEpoch'
dst = ssz.MarshalUint64(dst, s.FinalizedEpoch)
// Field (3) 'HeadRoot'
if len(s.HeadRoot) != 32 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, s.HeadRoot...)
// Field (4) 'HeadSlot'
dst = ssz.MarshalUint64(dst, s.HeadSlot)
return
}
// UnmarshalSSZ ssz unmarshals the Status object
func (s *Status) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 84 {
return ssz.ErrSize
}
// Field (0) 'ForkDigest'
if cap(s.ForkDigest) == 0 {
s.ForkDigest = make([]byte, 0, len(buf[0:4]))
}
s.ForkDigest = append(s.ForkDigest, buf[0:4]...)
// Field (1) 'FinalizedRoot'
if cap(s.FinalizedRoot) == 0 {
s.FinalizedRoot = make([]byte, 0, len(buf[4:36]))
}
s.FinalizedRoot = append(s.FinalizedRoot, buf[4:36]...)
// Field (2) 'FinalizedEpoch'
s.FinalizedEpoch = ssz.UnmarshallUint64(buf[36:44])
// Field (3) 'HeadRoot'
if cap(s.HeadRoot) == 0 {
s.HeadRoot = make([]byte, 0, len(buf[44:76]))
}
s.HeadRoot = append(s.HeadRoot, buf[44:76]...)
// Field (4) 'HeadSlot'
s.HeadSlot = ssz.UnmarshallUint64(buf[76:84])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the Status object
func (s *Status) SizeSSZ() (size int) {
size = 84
return
}
// HashTreeRoot ssz hashes the Status object
func (s *Status) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(s)
}
// HashTreeRootWith ssz hashes the Status object with a hasher
func (s *Status) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'ForkDigest'
if len(s.ForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(s.ForkDigest)
// Field (1) 'FinalizedRoot'
if len(s.FinalizedRoot) != 32 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(s.FinalizedRoot)
// Field (2) 'FinalizedEpoch'
hh.PutUint64(s.FinalizedEpoch)
// Field (3) 'HeadRoot'
if len(s.HeadRoot) != 32 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(s.HeadRoot)
// Field (4) 'HeadSlot'
hh.PutUint64(s.HeadSlot)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(b)
}
// MarshalSSZTo ssz marshals the BeaconBlocksByRangeRequest object to a target array
func (b *BeaconBlocksByRangeRequest) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'StartSlot'
dst = ssz.MarshalUint64(dst, b.StartSlot)
// Field (1) 'Count'
dst = ssz.MarshalUint64(dst, b.Count)
// Field (2) 'Step'
dst = ssz.MarshalUint64(dst, b.Step)
return
}
// UnmarshalSSZ ssz unmarshals the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 24 {
return ssz.ErrSize
}
// Field (0) 'StartSlot'
b.StartSlot = ssz.UnmarshallUint64(buf[0:8])
// Field (1) 'Count'
b.Count = ssz.UnmarshallUint64(buf[8:16])
// Field (2) 'Step'
b.Step = ssz.UnmarshallUint64(buf[16:24])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) SizeSSZ() (size int) {
size = 24
return
}
// HashTreeRoot ssz hashes the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(b)
}
// HashTreeRootWith ssz hashes the BeaconBlocksByRangeRequest object with a hasher
func (b *BeaconBlocksByRangeRequest) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'StartSlot'
hh.PutUint64(b.StartSlot)
// Field (1) 'Count'
hh.PutUint64(b.Count)
// Field (2) 'Step'
hh.PutUint64(b.Step)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the BeaconBlocksByRootRequest object
func (b *BeaconBlocksByRootRequest) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(b)
}
// MarshalSSZTo ssz marshals the BeaconBlocksByRootRequest object to a target array
func (b *BeaconBlocksByRootRequest) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
offset := int(4)
// Offset (0) 'BlockRoots'
dst = ssz.WriteOffset(dst, offset)
offset += len(b.BlockRoots) * 32
// Field (0) 'BlockRoots'
if len(b.BlockRoots) > 1024 {
err = ssz.ErrListTooBig
return
}
for ii := 0; ii < len(b.BlockRoots); ii++ {
if len(b.BlockRoots[ii]) != 32 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, b.BlockRoots[ii]...)
}
return
}
// UnmarshalSSZ ssz unmarshals the BeaconBlocksByRootRequest object
func (b *BeaconBlocksByRootRequest) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size < 4 {
return ssz.ErrSize
}
tail := buf
var o0 uint64
// Offset (0) 'BlockRoots'
if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
return ssz.ErrOffset
}
// Field (0) 'BlockRoots'
{
buf = tail[o0:]
num, err := ssz.DivideInt2(len(buf), 32, 1024)
if err != nil {
return err
}
b.BlockRoots = make([][]byte, num)
for ii := 0; ii < num; ii++ {
if cap(b.BlockRoots[ii]) == 0 {
b.BlockRoots[ii] = make([]byte, 0, len(buf[ii*32:(ii+1)*32]))
}
b.BlockRoots[ii] = append(b.BlockRoots[ii], buf[ii*32:(ii+1)*32]...)
}
}
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlocksByRootRequest object
func (b *BeaconBlocksByRootRequest) SizeSSZ() (size int) {
size = 4
// Field (0) 'BlockRoots'
size += len(b.BlockRoots) * 32
return
}
// HashTreeRoot ssz hashes the BeaconBlocksByRootRequest object
func (b *BeaconBlocksByRootRequest) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(b)
}
// HashTreeRootWith ssz hashes the BeaconBlocksByRootRequest object with a hasher
func (b *BeaconBlocksByRootRequest) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'BlockRoots'
{
if len(b.BlockRoots) > 1024 {
err = ssz.ErrListTooBig
return
}
subIndx := hh.Index()
for _, i := range b.BlockRoots {
if len(i) != 32 {
err = ssz.ErrBytesLength
return
}
hh.Append(i)
}
numItems := uint64(len(b.BlockRoots))
hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(1024, numItems, 32))
}
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the ErrorResponse object
func (e *ErrorResponse) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(e)
}
// MarshalSSZTo ssz marshals the ErrorResponse object to a target array
func (e *ErrorResponse) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
offset := int(4)
// Offset (0) 'Message'
dst = ssz.WriteOffset(dst, offset)
offset += len(e.Message)
// Field (0) 'Message'
if len(e.Message) > 256 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, e.Message...)
return
}
// UnmarshalSSZ ssz unmarshals the ErrorResponse object
func (e *ErrorResponse) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size < 4 {
return ssz.ErrSize
}
tail := buf
var o0 uint64
// Offset (0) 'Message'
if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
return ssz.ErrOffset
}
// Field (0) 'Message'
{
buf = tail[o0:]
if len(buf) > 256 {
return ssz.ErrBytesLength
}
if cap(e.Message) == 0 {
e.Message = make([]byte, 0, len(buf))
}
e.Message = append(e.Message, buf...)
}
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the ErrorResponse object
func (e *ErrorResponse) SizeSSZ() (size int) {
size = 4
// Field (0) 'Message'
size += len(e.Message)
return
}
// HashTreeRoot ssz hashes the ErrorResponse object
func (e *ErrorResponse) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(e)
}
// HashTreeRootWith ssz hashes the ErrorResponse object with a hasher
func (e *ErrorResponse) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'Message'
if len(e.Message) > 256 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(e.Message)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the ENRForkID object
func (e *ENRForkID) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(e)
}
// MarshalSSZTo ssz marshals the ENRForkID object to a target array
func (e *ENRForkID) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'CurrentForkDigest'
if len(e.CurrentForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, e.CurrentForkDigest...)
// Field (1) 'NextForkVersion'
if len(e.NextForkVersion) != 4 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, e.NextForkVersion...)
// Field (2) 'NextForkEpoch'
dst = ssz.MarshalUint64(dst, e.NextForkEpoch)
return
}
// UnmarshalSSZ ssz unmarshals the ENRForkID object
func (e *ENRForkID) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 16 {
return ssz.ErrSize
}
// Field (0) 'CurrentForkDigest'
if cap(e.CurrentForkDigest) == 0 {
e.CurrentForkDigest = make([]byte, 0, len(buf[0:4]))
}
e.CurrentForkDigest = append(e.CurrentForkDigest, buf[0:4]...)
// Field (1) 'NextForkVersion'
if cap(e.NextForkVersion) == 0 {
e.NextForkVersion = make([]byte, 0, len(buf[4:8]))
}
e.NextForkVersion = append(e.NextForkVersion, buf[4:8]...)
// Field (2) 'NextForkEpoch'
e.NextForkEpoch = ssz.UnmarshallUint64(buf[8:16])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the ENRForkID object
func (e *ENRForkID) SizeSSZ() (size int) {
size = 16
return
}
// HashTreeRoot ssz hashes the ENRForkID object
func (e *ENRForkID) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(e)
}
// HashTreeRootWith ssz hashes the ENRForkID object with a hasher
func (e *ENRForkID) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'CurrentForkDigest'
if len(e.CurrentForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(e.CurrentForkDigest)
// Field (1) 'NextForkVersion'
if len(e.NextForkVersion) != 4 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(e.NextForkVersion)
// Field (2) 'NextForkEpoch'
hh.PutUint64(e.NextForkEpoch)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the MetaData object
func (m *MetaData) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(m)
}
// MarshalSSZTo ssz marshals the MetaData object to a target array
func (m *MetaData) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'SeqNumber'
dst = ssz.MarshalUint64(dst, m.SeqNumber)
// Field (1) 'Attnets'
if len(m.Attnets) != 8 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, m.Attnets...)
return
}
// UnmarshalSSZ ssz unmarshals the MetaData object
func (m *MetaData) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 16 {
return ssz.ErrSize
}
// Field (0) 'SeqNumber'
m.SeqNumber = ssz.UnmarshallUint64(buf[0:8])
// Field (1) 'Attnets'
if cap(m.Attnets) == 0 {
m.Attnets = make([]byte, 0, len(buf[8:16]))
}
m.Attnets = append(m.Attnets, buf[8:16]...)
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the MetaData object
func (m *MetaData) SizeSSZ() (size int) {
size = 16
return
}
// HashTreeRoot ssz hashes the MetaData object
func (m *MetaData) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(m)
}
// HashTreeRootWith ssz hashes the MetaData object with a hasher
func (m *MetaData) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'SeqNumber'
hh.PutUint64(m.SeqNumber)
// Field (1) 'Attnets'
if len(m.Attnets) != 8 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(m.Attnets)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the BeaconState object
func (b *BeaconState) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(b)
@@ -1493,6 +953,10 @@ func (p *PendingAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'AggregationBits'
if len(p.AggregationBits) == 0 {
err = ssz.ErrEmptyBitlist
return
}
hh.PutBitlist(p.AggregationBits, 2048)
// Field (1) 'Data'
@@ -1793,3 +1257,438 @@ func (f *ForkData) HashTreeRootWith(hh *ssz.Hasher) (err error) {
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the Status object
func (s *Status) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(s)
}
// MarshalSSZTo ssz marshals the Status object to a target array
func (s *Status) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'ForkDigest'
if len(s.ForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, s.ForkDigest...)
// Field (1) 'FinalizedRoot'
if len(s.FinalizedRoot) != 32 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, s.FinalizedRoot...)
// Field (2) 'FinalizedEpoch'
dst = ssz.MarshalUint64(dst, s.FinalizedEpoch)
// Field (3) 'HeadRoot'
if len(s.HeadRoot) != 32 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, s.HeadRoot...)
// Field (4) 'HeadSlot'
dst = ssz.MarshalUint64(dst, s.HeadSlot)
return
}
// UnmarshalSSZ ssz unmarshals the Status object
func (s *Status) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 84 {
return ssz.ErrSize
}
// Field (0) 'ForkDigest'
if cap(s.ForkDigest) == 0 {
s.ForkDigest = make([]byte, 0, len(buf[0:4]))
}
s.ForkDigest = append(s.ForkDigest, buf[0:4]...)
// Field (1) 'FinalizedRoot'
if cap(s.FinalizedRoot) == 0 {
s.FinalizedRoot = make([]byte, 0, len(buf[4:36]))
}
s.FinalizedRoot = append(s.FinalizedRoot, buf[4:36]...)
// Field (2) 'FinalizedEpoch'
s.FinalizedEpoch = ssz.UnmarshallUint64(buf[36:44])
// Field (3) 'HeadRoot'
if cap(s.HeadRoot) == 0 {
s.HeadRoot = make([]byte, 0, len(buf[44:76]))
}
s.HeadRoot = append(s.HeadRoot, buf[44:76]...)
// Field (4) 'HeadSlot'
s.HeadSlot = ssz.UnmarshallUint64(buf[76:84])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the Status object
func (s *Status) SizeSSZ() (size int) {
size = 84
return
}
// HashTreeRoot ssz hashes the Status object
func (s *Status) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(s)
}
// HashTreeRootWith ssz hashes the Status object with a hasher
func (s *Status) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'ForkDigest'
if len(s.ForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(s.ForkDigest)
// Field (1) 'FinalizedRoot'
if len(s.FinalizedRoot) != 32 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(s.FinalizedRoot)
// Field (2) 'FinalizedEpoch'
hh.PutUint64(s.FinalizedEpoch)
// Field (3) 'HeadRoot'
if len(s.HeadRoot) != 32 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(s.HeadRoot)
// Field (4) 'HeadSlot'
hh.PutUint64(s.HeadSlot)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(b)
}
// MarshalSSZTo ssz marshals the BeaconBlocksByRangeRequest object to a target array
func (b *BeaconBlocksByRangeRequest) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'StartSlot'
dst = ssz.MarshalUint64(dst, b.StartSlot)
// Field (1) 'Count'
dst = ssz.MarshalUint64(dst, b.Count)
// Field (2) 'Step'
dst = ssz.MarshalUint64(dst, b.Step)
return
}
// UnmarshalSSZ ssz unmarshals the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 24 {
return ssz.ErrSize
}
// Field (0) 'StartSlot'
b.StartSlot = ssz.UnmarshallUint64(buf[0:8])
// Field (1) 'Count'
b.Count = ssz.UnmarshallUint64(buf[8:16])
// Field (2) 'Step'
b.Step = ssz.UnmarshallUint64(buf[16:24])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) SizeSSZ() (size int) {
size = 24
return
}
// HashTreeRoot ssz hashes the BeaconBlocksByRangeRequest object
func (b *BeaconBlocksByRangeRequest) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(b)
}
// HashTreeRootWith ssz hashes the BeaconBlocksByRangeRequest object with a hasher
func (b *BeaconBlocksByRangeRequest) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'StartSlot'
hh.PutUint64(b.StartSlot)
// Field (1) 'Count'
hh.PutUint64(b.Count)
// Field (2) 'Step'
hh.PutUint64(b.Step)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the ErrorResponse object
func (e *ErrorResponse) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(e)
}
// MarshalSSZTo ssz marshals the ErrorResponse object to a target array
func (e *ErrorResponse) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
offset := int(4)
// Offset (0) 'Message'
dst = ssz.WriteOffset(dst, offset)
offset += len(e.Message)
// Field (0) 'Message'
if len(e.Message) > 256 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, e.Message...)
return
}
// UnmarshalSSZ ssz unmarshals the ErrorResponse object
func (e *ErrorResponse) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size < 4 {
return ssz.ErrSize
}
tail := buf
var o0 uint64
// Offset (0) 'Message'
if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
return ssz.ErrOffset
}
// Field (0) 'Message'
{
buf = tail[o0:]
if len(buf) > 256 {
return ssz.ErrBytesLength
}
if cap(e.Message) == 0 {
e.Message = make([]byte, 0, len(buf))
}
e.Message = append(e.Message, buf...)
}
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the ErrorResponse object
func (e *ErrorResponse) SizeSSZ() (size int) {
size = 4
// Field (0) 'Message'
size += len(e.Message)
return
}
// HashTreeRoot ssz hashes the ErrorResponse object
func (e *ErrorResponse) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(e)
}
// HashTreeRootWith ssz hashes the ErrorResponse object with a hasher
func (e *ErrorResponse) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'Message'
if len(e.Message) > 256 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(e.Message)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the ENRForkID object
func (e *ENRForkID) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(e)
}
// MarshalSSZTo ssz marshals the ENRForkID object to a target array
func (e *ENRForkID) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'CurrentForkDigest'
if len(e.CurrentForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, e.CurrentForkDigest...)
// Field (1) 'NextForkVersion'
if len(e.NextForkVersion) != 4 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, e.NextForkVersion...)
// Field (2) 'NextForkEpoch'
dst = ssz.MarshalUint64(dst, e.NextForkEpoch)
return
}
// UnmarshalSSZ ssz unmarshals the ENRForkID object
func (e *ENRForkID) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 16 {
return ssz.ErrSize
}
// Field (0) 'CurrentForkDigest'
if cap(e.CurrentForkDigest) == 0 {
e.CurrentForkDigest = make([]byte, 0, len(buf[0:4]))
}
e.CurrentForkDigest = append(e.CurrentForkDigest, buf[0:4]...)
// Field (1) 'NextForkVersion'
if cap(e.NextForkVersion) == 0 {
e.NextForkVersion = make([]byte, 0, len(buf[4:8]))
}
e.NextForkVersion = append(e.NextForkVersion, buf[4:8]...)
// Field (2) 'NextForkEpoch'
e.NextForkEpoch = ssz.UnmarshallUint64(buf[8:16])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the ENRForkID object
func (e *ENRForkID) SizeSSZ() (size int) {
size = 16
return
}
// HashTreeRoot ssz hashes the ENRForkID object
func (e *ENRForkID) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(e)
}
// HashTreeRootWith ssz hashes the ENRForkID object with a hasher
func (e *ENRForkID) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'CurrentForkDigest'
if len(e.CurrentForkDigest) != 4 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(e.CurrentForkDigest)
// Field (1) 'NextForkVersion'
if len(e.NextForkVersion) != 4 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(e.NextForkVersion)
// Field (2) 'NextForkEpoch'
hh.PutUint64(e.NextForkEpoch)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the MetaData object
func (m *MetaData) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(m)
}
// MarshalSSZTo ssz marshals the MetaData object to a target array
func (m *MetaData) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'SeqNumber'
dst = ssz.MarshalUint64(dst, m.SeqNumber)
// Field (1) 'Attnets'
if len(m.Attnets) != 8 {
err = ssz.ErrBytesLength
return
}
dst = append(dst, m.Attnets...)
return
}
// UnmarshalSSZ ssz unmarshals the MetaData object
func (m *MetaData) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 16 {
return ssz.ErrSize
}
// Field (0) 'SeqNumber'
m.SeqNumber = ssz.UnmarshallUint64(buf[0:8])
// Field (1) 'Attnets'
if cap(m.Attnets) == 0 {
m.Attnets = make([]byte, 0, len(buf[8:16]))
}
m.Attnets = append(m.Attnets, buf[8:16]...)
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the MetaData object
func (m *MetaData) SizeSSZ() (size int) {
size = 16
return
}
// HashTreeRoot ssz hashes the MetaData object
func (m *MetaData) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(m)
}
// HashTreeRootWith ssz hashes the MetaData object with a hasher
func (m *MetaData) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'SeqNumber'
hh.PutUint64(m.SeqNumber)
// Field (1) 'Attnets'
if len(m.Attnets) != 8 {
err = ssz.ErrBytesLength
return
}
hh.PutBytes(m.Attnets)
hh.Merkleize(indx)
return
}

View File

@@ -166,53 +166,6 @@ func (m *BeaconBlocksByRangeRequest) GetStep() uint64 {
return 0
}
type BeaconBlocksByRootRequest struct {
BlockRoots [][]byte `protobuf:"bytes,1,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"?,32" ssz-max:"1024"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BeaconBlocksByRootRequest) Reset() { *m = BeaconBlocksByRootRequest{} }
func (m *BeaconBlocksByRootRequest) String() string { return proto.CompactTextString(m) }
func (*BeaconBlocksByRootRequest) ProtoMessage() {}
func (*BeaconBlocksByRootRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{2}
}
func (m *BeaconBlocksByRootRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BeaconBlocksByRootRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BeaconBlocksByRootRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BeaconBlocksByRootRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BeaconBlocksByRootRequest.Merge(m, src)
}
func (m *BeaconBlocksByRootRequest) XXX_Size() int {
return m.Size()
}
func (m *BeaconBlocksByRootRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BeaconBlocksByRootRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BeaconBlocksByRootRequest proto.InternalMessageInfo
func (m *BeaconBlocksByRootRequest) GetBlockRoots() [][]byte {
if m != nil {
return m.BlockRoots
}
return nil
}
type ErrorResponse struct {
Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty" ssz-max:"256"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -224,7 +177,7 @@ func (m *ErrorResponse) Reset() { *m = ErrorResponse{} }
func (m *ErrorResponse) String() string { return proto.CompactTextString(m) }
func (*ErrorResponse) ProtoMessage() {}
func (*ErrorResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{3}
return fileDescriptor_a1d590cda035b632, []int{2}
}
func (m *ErrorResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -273,7 +226,7 @@ func (m *ENRForkID) Reset() { *m = ENRForkID{} }
func (m *ENRForkID) String() string { return proto.CompactTextString(m) }
func (*ENRForkID) ProtoMessage() {}
func (*ENRForkID) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{4}
return fileDescriptor_a1d590cda035b632, []int{3}
}
func (m *ENRForkID) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -335,7 +288,7 @@ func (m *MetaData) Reset() { *m = MetaData{} }
func (m *MetaData) String() string { return proto.CompactTextString(m) }
func (*MetaData) ProtoMessage() {}
func (*MetaData) Descriptor() ([]byte, []int) {
return fileDescriptor_a1d590cda035b632, []int{5}
return fileDescriptor_a1d590cda035b632, []int{4}
}
func (m *MetaData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -381,7 +334,6 @@ func (m *MetaData) GetAttnets() github_com_prysmaticlabs_go_bitfield.Bitvector64
func init() {
proto.RegisterType((*Status)(nil), "ethereum.beacon.p2p.v1.Status")
proto.RegisterType((*BeaconBlocksByRangeRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlocksByRangeRequest")
proto.RegisterType((*BeaconBlocksByRootRequest)(nil), "ethereum.beacon.p2p.v1.BeaconBlocksByRootRequest")
proto.RegisterType((*ErrorResponse)(nil), "ethereum.beacon.p2p.v1.ErrorResponse")
proto.RegisterType((*ENRForkID)(nil), "ethereum.beacon.p2p.v1.ENRForkID")
proto.RegisterType((*MetaData)(nil), "ethereum.beacon.p2p.v1.MetaData")
@@ -392,43 +344,40 @@ func init() {
}
var fileDescriptor_a1d590cda035b632 = []byte{
// 576 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcd, 0x6e, 0xd3, 0x4c,
0x14, 0x86, 0xe5, 0xaf, 0xe9, 0xdf, 0x34, 0xf9, 0x4a, 0x07, 0x84, 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cf, 0x94, 0x82, 0x04, 0x07, 0xff, 0x93, 0x4e, 0xbd, 0x84, 0x2f, 0x37, 0x21,
0x5d, 0x90, 0x7a, 0x02, 0x37, 0xa5, 0x7c, 0x06, 0x4a, 0x87, 0x32, 0x29, 0x73, 0xfa, 0x5b, 0x5f,
0xcb, 0xd1, 0x5c, 0xfc, 0xa9, 0x00, 0xe9, 0x2b, 0x52, 0xdb, 0xa8, 0xef, 0x07, 0x55, 0x5d, 0x91,
0x26, 0x27, 0xf6, 0xc5, 0x22, 0xbb, 0x1f, 0x01, 0x45, 0x4f, 0xa0, 0x30, 0x9b, 0x84, 0xe9, 0x20,
0xc9, 0x62, 0x0f, 0xd4, 0x7a, 0x93, 0x30, 0xbd, 0x32, 0x05, 0xfa, 0x99, 0xec, 0x08, 0xc4, 0x04,
0x50, 0x97, 0x7d, 0xf4, 0xfe, 0xec, 0xe3, 0x8c, 0xfd, 0x5a, 0xb4, 0xde, 0xde, 0xfb, 0xc8, 0xa9,
0xba, 0xd5, 0xb1, 0xc0, 0xd0, 0x8f, 0x84, 0xa7, 0x9d, 0x40, 0xb6, 0xbd, 0x10, 0x47, 0x21, 0x44,
0x43, 0xdb, 0x0d, 0x71, 0x06, 0x3e, 0x4a, 0x75, 0x7a, 0xc2, 0x57, 0xa6, 0xee, 0xfe, 0xb7, 0x65,
0xd3, 0xfa, 0xbe, 0x6c, 0x5a, 0x3f, 0x96, 0x4d, 0xcb, 0xdb, 0x36, 0x3f, 0xfd, 0xf8, 0x77, 0x00,
0x00, 0x00, 0xff, 0xff, 0x6d, 0xdc, 0x81, 0x9b, 0x56, 0x03, 0x00, 0x00,
}
func (m *Status) Marshal() (dAtA []byte, err error) {
@@ -531,42 +480,6 @@ func (m *BeaconBlocksByRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, err
return len(dAtA) - i, nil
}
func (m *BeaconBlocksByRootRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BeaconBlocksByRootRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *BeaconBlocksByRootRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.BlockRoots) > 0 {
for iNdEx := len(m.BlockRoots) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.BlockRoots[iNdEx])
copy(dAtA[i:], m.BlockRoots[iNdEx])
i = encodeVarintMessages(dAtA, i, uint64(len(m.BlockRoots[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *ErrorResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -748,24 +661,6 @@ func (m *BeaconBlocksByRangeRequest) Size() (n int) {
return n
}
func (m *BeaconBlocksByRootRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.BlockRoots) > 0 {
for _, b := range m.BlockRoots {
l = len(b)
n += 1 + l + sovMessages(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ErrorResponse) Size() (n int) {
if m == nil {
return 0
@@ -1135,92 +1030,6 @@ func (m *BeaconBlocksByRangeRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *BeaconBlocksByRootRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessages
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: BeaconBlocksByRootRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BeaconBlocksByRootRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BlockRoots", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessages
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthMessages
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthMessages
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.BlockRoots = append(m.BlockRoots, make([]byte, postIndex-iNdEx))
copy(m.BlockRoots[len(m.BlockRoots)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMessages(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMessages
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthMessages
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ErrorResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0

View File

@@ -17,10 +17,6 @@ message BeaconBlocksByRangeRequest {
uint64 count = 2;
uint64 step = 3;
}
// Deprecated: Will eventually be removed is only kept around for backward compatibility.
message BeaconBlocksByRootRequest {
repeated bytes block_roots = 1 [(gogoproto.moretags) = "ssz-size:\"?,32\" ssz-max:\"1024\""];
}
message ErrorResponse {
bytes message = 1 [(gogoproto.moretags) = "ssz-max:\"256\""];