update codegen dep and cleanup organization (#14127)

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
This commit is contained in:
kasey
2024-06-20 18:33:54 -05:00
committed by GitHub
parent 305d5850e7
commit 8cd249c1c8
25 changed files with 20153 additions and 21551 deletions

View File

@@ -69,7 +69,6 @@ go_library(
"@com_github_gorilla_mux//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_prometheus_client_golang//prometheus:go_default_library",
"@com_github_prysmaticlabs_fastssz//:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
],

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"github.com/ethereum/go-ethereum/common"
fastssz "github.com/prysmaticlabs/fastssz"
"github.com/prysmaticlabs/prysm/v5/cmd"
"github.com/prysmaticlabs/prysm/v5/cmd/beacon-chain/flags"
"github.com/prysmaticlabs/prysm/v5/config/params"
@@ -197,7 +196,3 @@ func configureExecutionSetting(cliCtx *cli.Context) error {
" Default fee recipient will be used as a fall back", checksumAddress.Hex())
return params.SetActive(c)
}
func configureFastSSZHashingAlgorithm() {
fastssz.EnableVectorizedHTR = true
}

View File

@@ -277,8 +277,6 @@ func configureBeacon(cliCtx *cli.Context) error {
return errors.Wrap(err, "could not configure execution setting")
}
configureFastSSZHashingAlgorithm()
return nil
}

View File

@@ -2973,8 +2973,8 @@ def prysm_deps():
go_repository(
name = "com_github_prysmaticlabs_fastssz",
importpath = "github.com/prysmaticlabs/fastssz",
sum = "h1:c3p3UzV4vFA7xaCDphnDWOjpxcadrQ26l5b+ypsvyxo=",
version = "v0.0.0-20221107182844-78142813af44",
sum = "h1:0LZAwwHnsZFfXm4IK4rzFV4N5IVSKZKLmuBMA4kAlFk=",
version = "v0.0.0-20240620202422-a981b8ef89d3",
)
go_repository(
name = "com_github_prysmaticlabs_go_bitfield",

2
go.mod
View File

@@ -65,7 +65,7 @@ require (
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
github.com/prometheus/prom2json v1.3.0
github.com/prysmaticlabs/fastssz v0.0.0-20221107182844-78142813af44
github.com/prysmaticlabs/fastssz v0.0.0-20240620202422-a981b8ef89d3
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e
github.com/prysmaticlabs/prombbolt v0.0.0-20210126082820-9b7adba6db7c
github.com/prysmaticlabs/protoc-gen-go-cast v0.0.0-20230228205207-28762a7b9294

4
go.sum
View File

@@ -966,8 +966,8 @@ github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3c
github.com/prometheus/prom2json v1.3.0 h1:BlqrtbT9lLH3ZsOVhXPsHzFrApCTKRifB7gjJuypu6Y=
github.com/prometheus/prom2json v1.3.0/go.mod h1:rMN7m0ApCowcoDlypBHlkNbp5eJQf/+1isKykIP5ZnM=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/prysmaticlabs/fastssz v0.0.0-20221107182844-78142813af44 h1:c3p3UzV4vFA7xaCDphnDWOjpxcadrQ26l5b+ypsvyxo=
github.com/prysmaticlabs/fastssz v0.0.0-20221107182844-78142813af44/go.mod h1:MA5zShstUwCQaE9faGHgCGvEWUbG87p4SAXINhmCkvg=
github.com/prysmaticlabs/fastssz v0.0.0-20240620202422-a981b8ef89d3 h1:0LZAwwHnsZFfXm4IK4rzFV4N5IVSKZKLmuBMA4kAlFk=
github.com/prysmaticlabs/fastssz v0.0.0-20240620202422-a981b8ef89d3/go.mod h1:h2OlIZD/M6wFvV3YMZbW16lFgh3Rsye00G44J2cwLyU=
github.com/prysmaticlabs/go-bitfield v0.0.0-20210108222456-8e92c3709aa0/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e h1:ATgOe+abbzfx9kCPeXIW4fiWyDdxlwHw07j8UGhdTd4=
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e/go.mod h1:wmuf/mdK4VMD+jA9ThwcUKjg3a2XWM9cVfFYjDyY4j4=

View File

@@ -152,7 +152,7 @@
"external/.*": "Third party code",
"rules_go_work-.*": "Third party code",
".*\\.pb.*.go": "Generated code is ok",
".*generated\\.ssz\\.go": "Generated code is ok"
".*\\.ssz\\.go": "Generated code is ok"
}
},
"properpermissions": {
@@ -180,7 +180,7 @@
"external/.*": "Third party code",
"rules_go_work-.*": "Third party code",
".*\\.pb.*.go": "Generated code is ok",
".*generated\\.ssz\\.go": "Generated code is ok",
".*\\.ssz\\.go": "Generated code is ok",
".*_test\\.go": "Tests are ok (for now)",
"tools/analyzers/ineffassign/ineffassign\\.go": "3rd party code with a massive switch statement"
}

View File

