mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
using upstream fastssz with altair fixes (#9542)
* using upstream fastssz with altair fixes * update generated ssz code Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
4
deps.bzl
4
deps.bzl
@@ -825,8 +825,8 @@ def prysm_deps():
|
||||
name = "com_github_ferranbt_fastssz",
|
||||
importpath = "github.com/ferranbt/fastssz",
|
||||
nofuzz = True,
|
||||
sum = "h1:R8HHtp9wrae6trZA2lgJtOhghKl16lWY4cG0l7hH8CM=",
|
||||
version = "v0.0.0-20210719200358-90640294cb9c",
|
||||
sum = "h1:6dVcS0LktRSyEEgldFY4N9J17WjUoiJStttH+RZj0Wo=",
|
||||
version = "v0.0.0-20210905181407-59cf6761a7d5",
|
||||
)
|
||||
|
||||
go_repository(
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// Code generated by fastssz. DO NOT EDIT.
|
||||
// Hash: b0b105d81609a8e5a77ef34c799063f12138f31507c5781512531b5387511926
|
||||
// Hash: d706f5f311b0f23294fc4b788d2f6a7ccd6fe644291047b6c6c08d115d07c680
|
||||
package fuzz
|
||||
|
||||
import (
|
||||
ssz "github.com/ferranbt/fastssz"
|
||||
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
statepb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
)
|
||||
|
||||
// MarshalSSZ ssz marshals the InputBlockWithPrestate object
|
||||
@@ -21,7 +20,7 @@ func (i *InputBlockWithPrestate) MarshalSSZTo(buf []byte) (dst []byte, err error
|
||||
// Offset (0) 'State'
|
||||
dst = ssz.WriteOffset(dst, offset)
|
||||
if i.State == nil {
|
||||
i.State = new(statepb.BeaconState)
|
||||
i.State = new(ethpb.BeaconState)
|
||||
}
|
||||
offset += i.State.SizeSSZ()
|
||||
|
||||
@@ -74,7 +73,7 @@ func (i *InputBlockWithPrestate) UnmarshalSSZ(buf []byte) error {
|
||||
{
|
||||
buf = tail[o0:o1]
|
||||
if i.State == nil {
|
||||
i.State = new(statepb.BeaconState)
|
||||
i.State = new(ethpb.BeaconState)
|
||||
}
|
||||
if err = i.State.UnmarshalSSZ(buf); err != nil {
|
||||
return err
|
||||
@@ -100,7 +99,7 @@ func (i *InputBlockWithPrestate) SizeSSZ() (size int) {
|
||||
|
||||
// Field (0) 'State'
|
||||
if i.State == nil {
|
||||
i.State = new(statepb.BeaconState)
|
||||
i.State = new(ethpb.BeaconState)
|
||||
}
|
||||
size += i.State.SizeSSZ()
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@@ -19,7 +19,7 @@ require (
|
||||
github.com/emicklei/dot v0.11.0
|
||||
github.com/ethereum/go-ethereum v1.9.25
|
||||
github.com/fatih/color v1.9.0 // indirect
|
||||
github.com/ferranbt/fastssz v0.0.0-20210719200358-90640294cb9c
|
||||
github.com/ferranbt/fastssz v0.0.0-20210905181407-59cf6761a7d5
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@@ -267,8 +267,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
|
||||
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/ferranbt/fastssz v0.0.0-20210120143747-11b9eff30ea9/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
|
||||
github.com/ferranbt/fastssz v0.0.0-20210719200358-90640294cb9c h1:R8HHtp9wrae6trZA2lgJtOhghKl16lWY4cG0l7hH8CM=
|
||||
github.com/ferranbt/fastssz v0.0.0-20210719200358-90640294cb9c/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM=
|
||||
github.com/ferranbt/fastssz v0.0.0-20210905181407-59cf6761a7d5 h1:6dVcS0LktRSyEEgldFY4N9J17WjUoiJStttH+RZj0Wo=
|
||||
github.com/ferranbt/fastssz v0.0.0-20210905181407-59cf6761a7d5/go.mod h1:S8yiDeAXy8f88W4Ul+0dBMPx49S05byYbmZD6Uv94K4=
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by fastssz. DO NOT EDIT.
|
||||
// Hash: ccd00c4ea3e7548025f7d1d122d737f44048e5d147a6a95fc109138ad510329b
|
||||
// Hash: 2ef8662cd6bab2d476ca79b4a918b5f0177316ea961f47983c0976eb415e46aa
|
||||
package v1
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by fastssz. DO NOT EDIT.
|
||||
// Hash: 1ecd73ba246c1c2aebe49304b4c866ef93e39b7b2c3d94f4a673932fbabde479
|
||||
// Hash: c73c221c909430e49bd5b4bc72e72ff54596cc34e5b869bda04c4adfa5884321
|
||||
package eth
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by fastssz. DO NOT EDIT.
|
||||
// Hash: 896433aea7178190969a79e91ec8eb730c156c16958391df72ffdd99149ad7e0
|
||||
// Hash: 185d8107f2685f571ffa9c3a37f5481bd6c4861503030c71fad71950af93a6f7
|
||||
package eth
|
||||
|
||||
import (
|
||||
@@ -5246,7 +5246,7 @@ func (s *SyncCommittee) HashTreeRootWith(hh *ssz.Hasher) (err error) {
|
||||
err = ssz.ErrBytesLength
|
||||
return
|
||||
}
|
||||
hh.Append(i)
|
||||
hh.PutBytes(i)
|
||||
}
|
||||
hh.Merkleize(subIndx)
|
||||
}
|
||||
|
||||
@@ -161,8 +161,7 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "SyncAggregatorSelectionData":
|
||||
obj = ðpb.SyncAggregatorSelectionData{}
|
||||
case "SyncCommittee":
|
||||
t.Skip("TODO(8638): fssz bug, using custom HTR so state works")
|
||||
return nil, nil
|
||||
obj = ðpb.SyncCommittee{}
|
||||
case "LightClientSnapshot":
|
||||
t.Skip("not a beacon node type, this is a light node type")
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user