@@ -31,6 +31,7 @@ proto_library(
ssz_gen_marshal(
name = "ssz_generated_files",
go_proto = ":go_proto",
out = "engine.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
],

View File

@@ -190,7 +190,7 @@ func (e *ExecutionPayload) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 508 {
if o10 != 508 {
return ssz.ErrInvalidVariableOffset
}
@@ -336,11 +336,7 @@ func (e *ExecutionPayload) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -374,25 +370,13 @@ func (e *ExecutionPayload) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.AppendBytes32(elem)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (1073741824+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 1048576)
} else {
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -594,7 +578,7 @@ func (e *ExecutionPayloadCapella) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 512 {
if o10 != 512 {
return ssz.ErrInvalidVariableOffset
}
@@ -766,11 +750,7 @@ func (e *ExecutionPayloadCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -804,18 +784,10 @@ func (e *ExecutionPayloadCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.AppendBytes32(elem)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (1073741824+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 1048576)
} else {
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
// Field (14) 'Withdrawals'
@@ -831,18 +803,10 @@ func (e *ExecutionPayloadCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1050,7 +1014,7 @@ func (e *ExecutionPayloadDeneb) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 528 {
if o10 != 528 {
return ssz.ErrInvalidVariableOffset
}
@@ -1228,11 +1192,7 @@ func (e *ExecutionPayloadDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -1266,18 +1226,10 @@ func (e *ExecutionPayloadDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.AppendBytes32(elem)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (1073741824+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 1048576)
} else {
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
// Field (14) 'Withdrawals'
@@ -1293,11 +1245,7 @@ func (e *ExecutionPayloadDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
// Field (15) 'BlobGasUsed'
@@ -1306,11 +1254,7 @@ func (e *ExecutionPayloadDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (16) 'ExcessBlobGas'
hh.PutUint64(e.ExcessBlobGas)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1548,7 +1492,7 @@ func (e *ExecutionPayloadElectra) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 536 {
if o10 != 536 {
return ssz.ErrInvalidVariableOffset
}
@@ -1778,11 +1722,7 @@ func (e *ExecutionPayloadElectra) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -1816,18 +1756,10 @@ func (e *ExecutionPayloadElectra) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.AppendBytes32(elem)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (1073741824+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32)
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 1048576)
} else {
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
hh.MerkleizeWithMixin(subIndx, num, 1048576)
}
// Field (14) 'Withdrawals'
@@ -1843,11 +1775,7 @@ func (e *ExecutionPayloadElectra) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
// Field (15) 'BlobGasUsed'
@@ -1869,11 +1797,7 @@ func (e *ExecutionPayloadElectra) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 8192)
} else {
hh.MerkleizeWithMixin(subIndx, num, 8192)
}
hh.MerkleizeWithMixin(subIndx, num, 8192)
}
// Field (18) 'WithdrawalRequests'
@@ -1889,18 +1813,10 @@ func (e *ExecutionPayloadElectra) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2067,7 +1983,7 @@ func (e *ExecutionPayloadHeader) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 536 {
if o10 != 536 {
return ssz.ErrInvalidVariableOffset
}
@@ -2185,11 +2101,7 @@ func (e *ExecutionPayloadHeader) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -2213,11 +2125,7 @@ func (e *ExecutionPayloadHeader) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(e.TransactionsRoot)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2391,7 +2299,7 @@ func (e *ExecutionPayloadHeaderCapella) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 568 {
if o10 != 568 {
return ssz.ErrInvalidVariableOffset
}
@@ -2515,11 +2423,7 @@ func (e *ExecutionPayloadHeaderCapella) HashTreeRootWith(hh *ssz.Hasher) (err er
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -2550,11 +2454,7 @@ func (e *ExecutionPayloadHeaderCapella) HashTreeRootWith(hh *ssz.Hasher) (err er
}
hh.PutBytes(e.WithdrawalsRoot)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2734,7 +2634,7 @@ func (e *ExecutionPayloadHeaderDeneb) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 584 {
if o10 != 584 {
return ssz.ErrInvalidVariableOffset
}
@@ -2864,11 +2764,7 @@ func (e *ExecutionPayloadHeaderDeneb) HashTreeRootWith(hh *ssz.Hasher) (err erro
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -2905,11 +2801,7 @@ func (e *ExecutionPayloadHeaderDeneb) HashTreeRootWith(hh *ssz.Hasher) (err erro
// Field (16) 'ExcessBlobGas'
hh.PutUint64(e.ExcessBlobGas)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -3103,7 +2995,7 @@ func (e *ExecutionPayloadHeaderElectra) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o10 < 648 {
if o10 != 648 {
return ssz.ErrInvalidVariableOffset
}
@@ -3245,11 +3137,7 @@ func (e *ExecutionPayloadHeaderElectra) HashTreeRootWith(hh *ssz.Hasher) (err er
return
}
hh.PutBytes(e.ExtraData)
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(elemIndx, byteLen, (32+31)/32)
} else {
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
hh.MerkleizeWithMixin(elemIndx, byteLen, (32+31)/32)
}
// Field (11) 'BaseFeePerGas'
@@ -3300,11 +3188,7 @@ func (e *ExecutionPayloadHeaderElectra) HashTreeRootWith(hh *ssz.Hasher) (err er
}
hh.PutBytes(e.WithdrawalRequestsRoot)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -3393,11 +3277,7 @@ func (w *Withdrawal) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (3) 'Amount'
hh.PutUint64(w.Amount)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -3481,7 +3361,7 @@ func (b *BlobsBundle) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o0 < 12 {
if o0 != 12 {
return ssz.ErrInvalidVariableOffset
}
@@ -3586,11 +3466,7 @@ func (b *BlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
numItems := uint64(len(b.KzgCommitments))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4096)
} else {
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
// Field (1) 'Proofs'
@@ -3609,11 +3485,7 @@ func (b *BlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
numItems := uint64(len(b.Proofs))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4096)
} else {
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
// Field (2) 'Blobs'
@@ -3632,18 +3504,10 @@ func (b *BlobsBundle) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
numItems := uint64(len(b.Blobs))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, 4096)
} else {
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
hh.MerkleizeWithMixin(subIndx, numItems, 4096)
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -3734,11 +3598,7 @@ func (w *WithdrawalRequest) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (2) 'Amount'
hh.PutUint64(w.Amount)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -3858,10 +3718,6 @@ func (d *DepositRequest) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (4) 'Index'
hh.PutUint64(d.Index)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}

View File

@@ -35,6 +35,7 @@ load("//tools:ssz.bzl", "SSZ_DEPS", "ssz_gen_marshal")
ssz_gen_marshal(
name = "ssz_generated_files",
go_proto = ":go_proto",
out = "gateway.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",

View File

@@ -1,5 +1,5 @@
// Code generated by fastssz. DO NOT EDIT.
// Hash: d06a72227c2f5e350916cce3e89f4e855135a2a22f6ea263dedc68fa506c1ba7
// Hash: 2874e1dadeb47411763f48fe31e5daaa91ac663e796933d9a508c2e7be94fa5e
package v1
import (
@@ -62,7 +62,7 @@ func (a *Attestation) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o0 < 228 {
if o0 != 228 {
return ssz.ErrInvalidVariableOffset
}
@@ -132,11 +132,7 @@ func (a *Attestation) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(a.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -194,7 +190,7 @@ func (a *AggregateAttestationAndProof) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o1 < 108 {
if o1 != 108 {
return ssz.ErrInvalidVariableOffset
}
@@ -254,11 +250,7 @@ func (a *AggregateAttestationAndProof) HashTreeRootWith(hh *ssz.Hasher) (err err
}
hh.PutBytes(a.SelectionProof)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -310,7 +302,7 @@ func (s *SignedAggregateAttestationAndProof) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o0 < 100 {
if o0 != 100 {
return ssz.ErrInvalidVariableOffset
}
@@ -367,11 +359,7 @@ func (s *SignedAggregateAttestationAndProof) HashTreeRootWith(hh *ssz.Hasher) (e
}
hh.PutBytes(s.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -493,11 +481,7 @@ func (a *AttestationData) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -568,11 +552,7 @@ func (c *Checkpoint) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(c.Root)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -655,7 +635,7 @@ func (b *BeaconBlock) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o4 < 84 {
if o4 != 84 {
return ssz.ErrInvalidVariableOffset
}
@@ -719,11 +699,7 @@ func (b *BeaconBlock) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -775,7 +751,7 @@ func (s *SignedBeaconBlock) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o0 < 100 {
if o0 != 100 {
return ssz.ErrInvalidVariableOffset
}
@@ -832,11 +808,7 @@ func (s *SignedBeaconBlock) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(s.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1006,7 +978,7 @@ func (b *BeaconBlockBody) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o3 < 220 {
if o3 != 220 {
return ssz.ErrInvalidVariableOffset
}
@@ -1199,11 +1171,7 @@ func (b *BeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
// Field (4) 'AttesterSlashings'
@@ -1219,11 +1187,7 @@ func (b *BeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 2)
} else {
hh.MerkleizeWithMixin(subIndx, num, 2)
}
hh.MerkleizeWithMixin(subIndx, num, 2)
}
// Field (5) 'Attestations'
@@ -1239,11 +1203,7 @@ func (b *BeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 128)
} else {
hh.MerkleizeWithMixin(subIndx, num, 128)
}
hh.MerkleizeWithMixin(subIndx, num, 128)
}
// Field (6) 'Deposits'
@@ -1259,11 +1219,7 @@ func (b *BeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
// Field (7) 'VoluntaryExits'
@@ -1279,18 +1235,10 @@ func (b *BeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, num, 16)
} else {
hh.MerkleizeWithMixin(subIndx, num, 16)
}
hh.MerkleizeWithMixin(subIndx, num, 16)
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1374,11 +1322,7 @@ func (p *ProposerSlashing) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1435,7 +1379,7 @@ func (a *AttesterSlashing) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o0 < 8 {
if o0 != 8 {
return ssz.ErrInvalidVariableOffset
}
@@ -1506,11 +1450,7 @@ func (a *AttesterSlashing) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1604,12 +1544,7 @@ func (d *Deposit) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.Append(i)
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(subIndx)
} else {
hh.Merkleize(subIndx)
}
hh.Merkleize(subIndx)
}
// Field (1) 'Data'
@@ -1617,11 +1552,7 @@ func (d *Deposit) HashTreeRootWith(hh *ssz.Hasher) (err error) {
return
}
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1681,11 +1612,7 @@ func (v *VoluntaryExit) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (1) 'ValidatorIndex'
hh.PutUint64(uint64(v.ValidatorIndex))
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1768,11 +1695,7 @@ func (s *SignedVoluntaryExit) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(s.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1863,11 +1786,7 @@ func (e *Eth1Data) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(e.BlockHash)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -1987,11 +1906,7 @@ func (b *BeaconBlockHeader) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(b.BodyRoot)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2074,11 +1989,7 @@ func (s *SignedBeaconBlockHeader) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(s.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2139,7 +2050,7 @@ func (i *IndexedAttestation) UnmarshalSSZ(buf []byte) error {
return ssz.ErrOffset
}
if o0 < 228 {
if o0 != 228 {
return ssz.ErrInvalidVariableOffset
}
@@ -2204,11 +2115,7 @@ func (i *IndexedAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) {
hh.FillUpTo32()
numItems := uint64(len(i.AttestingIndices))
if ssz.EnableVectorizedHTR {
hh.MerkleizeWithMixinVectorizedHTR(subIndx, numItems, ssz.CalculateLimit(2048, numItems, 8))
} else {
hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(2048, numItems, 8))
}
hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(2048, numItems, 8))
}
// Field (1) 'Data'
@@ -2223,11 +2130,7 @@ func (i *IndexedAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(i.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2309,11 +2212,7 @@ func (s *SyncAggregate) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(s.SyncCommitteeSignature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2424,11 +2323,7 @@ func (d *Deposit_Data) HashTreeRootWith(hh *ssz.Hasher) (err error) {
}
hh.PutBytes(d.Signature)
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}
@@ -2564,10 +2459,6 @@ func (v *Validator) HashTreeRootWith(hh *ssz.Hasher) (err error) {
// Field (7) 'WithdrawableEpoch'
hh.PutUint64(uint64(v.WithdrawableEpoch))
if ssz.EnableVectorizedHTR {
hh.MerkleizeVectorizedHTR(indx)
} else {
hh.Merkleize(indx)
}
hh.Merkleize(indx)
return
}

View File

@@ -31,6 +31,7 @@ load("//tools:ssz.bzl", "SSZ_DEPS", "ssz_gen_marshal")
ssz_gen_marshal(
name = "ssz_generated_files",
go_proto = ":go_proto",
out = "grpc.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",

File diff suppressed because it is too large Load Diff

View File

@@ -45,111 +45,211 @@ proto_library(
##############################################################################
# Go
##############################################################################
ssz_phase0_objs = [
"AggregateAttestationAndProof",
"Attestation",
"AttestationData",
"AttesterSlashing",
"BeaconBlock",
"BeaconBlockHeader",
"BeaconState",
"Checkpoint",
"Deposit",
"Deposit_Data",
"DepositMessage",
"ENRForkID",
"Eth1Data",
"Fork",
"ForkData",
"HistoricalBatch",
"IndexedAttestation",
"PowBlock",
"ProposerSlashing",
"SignedAggregateAttestationAndProof",
"SignedBeaconBlock",
"SignedBeaconBlockHeader",
"SignedVoluntaryExit",
"SigningData",
"Status",
"Status",
"Validator",
"VoluntaryExit",
]
ssz_altair_objs = [
"BeaconBlockAltair",
"BeaconBlockBodyAltair",
"BeaconStateAltair",
"ContributionAndProof",
"SignedBeaconBlockAltair",
"SignedContributionAndProof",
"SyncAggregate",
"SyncAggregate",
"SyncAggregatorSelectionData",
"SyncCommittee",
"SyncCommitteeContribution",
"SyncCommitteeMessage",
]
ssz_bellatrix_objs = [
"BeaconBlockBellatrix",
"BeaconBlockBodyBellatrix",
"BeaconStateBellatrix",
"BlindedBeaconBlockBellatrix",
"BlindedBeaconBlockBodyBellatrix",
"SignedBeaconBlockBellatrix",
"SignedBlindedBeaconBlockBellatrix",
]
ssz_capella_objs = [
"BLSToExecutionChange",
"BeaconBlockBodyCapella",
"BeaconBlockCapella",
"BeaconStateCapella",
"BlindedBeaconBlockBodyCapella",
"BlindedBeaconBlockCapella",
"BuilderBidCapella",
"HistoricalSummary",
"SignedBLSToExecutionChange",
"SignedBeaconBlockCapella",
"SignedBlindedBeaconBlockCapella",
"Withdrawal",
]
ssz_deneb_objs = [
"BeaconBlockBodyDeneb",
"BeaconBlockContentsDeneb",
"BeaconBlockDeneb",
"BeaconStateDeneb",
"BlindedBeaconBlockBodyDeneb",
"BlindedBeaconBlockDeneb",
"BlobIdentifier",
"BlobSidecar",
"BlobSidecars",
"BuilderBidDeneb",
"SignedBeaconBlockContentsDeneb",
"SignedBeaconBlockDeneb",
"SignedBlindedBeaconBlockDeneb",
]
ssz_electra_objs = [
"AggregateAttestationAndProofElectra",
"AttestationElectra",
"AttesterSlashingElectra",
"BeaconBlockElectra",
"BeaconBlockElectra",
"BeaconStateElectra",
"BlindedBeaconBlockBodyElectra",
"BlindedBeaconBlockElectra",
"Consolidation",
"IndexedAttestationElectra",
"PendingBalanceDeposit",
"PendingBalanceDeposits",
"PendingConsolidation",
"PendingPartialWithdrawal",
"SignedAggregateAttestationAndProofElectra",
"SignedBeaconBlockElectra",
"SignedBlindedBeaconBlockElectra",
"SignedConsolidation",
]
ssz_gen_marshal(
name = "ssz_generated_files",
name = "ssz_generated_phase0",
go_proto = ":go_proto",
out = "phase0.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = ssz_phase0_objs,
)
ssz_gen_marshal(
name = "ssz_generated_altair",
go_proto = ":go_proto",
out = "altair.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = ssz_altair_objs,
exclude_objs = ssz_phase0_objs,
)
ssz_gen_marshal(
name = "ssz_generated_bellatrix",
go_proto = ":go_proto",
out = "bellatrix.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = ssz_bellatrix_objs,
exclude_objs = ssz_phase0_objs + ssz_altair_objs,
)
ssz_gen_marshal(
name = "ssz_generated_capella",
go_proto = ":go_proto",
out = "capella.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = ssz_capella_objs,
exclude_objs = ssz_phase0_objs + ssz_altair_objs + ssz_bellatrix_objs,
)
ssz_gen_marshal(
name = "ssz_generated_deneb",
go_proto = ":go_proto",
out = "deneb.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = ssz_deneb_objs,
exclude_objs = ssz_phase0_objs + ssz_altair_objs + ssz_bellatrix_objs + ssz_capella_objs,
)
ssz_gen_marshal(
name = "ssz_generated_electra",
go_proto = ":go_proto",
out = "electra.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = ssz_electra_objs,
exclude_objs = ssz_phase0_objs + ssz_altair_objs + ssz_bellatrix_objs + ssz_capella_objs + ssz_deneb_objs,
)
ssz_gen_marshal(
name = "ssz_generated_non_core",
go_proto = ":go_proto",
out = "non-core.ssz.go",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//math:go_default_library",
],
objs = [
"BeaconBlockAltair",
"BeaconBlockBodyAltair",
"SignedBeaconBlockAltair",
"BeaconBlockBellatrix",
"BeaconBlockBodyBellatrix",
"SignedBeaconBlockBellatrix",
"SignedBlindedBeaconBlockBellatrix",
"BlindedBeaconBlockBellatrix",
"BlindedBeaconBlockBodyBellatrix",
"BeaconBlockCapella",
"BeaconBlockBodyCapella",
"SignedBeaconBlockCapella",
"BeaconBlockDeneb",
"BeaconBlockBodyDeneb",
"SignedBeaconBlockDeneb",
"BeaconBlockElectra",
"BeaconBlockElectra",
"SignedBeaconBlockElectra",
"SignedBlindedBeaconBlockCapella",
"BlindedBeaconBlockCapella",
"BlindedBeaconBlockBodyCapella",
"SignedBlindedBeaconBlockDeneb",
"BeaconBlockContentsDeneb",
"SignedBeaconBlockContentsDeneb",
"BlindedBeaconBlockDeneb",
"BlindedBeaconBlockBodyDeneb",
"SignedBlindedBeaconBlockElectra",
"BlindedBeaconBlockElectra",
"BlindedBeaconBlockBodyElectra",
"SyncAggregate",
"SyncCommitteeMessage",
"SyncCommitteeContribution",
"ContributionAndProof",
"SignedContributionAndProof",
"BeaconBlocksByRangeRequest",
"BlobSidecarsByRangeRequest",
"ENRForkID",
"MetaDataV0",
"MetaDataV1",
"Status",
"AggregateAttestationAndProof",
"AggregateAttestationAndProofElectra",
"Attestation",
"AttestationElectra",
"AttestationData",
"AttesterSlashing",
"AttesterSlashingElectra",
"BeaconBlock",
"BeaconBlockHeader",
"Checkpoint",
"Deposit",
"Eth1Data",
"IndexedAttestation",
"IndexedAttestationElectra",
"ProposerSlashing",
"SignedAggregateAttestationAndProof",
"SignedAggregateAttestationAndProofElectra",
"SignedBeaconBlock",
"SignedBeaconBlockHeader",
"SignedVoluntaryExit",
"Validator",
"VoluntaryExit",
"ContributionAndProof",
"SignedContributionAndProof",
"DepositMessage",
"Fork",
"ForkData",
"HistoricalBatch",
"Status",
"BeaconState",
"BeaconStateAltair",
"BeaconStateBellatrix",
"BeaconStateCapella",
"BeaconStateDeneb",
"BeaconStateElectra",
"SigningData",
"SyncCommittee",
"SyncAggregatorSelectionData",
"PowBlock",
"SignedValidatorRegistrationV1",
"ValidatorRegistrationV1",
"Withdrawal",
"BLSToExecutionChange",
"SignedBLSToExecutionChange",
"BuilderBid",
"BuilderBidCapella",
"BuilderBidDeneb",
"BlobSidecar",
"BlobSidecars",
"BlobIdentifier",
"DepositSnapshot",
"PendingBalanceDeposit",
"PendingPartialWithdrawal",
"Consolidation",
"SignedConsolidation",
"PendingConsolidation",
],
)
@@ -212,7 +312,13 @@ go_library(
"eip_7251.go",
"sync_committee_mainnet.go",
"sync_committee_minimal.go", # keep
":ssz_generated_files", # keep
":ssz_generated_non_core", # keep
":ssz_generated_phase0", # keep
":ssz_generated_altair", # keep
":ssz_generated_bellatrix", # keep
":ssz_generated_capella", # keep
":ssz_generated_deneb", # keep
":ssz_generated_electra", # keep
],
embed = [
":go_grpc_gateway_library",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,780 @@
// Code generated by fastssz. DO NOT EDIT.
// Hash: 9da8a498bd074553137a73197dadcae4d3b4239484f64bab4f0a734dce528d24
package eth
import (
ssz "github.com/prysmaticlabs/fastssz"
github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1"
)
// MarshalSSZ ssz marshals the ValidatorRegistrationV1 object
func (v *ValidatorRegistrationV1) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(v)
}
// MarshalSSZTo ssz marshals the ValidatorRegistrationV1 object to a target array
func (v *ValidatorRegistrationV1) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'FeeRecipient'
if size := len(v.FeeRecipient); size != 20 {
err = ssz.ErrBytesLengthFn("--.FeeRecipient", size, 20)
return
}
dst = append(dst, v.FeeRecipient...)
// Field (1) 'GasLimit'
dst = ssz.MarshalUint64(dst, v.GasLimit)
// Field (2) 'Timestamp'
dst = ssz.MarshalUint64(dst, v.Timestamp)
// Field (3) 'Pubkey'
if size := len(v.Pubkey); size != 48 {
err = ssz.ErrBytesLengthFn("--.Pubkey", size, 48)
return
}
dst = append(dst, v.Pubkey...)
return
}
// UnmarshalSSZ ssz unmarshals the ValidatorRegistrationV1 object
func (v *ValidatorRegistrationV1) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 84 {
return ssz.ErrSize
}
// Field (0) 'FeeRecipient'
if cap(v.FeeRecipient) == 0 {
v.FeeRecipient = make([]byte, 0, len(buf[0:20]))
}
v.FeeRecipient = append(v.FeeRecipient, buf[0:20]...)
// Field (1) 'GasLimit'
v.GasLimit = ssz.UnmarshallUint64(buf[20:28])
// Field (2) 'Timestamp'
v.Timestamp = ssz.UnmarshallUint64(buf[28:36])
// Field (3) 'Pubkey'
if cap(v.Pubkey) == 0 {
v.Pubkey = make([]byte, 0, len(buf[36:84]))
}
v.Pubkey = append(v.Pubkey, buf[36:84]...)
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the ValidatorRegistrationV1 object
func (v *ValidatorRegistrationV1) SizeSSZ() (size int) {
size = 84
return
}
// HashTreeRoot ssz hashes the ValidatorRegistrationV1 object
func (v *ValidatorRegistrationV1) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(v)
}
// HashTreeRootWith ssz hashes the ValidatorRegistrationV1 object with a hasher
func (v *ValidatorRegistrationV1) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'FeeRecipient'
if size := len(v.FeeRecipient); size != 20 {
err = ssz.ErrBytesLengthFn("--.FeeRecipient", size, 20)
return
}
hh.PutBytes(v.FeeRecipient)
// Field (1) 'GasLimit'
hh.PutUint64(v.GasLimit)
// Field (2) 'Timestamp'
hh.PutUint64(v.Timestamp)
// Field (3) 'Pubkey'
if size := len(v.Pubkey); size != 48 {
err = ssz.ErrBytesLengthFn("--.Pubkey", size, 48)
return
}
hh.PutBytes(v.Pubkey)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the SignedValidatorRegistrationV1 object
func (s *SignedValidatorRegistrationV1) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(s)
}
// MarshalSSZTo ssz marshals the SignedValidatorRegistrationV1 object to a target array
func (s *SignedValidatorRegistrationV1) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'Message'
if s.Message == nil {
s.Message = new(ValidatorRegistrationV1)
}
if dst, err = s.Message.MarshalSSZTo(dst); err != nil {
return
}
// Field (1) 'Signature'
if size := len(s.Signature); size != 96 {
err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
return
}
dst = append(dst, s.Signature...)
return
}
// UnmarshalSSZ ssz unmarshals the SignedValidatorRegistrationV1 object
func (s *SignedValidatorRegistrationV1) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 180 {
return ssz.ErrSize
}
// Field (0) 'Message'
if s.Message == nil {
s.Message = new(ValidatorRegistrationV1)
}
if err = s.Message.UnmarshalSSZ(buf[0:84]); err != nil {
return err
}
// Field (1) 'Signature'
if cap(s.Signature) == 0 {
s.Signature = make([]byte, 0, len(buf[84:180]))
}
s.Signature = append(s.Signature, buf[84:180]...)
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the SignedValidatorRegistrationV1 object
func (s *SignedValidatorRegistrationV1) SizeSSZ() (size int) {
size = 180
return
}
// HashTreeRoot ssz hashes the SignedValidatorRegistrationV1 object
func (s *SignedValidatorRegistrationV1) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(s)
}
// HashTreeRootWith ssz hashes the SignedValidatorRegistrationV1 object with a hasher
func (s *SignedValidatorRegistrationV1) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'Message'
if err = s.Message.HashTreeRootWith(hh); err != nil {
return
}
// Field (1) 'Signature'
if size := len(s.Signature); size != 96 {
err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
return
}
hh.PutBytes(s.Signature)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the BuilderBid object
func (b *BuilderBid) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(b)
}
// MarshalSSZTo ssz marshals the BuilderBid object to a target array
func (b *BuilderBid) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
offset := int(84)
// Offset (0) 'Header'
dst = ssz.WriteOffset(dst, offset)
if b.Header == nil {
b.Header = new(v1.ExecutionPayloadHeader)
}
offset += b.Header.SizeSSZ()
// Field (1) 'Value'
if size := len(b.Value); size != 32 {
err = ssz.ErrBytesLengthFn("--.Value", size, 32)
return
}
dst = append(dst, b.Value...)
// Field (2) 'Pubkey'
if size := len(b.Pubkey); size != 48 {
err = ssz.ErrBytesLengthFn("--.Pubkey", size, 48)
return
}
dst = append(dst, b.Pubkey...)
// Field (0) 'Header'
if dst, err = b.Header.MarshalSSZTo(dst); err != nil {
return
}
return
}
// UnmarshalSSZ ssz unmarshals the BuilderBid object
func (b *BuilderBid) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size < 84 {
return ssz.ErrSize
}
tail := buf
var o0 uint64
// Offset (0) 'Header'
if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
return ssz.ErrOffset
}
if o0 != 84 {
return ssz.ErrInvalidVariableOffset
}
// Field (1) 'Value'
if cap(b.Value) == 0 {
b.Value = make([]byte, 0, len(buf[4:36]))
}
b.Value = append(b.Value, buf[4:36]...)
// Field (2) 'Pubkey'
if cap(b.Pubkey) == 0 {
b.Pubkey = make([]byte, 0, len(buf[36:84]))
}
b.Pubkey = append(b.Pubkey, buf[36:84]...)
// Field (0) 'Header'
{
buf = tail[o0:]
if b.Header == nil {
b.Header = new(v1.ExecutionPayloadHeader)
}
if err = b.Header.UnmarshalSSZ(buf); err != nil {
return err
}
}
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the BuilderBid object
func (b *BuilderBid) SizeSSZ() (size int) {
size = 84
// Field (0) 'Header'
if b.Header == nil {
b.Header = new(v1.ExecutionPayloadHeader)
}
size += b.Header.SizeSSZ()
return
}
// HashTreeRoot ssz hashes the BuilderBid object
func (b *BuilderBid) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(b)
}
// HashTreeRootWith ssz hashes the BuilderBid object with a hasher
func (b *BuilderBid) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'Header'
if err = b.Header.HashTreeRootWith(hh); err != nil {
return
}
// Field (1) 'Value'
if size := len(b.Value); size != 32 {
err = ssz.ErrBytesLengthFn("--.Value", size, 32)
return
}
hh.PutBytes(b.Value)
// Field (2) 'Pubkey'
if size := len(b.Pubkey); size != 48 {
err = ssz.ErrBytesLengthFn("--.Pubkey", size, 48)
return
}
hh.PutBytes(b.Pubkey)
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, uint64(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 = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(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(uint64(b.StartSlot))
// Field (1) 'Count'
hh.PutUint64(b.Count)
// Field (2) 'Step'
hh.PutUint64(b.Step)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the MetaDataV0 object
func (m *MetaDataV0) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(m)
}
// MarshalSSZTo ssz marshals the MetaDataV0 object to a target array
func (m *MetaDataV0) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'SeqNumber'
dst = ssz.MarshalUint64(dst, m.SeqNumber)
// Field (1) 'Attnets'
if size := len(m.Attnets); size != 8 {
err = ssz.ErrBytesLengthFn("--.Attnets", size, 8)
return
}
dst = append(dst, m.Attnets...)
return
}
// UnmarshalSSZ ssz unmarshals the MetaDataV0 object
func (m *MetaDataV0) 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 MetaDataV0 object
func (m *MetaDataV0) SizeSSZ() (size int) {
size = 16
return
}
// HashTreeRoot ssz hashes the MetaDataV0 object
func (m *MetaDataV0) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(m)
}
// HashTreeRootWith ssz hashes the MetaDataV0 object with a hasher
func (m *MetaDataV0) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'SeqNumber'
hh.PutUint64(m.SeqNumber)
// Field (1) 'Attnets'
if size := len(m.Attnets); size != 8 {
err = ssz.ErrBytesLengthFn("--.Attnets", size, 8)
return
}
hh.PutBytes(m.Attnets)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the MetaDataV1 object
func (m *MetaDataV1) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(m)
}
// MarshalSSZTo ssz marshals the MetaDataV1 object to a target array
func (m *MetaDataV1) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'SeqNumber'
dst = ssz.MarshalUint64(dst, m.SeqNumber)
// Field (1) 'Attnets'
if size := len(m.Attnets); size != 8 {
err = ssz.ErrBytesLengthFn("--.Attnets", size, 8)
return
}
dst = append(dst, m.Attnets...)
// Field (2) 'Syncnets'
if size := len(m.Syncnets); size != 1 {
err = ssz.ErrBytesLengthFn("--.Syncnets", size, 1)
return
}
dst = append(dst, m.Syncnets...)
return
}
// UnmarshalSSZ ssz unmarshals the MetaDataV1 object
func (m *MetaDataV1) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 17 {
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]...)
// Field (2) 'Syncnets'
if cap(m.Syncnets) == 0 {
m.Syncnets = make([]byte, 0, len(buf[16:17]))
}
m.Syncnets = append(m.Syncnets, buf[16:17]...)
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the MetaDataV1 object
func (m *MetaDataV1) SizeSSZ() (size int) {
size = 17
return
}
// HashTreeRoot ssz hashes the MetaDataV1 object
func (m *MetaDataV1) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(m)
}
// HashTreeRootWith ssz hashes the MetaDataV1 object with a hasher
func (m *MetaDataV1) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'SeqNumber'
hh.PutUint64(m.SeqNumber)
// Field (1) 'Attnets'
if size := len(m.Attnets); size != 8 {
err = ssz.ErrBytesLengthFn("--.Attnets", size, 8)
return
}
hh.PutBytes(m.Attnets)
// Field (2) 'Syncnets'
if size := len(m.Syncnets); size != 1 {
err = ssz.ErrBytesLengthFn("--.Syncnets", size, 1)
return
}
hh.PutBytes(m.Syncnets)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the BlobSidecarsByRangeRequest object
func (b *BlobSidecarsByRangeRequest) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(b)
}
// MarshalSSZTo ssz marshals the BlobSidecarsByRangeRequest object to a target array
func (b *BlobSidecarsByRangeRequest) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
// Field (0) 'StartSlot'
dst = ssz.MarshalUint64(dst, uint64(b.StartSlot))
// Field (1) 'Count'
dst = ssz.MarshalUint64(dst, b.Count)
return
}
// UnmarshalSSZ ssz unmarshals the BlobSidecarsByRangeRequest object
func (b *BlobSidecarsByRangeRequest) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 16 {
return ssz.ErrSize
}
// Field (0) 'StartSlot'
b.StartSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[0:8]))
// Field (1) 'Count'
b.Count = ssz.UnmarshallUint64(buf[8:16])
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the BlobSidecarsByRangeRequest object
func (b *BlobSidecarsByRangeRequest) SizeSSZ() (size int) {
size = 16
return
}
// HashTreeRoot ssz hashes the BlobSidecarsByRangeRequest object
func (b *BlobSidecarsByRangeRequest) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(b)
}
// HashTreeRootWith ssz hashes the BlobSidecarsByRangeRequest object with a hasher
func (b *BlobSidecarsByRangeRequest) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'StartSlot'
hh.PutUint64(uint64(b.StartSlot))
// Field (1) 'Count'
hh.PutUint64(b.Count)
hh.Merkleize(indx)
return
}
// MarshalSSZ ssz marshals the DepositSnapshot object
func (d *DepositSnapshot) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(d)
}
// MarshalSSZTo ssz marshals the DepositSnapshot object to a target array
func (d *DepositSnapshot) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
offset := int(84)
// Offset (0) 'Finalized'
dst = ssz.WriteOffset(dst, offset)
offset += len(d.Finalized) * 32
// Field (1) 'DepositRoot'
if size := len(d.DepositRoot); size != 32 {
err = ssz.ErrBytesLengthFn("--.DepositRoot", size, 32)
return
}
dst = append(dst, d.DepositRoot...)
// Field (2) 'DepositCount'
dst = ssz.MarshalUint64(dst, d.DepositCount)
// Field (3) 'ExecutionHash'
if size := len(d.ExecutionHash); size != 32 {
err = ssz.ErrBytesLengthFn("--.ExecutionHash", size, 32)
return
}
dst = append(dst, d.ExecutionHash...)
// Field (4) 'ExecutionDepth'
dst = ssz.MarshalUint64(dst, d.ExecutionDepth)
// Field (0) 'Finalized'
if size := len(d.Finalized); size > 32 {
err = ssz.ErrListTooBigFn("--.Finalized", size, 32)
return
}
for ii := 0; ii < len(d.Finalized); ii++ {
if size := len(d.Finalized[ii]); size != 32 {
err = ssz.ErrBytesLengthFn("--.Finalized[ii]", size, 32)
return
}
dst = append(dst, d.Finalized[ii]...)
}
return
}
// UnmarshalSSZ ssz unmarshals the DepositSnapshot object
func (d *DepositSnapshot) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size < 84 {
return ssz.ErrSize
}
tail := buf
var o0 uint64
// Offset (0) 'Finalized'
if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
return ssz.ErrOffset
}
if o0 != 84 {
return ssz.ErrInvalidVariableOffset
}
// Field (1) 'DepositRoot'
if cap(d.DepositRoot) == 0 {
d.DepositRoot = make([]byte, 0, len(buf[4:36]))
}
d.DepositRoot = append(d.DepositRoot, buf[4:36]...)
// Field (2) 'DepositCount'
d.DepositCount = ssz.UnmarshallUint64(buf[36:44])
// Field (3) 'ExecutionHash'
if cap(d.ExecutionHash) == 0 {
d.ExecutionHash = make([]byte, 0, len(buf[44:76]))
}
d.ExecutionHash = append(d.ExecutionHash, buf[44:76]...)
// Field (4) 'ExecutionDepth'
d.ExecutionDepth = ssz.UnmarshallUint64(buf[76:84])
// Field (0) 'Finalized'
{
buf = tail[o0:]
num, err := ssz.DivideInt2(len(buf), 32, 32)
if err != nil {
return err
}
d.Finalized = make([][]byte, num)
for ii := 0; ii < num; ii++ {
if cap(d.Finalized[ii]) == 0 {
d.Finalized[ii] = make([]byte, 0, len(buf[ii*32:(ii+1)*32]))
}
d.Finalized[ii] = append(d.Finalized[ii], buf[ii*32:(ii+1)*32]...)
}
}
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the DepositSnapshot object
func (d *DepositSnapshot) SizeSSZ() (size int) {
size = 84
// Field (0) 'Finalized'
size += len(d.Finalized) * 32
return
}
// HashTreeRoot ssz hashes the DepositSnapshot object
func (d *DepositSnapshot) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(d)
}
// HashTreeRootWith ssz hashes the DepositSnapshot object with a hasher
func (d *DepositSnapshot) HashTreeRootWith(hh *ssz.Hasher) (err error) {
indx := hh.Index()
// Field (0) 'Finalized'
{
if size := len(d.Finalized); size > 32 {
err = ssz.ErrListTooBigFn("--.Finalized", size, 32)
return
}
subIndx := hh.Index()
for _, i := range d.Finalized {
if len(i) != 32 {
err = ssz.ErrBytesLength
return
}
hh.Append(i)
}
numItems := uint64(len(d.Finalized))
hh.MerkleizeWithMixin(subIndx, numItems, 32)
}
// Field (1) 'DepositRoot'
if size := len(d.DepositRoot); size != 32 {
err = ssz.ErrBytesLengthFn("--.DepositRoot", size, 32)
return
}
hh.PutBytes(d.DepositRoot)
// Field (2) 'DepositCount'
hh.PutUint64(d.DepositCount)
// Field (3) 'ExecutionHash'
if size := len(d.ExecutionHash); size != 32 {
err = ssz.ErrBytesLengthFn("--.ExecutionHash", size, 32)
return
}
hh.PutBytes(d.ExecutionHash)
// Field (4) 'ExecutionDepth'
hh.PutUint64(d.ExecutionDepth)
hh.Merkleize(indx)
return
}

File diff suppressed because it is too large Load Diff

View File

@@ -60,6 +60,9 @@ def _ssz_go_proto_library_impl(ctx):
if len(ctx.attr.objs) > 0:
args.append("--objs=%s" % ",".join(ctx.attr.objs))
if len(ctx.attr.exclude_objs) > 0:
args.append("--exclude-objs=%s" % ",".join(ctx.attr.exclude_objs))
ctx.actions.run(
executable = ctx.executable.sszgen,
progress_message = "Generating ssz marshal and unmarshal functions",
@@ -79,9 +82,10 @@ ssz_gen_marshal = rule(
cfg = "exec",
),
"objs": attr.string_list(),
"exclude_objs": attr.string_list(),
"includes": attr.label_list(providers = [GoLibrary]),
"out": attr.output(),
},
outputs = {"out": "generated.ssz.go"},
)
SSZ_DEPS = ["@com_github_prysmaticlabs_fastssz//:go_default_library"]

View File

@@ -71,7 +71,6 @@ go_library(
"@com_github_gorilla_mux//:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//runtime:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_prysmaticlabs_fastssz//:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
"@org_golang_google_protobuf//encoding/protojson:go_default_library",

View File

@@ -22,7 +22,6 @@ import (
"github.com/gorilla/mux"
gwruntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/pkg/errors"
fastssz "github.com/prysmaticlabs/fastssz"
"github.com/prysmaticlabs/prysm/v5/api"
"github.com/prysmaticlabs/prysm/v5/api/gateway"
"github.com/prysmaticlabs/prysm/v5/api/server/middleware"
@@ -122,8 +121,6 @@ func NewValidatorClient(cliCtx *cli.Context) (*ValidatorClient, error) {
}
}
configureFastSSZHashingAlgorithm()
// initialize router used for endpoints
router := newRouter(cliCtx)
// If the --web flag is enabled to administer the validator
@@ -794,7 +791,3 @@ func clearDB(ctx context.Context, dataDir string, force bool, isDatabaseMinimal
return nil
}
func configureFastSSZHashingAlgorithm() {
fastssz.EnableVectorizedHTR = true
}