From 163f729c39986c24f78dadc8aed94de9d744d699 Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Fri, 18 Oct 2024 17:03:42 +0400 Subject: [PATCH 1/6] Rename requestsRoot to requestsHash --- cmd/evm/internal/t8ntool/execution.go | 2 +- cmd/evm/internal/t8ntool/gen_stenv.go | 10 ++-- cmd/evm/internal/t8ntool/transition.go | 2 +- consensus/clique/verifier.go | 2 +- consensus/ethash/consensus.go | 2 +- consensus/merge/merge.go | 16 +++---- core/genesis_write.go | 8 ++-- core/types/block.go | 46 +++++++++---------- core/types/gen_genesis.go | 10 ++-- core/types/gen_header_json.go | 10 ++-- core/types/genesis.go | 2 +- erigon-lib/go.mod | 2 +- erigon-lib/go.sum | 2 + .../executionproto/execution.pb.go | 14 +++--- polygon/bor/bor.go | 6 +-- tests/block_test_util.go | 8 ++-- tests/gen_btheader.go | 10 ++-- turbo/adapter/ethapi/api.go | 4 +- turbo/engineapi/engine_server.go | 2 +- turbo/engineapi/engine_types/jsonrpc.go | 2 +- turbo/execution/eth1/eth1_utils/grpc.go | 10 ++-- turbo/stages/bodydownload/body_algos.go | 16 +++---- 22 files changed, 94 insertions(+), 92 deletions(-) diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 9cf60061557..829a3edce23 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -67,7 +67,7 @@ type stEnv struct { Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"` WithdrawalsHash *libcommon.Hash `json:"withdrawalsRoot,omitempty"` Requests types.Requests `json:"requests,omitempty"` - RequestsRoot *libcommon.Hash `json:"requestsRoot,omitempty"` + RequestsHash *libcommon.Hash `json:"requestsHash,omitempty"` } type stEnvMarshaling struct { diff --git a/cmd/evm/internal/t8ntool/gen_stenv.go b/cmd/evm/internal/t8ntool/gen_stenv.go index b4a60de2f13..89de04a8e08 100644 --- a/cmd/evm/internal/t8ntool/gen_stenv.go +++ b/cmd/evm/internal/t8ntool/gen_stenv.go @@ -35,7 +35,7 @@ func (s stEnv) MarshalJSON() ([]byte, error) { Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"` WithdrawalsHash *common.Hash `json:"withdrawalsRoot,omitempty"` Requests types.Requests `json:"requests,omitempty"` - RequestsRoot *common.Hash `json:"requestsRoot,omitempty"` + RequestsHash *common.Hash `json:"requestsHash,omitempty"` } var enc stEnv enc.Coinbase = common0.UnprefixedAddress(s.Coinbase) @@ -55,7 +55,7 @@ func (s stEnv) MarshalJSON() ([]byte, error) { enc.Withdrawals = s.Withdrawals enc.WithdrawalsHash = s.WithdrawalsHash enc.Requests = s.Requests - enc.RequestsRoot = s.RequestsRoot + enc.RequestsHash = s.RequestsHash return json.Marshal(&enc) } @@ -79,7 +79,7 @@ func (s *stEnv) UnmarshalJSON(input []byte) error { Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"` WithdrawalsHash *common.Hash `json:"withdrawalsRoot,omitempty"` Requests *types.Requests `json:"requests,omitempty"` - RequestsRoot *common.Hash `json:"requestsRoot,omitempty"` + RequestsHash *common.Hash `json:"requestsHash,omitempty"` } var dec stEnv if err := json.Unmarshal(input, &dec); err != nil { @@ -140,8 +140,8 @@ func (s *stEnv) UnmarshalJSON(input []byte) error { if dec.Requests != nil { s.Requests = *dec.Requests } - if dec.RequestsRoot != nil { - s.RequestsRoot = dec.RequestsRoot + if dec.RequestsHash != nil { + s.RequestsHash = dec.RequestsHash } return nil } diff --git a/cmd/evm/internal/t8ntool/transition.go b/cmd/evm/internal/t8ntool/transition.go index a20d3bd3a0c..2d4856a0f30 100644 --- a/cmd/evm/internal/t8ntool/transition.go +++ b/cmd/evm/internal/t8ntool/transition.go @@ -617,7 +617,7 @@ func NewHeader(env stEnv) *types.Header { header.UncleHash = env.UncleHash header.WithdrawalsHash = env.WithdrawalsHash - header.RequestsRoot = env.RequestsRoot + header.RequestsHash = env.RequestsHash return &header } diff --git a/consensus/clique/verifier.go b/consensus/clique/verifier.go index ebba1d5a401..fd2c300c3f1 100644 --- a/consensus/clique/verifier.go +++ b/consensus/clique/verifier.go @@ -97,7 +97,7 @@ func (c *Clique) verifyHeader(chain consensus.ChainHeaderReader, header *types.H return consensus.ErrUnexpectedWithdrawals } - if header.RequestsRoot != nil { + if header.RequestsHash != nil { return consensus.ErrUnexpectedRequests } diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 4c75240522c..d18547d08f8 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -257,7 +257,7 @@ func VerifyHeaderBasics(chain consensus.ChainHeaderReader, header, parent *types return consensus.ErrUnexpectedWithdrawals } - if header.RequestsRoot != nil { + if header.RequestsHash != nil { return consensus.ErrUnexpectedRequests } diff --git a/consensus/merge/merge.go b/consensus/merge/merge.go index 2d0c7e12d6b..76134fbba06 100644 --- a/consensus/merge/merge.go +++ b/consensus/merge/merge.go @@ -202,10 +202,10 @@ func (s *Merge) Finalize(config *chain.Config, header *types.Header, state *stat rs = append(rs, withdrawalReqs...) consolidations := misc.DequeueConsolidationRequests7251(syscall) rs = append(rs, consolidations...) - if requestsInBlock != nil || header.RequestsRoot != nil { + if requestsInBlock != nil || header.RequestsHash != nil { rh := types.DeriveSha(rs) - if *header.RequestsRoot != rh { - return nil, nil, nil, fmt.Errorf("error: invalid requests root hash in header, expected: %v, got :%v", header.RequestsRoot, rh) + if *header.RequestsHash != rh { + return nil, nil, nil, fmt.Errorf("error: invalid requests root hash in header, expected: %v, got :%v", header.RequestsHash, rh) } if !reflect.DeepEqual(requestsInBlock.Deposits(), depositReqs.Deposits()) { return nil, nil, nil, errors.New("error: invalid EIP-6110 Deposit Requests in block") @@ -228,7 +228,7 @@ func (s *Merge) FinalizeAndAssemble(config *chain.Config, header *types.Header, if !misc.IsPoSHeader(header) { return s.eth1Engine.FinalizeAndAssemble(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, call, logger) } - header.RequestsRoot = nil + header.RequestsHash = nil outTxs, outReceipts, rs, err := s.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger) if err != nil { return nil, nil, nil, err @@ -318,12 +318,12 @@ func (s *Merge) verifyHeader(chain consensus.ChainHeaderReader, header, parent * return fmt.Errorf("invalid excessBlobGas: have %d, want %d", *header.ExcessBlobGas, expectedExcessBlobGas) } - // Verify existence / non-existence of requestsRoot + // Verify existence / non-existence of requestsHash prague := chain.Config().IsPrague(header.Time) - if prague && header.RequestsRoot == nil { - return errors.New("missing requestsRoot") + if prague && header.RequestsHash == nil { + return errors.New("missing requestsHash") } - if !prague && header.RequestsRoot != nil { + if !prague && header.RequestsHash != nil { return consensus.ErrUnexpectedRequests } diff --git a/core/genesis_write.go b/core/genesis_write.go index b28acaace86..410844581ae 100644 --- a/core/genesis_write.go +++ b/core/genesis_write.go @@ -447,7 +447,7 @@ func GenesisToBlock(g *types.Genesis, dirs datadir.Dirs, logger log.Logger) (*ty ExcessBlobGas: g.ExcessBlobGas, AuRaStep: g.AuRaStep, AuRaSeal: g.AuRaSeal, - RequestsRoot: g.RequestsRoot, + RequestsHash: g.RequestsHash, } if g.GasLimit == 0 { head.GasLimit = params.GenesisGasLimit @@ -491,10 +491,10 @@ func GenesisToBlock(g *types.Genesis, dirs datadir.Dirs, logger log.Logger) (*ty requests = types.Requests{} // TODO @somnathb1 - if later iterations and/or tests don't need this from genesis.json, remove the following - if g.RequestsRoot != nil { - head.RequestsRoot = g.RequestsRoot + if g.RequestsHash != nil { + head.RequestsHash = g.RequestsHash } else { - head.RequestsRoot = &types.EmptyRootHash + head.RequestsHash = &types.EmptyRootHash } } diff --git a/core/types/block.go b/core/types/block.go index 16afa44fe33..e2e1753deb5 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -108,7 +108,7 @@ type Header struct { ParentBeaconBlockRoot *libcommon.Hash `json:"parentBeaconBlockRoot"` // EIP-4788 - RequestsRoot *libcommon.Hash `json:"requestsRoot"` // EIP-7685 + RequestsHash *libcommon.Hash `json:"requestsHash"` // EIP-7685 // The verkle proof is ignored in legacy headers Verkle bool @@ -179,7 +179,7 @@ func (h *Header) EncodingSize() int { encodingSize += 33 } - if h.RequestsRoot != nil { + if h.RequestsHash != nil { encodingSize += 33 } @@ -332,12 +332,12 @@ func (h *Header) EncodeRLP(w io.Writer) error { } } - if h.RequestsRoot != nil { + if h.RequestsHash != nil { b[0] = 128 + 32 if _, err := w.Write(b[:1]); err != nil { return err } - if _, err := w.Write(h.RequestsRoot.Bytes()); err != nil { + if _, err := w.Write(h.RequestsHash.Bytes()); err != nil { return err } } @@ -530,22 +530,22 @@ func (h *Header) DecodeRLP(s *rlp.Stream) error { h.ParentBeaconBlockRoot = new(libcommon.Hash) h.ParentBeaconBlockRoot.SetBytes(b) - // RequestsRoot + // RequestsHash if b, err = s.Bytes(); err != nil { if errors.Is(err, rlp.EOL) { - h.RequestsRoot = nil + h.RequestsHash = nil if err := s.ListEnd(); err != nil { - return fmt.Errorf("close header struct (no RequestsRoot): %w", err) + return fmt.Errorf("close header struct (no RequestsHash): %w", err) } return nil } - return fmt.Errorf("read RequestsRoot: %w", err) + return fmt.Errorf("read RequestsHash: %w", err) } if len(b) != 32 { - return fmt.Errorf("wrong size for RequestsRoot: %d", len(b)) + return fmt.Errorf("wrong size for RequestsHash: %d", len(b)) } - h.RequestsRoot = new(libcommon.Hash) - h.RequestsRoot.SetBytes(b) + h.RequestsHash = new(libcommon.Hash) + h.RequestsHash.SetBytes(b) if h.Verkle { if h.VerkleProof, err = s.Bytes(); err != nil { @@ -615,7 +615,7 @@ func (h *Header) Size() common.StorageSize { if h.ParentBeaconBlockRoot != nil { s += common.StorageSize(32) } - if h.RequestsRoot != nil { + if h.RequestsHash != nil { s += common.StorageSize(32) } return s @@ -1100,13 +1100,13 @@ func NewBlock(header *Header, txs []Transaction, uncles []*Header, receipts []*R b.header.ParentBeaconBlockRoot = header.ParentBeaconBlockRoot if requests == nil { - b.header.RequestsRoot = nil + b.header.RequestsHash = nil } else if len(requests) == 0 { - b.header.RequestsRoot = &EmptyRootHash + b.header.RequestsHash = &EmptyRootHash b.requests = make(Requests, len(requests)) } else { h := DeriveSha(requests) - b.header.RequestsRoot = &h + b.header.RequestsHash = &h b.requests = make(Requests, len(requests)) for i, r := range requests { rCopy := r.copy() @@ -1190,9 +1190,9 @@ func CopyHeader(h *Header) *Header { cpy.ParentBeaconBlockRoot = new(libcommon.Hash) cpy.ParentBeaconBlockRoot.SetBytes(h.ParentBeaconBlockRoot.Bytes()) } - if h.RequestsRoot != nil { - cpy.RequestsRoot = new(libcommon.Hash) - cpy.RequestsRoot.SetBytes(h.RequestsRoot.Bytes()) + if h.RequestsHash != nil { + cpy.RequestsHash = new(libcommon.Hash) + cpy.RequestsHash.SetBytes(h.RequestsHash.Bytes()) } cpy.mutable = h.mutable if hash := h.hash.Load(); hash != nil { @@ -1344,7 +1344,7 @@ func (b *Block) BaseFee() *big.Int { func (b *Block) WithdrawalsHash() *libcommon.Hash { return b.header.WithdrawalsHash } func (b *Block) Withdrawals() Withdrawals { return b.withdrawals } func (b *Block) ParentBeaconBlockRoot() *libcommon.Hash { return b.header.ParentBeaconBlockRoot } -func (b *Block) RequestsRoot() *libcommon.Hash { return b.header.RequestsRoot } +func (b *Block) RequestsHash() *libcommon.Hash { return b.header.RequestsHash } func (b *Block) Requests() Requests { return b.requests } // Header returns a deep-copy of the entire block header using CopyHeader() @@ -1448,15 +1448,15 @@ func (b *Block) HashCheck(fullCheck bool) error { return fmt.Errorf("block has invalid withdrawals hash: have %x, exp: %x", hash, b.WithdrawalsHash()) } - if b.RequestsRoot() == nil { + if b.RequestsHash() == nil { if b.Requests() != nil { - return errors.New("header missing RequestsRoot") + return errors.New("header missing RequestsHash") } return nil } - if hash := DeriveSha(b.Requests()); hash != *b.RequestsRoot() { - return fmt.Errorf("block has invalid requests root: have %x, exp: %x", hash, b.RequestsRoot()) + if hash := DeriveSha(b.Requests()); hash != *b.RequestsHash() { + return fmt.Errorf("block has invalid requests root: have %x, exp: %x", hash, b.RequestsHash()) } return nil diff --git a/core/types/gen_genesis.go b/core/types/gen_genesis.go index 53e7bc3c7fe..2f4646bbbc4 100644 --- a/core/types/gen_genesis.go +++ b/core/types/gen_genesis.go @@ -37,7 +37,7 @@ func (g Genesis) MarshalJSON() ([]byte, error) { BlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed"` ExcessBlobGas *math.HexOrDecimal64 `json:"excessBlobGas"` ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"` - RequestsRoot *common.Hash `json:"requestsRoot"` + RequestsHash *common.Hash `json:"requestsHash"` } var enc Genesis enc.Config = g.Config @@ -63,7 +63,7 @@ func (g Genesis) MarshalJSON() ([]byte, error) { enc.BlobGasUsed = (*math.HexOrDecimal64)(g.BlobGasUsed) enc.ExcessBlobGas = (*math.HexOrDecimal64)(g.ExcessBlobGas) enc.ParentBeaconBlockRoot = g.ParentBeaconBlockRoot - enc.RequestsRoot = g.RequestsRoot + enc.RequestsHash = g.RequestsHash return json.Marshal(&enc) } @@ -88,7 +88,7 @@ func (g *Genesis) UnmarshalJSON(input []byte) error { BlobGasUsed *math.HexOrDecimal64 `json:"blobGasUsed"` ExcessBlobGas *math.HexOrDecimal64 `json:"excessBlobGas"` ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"` - RequestsRoot *common.Hash `json:"requestsRoot"` + RequestsHash *common.Hash `json:"requestsHash"` } var dec Genesis if err := json.Unmarshal(input, &dec); err != nil { @@ -154,8 +154,8 @@ func (g *Genesis) UnmarshalJSON(input []byte) error { if dec.ParentBeaconBlockRoot != nil { g.ParentBeaconBlockRoot = dec.ParentBeaconBlockRoot } - if dec.RequestsRoot != nil { - g.RequestsRoot = dec.RequestsRoot + if dec.RequestsHash != nil { + g.RequestsHash = dec.RequestsHash } return nil } diff --git a/core/types/gen_header_json.go b/core/types/gen_header_json.go index 1f68a0821ea..382b8aa85c9 100644 --- a/core/types/gen_header_json.go +++ b/core/types/gen_header_json.go @@ -41,7 +41,7 @@ func (h Header) MarshalJSON() ([]byte, error) { BlobGasUsed *hexutil.Uint64 `json:"blobGasUsed"` ExcessBlobGas *hexutil.Uint64 `json:"excessBlobGas"` ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"` - RequestsRoot *common.Hash `json:"requestsRoot"` + RequestsHash *common.Hash `json:"requestsHash"` Verkle bool VerkleProof []byte VerkleKeyVals []verkle.KeyValuePair @@ -70,7 +70,7 @@ func (h Header) MarshalJSON() ([]byte, error) { enc.BlobGasUsed = (*hexutil.Uint64)(h.BlobGasUsed) enc.ExcessBlobGas = (*hexutil.Uint64)(h.ExcessBlobGas) enc.ParentBeaconBlockRoot = h.ParentBeaconBlockRoot - enc.RequestsRoot = h.RequestsRoot + enc.RequestsHash = h.RequestsHash enc.Verkle = h.Verkle enc.VerkleProof = h.VerkleProof enc.VerkleKeyVals = h.VerkleKeyVals @@ -103,7 +103,7 @@ func (h *Header) UnmarshalJSON(input []byte) error { BlobGasUsed *hexutil.Uint64 `json:"blobGasUsed"` ExcessBlobGas *hexutil.Uint64 `json:"excessBlobGas"` ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"` - RequestsRoot *common.Hash `json:"requestsRoot"` + RequestsHash *common.Hash `json:"requestsHash"` Verkle *bool VerkleProof []byte VerkleKeyVals []verkle.KeyValuePair @@ -190,8 +190,8 @@ func (h *Header) UnmarshalJSON(input []byte) error { if dec.ParentBeaconBlockRoot != nil { h.ParentBeaconBlockRoot = dec.ParentBeaconBlockRoot } - if dec.RequestsRoot != nil { - h.RequestsRoot = dec.RequestsRoot + if dec.RequestsHash != nil { + h.RequestsHash = dec.RequestsHash } if dec.Verkle != nil { h.Verkle = *dec.Verkle diff --git a/core/types/genesis.go b/core/types/genesis.go index 59895d2090e..4f4bc03f8de 100644 --- a/core/types/genesis.go +++ b/core/types/genesis.go @@ -68,7 +68,7 @@ type Genesis struct { BlobGasUsed *uint64 `json:"blobGasUsed"` // EIP-4844 ExcessBlobGas *uint64 `json:"excessBlobGas"` // EIP-4844 ParentBeaconBlockRoot *common.Hash `json:"parentBeaconBlockRoot"` // EIP-4788 - RequestsRoot *common.Hash `json:"requestsRoot"` // EIP-7685 + RequestsHash *common.Hash `json:"requestsHash"` // EIP-7685 } // GenesisAlloc specifies the initial state that is part of the genesis block. diff --git a/erigon-lib/go.mod b/erigon-lib/go.mod index 84d147e24c2..b656c8533ff 100644 --- a/erigon-lib/go.mod +++ b/erigon-lib/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978 - github.com/erigontech/interfaces v0.0.0-20241011102608-29c1d07f457d + github.com/erigontech/interfaces v0.0.0-20241018125732-814767d1b926 github.com/erigontech/mdbx-go v0.38.4 github.com/erigontech/secp256k1 v1.1.0 github.com/rs/dnscache v0.0.0-20211102005908-e0241e321417 diff --git a/erigon-lib/go.sum b/erigon-lib/go.sum index a08eb055a3a..b01da12f04a 100644 --- a/erigon-lib/go.sum +++ b/erigon-lib/go.sum @@ -150,6 +150,8 @@ github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978 h1:7E github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978/go.mod h1:ooHlCl+eEYzebiPu+FP6Q6SpPUeMADn8Jxabv3IKb9M= github.com/erigontech/interfaces v0.0.0-20241011102608-29c1d07f457d h1:T0xEfGinQBrv1aV2WdIQCBoCPOn2CKKH5hi35o/V0m8= github.com/erigontech/interfaces v0.0.0-20241011102608-29c1d07f457d/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE= +github.com/erigontech/interfaces v0.0.0-20241018125732-814767d1b926 h1:2H5vOO4LT+P0oB82f4AEK7AK+1QJYUL9VNz2KEvqknI= +github.com/erigontech/interfaces v0.0.0-20241018125732-814767d1b926/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE= github.com/erigontech/mdbx-go v0.38.4 h1:S9T7mTe9KPcFe4dOoOtVdI6gPzht9y7wMnYfUBgrQLo= github.com/erigontech/mdbx-go v0.38.4/go.mod h1:IcOLQDPw3VM/asP6T5JVPPN4FHHgJtY16XfYjzWKVNI= github.com/erigontech/secp256k1 v1.1.0 h1:mO3YJMUSoASE15Ya//SoHiisptUhdXExuMUN1M0X9qY= diff --git a/erigon-lib/gointerfaces/executionproto/execution.pb.go b/erigon-lib/gointerfaces/executionproto/execution.pb.go index 26d30fa3857..0e40fdaa03a 100644 --- a/erigon-lib/gointerfaces/executionproto/execution.pb.go +++ b/erigon-lib/gointerfaces/executionproto/execution.pb.go @@ -281,7 +281,7 @@ type Header struct { BlobGasUsed *uint64 `protobuf:"varint,19,opt,name=blob_gas_used,json=blobGasUsed,proto3,oneof" json:"blob_gas_used,omitempty"` // added in Dencun (EIP-4844) ExcessBlobGas *uint64 `protobuf:"varint,20,opt,name=excess_blob_gas,json=excessBlobGas,proto3,oneof" json:"excess_blob_gas,omitempty"` // added in Dencun (EIP-4844) ParentBeaconBlockRoot *typesproto.H256 `protobuf:"bytes,21,opt,name=parent_beacon_block_root,json=parentBeaconBlockRoot,proto3,oneof" json:"parent_beacon_block_root,omitempty"` // added in Dencun (EIP-4788) - RequestsRoot *typesproto.H256 `protobuf:"bytes,22,opt,name=requests_root,json=requestsRoot,proto3,oneof" json:"requests_root,omitempty"` // added in Pectra (EIP-7685) + RequestsHash *typesproto.H256 `protobuf:"bytes,22,opt,name=requests_hash,json=requestsHash,proto3,oneof" json:"requests_hash,omitempty"` // added in Pectra (EIP-7685) // AuRa AuraStep *uint64 `protobuf:"varint,23,opt,name=aura_step,json=auraStep,proto3,oneof" json:"aura_step,omitempty"` AuraSeal []byte `protobuf:"bytes,24,opt,name=aura_seal,json=auraSeal,proto3,oneof" json:"aura_seal,omitempty"` @@ -466,9 +466,9 @@ func (x *Header) GetParentBeaconBlockRoot() *typesproto.H256 { return nil } -func (x *Header) GetRequestsRoot() *typesproto.H256 { +func (x *Header) GetRequestsHash() *typesproto.H256 { if x != nil { - return x.RequestsRoot + return x.RequestsHash } return nil } @@ -1793,9 +1793,9 @@ var file_execution_execution_proto_rawDesc = []byte{ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x32, 0x35, 0x36, 0x48, 0x04, 0x52, 0x15, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x73, 0x74, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x32, 0x35, 0x36, 0x48, 0x05, 0x52, 0x0c, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x48, 0x61, 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x75, 0x72, 0x61, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x48, 0x06, 0x52, 0x08, 0x61, 0x75, 0x72, 0x61, 0x53, 0x74, 0x65, 0x70, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x75, 0x72, 0x61, 0x5f, 0x73, 0x65, 0x61, 0x6c, 0x18, 0x18, 0x20, @@ -1807,7 +1807,7 @@ var file_execution_execution_proto_rawDesc = []byte{ 0x10, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x67, 0x61, 0x73, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x75, 0x72, 0x61, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x75, 0x72, 0x61, 0x5f, 0x73, 0x65, 0x61, 0x6c, 0x22, 0xfa, 0x01, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2a, 0x0a, 0x0a, 0x62, 0x6c, @@ -2123,7 +2123,7 @@ var file_execution_execution_proto_depIdxs = []int32{ 27, // 14: execution.Header.base_fee_per_gas:type_name -> types.H256 27, // 15: execution.Header.withdrawal_hash:type_name -> types.H256 27, // 16: execution.Header.parent_beacon_block_root:type_name -> types.H256 - 27, // 17: execution.Header.requests_root:type_name -> types.H256 + 27, // 17: execution.Header.requests_hash:type_name -> types.H256 27, // 18: execution.BlockBody.block_hash:type_name -> types.H256 4, // 19: execution.BlockBody.uncles:type_name -> execution.Header 30, // 20: execution.BlockBody.withdrawals:type_name -> types.Withdrawal diff --git a/polygon/bor/bor.go b/polygon/bor/bor.go index 062e9db08a5..5d3bc0ce5d1 100644 --- a/polygon/bor/bor.go +++ b/polygon/bor/bor.go @@ -612,7 +612,7 @@ func ValidateHeaderUnusedFields(header *types.Header) error { return consensus.ErrUnexpectedWithdrawals } - if header.RequestsRoot != nil { + if header.RequestsHash != nil { return consensus.ErrUnexpectedRequests } @@ -1045,7 +1045,7 @@ func (c *Bor) Finalize(config *chain.Config, header *types.Header, state *state. return nil, nil, nil, consensus.ErrUnexpectedWithdrawals } - if requests != nil || header.RequestsRoot != nil { + if requests != nil || header.RequestsHash != nil { return nil, nil, nil, consensus.ErrUnexpectedRequests } @@ -1112,7 +1112,7 @@ func (c *Bor) FinalizeAndAssemble(chainConfig *chain.Config, header *types.Heade return nil, nil, nil, consensus.ErrUnexpectedWithdrawals } - if requests != nil || header.RequestsRoot != nil { + if requests != nil || header.RequestsHash != nil { return nil, nil, nil, consensus.ErrUnexpectedRequests } diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 8c1f34d9fa2..c10b6436577 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -106,7 +106,7 @@ type btHeader struct { BlobGasUsed *uint64 ExcessBlobGas *uint64 ParentBeaconBlockRoot *libcommon.Hash - RequestsRoot *libcommon.Hash + RequestsHash *libcommon.Hash } type btHeaderMarshaling struct { @@ -179,7 +179,7 @@ func (bt *BlockTest) genesis(config *chain.Config) *types.Genesis { BlobGasUsed: bt.json.Genesis.BlobGasUsed, ExcessBlobGas: bt.json.Genesis.ExcessBlobGas, ParentBeaconBlockRoot: bt.json.Genesis.ParentBeaconBlockRoot, - RequestsRoot: bt.json.Genesis.RequestsRoot, + RequestsHash: bt.json.Genesis.RequestsHash, } } @@ -311,8 +311,8 @@ func validateHeader(h *btHeader, h2 *types.Header) error { if !reflect.DeepEqual(h.ParentBeaconBlockRoot, h2.ParentBeaconBlockRoot) { return fmt.Errorf("parentBeaconBlockRoot: want: %v have: %v", h.ParentBeaconBlockRoot, h2.ParentBeaconBlockRoot) } - if !reflect.DeepEqual(h.RequestsRoot, h2.RequestsRoot) { - return fmt.Errorf("requestsRoot: want: %v have: %v", h.RequestsRoot, h2.RequestsRoot) + if !reflect.DeepEqual(h.RequestsHash, h2.RequestsHash) { + return fmt.Errorf("requestsHash: want: %v have: %v", h.RequestsHash, h2.RequestsHash) } return nil } diff --git a/tests/gen_btheader.go b/tests/gen_btheader.go index 385526f8505..55da00bc93e 100644 --- a/tests/gen_btheader.go +++ b/tests/gen_btheader.go @@ -38,7 +38,7 @@ func (b btHeader) MarshalJSON() ([]byte, error) { BlobGasUsed *math.HexOrDecimal64 ExcessBlobGas *math.HexOrDecimal64 ParentBeaconBlockRoot *common.Hash - RequestsRoot *common.Hash + RequestsHash *common.Hash } var enc btHeader enc.Bloom = b.Bloom @@ -62,7 +62,7 @@ func (b btHeader) MarshalJSON() ([]byte, error) { enc.BlobGasUsed = (*math.HexOrDecimal64)(b.BlobGasUsed) enc.ExcessBlobGas = (*math.HexOrDecimal64)(b.ExcessBlobGas) enc.ParentBeaconBlockRoot = b.ParentBeaconBlockRoot - enc.RequestsRoot = b.RequestsRoot + enc.RequestsHash = b.RequestsHash return json.Marshal(&enc) } @@ -90,7 +90,7 @@ func (b *btHeader) UnmarshalJSON(input []byte) error { BlobGasUsed *math.HexOrDecimal64 ExcessBlobGas *math.HexOrDecimal64 ParentBeaconBlockRoot *common.Hash - RequestsRoot *common.Hash + RequestsHash *common.Hash } var dec btHeader if err := json.Unmarshal(input, &dec); err != nil { @@ -159,8 +159,8 @@ func (b *btHeader) UnmarshalJSON(input []byte) error { if dec.ParentBeaconBlockRoot != nil { b.ParentBeaconBlockRoot = dec.ParentBeaconBlockRoot } - if dec.RequestsRoot != nil { - b.RequestsRoot = dec.RequestsRoot + if dec.RequestsHash != nil { + b.RequestsHash = dec.RequestsHash } return nil } diff --git a/turbo/adapter/ethapi/api.go b/turbo/adapter/ethapi/api.go index 3f3b699f797..311e0fe730f 100644 --- a/turbo/adapter/ethapi/api.go +++ b/turbo/adapter/ethapi/api.go @@ -307,8 +307,8 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} { if head.ParentBeaconBlockRoot != nil { result["parentBeaconBlockRoot"] = head.ParentBeaconBlockRoot } - if head.RequestsRoot != nil { - result["requestsRoot"] = head.RequestsRoot + if head.RequestsHash != nil { + result["requestsHash"] = head.RequestsHash } return result diff --git a/turbo/engineapi/engine_server.go b/turbo/engineapi/engine_server.go index e0b057f75c9..854fb6c7e51 100644 --- a/turbo/engineapi/engine_server.go +++ b/turbo/engineapi/engine_server.go @@ -213,7 +213,7 @@ func (s *EngineServer) newPayload(ctx context.Context, req *engine_types.Executi requests = append(requests, req.WithdrawalRequests.Requests()...) requests = append(requests, req.ConsolidationRequests.Requests()...) rh := types.DeriveSha(requests) - header.RequestsRoot = &rh + header.RequestsHash = &rh } if version <= clparams.CapellaVersion { diff --git a/turbo/engineapi/engine_types/jsonrpc.go b/turbo/engineapi/engine_types/jsonrpc.go index 23ce006c088..7f0483aee97 100644 --- a/turbo/engineapi/engine_types/jsonrpc.go +++ b/turbo/engineapi/engine_types/jsonrpc.go @@ -171,7 +171,7 @@ func ConvertRpcBlockToExecutionPayload(payload *execution.Block) *ExecutionPaylo excessBlobGas := *header.ExcessBlobGas res.ExcessBlobGas = (*hexutil.Uint64)(&excessBlobGas) } - if header.RequestsRoot != nil { + if header.RequestsHash != nil { reqs, _ := types.UnmarshalRequestsFromBinary(body.Requests) res.DepositRequests = reqs.Deposits() res.WithdrawalRequests = reqs.Withdrawals() diff --git a/turbo/execution/eth1/eth1_utils/grpc.go b/turbo/execution/eth1/eth1_utils/grpc.go index a4479faa918..c40c50eb70e 100644 --- a/turbo/execution/eth1/eth1_utils/grpc.go +++ b/turbo/execution/eth1/eth1_utils/grpc.go @@ -74,8 +74,8 @@ func HeaderToHeaderRPC(header *types.Header) *execution.Header { h.ParentBeaconBlockRoot = gointerfaces.ConvertHashToH256(*header.ParentBeaconBlockRoot) } - if header.RequestsRoot != nil { - h.RequestsRoot = gointerfaces.ConvertHashToH256(*header.RequestsRoot) + if header.RequestsHash != nil { + h.RequestsHash = gointerfaces.ConvertHashToH256(*header.RequestsHash) } if len(header.AuRaSeal) > 0 { @@ -152,9 +152,9 @@ func HeaderRpcToHeader(header *execution.Header) (*types.Header, error) { h.ParentBeaconBlockRoot = new(libcommon.Hash) *h.ParentBeaconBlockRoot = gointerfaces.ConvertH256ToHash(header.ParentBeaconBlockRoot) } - if header.RequestsRoot != nil { - h.RequestsRoot = new(libcommon.Hash) - *h.RequestsRoot = gointerfaces.ConvertH256ToHash(header.RequestsRoot) + if header.RequestsHash != nil { + h.RequestsHash = new(libcommon.Hash) + *h.RequestsHash = gointerfaces.ConvertH256ToHash(header.RequestsHash) } blockHash := gointerfaces.ConvertH256ToHash(header.BlockHash) if blockHash != h.Hash() { diff --git a/turbo/stages/bodydownload/body_algos.go b/turbo/stages/bodydownload/body_algos.go index 86599929ff3..b95d08484db 100644 --- a/turbo/stages/bodydownload/body_algos.go +++ b/turbo/stages/bodydownload/body_algos.go @@ -167,15 +167,15 @@ func (bd *BodyDownload) RequestMoreBodies(tx kv.RwTx, blockReader services.FullB if request { if header.UncleHash == types.EmptyUncleHash && header.TxHash == types.EmptyRootHash && (header.WithdrawalsHash == nil || *header.WithdrawalsHash == types.EmptyRootHash) && - (header.RequestsRoot == nil || *header.RequestsRoot == types.EmptyRootHash) { + (header.RequestsHash == nil || *header.RequestsHash == types.EmptyRootHash) { // Empty block body body := &types.RawBody{} if header.WithdrawalsHash != nil { // implies *header.WithdrawalsHash == types.EmptyRootHash body.Withdrawals = make([]*types.Withdrawal, 0) } - if header.RequestsRoot != nil { - // implies *header.RequestsRoot == types.EmptyRootHash + if header.RequestsHash != nil { + // implies *header.RequestsHash == types.EmptyRootHash body.Requests = make(types.Requests, 0) } bd.addBodyToCache(blockNum, body) @@ -198,14 +198,14 @@ func (bd *BodyDownload) RequestMoreBodies(tx kv.RwTx, blockReader services.FullB if header.WithdrawalsHash != nil { copy(bodyHashes[2*length.Hash:], header.WithdrawalsHash.Bytes()) } - if header.RequestsRoot != nil { - copy(bodyHashes[3*length.Hash:], header.RequestsRoot.Bytes()) + if header.RequestsHash != nil { + copy(bodyHashes[3*length.Hash:], header.RequestsHash.Bytes()) } bd.requestedMap[bodyHashes] = blockNum blockNums = append(blockNums, blockNum) hashes = append(hashes, hash) } else { - // uncleHash, txHash, withdrawalsHash, and requestsRoot are all empty (or block is prefetched), no need to request + // uncleHash, txHash, withdrawalsHash, and requestsHash are all empty (or block is prefetched), no need to request bd.delivered.Add(blockNum) } } @@ -343,8 +343,8 @@ Loop: copy(bodyHashes[2*length.Hash:], withdrawalsHash.Bytes()) } if requests[i] != nil { - requestsRoot := types.DeriveSha(requests[i]) - copy(bodyHashes[3*length.Hash:], requestsRoot.Bytes()) + requestsHash := types.DeriveSha(requests[i]) + copy(bodyHashes[3*length.Hash:], requestsHash.Bytes()) } // Block numbers are added to the bd.delivered bitmap here, only for blocks for which the body has been received, and their double hashes are present in the bd.requestedMap From bbfd5bbfdd6f289220cc00d231e34566699abef9 Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Fri, 18 Oct 2024 17:30:08 +0400 Subject: [PATCH 2/6] Go mod tidy --- erigon-lib/go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/erigon-lib/go.sum b/erigon-lib/go.sum index b01da12f04a..620778bb705 100644 --- a/erigon-lib/go.sum +++ b/erigon-lib/go.sum @@ -148,8 +148,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978 h1:7ECOf7Us3+/706WGZXIX84qQc6zmxQby8fGbFLiqFlU= github.com/erigontech/erigon-snapshot v1.3.1-0.20240814160410-2ce37904b978/go.mod h1:ooHlCl+eEYzebiPu+FP6Q6SpPUeMADn8Jxabv3IKb9M= -github.com/erigontech/interfaces v0.0.0-20241011102608-29c1d07f457d h1:T0xEfGinQBrv1aV2WdIQCBoCPOn2CKKH5hi35o/V0m8= -github.com/erigontech/interfaces v0.0.0-20241011102608-29c1d07f457d/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE= github.com/erigontech/interfaces v0.0.0-20241018125732-814767d1b926 h1:2H5vOO4LT+P0oB82f4AEK7AK+1QJYUL9VNz2KEvqknI= github.com/erigontech/interfaces v0.0.0-20241018125732-814767d1b926/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE= github.com/erigontech/mdbx-go v0.38.4 h1:S9T7mTe9KPcFe4dOoOtVdI6gPzht9y7wMnYfUBgrQLo= From 793c6cb855db11e0cb8b80d44bb6d46f33ffd36e Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Fri, 18 Oct 2024 17:49:29 +0400 Subject: [PATCH 3/6] Remove requests from body, block and exeution payload --- .../beacon_state_mutator_mock.go | 406 +++++++++++++----- cl/cltypes/beacon_block_test.go | 2 +- .../block_collector/block_collector.go | 2 +- .../execution_client_direct.go | 2 +- cmd/evm/internal/t8ntool/transition.go | 2 +- cmd/state/commands/opcode_tracer.go | 2 +- cmd/state/exec3/historical_trace_worker.go | 1 - consensus/aura/aura.go | 2 +- consensus/clique/clique.go | 2 +- consensus/ethash/consensus.go | 2 +- consensus/merge/merge.go | 2 +- core/blockchain.go | 2 +- core/chain_makers.go | 2 +- core/genesis_write.go | 5 +- core/rawdb/accessors_chain.go | 9 +- core/rawdb/accessors_chain_test.go | 52 +-- core/rawdb/accessors_indexes_test.go | 2 +- core/types/block.go | 159 ++----- core/types/block_test.go | 6 +- core/types/encdec_test.go | 135 +----- eth/protocols/eth/protocol.go | 9 +- eth/stagedsync/exec3.go | 2 - eth/stagedsync/stage_mining_exec.go | 1 - eth/stagedsync/stage_mining_finish.go | 2 +- .../sentry_multi_client.go | 6 +- polygon/bor/bor.go | 2 +- polygon/p2p/message_listener_test.go | 2 +- .../statedb_insert_chain_transaction_test.go | 18 +- turbo/adapter/ethapi/api.go | 4 - .../block_downloader.go | 2 +- turbo/engineapi/engine_server.go | 7 +- turbo/execution/eth1/block_building.go | 8 - .../eth1/eth1_chain_reader.go/chain_reader.go | 4 +- turbo/execution/eth1/eth1_utils/grpc.go | 5 - turbo/execution/eth1/eth1_utils/grpc_test.go | 2 +- turbo/execution/eth1/getters.go | 4 - .../snapshotsync/freezeblocks/block_reader.go | 5 +- turbo/stages/bodydownload/body_algos.go | 21 +- 38 files changed, 383 insertions(+), 518 deletions(-) diff --git a/cl/abstract/mock_services/beacon_state_mutator_mock.go b/cl/abstract/mock_services/beacon_state_mutator_mock.go index 2a60b96d92e..567f83f6b6d 100644 --- a/cl/abstract/mock_services/beacon_state_mutator_mock.go +++ b/cl/abstract/mock_services/beacon_state_mutator_mock.go @@ -55,19 +55,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddCurrentEpochAtteastation(arg0 a } // MockBeaconStateMutatorAddCurrentEpochAtteastationCall wrap *gomock.Call -type MockBeaconStateMutatorAddCurrentEpochAtteastationCall struct{ +type MockBeaconStateMutatorAddCurrentEpochAtteastationCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddCurrentEpochAtteastationCall) Return() *MockBeaconStateMutatorAddCurrentEpochAtteastationCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddCurrentEpochAtteastationCall) Do(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddCurrentEpochAtteastationCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddCurrentEpochAtteastationCall) DoAndReturn(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddCurrentEpochAtteastationCall { c.Call = c.Call.DoAndReturn(f) @@ -88,19 +91,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddCurrentEpochParticipationFlags( } // MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall struct{ +type MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall) Do(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall) DoAndReturn(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -121,19 +127,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddEth1DataVote(arg0 any) *MockBea } // MockBeaconStateMutatorAddEth1DataVoteCall wrap *gomock.Call -type MockBeaconStateMutatorAddEth1DataVoteCall struct{ +type MockBeaconStateMutatorAddEth1DataVoteCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddEth1DataVoteCall) Return() *MockBeaconStateMutatorAddEth1DataVoteCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddEth1DataVoteCall) Do(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorAddEth1DataVoteCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddEth1DataVoteCall) DoAndReturn(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorAddEth1DataVoteCall { c.Call = c.Call.DoAndReturn(f) @@ -154,19 +163,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddHistoricalRoot(arg0 any) *MockB } // MockBeaconStateMutatorAddHistoricalRootCall wrap *gomock.Call -type MockBeaconStateMutatorAddHistoricalRootCall struct{ +type MockBeaconStateMutatorAddHistoricalRootCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddHistoricalRootCall) Return() *MockBeaconStateMutatorAddHistoricalRootCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddHistoricalRootCall) Do(f func(common.Hash)) *MockBeaconStateMutatorAddHistoricalRootCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddHistoricalRootCall) DoAndReturn(f func(common.Hash)) *MockBeaconStateMutatorAddHistoricalRootCall { c.Call = c.Call.DoAndReturn(f) @@ -187,19 +199,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddHistoricalSummary(arg0 any) *Mo } // MockBeaconStateMutatorAddHistoricalSummaryCall wrap *gomock.Call -type MockBeaconStateMutatorAddHistoricalSummaryCall struct{ +type MockBeaconStateMutatorAddHistoricalSummaryCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddHistoricalSummaryCall) Return() *MockBeaconStateMutatorAddHistoricalSummaryCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddHistoricalSummaryCall) Do(f func(*cltypes.HistoricalSummary)) *MockBeaconStateMutatorAddHistoricalSummaryCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddHistoricalSummaryCall) DoAndReturn(f func(*cltypes.HistoricalSummary)) *MockBeaconStateMutatorAddHistoricalSummaryCall { c.Call = c.Call.DoAndReturn(f) @@ -220,19 +235,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddInactivityScore(arg0 any) *Mock } // MockBeaconStateMutatorAddInactivityScoreCall wrap *gomock.Call -type MockBeaconStateMutatorAddInactivityScoreCall struct{ +type MockBeaconStateMutatorAddInactivityScoreCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddInactivityScoreCall) Return() *MockBeaconStateMutatorAddInactivityScoreCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddInactivityScoreCall) Do(f func(uint64)) *MockBeaconStateMutatorAddInactivityScoreCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddInactivityScoreCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorAddInactivityScoreCall { c.Call = c.Call.DoAndReturn(f) @@ -253,19 +271,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddPreviousEpochAttestation(arg0 a } // MockBeaconStateMutatorAddPreviousEpochAttestationCall wrap *gomock.Call -type MockBeaconStateMutatorAddPreviousEpochAttestationCall struct{ +type MockBeaconStateMutatorAddPreviousEpochAttestationCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddPreviousEpochAttestationCall) Return() *MockBeaconStateMutatorAddPreviousEpochAttestationCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddPreviousEpochAttestationCall) Do(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddPreviousEpochAttestationCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddPreviousEpochAttestationCall) DoAndReturn(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddPreviousEpochAttestationCall { c.Call = c.Call.DoAndReturn(f) @@ -286,19 +307,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddPreviousEpochParticipationAt(ar } // MockBeaconStateMutatorAddPreviousEpochParticipationAtCall wrap *gomock.Call -type MockBeaconStateMutatorAddPreviousEpochParticipationAtCall struct{ +type MockBeaconStateMutatorAddPreviousEpochParticipationAtCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall) Return() *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall) Do(f func(int, byte)) *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall) DoAndReturn(f func(int, byte)) *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall { c.Call = c.Call.DoAndReturn(f) @@ -319,19 +343,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddPreviousEpochParticipationFlags } // MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall struct{ +type MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall) Do(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall) DoAndReturn(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -352,19 +379,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddValidator(arg0, arg1 any) *Mock } // MockBeaconStateMutatorAddValidatorCall wrap *gomock.Call -type MockBeaconStateMutatorAddValidatorCall struct{ +type MockBeaconStateMutatorAddValidatorCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddValidatorCall) Return() *MockBeaconStateMutatorAddValidatorCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddValidatorCall) Do(f func(solid.Validator, uint64)) *MockBeaconStateMutatorAddValidatorCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddValidatorCall) DoAndReturn(f func(solid.Validator, uint64)) *MockBeaconStateMutatorAddValidatorCall { c.Call = c.Call.DoAndReturn(f) @@ -385,19 +415,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) AppendValidator(arg0 any) *MockBea } // MockBeaconStateMutatorAppendValidatorCall wrap *gomock.Call -type MockBeaconStateMutatorAppendValidatorCall struct{ +type MockBeaconStateMutatorAppendValidatorCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAppendValidatorCall) Return() *MockBeaconStateMutatorAppendValidatorCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAppendValidatorCall) Do(f func(solid.Validator)) *MockBeaconStateMutatorAppendValidatorCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAppendValidatorCall) DoAndReturn(f func(solid.Validator)) *MockBeaconStateMutatorAppendValidatorCall { c.Call = c.Call.DoAndReturn(f) @@ -418,19 +451,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetCurrentEpochAttestations() *M } // MockBeaconStateMutatorResetCurrentEpochAttestationsCall wrap *gomock.Call -type MockBeaconStateMutatorResetCurrentEpochAttestationsCall struct{ +type MockBeaconStateMutatorResetCurrentEpochAttestationsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetCurrentEpochAttestationsCall) Return() *MockBeaconStateMutatorResetCurrentEpochAttestationsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetCurrentEpochAttestationsCall) Do(f func()) *MockBeaconStateMutatorResetCurrentEpochAttestationsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetCurrentEpochAttestationsCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetCurrentEpochAttestationsCall { c.Call = c.Call.DoAndReturn(f) @@ -451,19 +487,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetEpochParticipation() *MockBea } // MockBeaconStateMutatorResetEpochParticipationCall wrap *gomock.Call -type MockBeaconStateMutatorResetEpochParticipationCall struct{ +type MockBeaconStateMutatorResetEpochParticipationCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetEpochParticipationCall) Return() *MockBeaconStateMutatorResetEpochParticipationCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetEpochParticipationCall) Do(f func()) *MockBeaconStateMutatorResetEpochParticipationCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetEpochParticipationCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetEpochParticipationCall { c.Call = c.Call.DoAndReturn(f) @@ -484,19 +523,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetEth1DataVotes() *MockBeaconSt } // MockBeaconStateMutatorResetEth1DataVotesCall wrap *gomock.Call -type MockBeaconStateMutatorResetEth1DataVotesCall struct{ +type MockBeaconStateMutatorResetEth1DataVotesCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetEth1DataVotesCall) Return() *MockBeaconStateMutatorResetEth1DataVotesCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetEth1DataVotesCall) Do(f func()) *MockBeaconStateMutatorResetEth1DataVotesCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetEth1DataVotesCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetEth1DataVotesCall { c.Call = c.Call.DoAndReturn(f) @@ -517,19 +559,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetHistoricalSummaries() *MockBe } // MockBeaconStateMutatorResetHistoricalSummariesCall wrap *gomock.Call -type MockBeaconStateMutatorResetHistoricalSummariesCall struct{ +type MockBeaconStateMutatorResetHistoricalSummariesCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetHistoricalSummariesCall) Return() *MockBeaconStateMutatorResetHistoricalSummariesCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetHistoricalSummariesCall) Do(f func()) *MockBeaconStateMutatorResetHistoricalSummariesCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetHistoricalSummariesCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetHistoricalSummariesCall { c.Call = c.Call.DoAndReturn(f) @@ -550,19 +595,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetPreviousEpochAttestations() * } // MockBeaconStateMutatorResetPreviousEpochAttestationsCall wrap *gomock.Call -type MockBeaconStateMutatorResetPreviousEpochAttestationsCall struct{ +type MockBeaconStateMutatorResetPreviousEpochAttestationsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetPreviousEpochAttestationsCall) Return() *MockBeaconStateMutatorResetPreviousEpochAttestationsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetPreviousEpochAttestationsCall) Do(f func()) *MockBeaconStateMutatorResetPreviousEpochAttestationsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetPreviousEpochAttestationsCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetPreviousEpochAttestationsCall { c.Call = c.Call.DoAndReturn(f) @@ -583,19 +631,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetActivationEligibilityEpochForVa } // MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -616,19 +667,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetActivationEpochForValidatorAtIn } // MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -649,19 +703,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetBlockRootAt(arg0, arg1 any) *Mo } // MockBeaconStateMutatorSetBlockRootAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetBlockRootAtCall struct{ +type MockBeaconStateMutatorSetBlockRootAtCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetBlockRootAtCall) Return() *MockBeaconStateMutatorSetBlockRootAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetBlockRootAtCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetBlockRootAtCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetBlockRootAtCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetBlockRootAtCall { c.Call = c.Call.DoAndReturn(f) @@ -682,19 +739,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetCurrentEpochParticipationFlags( } // MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall struct{ +type MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall) Do(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall) DoAndReturn(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -715,19 +775,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetCurrentJustifiedCheckpoint(arg0 } // MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall wrap *gomock.Call -type MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall struct{ +type MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall) Return() *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall) Do(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall) DoAndReturn(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall { c.Call = c.Call.DoAndReturn(f) @@ -748,19 +811,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetCurrentSyncCommittee(arg0 any) } // MockBeaconStateMutatorSetCurrentSyncCommitteeCall wrap *gomock.Call -type MockBeaconStateMutatorSetCurrentSyncCommitteeCall struct{ +type MockBeaconStateMutatorSetCurrentSyncCommitteeCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetCurrentSyncCommitteeCall) Return() *MockBeaconStateMutatorSetCurrentSyncCommitteeCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetCurrentSyncCommitteeCall) Do(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetCurrentSyncCommitteeCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetCurrentSyncCommitteeCall) DoAndReturn(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetCurrentSyncCommitteeCall { c.Call = c.Call.DoAndReturn(f) @@ -781,19 +847,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEffectiveBalanceForValidatorAtI } // MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -814,19 +883,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEpochParticipationForValidatorI } // MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall struct{ +type MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall) Return() *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall) Do(f func(bool, int, cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall) DoAndReturn(f func(bool, int, cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -847,19 +919,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEth1Data(arg0 any) *MockBeaconS } // MockBeaconStateMutatorSetEth1DataCall wrap *gomock.Call -type MockBeaconStateMutatorSetEth1DataCall struct{ +type MockBeaconStateMutatorSetEth1DataCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEth1DataCall) Return() *MockBeaconStateMutatorSetEth1DataCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEth1DataCall) Do(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorSetEth1DataCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEth1DataCall) DoAndReturn(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorSetEth1DataCall { c.Call = c.Call.DoAndReturn(f) @@ -880,19 +955,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEth1DepositIndex(arg0 any) *Moc } // MockBeaconStateMutatorSetEth1DepositIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetEth1DepositIndexCall struct{ +type MockBeaconStateMutatorSetEth1DepositIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEth1DepositIndexCall) Return() *MockBeaconStateMutatorSetEth1DepositIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEth1DepositIndexCall) Do(f func(uint64)) *MockBeaconStateMutatorSetEth1DepositIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEth1DepositIndexCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetEth1DepositIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -913,19 +991,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetExitEpochForValidatorAtIndex(ar } // MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -946,19 +1027,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetFinalizedCheckpoint(arg0 any) * } // MockBeaconStateMutatorSetFinalizedCheckpointCall wrap *gomock.Call -type MockBeaconStateMutatorSetFinalizedCheckpointCall struct{ +type MockBeaconStateMutatorSetFinalizedCheckpointCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetFinalizedCheckpointCall) Return() *MockBeaconStateMutatorSetFinalizedCheckpointCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetFinalizedCheckpointCall) Do(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetFinalizedCheckpointCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetFinalizedCheckpointCall) DoAndReturn(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetFinalizedCheckpointCall { c.Call = c.Call.DoAndReturn(f) @@ -979,19 +1063,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetFork(arg0 any) *MockBeaconState } // MockBeaconStateMutatorSetForkCall wrap *gomock.Call -type MockBeaconStateMutatorSetForkCall struct{ +type MockBeaconStateMutatorSetForkCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetForkCall) Return() *MockBeaconStateMutatorSetForkCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetForkCall) Do(f func(*cltypes.Fork)) *MockBeaconStateMutatorSetForkCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetForkCall) DoAndReturn(f func(*cltypes.Fork)) *MockBeaconStateMutatorSetForkCall { c.Call = c.Call.DoAndReturn(f) @@ -1012,19 +1099,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetInactivityScores(arg0 any) *Moc } // MockBeaconStateMutatorSetInactivityScoresCall wrap *gomock.Call -type MockBeaconStateMutatorSetInactivityScoresCall struct{ +type MockBeaconStateMutatorSetInactivityScoresCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetInactivityScoresCall) Return() *MockBeaconStateMutatorSetInactivityScoresCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetInactivityScoresCall) Do(f func([]uint64)) *MockBeaconStateMutatorSetInactivityScoresCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetInactivityScoresCall) DoAndReturn(f func([]uint64)) *MockBeaconStateMutatorSetInactivityScoresCall { c.Call = c.Call.DoAndReturn(f) @@ -1045,19 +1135,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetJustificationBits(arg0 any) *Mo } // MockBeaconStateMutatorSetJustificationBitsCall wrap *gomock.Call -type MockBeaconStateMutatorSetJustificationBitsCall struct{ +type MockBeaconStateMutatorSetJustificationBitsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetJustificationBitsCall) Return() *MockBeaconStateMutatorSetJustificationBitsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetJustificationBitsCall) Do(f func(cltypes.JustificationBits)) *MockBeaconStateMutatorSetJustificationBitsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetJustificationBitsCall) DoAndReturn(f func(cltypes.JustificationBits)) *MockBeaconStateMutatorSetJustificationBitsCall { c.Call = c.Call.DoAndReturn(f) @@ -1078,19 +1171,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetLatestBlockHeader(arg0 any) *Mo } // MockBeaconStateMutatorSetLatestBlockHeaderCall wrap *gomock.Call -type MockBeaconStateMutatorSetLatestBlockHeaderCall struct{ +type MockBeaconStateMutatorSetLatestBlockHeaderCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetLatestBlockHeaderCall) Return() *MockBeaconStateMutatorSetLatestBlockHeaderCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetLatestBlockHeaderCall) Do(f func(*cltypes.BeaconBlockHeader)) *MockBeaconStateMutatorSetLatestBlockHeaderCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetLatestBlockHeaderCall) DoAndReturn(f func(*cltypes.BeaconBlockHeader)) *MockBeaconStateMutatorSetLatestBlockHeaderCall { c.Call = c.Call.DoAndReturn(f) @@ -1111,19 +1207,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetLatestExecutionPayloadHeader(ar } // MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall wrap *gomock.Call -type MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall struct{ +type MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall) Return() *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall) Do(f func(*cltypes.Eth1Header)) *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall) DoAndReturn(f func(*cltypes.Eth1Header)) *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall { c.Call = c.Call.DoAndReturn(f) @@ -1144,19 +1243,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetNextSyncCommittee(arg0 any) *Mo } // MockBeaconStateMutatorSetNextSyncCommitteeCall wrap *gomock.Call -type MockBeaconStateMutatorSetNextSyncCommitteeCall struct{ +type MockBeaconStateMutatorSetNextSyncCommitteeCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetNextSyncCommitteeCall) Return() *MockBeaconStateMutatorSetNextSyncCommitteeCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetNextSyncCommitteeCall) Do(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetNextSyncCommitteeCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetNextSyncCommitteeCall) DoAndReturn(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetNextSyncCommitteeCall { c.Call = c.Call.DoAndReturn(f) @@ -1177,19 +1279,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetNextWithdrawalIndex(arg0 any) * } // MockBeaconStateMutatorSetNextWithdrawalIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetNextWithdrawalIndexCall struct{ +type MockBeaconStateMutatorSetNextWithdrawalIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetNextWithdrawalIndexCall) Return() *MockBeaconStateMutatorSetNextWithdrawalIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetNextWithdrawalIndexCall) Do(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetNextWithdrawalIndexCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1210,19 +1315,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetNextWithdrawalValidatorIndex(ar } // MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall struct{ +type MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall) Return() *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall) Do(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1243,19 +1351,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetPreviousEpochAttestations(arg0 } // MockBeaconStateMutatorSetPreviousEpochAttestationsCall wrap *gomock.Call -type MockBeaconStateMutatorSetPreviousEpochAttestationsCall struct{ +type MockBeaconStateMutatorSetPreviousEpochAttestationsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetPreviousEpochAttestationsCall) Return() *MockBeaconStateMutatorSetPreviousEpochAttestationsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetPreviousEpochAttestationsCall) Do(f func(*solid.ListSSZ[*solid.PendingAttestation])) *MockBeaconStateMutatorSetPreviousEpochAttestationsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetPreviousEpochAttestationsCall) DoAndReturn(f func(*solid.ListSSZ[*solid.PendingAttestation])) *MockBeaconStateMutatorSetPreviousEpochAttestationsCall { c.Call = c.Call.DoAndReturn(f) @@ -1276,19 +1387,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetPreviousEpochParticipationFlags } // MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall struct{ +type MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall) Do(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall) DoAndReturn(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -1309,19 +1423,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetPreviousJustifiedCheckpoint(arg } // MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall wrap *gomock.Call -type MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall struct{ +type MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall) Return() *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall) Do(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall) DoAndReturn(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall { c.Call = c.Call.DoAndReturn(f) @@ -1342,19 +1459,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetRandaoMixAt(arg0, arg1 any) *Mo } // MockBeaconStateMutatorSetRandaoMixAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetRandaoMixAtCall struct{ +type MockBeaconStateMutatorSetRandaoMixAtCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetRandaoMixAtCall) Return() *MockBeaconStateMutatorSetRandaoMixAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetRandaoMixAtCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetRandaoMixAtCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetRandaoMixAtCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetRandaoMixAtCall { c.Call = c.Call.DoAndReturn(f) @@ -1375,19 +1495,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetSlashingSegmentAt(arg0, arg1 an } // MockBeaconStateMutatorSetSlashingSegmentAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetSlashingSegmentAtCall struct{ +type MockBeaconStateMutatorSetSlashingSegmentAtCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetSlashingSegmentAtCall) Return() *MockBeaconStateMutatorSetSlashingSegmentAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetSlashingSegmentAtCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetSlashingSegmentAtCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetSlashingSegmentAtCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetSlashingSegmentAtCall { c.Call = c.Call.DoAndReturn(f) @@ -1408,19 +1531,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetSlot(arg0 any) *MockBeaconState } // MockBeaconStateMutatorSetSlotCall wrap *gomock.Call -type MockBeaconStateMutatorSetSlotCall struct{ +type MockBeaconStateMutatorSetSlotCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetSlotCall) Return() *MockBeaconStateMutatorSetSlotCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetSlotCall) Do(f func(uint64)) *MockBeaconStateMutatorSetSlotCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetSlotCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetSlotCall { c.Call = c.Call.DoAndReturn(f) @@ -1441,19 +1567,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetStateRootAt(arg0, arg1 any) *Mo } // MockBeaconStateMutatorSetStateRootAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetStateRootAtCall struct{ +type MockBeaconStateMutatorSetStateRootAtCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetStateRootAtCall) Return() *MockBeaconStateMutatorSetStateRootAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetStateRootAtCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetStateRootAtCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetStateRootAtCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetStateRootAtCall { c.Call = c.Call.DoAndReturn(f) @@ -1474,19 +1603,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorAtIndex(arg0, arg1 any } // MockBeaconStateMutatorSetValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorAtIndexCall) Do(f func(int, solid.Validator)) *MockBeaconStateMutatorSetValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorAtIndexCall) DoAndReturn(f func(int, solid.Validator)) *MockBeaconStateMutatorSetValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1509,19 +1641,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorBalance(arg0, arg1 any } // MockBeaconStateMutatorSetValidatorBalanceCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorBalanceCall struct{ +type MockBeaconStateMutatorSetValidatorBalanceCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorBalanceCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorBalanceCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorBalanceCall) Do(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorBalanceCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorBalanceCall) DoAndReturn(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorBalanceCall { c.Call = c.Call.DoAndReturn(f) @@ -1544,19 +1679,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorInactivityScore(arg0, } // MockBeaconStateMutatorSetValidatorInactivityScoreCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorInactivityScoreCall struct{ +type MockBeaconStateMutatorSetValidatorInactivityScoreCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorInactivityScoreCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorInactivityScoreCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorInactivityScoreCall) Do(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorInactivityScoreCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorInactivityScoreCall) DoAndReturn(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorInactivityScoreCall { c.Call = c.Call.DoAndReturn(f) @@ -1579,19 +1717,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsCurrentMatchingHeadA } // MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall struct{ +type MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1614,19 +1755,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsCurrentMatchingSourc } // MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall struct{ +type MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1649,19 +1793,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsCurrentMatchingTarge } // MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall struct{ +type MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1684,19 +1831,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsPreviousMatchingHead } // MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall struct{ +type MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1719,19 +1869,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsPreviousMatchingSour } // MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall struct{ +type MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1754,19 +1907,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsPreviousMatchingTarg } // MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall struct{ +type MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1789,19 +1945,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorMinCurrentInclusionDel } // MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall struct{ +type MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall) Do(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall) DoAndReturn(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall { c.Call = c.Call.DoAndReturn(f) @@ -1824,19 +1983,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorMinPreviousInclusionDe } // MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall struct{ +type MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall) Do(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall) DoAndReturn(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall { c.Call = c.Call.DoAndReturn(f) @@ -1859,19 +2021,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorSlashed(arg0, arg1 any } // MockBeaconStateMutatorSetValidatorSlashedCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorSlashedCall struct{ +type MockBeaconStateMutatorSetValidatorSlashedCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorSlashedCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorSlashedCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorSlashedCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorSlashedCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorSlashedCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorSlashedCall { c.Call = c.Call.DoAndReturn(f) @@ -1892,19 +2057,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetVersion(arg0 any) *MockBeaconSt } // MockBeaconStateMutatorSetVersionCall wrap *gomock.Call -type MockBeaconStateMutatorSetVersionCall struct{ +type MockBeaconStateMutatorSetVersionCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetVersionCall) Return() *MockBeaconStateMutatorSetVersionCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetVersionCall) Do(f func(clparams.StateVersion)) *MockBeaconStateMutatorSetVersionCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetVersionCall) DoAndReturn(f func(clparams.StateVersion)) *MockBeaconStateMutatorSetVersionCall { c.Call = c.Call.DoAndReturn(f) @@ -1927,19 +2095,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetWithdrawableEpochForValidatorAt } // MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall) Return(arg0 error) *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall) Do(f func(int, uint64) error) *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64) error) *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1960,19 +2131,22 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetWithdrawalCredentialForValidato } // MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall struct{ +type MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall struct { *gomock.Call } + // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } + // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } + // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) diff --git a/cl/cltypes/beacon_block_test.go b/cl/cltypes/beacon_block_test.go index b025c46ca32..995a31fbb6f 100644 --- a/cl/cltypes/beacon_block_test.go +++ b/cl/cltypes/beacon_block_test.go @@ -56,7 +56,7 @@ func TestBeaconBody(t *testing.T) { BaseFee: big.NewInt(1), }, []types.Transaction{types.NewTransaction(1, [20]byte{}, uint256.NewInt(1), 5, uint256.NewInt(2), nil)}, nil, nil, types.Withdrawals{&types.Withdrawal{ Index: 69, - }}, nil /*requests*/) + }}) // Test BeaconBody body := &BeaconBody{ diff --git a/cl/phase1/execution_client/block_collector/block_collector.go b/cl/phase1/execution_client/block_collector/block_collector.go index 10f011afad1..2def8da0fd9 100644 --- a/cl/phase1/execution_client/block_collector/block_collector.go +++ b/cl/phase1/execution_client/block_collector/block_collector.go @@ -123,7 +123,7 @@ func (b *blockCollector) Flush(ctx context.Context) error { b.logger.Warn("bad blocks segment received", "err", err) return err } - blocksBatch = append(blocksBatch, types.NewBlockFromStorage(executionPayload.BlockHash, header, txs, nil, body.Withdrawals, body.Requests)) + blocksBatch = append(blocksBatch, types.NewBlockFromStorage(executionPayload.BlockHash, header, txs, nil, body.Withdrawals)) if len(blocksBatch) >= batchSize { b.logger.Info("[Caplin] Inserting blocks", "from", blocksBatch[0].NumberU64(), "to", blocksBatch[len(blocksBatch)-1].NumberU64()) if err := b.engine.InsertBlocks(ctx, blocksBatch, true); err != nil { diff --git a/cl/phase1/execution_client/execution_client_direct.go b/cl/phase1/execution_client/execution_client_direct.go index 0881d14c89e..de08eb62012 100644 --- a/cl/phase1/execution_client/execution_client_direct.go +++ b/cl/phase1/execution_client/execution_client_direct.go @@ -59,7 +59,7 @@ func (cc *ExecutionClientDirect) NewPayload(ctx context.Context, payload *cltype return PayloadStatusInvalidated, err } - if err := cc.chainRW.InsertBlockAndWait(ctx, types.NewBlockFromStorage(payload.BlockHash, header, txs, nil, body.Withdrawals, body.Requests)); err != nil { + if err := cc.chainRW.InsertBlockAndWait(ctx, types.NewBlockFromStorage(payload.BlockHash, header, txs, nil, body.Withdrawals)); err != nil { return PayloadStatusNone, err } diff --git a/cmd/evm/internal/t8ntool/transition.go b/cmd/evm/internal/t8ntool/transition.go index 2d4856a0f30..384889301f4 100644 --- a/cmd/evm/internal/t8ntool/transition.go +++ b/cmd/evm/internal/t8ntool/transition.go @@ -287,7 +287,7 @@ func Main(ctx *cli.Context) error { ommerN.SetUint64(header.Number.Uint64() - ommer.Delta) ommerHeaders[i] = &types.Header{Coinbase: ommer.Address, Number: &ommerN} } - block := types.NewBlock(header, txs, ommerHeaders, nil /* receipts */, prestate.Env.Withdrawals, prestate.Env.Requests) + block := types.NewBlock(header, txs, ommerHeaders, nil /* receipts */, prestate.Env.Withdrawals) var hashError error getHash := func(num uint64) libcommon.Hash { diff --git a/cmd/state/commands/opcode_tracer.go b/cmd/state/commands/opcode_tracer.go index 3c2ebce25c3..c581ca7c36b 100644 --- a/cmd/state/commands/opcode_tracer.go +++ b/cmd/state/commands/opcode_tracer.go @@ -740,7 +740,7 @@ func runBlock(engine consensus.Engine, ibs *state.IntraBlockState, txnWriter sta if !vmConfig.ReadOnly { // Finalize the block, applying any consensus engine specific extras (e.g. block rewards) tx := block.Transactions() - if _, _, _, err := engine.FinalizeAndAssemble(chainConfig, header, ibs, tx, block.Uncles(), receipts, block.Withdrawals(), block.Requests(), nil, nil, nil, logger); err != nil { + if _, _, _, err := engine.FinalizeAndAssemble(chainConfig, header, ibs, tx, block.Uncles(), receipts, block.Withdrawals(), nil, nil, nil, nil, logger); err != nil { return nil, fmt.Errorf("finalize of block %d failed: %w", block.NumberU64(), err) } diff --git a/cmd/state/exec3/historical_trace_worker.go b/cmd/state/exec3/historical_trace_worker.go index 1356fcf08ec..dcb4dd50276 100644 --- a/cmd/state/exec3/historical_trace_worker.go +++ b/cmd/state/exec3/historical_trace_worker.go @@ -461,7 +461,6 @@ func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx GetHashFn: getHashFn, EvmBlockContext: blockContext, Withdrawals: b.Withdrawals(), - Requests: b.Requests(), // use history reader instead of state reader to catch up to the tx where we left off HistoryExecution: true, diff --git a/consensus/aura/aura.go b/consensus/aura/aura.go index 976ed9895dd..84aa18ad471 100644 --- a/consensus/aura/aura.go +++ b/consensus/aura/aura.go @@ -852,7 +852,7 @@ func (c *AuRa) FinalizeAndAssemble(config *chain.Config, header *types.Header, s } // Assemble and return the final block for sealing - return types.NewBlockForAsembling(header, outTxs, uncles, outReceipts, withdrawals, requests), outTxs, outReceipts, nil + return types.NewBlockForAsembling(header, outTxs, uncles, outReceipts, withdrawals), outTxs, outReceipts, nil } // Authorize injects a private key into the consensus engine to mint new blocks diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 6492029b4fc..de82ea675ce 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -392,7 +392,7 @@ func (c *Clique) FinalizeAndAssemble(chainConfig *chain.Config, header *types.He txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests, chain consensus.ChainReader, syscall consensus.SystemCall, call consensus.Call, logger log.Logger, ) (*types.Block, types.Transactions, types.Receipts, error) { // Assemble and return the final block for sealing - return types.NewBlockForAsembling(header, txs, nil, receipts, withdrawals, requests), txs, receipts, nil + return types.NewBlockForAsembling(header, txs, nil, receipts, withdrawals), txs, receipts, nil } // Authorize injects a private key into the consensus engine to mint new blocks diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index d18547d08f8..5aead0b343b 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -588,7 +588,7 @@ func (ethash *Ethash) FinalizeAndAssemble(chainConfig *chain.Config, header *typ return nil, nil, nil, err } // Header seems complete, assemble into a block and return - return types.NewBlock(header, outTxs, uncles, outR, withdrawals, requests), outTxs, outR, nil + return types.NewBlock(header, outTxs, uncles, outR, withdrawals), outTxs, outR, nil } // SealHash returns the hash of a block prior to it being sealed. diff --git a/consensus/merge/merge.go b/consensus/merge/merge.go index 76134fbba06..794287752ed 100644 --- a/consensus/merge/merge.go +++ b/consensus/merge/merge.go @@ -238,7 +238,7 @@ func (s *Merge) FinalizeAndAssemble(config *chain.Config, header *types.Header, rs = make(types.Requests, 0) } } - return types.NewBlockForAsembling(header, outTxs, uncles, outReceipts, withdrawals, rs), outTxs, outReceipts, nil + return types.NewBlockForAsembling(header, outTxs, uncles, outReceipts, withdrawals), outTxs, outReceipts, nil } func (s *Merge) SealHash(header *types.Header) (hash libcommon.Hash) { diff --git a/core/blockchain.go b/core/blockchain.go index 068de0b2c0e..a2d567cf943 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -170,7 +170,7 @@ func ExecuteBlockEphemerally( if !vmConfig.ReadOnly { txs := block.Transactions() - if _, _, _, err := FinalizeBlockExecution(engine, stateReader, block.Header(), txs, block.Uncles(), stateWriter, chainConfig, ibs, receipts, block.Withdrawals(), block.Requests(), chainReader, false, logger); err != nil { + if _, _, _, err := FinalizeBlockExecution(engine, stateReader, block.Header(), txs, block.Uncles(), stateWriter, chainConfig, ibs, receipts, block.Withdrawals(), nil, chainReader, false, logger); err != nil { return nil, err } } diff --git a/core/chain_makers.go b/core/chain_makers.go index c3e3894cad5..5ff9264dcf5 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -392,7 +392,7 @@ func GenerateChain(config *chain.Config, parent *types.Block, engine consensus.E b.header.Root = libcommon.BytesToHash(stateRoot) // Recreating block to make sure Root makes it into the header - block := types.NewBlockForAsembling(b.header, b.txs, b.uncles, b.receipts, nil /* withdrawals */, nil /*requests*/) + block := types.NewBlockForAsembling(b.header, b.txs, b.uncles, b.receipts, nil /* withdrawals */) return block, b.receipts, nil } return nil, nil, errors.New("no engine to generate blocks") diff --git a/core/genesis_write.go b/core/genesis_write.go index 410844581ae..9562fb7f37e 100644 --- a/core/genesis_write.go +++ b/core/genesis_write.go @@ -486,10 +486,7 @@ func GenesisToBlock(g *types.Genesis, dirs datadir.Dirs, logger log.Logger) (*ty } } - var requests types.Requests if g.Config != nil && g.Config.IsPrague(g.Timestamp) { - requests = types.Requests{} - // TODO @somnathb1 - if later iterations and/or tests don't need this from genesis.json, remove the following if g.RequestsHash != nil { head.RequestsHash = g.RequestsHash @@ -596,7 +593,7 @@ func GenesisToBlock(g *types.Genesis, dirs datadir.Dirs, logger log.Logger) (*ty head.Root = root - return types.NewBlock(head, nil, nil, nil, withdrawals, requests), statedb, nil + return types.NewBlock(head, nil, nil, nil, withdrawals), statedb, nil } func sortedAllocKeys(m types.GenesisAlloc) []string { diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index ea8deff567c..bc859e4e026 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -30,6 +30,8 @@ import ( "github.com/gballet/go-verkle" + "github.com/erigontech/erigon-lib/log/v3" + "github.com/erigontech/erigon-lib/common" "github.com/erigontech/erigon-lib/common/dbg" "github.com/erigontech/erigon-lib/common/hexutility" @@ -37,7 +39,7 @@ import ( "github.com/erigontech/erigon-lib/kv" "github.com/erigontech/erigon-lib/kv/dbutils" "github.com/erigontech/erigon-lib/kv/rawdbv3" - "github.com/erigontech/erigon-lib/log/v3" + "github.com/erigontech/erigon/core/types" "github.com/erigontech/erigon/ethdb/cbor" "github.com/erigontech/erigon/rlp" @@ -571,7 +573,6 @@ func ReadBody(db kv.Getter, hash common.Hash, number uint64) (*types.Body, uint6 body := new(types.Body) body.Uncles = bodyForStorage.Uncles body.Withdrawals = bodyForStorage.Withdrawals - body.Requests = bodyForStorage.Requests if bodyForStorage.TxCount < 2 { panic(fmt.Sprintf("block body hash too few txs amount: %d, %d", number, bodyForStorage.TxCount)) @@ -616,7 +617,6 @@ func WriteRawBody(db kv.RwTx, hash common.Hash, number uint64, body *types.RawBo TxCount: types.TxCountToTxAmount(len(body.Transactions)), /*system txs*/ Uncles: body.Uncles, Withdrawals: body.Withdrawals, - Requests: body.Requests, } if err = WriteBodyForStorage(db, hash, number, &data); err != nil { return false, fmt.Errorf("WriteBodyForStorage: %w", err) @@ -639,7 +639,6 @@ func WriteBody(db kv.RwTx, hash common.Hash, number uint64, body *types.Body) (e TxCount: types.TxCountToTxAmount(len(body.Transactions)), Uncles: body.Uncles, Withdrawals: body.Withdrawals, - Requests: body.Requests, } if err = WriteBodyForStorage(db, hash, number, &data); err != nil { return fmt.Errorf("failed to write body: %w", err) @@ -910,7 +909,7 @@ func ReadBlock(tx kv.Getter, hash common.Hash, number uint64) *types.Block { if body == nil { return nil } - return types.NewBlockFromStorage(hash, header, body.Transactions, body.Uncles, body.Withdrawals, body.Requests) + return types.NewBlockFromStorage(hash, header, body.Transactions, body.Uncles, body.Withdrawals) } // HasBlock - is more efficient than ReadBlock because doesn't read transactions. diff --git a/core/rawdb/accessors_chain_test.go b/core/rawdb/accessors_chain_test.go index 115667a89a8..7c03ef3d543 100644 --- a/core/rawdb/accessors_chain_test.go +++ b/core/rawdb/accessors_chain_test.go @@ -33,7 +33,6 @@ import ( "github.com/erigontech/erigon-lib/log/v3" libcommon "github.com/erigontech/erigon-lib/common" - "github.com/erigontech/erigon-lib/common/hexutility" // "github.com/erigontech/erigon-lib/common/hexutility" "github.com/erigontech/erigon-lib/kv/memdb" @@ -588,33 +587,6 @@ func TestBlockWithdrawalsStorage(t *testing.T) { withdrawals = append(withdrawals, &w) withdrawals = append(withdrawals, &w2) - pk := [48]byte{} - copy(pk[:], libcommon.Hex2Bytes("3d1291c96ad36914068b56d93974c1b1d5afcb3fcd37b2ac4b144afd3f6fec5b")) - sig := [96]byte{} - copy(sig[:], libcommon.Hex2Bytes("20a0a807c717055ecb60dc9d5071fbd336f7f238d61a288173de20f33f79ebf4")) - r1 := types.DepositRequest{ - Pubkey: pk, - WithdrawalCredentials: libcommon.Hash(hexutility.Hex2Bytes("15095f80cde9763665d2eee3f8dfffc4a4405544c6fece33130e6e98809c4b98")), - Amount: 12324, - Signature: sig, - Index: 0, - } - pk2 := [48]byte{} - copy(pk2[:], libcommon.Hex2Bytes("d40ffb510bfc52b058d5e934026ce3eddaf0a4b1703920f03b32b97de2196a93")) - sig2 := [96]byte{} - copy(sig2[:], libcommon.Hex2Bytes("dc40cf2c33c6fb17e11e3ffe455063f1bf2280a3b08563f8b33aa359a16a383c")) - r2 := types.DepositRequest{ - Pubkey: pk2, - WithdrawalCredentials: libcommon.Hash(hexutility.Hex2Bytes("d73d9332eb1229e58aa7e33e9a5079d9474f68f747544551461bf3ff9f7ccd64")), - Amount: 12324, - Signature: sig2, - Index: 0, - } - deposits := make(types.DepositRequests, 0) - deposits = append(deposits, &r1) - deposits = append(deposits, &r2) - var reqs types.Requests - reqs = deposits.Requests() // Create a test block to move around the database and make sure it's really new block := types.NewBlockWithHeader(&types.Header{ Number: big.NewInt(1), @@ -634,7 +606,7 @@ func TestBlockWithdrawalsStorage(t *testing.T) { } // Write withdrawals to block - wBlock := types.NewBlockFromStorage(block.Hash(), block.Header(), block.Transactions(), block.Uncles(), withdrawals, reqs) + wBlock := types.NewBlockFromStorage(block.Hash(), block.Header(), block.Transactions(), block.Uncles(), withdrawals) if err := rawdb.WriteHeader(tx, wBlock.HeaderNoCopy()); err != nil { t.Fatalf("Could not write body: %v", err) } @@ -688,28 +660,6 @@ func TestBlockWithdrawalsStorage(t *testing.T) { require.Equal(libcommon.Address{0: 0xff}, rw2.Address) require.Equal(uint64(1001), rw2.Amount) - readRequests := entry.Requests - require.True(len(entry.Requests) == 2) - rd1 := readRequests[0] - rd2 := readRequests[1] - require.True(rd1.RequestType() == types.DepositRequestType) - require.True(rd2.RequestType() == types.DepositRequestType) - - readDeposits := readRequests.Deposits() - d1 := readDeposits[0] - d2 := readDeposits[1] - require.Equal(d1.Pubkey, r1.Pubkey) - require.Equal(d1.Amount, r1.Amount) - require.Equal(d1.Signature, r1.Signature) - require.Equal(d1.WithdrawalCredentials, r1.WithdrawalCredentials) - require.Equal(d1.Index, r1.Index) - - require.Equal(d2.Pubkey, r2.Pubkey) - require.Equal(d2.Amount, r2.Amount) - require.Equal(d2.Signature, r2.Signature) - require.Equal(d2.WithdrawalCredentials, r2.WithdrawalCredentials) - require.Equal(d2.Index, r2.Index) - // Delete the block and verify the execution if err := rawdb.TruncateBlocks(context.Background(), tx, block.NumberU64()); err != nil { t.Fatal(err) diff --git a/core/rawdb/accessors_indexes_test.go b/core/rawdb/accessors_indexes_test.go index 2f0291a4562..8dd02b14a13 100644 --- a/core/rawdb/accessors_indexes_test.go +++ b/core/rawdb/accessors_indexes_test.go @@ -67,7 +67,7 @@ func TestLookupStorage(t *testing.T) { tx3 := types.NewTransaction(3, libcommon.BytesToAddress([]byte{0x33}), uint256.NewInt(333), 3333, uint256.NewInt(33333), []byte{0x33, 0x33, 0x33}) txs := []types.Transaction{tx1, tx2, tx3} - block := types.NewBlock(&types.Header{Number: big.NewInt(314)}, txs, nil, nil, nil, nil /*requests*/) + block := types.NewBlock(&types.Header{Number: big.NewInt(314)}, txs, nil, nil, nil) // Check that no transactions entries are in a pristine database for i, txn := range txs { diff --git a/core/types/block.go b/core/types/block.go index e2e1753deb5..ac1d6dd471d 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -652,7 +652,6 @@ type Body struct { Transactions []Transaction Uncles []*Header Withdrawals []*Withdrawal - Requests Requests } // RawBody is semi-parsed variant of Body, where transactions are still unparsed RLP strings @@ -662,7 +661,6 @@ type RawBody struct { Transactions [][]byte Uncles []*Header Withdrawals []*Withdrawal - Requests Requests } // BaseTxnID represents internal auto-incremented transaction number in block, may be different across the nodes @@ -705,7 +703,6 @@ type BodyForStorage struct { TxCount uint32 Uncles []*Header Withdrawals []*Withdrawal - Requests Requests } // Alternative representation of the Block. @@ -718,7 +715,6 @@ func (r RawBlock) AsBlock() (*Block, error) { b := &Block{header: r.Header} b.uncles = r.Body.Uncles b.withdrawals = r.Body.Withdrawals - b.requests = r.Body.Requests txs := make([]Transaction, len(r.Body.Transactions)) for i, txn := range r.Body.Transactions { @@ -738,7 +734,6 @@ type Block struct { uncles []*Header transactions Transactions withdrawals []*Withdrawal - requests Requests // caches size atomic.Uint64 @@ -766,11 +761,11 @@ func (b *Body) SendersFromTxs() []libcommon.Address { } func (rb RawBody) EncodingSize() int { - payloadSize, _, _, _, _ := rb.payloadSize() + payloadSize, _, _, _ := rb.payloadSize() return payloadSize } -func (rb RawBody) payloadSize() (payloadSize, txsLen, unclesLen, withdrawalsLen, requestsLen int) { +func (rb RawBody) payloadSize() (payloadSize, txsLen, unclesLen, withdrawalsLen int) { // size of Transactions for _, txn := range rb.Transactions { txsLen += len(txn) @@ -787,17 +782,11 @@ func (rb RawBody) payloadSize() (payloadSize, txsLen, unclesLen, withdrawalsLen, payloadSize += rlp2.ListPrefixLen(withdrawalsLen) + withdrawalsLen } - // size of requests - if rb.Requests != nil { - requestsLen = rb.Requests.EncodingSize() - payloadSize += rlp2.ListPrefixLen(requestsLen) + requestsLen - } - - return payloadSize, txsLen, unclesLen, withdrawalsLen, requestsLen + return payloadSize, txsLen, unclesLen, withdrawalsLen } func (rb RawBody) EncodeRLP(w io.Writer) error { - payloadSize, txsLen, unclesLen, withdrawalsLen, _ /* requestsLen */ := rb.payloadSize() + payloadSize, txsLen, unclesLen, withdrawalsLen := rb.payloadSize() var b [33]byte // prefix if err := EncodeStructSizePrefix(payloadSize, w, b[:]); err != nil { @@ -822,10 +811,6 @@ func (rb RawBody) EncodeRLP(w io.Writer) error { return err } } - // encode Requests - if rb.Requests != nil { - rb.Requests.EncodeRLP(w) - } return nil } @@ -861,15 +846,11 @@ func (rb *RawBody) DecodeRLP(s *rlp.Stream) error { if err := decodeWithdrawals(&rb.Withdrawals, s); err != nil { return err } - // decode Requests - if err := decodeRequests(&rb.Requests, s); err != nil { - return err - } return s.ListEnd() } -func (bfs BodyForStorage) payloadSize() (payloadSize, unclesLen, withdrawalsLen, requestsLen int) { +func (bfs BodyForStorage) payloadSize() (payloadSize, unclesLen, withdrawalsLen int) { baseTxnIDLen := 1 + rlp.IntLenExcludingHead(bfs.BaseTxnID.U64()) txCountLen := 1 + rlp.IntLenExcludingHead(uint64(bfs.TxCount)) @@ -886,17 +867,11 @@ func (bfs BodyForStorage) payloadSize() (payloadSize, unclesLen, withdrawalsLen, payloadSize += rlp2.ListPrefixLen(withdrawalsLen) + withdrawalsLen } - // size of Requests - if bfs.Requests != nil { - requestsLen = bfs.Requests.EncodingSize() - payloadSize += rlp2.ListPrefixLen(requestsLen) + requestsLen - } - - return payloadSize, unclesLen, withdrawalsLen, requestsLen + return payloadSize, unclesLen, withdrawalsLen } func (bfs BodyForStorage) EncodeRLP(w io.Writer) error { - payloadSize, unclesLen, withdrawalsLen, _ /* requestsLen */ := bfs.payloadSize() + payloadSize, unclesLen, withdrawalsLen := bfs.payloadSize() var b [33]byte // prefix @@ -925,10 +900,7 @@ func (bfs BodyForStorage) EncodeRLP(w io.Writer) error { return err } } - // encode Requests - if bfs.Requests != nil { - bfs.Requests.EncodeRLP(w) - } + return nil } @@ -955,19 +927,15 @@ func (bfs *BodyForStorage) DecodeRLP(s *rlp.Stream) error { if err := decodeWithdrawals(&bfs.Withdrawals, s); err != nil { return err } - // decode Requests - if err := decodeRequests(&bfs.Requests, s); err != nil { - return err - } return s.ListEnd() } func (bb Body) EncodingSize() int { - payloadSize, _, _, _, _ := bb.payloadSize() + payloadSize, _, _, _ := bb.payloadSize() return payloadSize } -func (bb Body) payloadSize() (payloadSize int, txsLen, unclesLen, withdrawalsLen, requestsLen int) { +func (bb Body) payloadSize() (payloadSize int, txsLen, unclesLen, withdrawalsLen int) { // size of Transactions txsLen += encodingSizeGeneric(bb.Transactions) payloadSize += rlp2.ListPrefixLen(txsLen) + txsLen @@ -982,18 +950,11 @@ func (bb Body) payloadSize() (payloadSize int, txsLen, unclesLen, withdrawalsLen payloadSize += rlp2.ListPrefixLen(withdrawalsLen) + withdrawalsLen } - // size of Requests - if bb.Requests != nil { - requestsLen = bb.Requests.EncodingSize() - payloadSize += rlp2.ListPrefixLen(requestsLen) + requestsLen - - } - - return payloadSize, txsLen, unclesLen, withdrawalsLen, requestsLen + return payloadSize, txsLen, unclesLen, withdrawalsLen } func (bb Body) EncodeRLP(w io.Writer) error { - payloadSize, txsLen, unclesLen, withdrawalsLen /* requestsLen */, _ := bb.payloadSize() + payloadSize, txsLen, unclesLen, withdrawalsLen := bb.payloadSize() var b [33]byte // prefix if err := EncodeStructSizePrefix(payloadSize, w, b[:]); err != nil { @@ -1013,10 +974,6 @@ func (bb Body) EncodeRLP(w io.Writer) error { return err } } - // encode Requests - if bb.Requests != nil { - bb.Requests.EncodeRLP(w) - } return nil } @@ -1038,10 +995,6 @@ func (bb *Body) DecodeRLP(s *rlp.Stream) error { if err := decodeWithdrawals(&bb.Withdrawals, s); err != nil { return err } - // decode Requests - if err := decodeRequests(&bb.Requests, s); err != nil { - return err - } return s.ListEnd() } @@ -1052,7 +1005,7 @@ func (bb *Body) DecodeRLP(s *rlp.Stream) error { // The values of TxHash, UncleHash, ReceiptHash, Bloom, and WithdrawalHash // in the header are ignored and set to the values derived from // the given txs, uncles, receipts, and withdrawals. -func NewBlock(header *Header, txs []Transaction, uncles []*Header, receipts []*Receipt, withdrawals []*Withdrawal, requests Requests) *Block { +func NewBlock(header *Header, txs []Transaction, uncles []*Header, receipts []*Receipt, withdrawals []*Withdrawal) *Block { b := &Block{header: CopyHeader(header)} // TODO: panic if len(txs) != len(receipts) @@ -1098,38 +1051,22 @@ func NewBlock(header *Header, txs []Transaction, uncles []*Header, receipts []*R } b.header.ParentBeaconBlockRoot = header.ParentBeaconBlockRoot - - if requests == nil { - b.header.RequestsHash = nil - } else if len(requests) == 0 { - b.header.RequestsHash = &EmptyRootHash - b.requests = make(Requests, len(requests)) - } else { - h := DeriveSha(requests) - b.header.RequestsHash = &h - b.requests = make(Requests, len(requests)) - for i, r := range requests { - rCopy := r.copy() - b.requests[i] = rCopy - } - } - b.header.mutable = false //Force immutability of block and header. Use `NewBlockForAsembling` if you need mutable block return b } // NewBlockForAsembling - creating new block - which allow mutation of fileds. Use it for block-assembly -func NewBlockForAsembling(header *Header, txs []Transaction, uncles []*Header, receipts []*Receipt, withdrawals []*Withdrawal, requests Requests) *Block { - b := NewBlock(header, txs, uncles, receipts, withdrawals, requests) +func NewBlockForAsembling(header *Header, txs []Transaction, uncles []*Header, receipts []*Receipt, withdrawals []*Withdrawal) *Block { + b := NewBlock(header, txs, uncles, receipts, withdrawals) b.header.mutable = true return b } // NewBlockFromStorage like NewBlock but used to create Block object when read it from DB // in this case no reason to copy parts, or re-calculate headers fields - they are all stored in DB -func NewBlockFromStorage(hash libcommon.Hash, header *Header, txs []Transaction, uncles []*Header, withdrawals []*Withdrawal, requests Requests) *Block { +func NewBlockFromStorage(hash libcommon.Hash, header *Header, txs []Transaction, uncles []*Header, withdrawals []*Withdrawal) *Block { header.hash.Store(&hash) - b := &Block{header: header, transactions: txs, uncles: uncles, withdrawals: withdrawals, requests: requests} + b := &Block{header: header, transactions: txs, uncles: uncles, withdrawals: withdrawals} return b } @@ -1148,7 +1085,6 @@ func NewBlockFromNetwork(header *Header, body *Body) *Block { transactions: body.Transactions, uncles: body.Uncles, withdrawals: body.Withdrawals, - requests: body.Requests, } } @@ -1230,15 +1166,11 @@ func (bb *Block) DecodeRLP(s *rlp.Stream) error { if err := decodeWithdrawals(&bb.withdrawals, s); err != nil { return err } - // decode Requests - if err := decodeRequests(&bb.requests, s); err != nil { - return err - } return s.ListEnd() } -func (bb *Block) payloadSize() (payloadSize int, txsLen, unclesLen, withdrawalsLen, requestsLen int) { +func (bb *Block) payloadSize() (payloadSize int, txsLen, unclesLen, withdrawalsLen int) { // size of Header headerLen := bb.header.EncodingSize() payloadSize += rlp2.ListPrefixLen(headerLen) + headerLen @@ -1257,24 +1189,17 @@ func (bb *Block) payloadSize() (payloadSize int, txsLen, unclesLen, withdrawalsL payloadSize += rlp2.ListPrefixLen(withdrawalsLen) + withdrawalsLen } - // size of Requests - if bb.requests != nil { - requestsLen = bb.requests.EncodingSize() - payloadSize += rlp2.ListPrefixLen(requestsLen) + requestsLen - - } - - return payloadSize, txsLen, unclesLen, withdrawalsLen, requestsLen + return payloadSize, txsLen, unclesLen, withdrawalsLen } func (bb *Block) EncodingSize() int { - payloadSize, _, _, _, _ := bb.payloadSize() + payloadSize, _, _, _ := bb.payloadSize() return payloadSize } // EncodeRLP serializes b into the Ethereum RLP block format. func (bb *Block) EncodeRLP(w io.Writer) error { - payloadSize, txsLen, unclesLen, withdrawalsLen, _ /* requestsLen */ := bb.payloadSize() + payloadSize, txsLen, unclesLen, withdrawalsLen := bb.payloadSize() var b [33]byte // prefix if err := EncodeStructSizePrefix(payloadSize, w, b[:]); err != nil { @@ -1298,10 +1223,7 @@ func (bb *Block) EncodeRLP(w io.Writer) error { return err } } - // encode Requests - if bb.requests != nil { - bb.requests.EncodeRLP(w) - } + return nil } @@ -1345,7 +1267,6 @@ func (b *Block) WithdrawalsHash() *libcommon.Hash { return b.header.Withdr func (b *Block) Withdrawals() Withdrawals { return b.withdrawals } func (b *Block) ParentBeaconBlockRoot() *libcommon.Hash { return b.header.ParentBeaconBlockRoot } func (b *Block) RequestsHash() *libcommon.Hash { return b.header.RequestsHash } -func (b *Block) Requests() Requests { return b.requests } // Header returns a deep-copy of the entire block header using CopyHeader() func (b *Block) Header() *Header { return CopyHeader(b.header) } @@ -1353,7 +1274,7 @@ func (b *Block) HeaderNoCopy() *Header { return b.header } // Body returns the non-header content of the block. func (b *Block) Body() *Body { - bd := &Body{Transactions: b.transactions, Uncles: b.uncles, Withdrawals: b.withdrawals, Requests: b.requests} + bd := &Body{Transactions: b.transactions, Uncles: b.uncles, Withdrawals: b.withdrawals} bd.SendersFromTxs() return bd } @@ -1369,7 +1290,7 @@ func (b *Block) SendersToTxs(senders []libcommon.Address) { // RawBody creates a RawBody based on the block. It is not very efficient, so // will probably be removed in favour of RawBlock. Also it panics func (b *Block) RawBody() *RawBody { - br := &RawBody{Transactions: make([][]byte, len(b.transactions)), Uncles: b.uncles, Withdrawals: b.withdrawals, Requests: b.requests} + br := &RawBody{Transactions: make([][]byte, len(b.transactions)), Uncles: b.uncles, Withdrawals: b.withdrawals} for i, txn := range b.transactions { var err error br.Transactions[i], err = rlp.EncodeToBytes(txn) @@ -1382,7 +1303,7 @@ func (b *Block) RawBody() *RawBody { // RawBody creates a RawBody based on the body. func (b *Body) RawBody() *RawBody { - br := &RawBody{Transactions: make([][]byte, len(b.Transactions)), Uncles: b.Uncles, Withdrawals: b.Withdrawals, Requests: b.Requests} + br := &RawBody{Transactions: make([][]byte, len(b.Transactions)), Uncles: b.Uncles, Withdrawals: b.Withdrawals} for i, txn := range b.Transactions { var err error br.Transactions[i], err = rlp.EncodeToBytes(txn) @@ -1411,7 +1332,7 @@ func (b *Block) SanityCheck() error { return b.header.SanityCheck() } -// HashCheck checks that transactions, receipts, uncles, withdrawals, and requests hashes are correct. +// HashCheck checks that transactions, receipts, uncles, and withdrawals hashes are correct. func (b *Block) HashCheck(fullCheck bool) error { if hash := DeriveSha(b.Transactions()); hash != b.TxHash() { return fmt.Errorf("block has invalid transaction hash: have %x, exp: %x", hash, b.TxHash()) @@ -1448,16 +1369,9 @@ func (b *Block) HashCheck(fullCheck bool) error { return fmt.Errorf("block has invalid withdrawals hash: have %x, exp: %x", hash, b.WithdrawalsHash()) } - if b.RequestsHash() == nil { - if b.Requests() != nil { - return errors.New("header missing RequestsHash") - } - return nil - } - - if hash := DeriveSha(b.Requests()); hash != *b.RequestsHash() { - return fmt.Errorf("block has invalid requests root: have %x, exp: %x", hash, b.RequestsHash()) - } + // if hash := DeriveSha(b.Requests()); hash != *b.RequestsHash() { + // return fmt.Errorf("block has invalid requests root: have %x, exp: %x", hash, b.RequestsHash()) + // } return nil } @@ -1516,20 +1430,11 @@ func (b *Block) Copy() *Block { } } - var requests []Request - if b.requests != nil { - requests = make([]Request, 0, len(b.requests)) - for _, request := range b.requests { - requests = append(requests, request.copy()) - } - } - newB := &Block{ header: CopyHeader(b.header), uncles: uncles, transactions: CopyTxs(b.transactions), withdrawals: withdrawals, - requests: requests, } szCopy := b.size.Load() newB.size.Store(szCopy) @@ -1546,7 +1451,6 @@ func (b *Block) WithSeal(header *Header) *Block { transactions: b.transactions, uncles: b.uncles, withdrawals: b.withdrawals, - requests: b.requests, } } @@ -1652,11 +1556,6 @@ func decodeWithdrawals(appendList *[]*Withdrawal, s *rlp.Stream) error { return checkErrListEnd(s, err) } -func decodeRequests(r *Requests, s *rlp.Stream) error { - err := r.DecodeRLP(s) - return checkErrListEnd(s, err) -} - func checkErrListEnd(s *rlp.Stream, err error) error { if !errors.Is(err, rlp.EOL) { return err diff --git a/core/types/block_test.go b/core/types/block_test.go index 64febc946db..39fce61b0d4 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -363,7 +363,7 @@ func makeBenchBlock() *Block { Extra: []byte("benchmark uncle"), } } - return NewBlock(header, txs, uncles, receipts, nil /* withdrawals */, nil /*requests*/) + return NewBlock(header, txs, uncles, receipts, nil /* withdrawals */) } func TestCanEncodeAndDecodeRawBody(t *testing.T) { @@ -512,7 +512,7 @@ func TestWithdrawalsEncoding(t *testing.T) { Amount: 5_000_000_000, } - block := NewBlock(&header, nil, nil, nil, withdrawals, nil /*requests*/) + block := NewBlock(&header, nil, nil, nil, withdrawals) _ = block.Size() encoded, err := rlp.EncodeToBytes(block) @@ -524,7 +524,7 @@ func TestWithdrawalsEncoding(t *testing.T) { assert.Equal(t, block, &decoded) // Now test with empty withdrawals - block2 := NewBlock(&header, nil, nil, nil, []*Withdrawal{}, nil /*requests*/) + block2 := NewBlock(&header, nil, nil, nil, []*Withdrawal{}) _ = block2.Size() encoded2, err := rlp.EncodeToBytes(block2) diff --git a/core/types/encdec_test.go b/core/types/encdec_test.go index 9415e9a4bd3..3412f3277f6 100644 --- a/core/types/encdec_test.go +++ b/core/types/encdec_test.go @@ -28,7 +28,6 @@ import ( "github.com/holiman/uint256" libcommon "github.com/erigontech/erigon-lib/common" - "github.com/erigontech/erigon-lib/common/hexutility" types2 "github.com/erigontech/erigon-lib/types" "github.com/erigontech/erigon/rlp" ) @@ -87,12 +86,6 @@ func (tr *TRand) RandWithdrawal() *Withdrawal { } } -func (tr *TRand) RandWithdrawalRequest() *WithdrawalRequest { - return &WithdrawalRequest{ - RequestData: [WithdrawalRequestDataLen]byte(tr.RandBytes(WithdrawalRequestDataLen)), - } -} - func (tr *TRand) RandDepositRequest() *DepositRequest { return &DepositRequest{ Pubkey: [48]byte(tr.RandBytes(48)), @@ -103,20 +96,10 @@ func (tr *TRand) RandDepositRequest() *DepositRequest { } } -func (tr *TRand) RandConsolidationRequest() *ConsolidationRequest { - return &ConsolidationRequest{ - RequestData: [ConsolidationRequestDataLen]byte(tr.RandBytes(ConsolidationRequestDataLen)), - } -} - -func (tr *TRand) RandRequest() Request { +func (tr *TRand) RandRequest() *DepositRequest { switch tr.rnd.Intn(3) { case 0: return tr.RandDepositRequest() - case 1: - return tr.RandWithdrawalRequest() - case 2: - return tr.RandConsolidationRequest() default: return nil // unreachable code } @@ -303,7 +286,6 @@ func (tr *TRand) RandRawBody() *RawBody { Transactions: tr.RandRawTransactions(tr.RandIntInRange(1, 6)), Uncles: tr.RandHeaders(tr.RandIntInRange(1, 6)), Withdrawals: tr.RandWithdrawals(tr.RandIntInRange(1, 6)), - Requests: tr.RandRequests(tr.RandIntInRange(1, 6)), } } @@ -330,7 +312,6 @@ func (tr *TRand) RandBody() *Body { Transactions: tr.RandTransactions(tr.RandIntInRange(1, 6)), Uncles: tr.RandHeaders(tr.RandIntInRange(1, 6)), Withdrawals: tr.RandWithdrawals(tr.RandIntInRange(1, 6)), - Requests: tr.RandRequests(tr.RandIntInRange(1, 6)), } } @@ -409,47 +390,13 @@ func compareDeposits(t *testing.T, a, b *DepositRequest) { check(t, "Deposit.Index", a.Index, b.Index) } -func compareWithdrawalRequests(t *testing.T, a, b *WithdrawalRequest) { - check(t, "WithdrawalRequest.Amount", a.RequestData, b.RequestData) -} - -func compareConsolidationRequests(t *testing.T, a, b *ConsolidationRequest) { - check(t, "ConsolidationRequest.RequestData", a.RequestData, b.RequestData) -} - -func checkRequests(t *testing.T, a, b Request) { +func checkRequests(t *testing.T, a, b DepositRequest) { if a.RequestType() != b.RequestType() { t.Errorf("request type mismatch: request-a: %v, request-b: %v", a.RequestType(), b.RequestType()) } - switch a.RequestType() { - case DepositRequestType: - a, aok := a.(*DepositRequest) - b, bok := b.(*DepositRequest) - if aok && bok { - compareDeposits(t, a, b) - } else { - t.Errorf("type assertion failed: %v %v %v %v", a.RequestType(), aok, b.RequestType(), bok) - } - case WithdrawalRequestType: - a, aok := a.(*WithdrawalRequest) - b, bok := b.(*WithdrawalRequest) - if aok && bok { - compareWithdrawalRequests(t, a, b) - } else { - t.Errorf("type assertion failed: %v %v %v %v", a.RequestType(), aok, b.RequestType(), bok) - } - case ConsolidationRequestType: - a, aok := a.(*ConsolidationRequest) - b, bok := b.(*ConsolidationRequest) - if aok && bok { - compareConsolidationRequests(t, a, b) - } else { - t.Errorf("type assertion failed: %v %v %v %v", a.RequestType(), aok, b.RequestType(), bok) - } - default: - t.Errorf("unknown request type: %v", a.RequestType()) - } + compareDeposits(t, &a, &b) + } func compareHeaders(t *testing.T, a, b []*Header) error { @@ -476,15 +423,15 @@ func compareWithdrawals(t *testing.T, a, b []*Withdrawal) error { return nil } -func compareRequests(t *testing.T, a, b Requests) error { - arLen, brLen := len(a), len(b) - if arLen != brLen { - return fmt.Errorf("requests len mismatch: expected: %v, got: %v", arLen, brLen) - } +func compareRequests(t *testing.T, a, b DepositRequests) error { + // arLen, brLen := len(a), len(b) + // if arLen != brLen { + // return fmt.Errorf("requests len mismatch: expected: %v, got: %v", arLen, brLen) + // } - for i := 0; i < arLen; i++ { - checkRequests(t, a[i], b[i]) - } + // for i := 0; i < arLen; i++ { + // checkRequests(t, &a[i], &b[i]) + // } return nil } @@ -503,8 +450,6 @@ func compareRawBodies(t *testing.T, a, b *RawBody) error { compareHeaders(t, a.Uncles, b.Uncles) compareWithdrawals(t, a.Withdrawals, b.Withdrawals) - compareRequests(t, a.Requests, b.Requests) - return nil } @@ -521,7 +466,6 @@ func compareBodies(t *testing.T, a, b *Body) error { compareHeaders(t, a.Uncles, b.Uncles) compareWithdrawals(t, a.Withdrawals, b.Withdrawals) - compareRequests(t, a.Requests, b.Requests) return nil } @@ -572,58 +516,3 @@ func TestBodyEncodeDecodeRLP(t *testing.T) { } } } - -func TestDepositEncodeDecode(t *testing.T) { - tr := NewTRand() - var buf bytes.Buffer - for i := 0; i < RUNS; i++ { - a := tr.RandDepositRequest() - buf.Reset() - if err := a.EncodeRLP(&buf); err != nil { - t.Errorf("error: deposit.EncodeRLP(): %v", err) - } - b := new(DepositRequest) - if err := b.DecodeRLP(buf.Bytes()); err != nil { - t.Errorf("error: Deposit.DecodeRLP(): %v", err) - } - compareDeposits(t, a, b) - } -} - -func TestConsolidationReqsEncodeDecode(t *testing.T) { - tr := NewTRand() - var buf bytes.Buffer - for i := 0; i < RUNS; i++ { - a := tr.RandConsolidationRequest() - buf.Reset() - if err := a.EncodeRLP(&buf); err != nil { - t.Errorf("error: deposit.EncodeRLP(): %v", err) - } - b := new(ConsolidationRequest) - if err := b.DecodeRLP(buf.Bytes()); err != nil { - t.Errorf("error: Deposit.DecodeRLP(): %v", err) - } - compareConsolidationRequests(t, a, b) - } -} - -func TestWithdrawalReqsEncodeDecode(t *testing.T) { - wx1 := WithdrawalRequest{ - RequestData: [WithdrawalRequestDataLen]byte(hexutility.MustDecodeHex("0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fefefefefefefefe")), - } - wx2 := WithdrawalRequest{ - RequestData: [WithdrawalRequestDataLen]byte(hexutility.MustDecodeHex("0x8a0a19589531694250d570040a0c4b74576919b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fefefefefefefefe")), - } - - var wx3, wx4 WithdrawalRequest - var buf1, buf2 bytes.Buffer - wx1.EncodeRLP(&buf1) - wx2.EncodeRLP(&buf2) - - wx3.DecodeRLP(buf1.Bytes()) - wx4.DecodeRLP(buf2.Bytes()) - - if wx1.RequestData != wx3.RequestData || wx2.RequestData != wx4.RequestData { - t.Errorf("error: incorrect encode/decode for WithdrawalRequest") - } -} diff --git a/eth/protocols/eth/protocol.go b/eth/protocols/eth/protocol.go index 776bb52c0ea..e79b3cca351 100644 --- a/eth/protocols/eth/protocol.go +++ b/eth/protocols/eth/protocol.go @@ -359,19 +359,18 @@ type BlockBodiesRLPPacket66 struct { BlockBodiesRLPPacket } -// Unpack retrieves the transactions, uncles, withdrawals, and requests from the range packet and returns +// Unpack retrieves the transactions, uncles, withdrawals from the range packet and returns // them in a split flat format that's more consistent with the internal data structures. -func (p *BlockRawBodiesPacket) Unpack() ([][][]byte, [][]*types.Header, []types.Withdrawals, []types.Requests) { +func (p *BlockRawBodiesPacket) Unpack() ([][][]byte, [][]*types.Header, []types.Withdrawals) { var ( txSet = make([][][]byte, len(*p)) uncleSet = make([][]*types.Header, len(*p)) withdrawalSet = make([]types.Withdrawals, len(*p)) - requestSet = make([]types.Requests, len(*p)) ) for i, body := range *p { - txSet[i], uncleSet[i], withdrawalSet[i], requestSet[i] = body.Transactions, body.Uncles, body.Withdrawals, body.Requests + txSet[i], uncleSet[i], withdrawalSet[i] = body.Transactions, body.Uncles, body.Withdrawals } - return txSet, uncleSet, withdrawalSet, requestSet + return txSet, uncleSet, withdrawalSet } // GetReceiptsPacket represents a block receipts query. diff --git a/eth/stagedsync/exec3.go b/eth/stagedsync/exec3.go index 1dc5ca0ef19..df9e36aba91 100644 --- a/eth/stagedsync/exec3.go +++ b/eth/stagedsync/exec3.go @@ -809,7 +809,6 @@ Loop: GetHashFn: getHashFn, EvmBlockContext: blockContext, Withdrawals: b.Withdrawals(), - Requests: b.Requests(), PruneNonEssentials: pruneNonEssentials, // use history reader instead of state reader to catch up to the tx where we left off @@ -1614,7 +1613,6 @@ func reconstituteStep(last bool, GetHashFn: getHashFn, EvmBlockContext: blockContext, Withdrawals: b.Withdrawals(), - Requests: b.Requests(), } if txIndex >= 0 && txIndex < len(txs) { txTask.Tx = txs[txIndex] diff --git a/eth/stagedsync/stage_mining_exec.go b/eth/stagedsync/stage_mining_exec.go index a98387dac6d..a72c54cf245 100644 --- a/eth/stagedsync/stage_mining_exec.go +++ b/eth/stagedsync/stage_mining_exec.go @@ -204,7 +204,6 @@ func SpawnMiningExecStage(s *StageState, txc wrap.TxContainer, cfg MiningExecCfg if err != nil { return fmt.Errorf("cannot finalize block execution: %s", err) } - current.Requests = block.Requests() // Simulate the block execution to get the final state root if err = rawdb.WriteHeader(txc.Tx, block.Header()); err != nil { diff --git a/eth/stagedsync/stage_mining_finish.go b/eth/stagedsync/stage_mining_finish.go index d74f6dfcffa..9586bcb7709 100644 --- a/eth/stagedsync/stage_mining_finish.go +++ b/eth/stagedsync/stage_mining_finish.go @@ -68,7 +68,7 @@ func SpawnMiningFinishStage(s *StageState, tx kv.RwTx, cfg MiningFinishCfg, quit // continue //} - block := types.NewBlockForAsembling(current.Header, current.Txs, current.Uncles, current.Receipts, current.Withdrawals, current.Requests) + block := types.NewBlockForAsembling(current.Header, current.Txs, current.Uncles, current.Receipts, current.Withdrawals) blockWithReceipts := &types.BlockWithReceipts{Block: block, Receipts: current.Receipts} *current = MiningBlock{} // hack to clean global data diff --git a/p2p/sentry/sentry_multi_client/sentry_multi_client.go b/p2p/sentry/sentry_multi_client/sentry_multi_client.go index ff266330c5d..c15a91a2889 100644 --- a/p2p/sentry/sentry_multi_client/sentry_multi_client.go +++ b/p2p/sentry/sentry_multi_client/sentry_multi_client.go @@ -470,12 +470,12 @@ func (cs *MultiClient) blockBodies66(ctx context.Context, inreq *proto_sentry.In if err := rlp.DecodeBytes(inreq.Data, &request); err != nil { return fmt.Errorf("decode BlockBodiesPacket66: %w", err) } - txs, uncles, withdrawals, requests := request.BlockRawBodiesPacket.Unpack() - if len(txs) == 0 && len(uncles) == 0 && len(withdrawals) == 0 && len(requests) == 0 { + txs, uncles, withdrawals := request.BlockRawBodiesPacket.Unpack() + if len(txs) == 0 && len(uncles) == 0 && len(withdrawals) == 0 { // No point processing empty response return nil } - cs.Bd.DeliverBodies(txs, uncles, withdrawals, requests, uint64(len(inreq.Data)), sentry.ConvertH512ToPeerID(inreq.PeerId)) + cs.Bd.DeliverBodies(txs, uncles, withdrawals, nil, uint64(len(inreq.Data)), sentry.ConvertH512ToPeerID(inreq.PeerId)) return nil } diff --git a/polygon/bor/bor.go b/polygon/bor/bor.go index 5d3bc0ce5d1..0b564f15fb0 100644 --- a/polygon/bor/bor.go +++ b/polygon/bor/bor.go @@ -1141,7 +1141,7 @@ func (c *Bor) FinalizeAndAssemble(chainConfig *chain.Config, header *types.Heade } // Assemble block - block := types.NewBlockForAsembling(header, txs, nil, receipts, withdrawals, requests) + block := types.NewBlockForAsembling(header, txs, nil, receipts, withdrawals) // set state sync // bc := chain.(*core.BlockChain) diff --git a/polygon/p2p/message_listener_test.go b/polygon/p2p/message_listener_test.go index 9c7309ec655..814ea7cbea4 100644 --- a/polygon/p2p/message_listener_test.go +++ b/polygon/p2p/message_listener_test.go @@ -433,7 +433,7 @@ func blockHeadersPacket66Bytes(t *testing.T, requestId uint64, headers []*types. func newMockNewBlockPacketBytes(t *testing.T) []byte { newBlockPacket := eth.NewBlockPacket{ - Block: types.NewBlock(newMockBlockHeaders(1)[0], nil, nil, nil, nil, nil), + Block: types.NewBlock(newMockBlockHeaders(1)[0], nil, nil, nil, nil), } newBlockPacketBytes, err := rlp.EncodeToBytes(&newBlockPacket) require.NoError(t, err) diff --git a/tests/statedb_insert_chain_transaction_test.go b/tests/statedb_insert_chain_transaction_test.go index 935e61ac73e..986f02cb7a6 100644 --- a/tests/statedb_insert_chain_transaction_test.go +++ b/tests/statedb_insert_chain_transaction_test.go @@ -68,7 +68,7 @@ func TestInsertIncorrectStateRootDifferentAccounts(t *testing.T) { t.Fatal("roots are the same") } - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { t.Fatal("should fail") @@ -135,7 +135,7 @@ func TestInsertIncorrectStateRootSameAccount(t *testing.T) { t.Fatal("roots are the same") } - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { t.Fatal("should fail") @@ -197,7 +197,7 @@ func TestInsertIncorrectStateRootSameAccountSameAmount(t *testing.T) { incorrectHeader := types.CopyHeader(chain.Headers[0]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[1].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { t.Fatal("should fail") @@ -259,7 +259,7 @@ func TestInsertIncorrectStateRootAllFundsRoot(t *testing.T) { incorrectHeader := types.CopyHeader(chain.Headers[0]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[1].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { t.Fatal("should fail") @@ -320,7 +320,7 @@ func TestInsertIncorrectStateRootAllFunds(t *testing.T) { // BLOCK 1 incorrectHeader := types.CopyHeader(chain.Headers[0]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[1].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[0].Transactions(), chain.Blocks[0].Uncles(), chain.Receipts[0], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { @@ -401,7 +401,7 @@ func TestAccountDeployIncorrectRoot(t *testing.T) { incorrectHeader := types.CopyHeader(chain.Headers[1]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[0].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[1].Transactions(), chain.Blocks[1].Uncles(), chain.Receipts[1], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[1].Transactions(), chain.Blocks[1].Uncles(), chain.Receipts[1], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} // BLOCK 2 - INCORRECT @@ -508,7 +508,7 @@ func TestAccountCreateIncorrectRoot(t *testing.T) { // BLOCK 3 - INCORRECT incorrectHeader := types.CopyHeader(chain.Headers[2]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[1].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[2].Transactions(), chain.Blocks[2].Uncles(), chain.Receipts[2], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[2].Transactions(), chain.Blocks[2].Uncles(), chain.Receipts[2], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { @@ -597,7 +597,7 @@ func TestAccountUpdateIncorrectRoot(t *testing.T) { // BLOCK 4 - INCORRECT incorrectHeader := types.CopyHeader(chain.Headers[3]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[1].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[3].Transactions(), chain.Blocks[3].Uncles(), chain.Receipts[3], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[3].Transactions(), chain.Blocks[3].Uncles(), chain.Receipts[3], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { @@ -685,7 +685,7 @@ func TestAccountDeleteIncorrectRoot(t *testing.T) { // BLOCK 4 - INCORRECT incorrectHeader := types.CopyHeader(chain.Headers[3]) // Copy header, not just pointer incorrectHeader.Root = chain.Headers[1].Root - incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[3].Transactions(), chain.Blocks[3].Uncles(), chain.Receipts[3], nil, nil) + incorrectBlock := types.NewBlock(incorrectHeader, chain.Blocks[3].Transactions(), chain.Blocks[3].Uncles(), chain.Receipts[3], nil) incorrectChain := &core.ChainPack{Blocks: []*types.Block{incorrectBlock}, Headers: []*types.Header{incorrectHeader}, TopBlock: incorrectBlock} if err = m.InsertChain(incorrectChain); err == nil { t.Fatal("should fail") diff --git a/turbo/adapter/ethapi/api.go b/turbo/adapter/ethapi/api.go index 311e0fe730f..3891926093d 100644 --- a/turbo/adapter/ethapi/api.go +++ b/turbo/adapter/ethapi/api.go @@ -367,10 +367,6 @@ func RPCMarshalBlockExDeprecated(block *types.Block, inclTx bool, fullTx bool, b fields["withdrawals"] = block.Withdrawals() } - if block.Requests() != nil { - fields["requests"] = block.Requests() - } - return fields, nil } diff --git a/turbo/engineapi/engine_block_downloader/block_downloader.go b/turbo/engineapi/engine_block_downloader/block_downloader.go index 50283851ffc..b2449124595 100644 --- a/turbo/engineapi/engine_block_downloader/block_downloader.go +++ b/turbo/engineapi/engine_block_downloader/block_downloader.go @@ -294,7 +294,7 @@ func (e *EngineBlockDownloader) insertHeadersAndBodies(ctx context.Context, tx k if body == nil { return fmt.Errorf("missing body at block=%d", number) } - blocksBatch = append(blocksBatch, types.NewBlockFromStorage(hash, header, body.Transactions, body.Uncles, body.Withdrawals, body.Requests)) + blocksBatch = append(blocksBatch, types.NewBlockFromStorage(hash, header, body.Transactions, body.Uncles, body.Withdrawals)) if number%uint64(blockWrittenLogSize) == 0 { e.logger.Info("[insertHeadersAndBodies] Written blocks", "progress", number, "to", toBlock) } diff --git a/turbo/engineapi/engine_server.go b/turbo/engineapi/engine_server.go index 854fb6c7e51..b224a322c4a 100644 --- a/turbo/engineapi/engine_server.go +++ b/turbo/engineapi/engine_server.go @@ -305,7 +305,7 @@ func (s *EngineServer) newPayload(ctx context.Context, req *engine_types.Executi defer s.lock.Unlock() s.logger.Debug("[NewPayload] sending block", "height", header.Number, "hash", blockHash) - block := types.NewBlockFromStorage(blockHash, &header, transactions, nil /* uncles */, withdrawals, requests) + block := types.NewBlockFromStorage(blockHash, &header, transactions, nil /* uncles */, withdrawals) payloadStatus, err := s.HandleNewPayload(ctx, "NewPayload", block, expectedBlobHashes) if err != nil { @@ -619,11 +619,6 @@ func extractPayloadBodyFromBody(body *types.RawBody, version clparams.StateVersi } ret := &engine_types.ExecutionPayloadBody{Transactions: bdTxs, Withdrawals: body.Withdrawals} - if version >= clparams.ElectraVersion && body.Requests != nil { - ret.DepositRequests = body.Requests.Deposits() - ret.WithdrawalRequests = body.Requests.Withdrawals() - ret.ConsolidationRequests = body.Requests.Consolidations() - } return ret } diff --git a/turbo/execution/eth1/block_building.go b/turbo/execution/eth1/block_building.go index 0ffefd7a934..e5d9860e5c6 100644 --- a/turbo/execution/eth1/block_building.go +++ b/turbo/execution/eth1/block_building.go @@ -33,7 +33,6 @@ import ( "github.com/erigontech/erigon/rpc" "github.com/erigontech/erigon/turbo/builder" "github.com/erigontech/erigon/turbo/engineapi/engine_helpers" - "github.com/erigontech/erigon/turbo/engineapi/engine_types" "github.com/erigontech/erigon/turbo/execution/eth1/eth1_utils" ) @@ -183,13 +182,6 @@ func (e *EthereumExecutionModule) GetAssembledBlock(ctx context.Context, req *ex payload.BlobGasUsed = header.BlobGasUsed payload.ExcessBlobGas = header.ExcessBlobGas } - reqs := block.Requests() - if reqs != nil { - payload.Version = 4 - payload.DepositRequests = engine_types.ConvertDepositRequestsToRpc(reqs.Deposits()) - payload.WithdrawalRequests = engine_types.ConvertWithdrawalRequestsToRpc(reqs.Withdrawals()) - payload.ConsolidationRequests = engine_types.ConvertConsolidationRequestsToRpc(reqs.Consolidations()) - } blockValue := blockValue(blockWithReceipts, baseFee) diff --git a/turbo/execution/eth1/eth1_chain_reader.go/chain_reader.go b/turbo/execution/eth1/eth1_chain_reader.go/chain_reader.go index e0730a84da8..12b88428044 100644 --- a/turbo/execution/eth1/eth1_chain_reader.go/chain_reader.go +++ b/turbo/execution/eth1/eth1_chain_reader.go/chain_reader.go @@ -125,7 +125,7 @@ func (c ChainReaderWriterEth1) GetBlockByHash(ctx context.Context, hash libcommo log.Warn("[engine] GetBlockByHash", "err", err) return nil } - return types.NewBlock(header, txs, nil, nil, body.Withdrawals, body.Requests) + return types.NewBlock(header, txs, nil, nil, body.Withdrawals) } func (c ChainReaderWriterEth1) GetBlockByNumber(ctx context.Context, number uint64) *types.Block { @@ -154,7 +154,7 @@ func (c ChainReaderWriterEth1) GetBlockByNumber(ctx context.Context, number uint log.Warn("[engine] GetBlockByNumber", "err", err) return nil } - return types.NewBlock(header, txs, nil, nil, body.Withdrawals, body.Requests) + return types.NewBlock(header, txs, nil, nil, body.Withdrawals) } func (c ChainReaderWriterEth1) GetHeaderByHash(ctx context.Context, hash libcommon.Hash) *types.Header { diff --git a/turbo/execution/eth1/eth1_utils/grpc.go b/turbo/execution/eth1/eth1_utils/grpc.go index c40c50eb70e..2add340f7a3 100644 --- a/turbo/execution/eth1/eth1_utils/grpc.go +++ b/turbo/execution/eth1/eth1_utils/grpc.go @@ -216,15 +216,12 @@ func ConvertRawBlockBodyToRpc(in *types.RawBody, blockNumber uint64, blockHash l return nil } - reqs, _ := types.MarshalRequestsBinary(in.Requests) - return &execution.BlockBody{ BlockNumber: blockNumber, BlockHash: gointerfaces.ConvertHashToH256(blockHash), Transactions: in.Transactions, Uncles: HeadersToHeadersRPC(in.Uncles), Withdrawals: ConvertWithdrawalsToRpc(in.Withdrawals), - Requests: reqs, } } @@ -245,12 +242,10 @@ func ConvertRawBlockBodyFromRpc(in *execution.BlockBody) (*types.RawBody, error) if err != nil { return nil, err } - reqs, _ := types.UnmarshalRequestsFromBinary(in.Requests) return &types.RawBody{ Transactions: in.Transactions, Uncles: uncles, Withdrawals: ConvertWithdrawalsFromRpc(in.Withdrawals), - Requests: reqs, }, nil } diff --git a/turbo/execution/eth1/eth1_utils/grpc_test.go b/turbo/execution/eth1/eth1_utils/grpc_test.go index 8f88bf2a998..b1212a4a98c 100644 --- a/turbo/execution/eth1/eth1_utils/grpc_test.go +++ b/turbo/execution/eth1/eth1_utils/grpc_test.go @@ -83,7 +83,7 @@ func makeBlock(txCount, uncleCount, withdrawalCount int) *types.Block { Amount: uint64(10 * i), } } - return types.NewBlock(header, txs, uncles, receipts, withdrawals, nil) // TODO(racytech): add requests + return types.NewBlock(header, txs, uncles, receipts, withdrawals) } func TestBlockRpcConversion(t *testing.T) { diff --git a/turbo/execution/eth1/getters.go b/turbo/execution/eth1/getters.go index 9b6deecae2d..4d1e047be17 100644 --- a/turbo/execution/eth1/getters.go +++ b/turbo/execution/eth1/getters.go @@ -168,14 +168,12 @@ func (e *EthereumExecutionModule) GetBodiesByHashes(ctx context.Context, req *ex return nil, fmt.Errorf("ethereumExecutionModule.GetBodiesByHashes: MarshalTransactionsBinary error %w", err) } - reqs, err := types.MarshalRequestsBinary(body.Requests) if err != nil { return nil, fmt.Errorf("ethereumExecutionModule.GetBodiesByHashes: MarshalRequestsBinary error %w", err) } bodies = append(bodies, &execution.BlockBody{ Transactions: txs, Withdrawals: eth1_utils.ConvertWithdrawalsToRpc(body.Withdrawals), - Requests: reqs, }) } @@ -216,14 +214,12 @@ func (e *EthereumExecutionModule) GetBodiesByRange(ctx context.Context, req *exe return nil, fmt.Errorf("ethereumExecutionModule.GetBodiesByRange: MarshalTransactionsBinary error %w", err) } - reqs, err := types.MarshalRequestsBinary(body.Requests) if err != nil { return nil, fmt.Errorf("ethereumExecutionModule.GetBodiesByHashes: MarshalRequestsBinary error %w", err) } bodies = append(bodies, &execution.BlockBody{ Transactions: txs, Withdrawals: eth1_utils.ConvertWithdrawalsToRpc(body.Withdrawals), - Requests: reqs, }) } // Remove trailing nil values as per spec diff --git a/turbo/snapshotsync/freezeblocks/block_reader.go b/turbo/snapshotsync/freezeblocks/block_reader.go index 656eae2f665..4acc6750918 100644 --- a/turbo/snapshotsync/freezeblocks/block_reader.go +++ b/turbo/snapshotsync/freezeblocks/block_reader.go @@ -837,7 +837,7 @@ func (r *BlockReader) blockWithSenders(ctx context.Context, tx kv.Getter, hash c return } if txCount == 0 { - block = types.NewBlockFromStorage(hash, h, nil, b.Uncles, b.Withdrawals, b.Requests) + block = types.NewBlockFromStorage(hash, h, nil, b.Uncles, b.Withdrawals) if len(senders) != block.Transactions().Len() { if dbgLogs { log.Info(dbgPrefix + fmt.Sprintf("found block with %d transactions, but %d senders", block.Transactions().Len(), len(senders))) @@ -863,7 +863,7 @@ func (r *BlockReader) blockWithSenders(ctx context.Context, tx kv.Getter, hash c } release() - block = types.NewBlockFromStorage(hash, h, txs, b.Uncles, b.Withdrawals, b.Requests) + block = types.NewBlockFromStorage(hash, h, txs, b.Uncles, b.Withdrawals) if len(senders) != block.Transactions().Len() { if dbgLogs { log.Info(dbgPrefix + fmt.Sprintf("found block with %d transactions, but %d senders", block.Transactions().Len(), len(senders))) @@ -951,7 +951,6 @@ func (r *BlockReader) bodyFromSnapshot(blockHeight uint64, sn *VisibleSegment, b body := new(types.Body) body.Uncles = b.Uncles body.Withdrawals = b.Withdrawals - body.Requests = b.Requests var txCount uint32 if b.TxCount >= 2 { txCount = b.TxCount - 2 diff --git a/turbo/stages/bodydownload/body_algos.go b/turbo/stages/bodydownload/body_algos.go index b95d08484db..2bb352168db 100644 --- a/turbo/stages/bodydownload/body_algos.go +++ b/turbo/stages/bodydownload/body_algos.go @@ -174,10 +174,6 @@ func (bd *BodyDownload) RequestMoreBodies(tx kv.RwTx, blockReader services.FullB // implies *header.WithdrawalsHash == types.EmptyRootHash body.Withdrawals = make([]*types.Withdrawal, 0) } - if header.RequestsHash != nil { - // implies *header.RequestsHash == types.EmptyRootHash - body.Requests = make(types.Requests, 0) - } bd.addBodyToCache(blockNum, body) dataflow.BlockBodyDownloadStates.AddChange(blockNum, dataflow.BlockBodyEmpty) request = false @@ -259,9 +255,9 @@ func (bd *BodyDownload) RequestSent(bodyReq *BodyRequest, timeWithTimeout uint64 // DeliverBodies takes the block body received from a peer and adds it to the various data structures func (bd *BodyDownload) DeliverBodies(txs [][][]byte, uncles [][]*types.Header, withdrawals []types.Withdrawals, - requests []types.Requests, lenOfP2PMsg uint64, peerID [64]byte, + requests []types.Request, lenOfP2PMsg uint64, peerID [64]byte, ) { - bd.deliveryCh <- Delivery{txs: txs, uncles: uncles, withdrawals: withdrawals, requests: requests, lenOfP2PMessage: lenOfP2PMsg, peerID: peerID} + bd.deliveryCh <- Delivery{txs: txs, uncles: uncles, withdrawals: withdrawals, lenOfP2PMessage: lenOfP2PMsg, peerID: peerID} select { case bd.DeliveryNotify <- struct{}{}: @@ -320,17 +316,14 @@ Loop: if delivery.withdrawals == nil { bd.logger.Warn("nil withdrawals delivered", "peer_id", delivery.peerID, "p2p_msg_len", delivery.lenOfP2PMessage) } - if delivery.requests == nil { - bd.logger.Warn("nil requests delivered", "peer_id", delivery.peerID, "p2p_msg_len", delivery.lenOfP2PMessage) - } - if delivery.txs == nil || delivery.uncles == nil || delivery.withdrawals == nil || delivery.requests == nil { + if delivery.txs == nil || delivery.uncles == nil || delivery.withdrawals == nil { bd.logger.Debug("delivery body processing has been skipped due to nil tx|data") continue } //var deliveredNums []uint64 toClean := map[uint64]struct{}{} - txs, uncles, withdrawals, requests, lenOfP2PMessage := delivery.txs, delivery.uncles, delivery.withdrawals, delivery.requests, delivery.lenOfP2PMessage + txs, uncles, withdrawals, lenOfP2PMessage := delivery.txs, delivery.uncles, delivery.withdrawals, delivery.lenOfP2PMessage for i := range txs { var bodyHashes BodyHashes @@ -342,10 +335,6 @@ Loop: withdrawalsHash := types.DeriveSha(withdrawals[i]) copy(bodyHashes[2*length.Hash:], withdrawalsHash.Bytes()) } - if requests[i] != nil { - requestsHash := types.DeriveSha(requests[i]) - copy(bodyHashes[3*length.Hash:], requestsHash.Bytes()) - } // Block numbers are added to the bd.delivered bitmap here, only for blocks for which the body has been received, and their double hashes are present in the bd.requestedMap // Also, block numbers can be added to bd.delivered for empty blocks, above @@ -362,7 +351,7 @@ Loop: } delete(bd.requestedMap, bodyHashes) // Delivered, cleaning up - bd.addBodyToCache(blockNum, &types.RawBody{Transactions: txs[i], Uncles: uncles[i], Withdrawals: withdrawals[i], Requests: requests[i]}) + bd.addBodyToCache(blockNum, &types.RawBody{Transactions: txs[i], Uncles: uncles[i], Withdrawals: withdrawals[i]}) bd.delivered.Add(blockNum) delivered++ dataflow.BlockBodyDownloadStates.AddChange(blockNum, dataflow.BlockBodyReceived) From b42189c8ec6fde3b932f543ffe82989ed2042a57 Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Fri, 18 Oct 2024 19:58:41 +0400 Subject: [PATCH 4/6] Lint --- consensus/merge/merge.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/consensus/merge/merge.go b/consensus/merge/merge.go index 794287752ed..3edfece93f1 100644 --- a/consensus/merge/merge.go +++ b/consensus/merge/merge.go @@ -229,15 +229,10 @@ func (s *Merge) FinalizeAndAssemble(config *chain.Config, header *types.Header, return s.eth1Engine.FinalizeAndAssemble(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, call, logger) } header.RequestsHash = nil - outTxs, outReceipts, rs, err := s.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger) + outTxs, outReceipts, _, err := s.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger) if err != nil { return nil, nil, nil, err } - if config.IsPrague(header.Time) { - if rs == nil { - rs = make(types.Requests, 0) - } - } return types.NewBlockForAsembling(header, outTxs, uncles, outReceipts, withdrawals), outTxs, outReceipts, nil } From a29c2f163da9592bb762e47cbc532c367b3c4195 Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Fri, 18 Oct 2024 20:01:05 +0400 Subject: [PATCH 5/6] Revert unnecessary --- .../beacon_state_mutator_mock.go | 406 +++++------------- 1 file changed, 116 insertions(+), 290 deletions(-) diff --git a/cl/abstract/mock_services/beacon_state_mutator_mock.go b/cl/abstract/mock_services/beacon_state_mutator_mock.go index 567f83f6b6d..2a60b96d92e 100644 --- a/cl/abstract/mock_services/beacon_state_mutator_mock.go +++ b/cl/abstract/mock_services/beacon_state_mutator_mock.go @@ -55,22 +55,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddCurrentEpochAtteastation(arg0 a } // MockBeaconStateMutatorAddCurrentEpochAtteastationCall wrap *gomock.Call -type MockBeaconStateMutatorAddCurrentEpochAtteastationCall struct { +type MockBeaconStateMutatorAddCurrentEpochAtteastationCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddCurrentEpochAtteastationCall) Return() *MockBeaconStateMutatorAddCurrentEpochAtteastationCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddCurrentEpochAtteastationCall) Do(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddCurrentEpochAtteastationCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddCurrentEpochAtteastationCall) DoAndReturn(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddCurrentEpochAtteastationCall { c.Call = c.Call.DoAndReturn(f) @@ -91,22 +88,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddCurrentEpochParticipationFlags( } // MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall struct { +type MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall) Do(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall) DoAndReturn(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddCurrentEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -127,22 +121,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddEth1DataVote(arg0 any) *MockBea } // MockBeaconStateMutatorAddEth1DataVoteCall wrap *gomock.Call -type MockBeaconStateMutatorAddEth1DataVoteCall struct { +type MockBeaconStateMutatorAddEth1DataVoteCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddEth1DataVoteCall) Return() *MockBeaconStateMutatorAddEth1DataVoteCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddEth1DataVoteCall) Do(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorAddEth1DataVoteCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddEth1DataVoteCall) DoAndReturn(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorAddEth1DataVoteCall { c.Call = c.Call.DoAndReturn(f) @@ -163,22 +154,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddHistoricalRoot(arg0 any) *MockB } // MockBeaconStateMutatorAddHistoricalRootCall wrap *gomock.Call -type MockBeaconStateMutatorAddHistoricalRootCall struct { +type MockBeaconStateMutatorAddHistoricalRootCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddHistoricalRootCall) Return() *MockBeaconStateMutatorAddHistoricalRootCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddHistoricalRootCall) Do(f func(common.Hash)) *MockBeaconStateMutatorAddHistoricalRootCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddHistoricalRootCall) DoAndReturn(f func(common.Hash)) *MockBeaconStateMutatorAddHistoricalRootCall { c.Call = c.Call.DoAndReturn(f) @@ -199,22 +187,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddHistoricalSummary(arg0 any) *Mo } // MockBeaconStateMutatorAddHistoricalSummaryCall wrap *gomock.Call -type MockBeaconStateMutatorAddHistoricalSummaryCall struct { +type MockBeaconStateMutatorAddHistoricalSummaryCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddHistoricalSummaryCall) Return() *MockBeaconStateMutatorAddHistoricalSummaryCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddHistoricalSummaryCall) Do(f func(*cltypes.HistoricalSummary)) *MockBeaconStateMutatorAddHistoricalSummaryCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddHistoricalSummaryCall) DoAndReturn(f func(*cltypes.HistoricalSummary)) *MockBeaconStateMutatorAddHistoricalSummaryCall { c.Call = c.Call.DoAndReturn(f) @@ -235,22 +220,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddInactivityScore(arg0 any) *Mock } // MockBeaconStateMutatorAddInactivityScoreCall wrap *gomock.Call -type MockBeaconStateMutatorAddInactivityScoreCall struct { +type MockBeaconStateMutatorAddInactivityScoreCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddInactivityScoreCall) Return() *MockBeaconStateMutatorAddInactivityScoreCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddInactivityScoreCall) Do(f func(uint64)) *MockBeaconStateMutatorAddInactivityScoreCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddInactivityScoreCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorAddInactivityScoreCall { c.Call = c.Call.DoAndReturn(f) @@ -271,22 +253,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddPreviousEpochAttestation(arg0 a } // MockBeaconStateMutatorAddPreviousEpochAttestationCall wrap *gomock.Call -type MockBeaconStateMutatorAddPreviousEpochAttestationCall struct { +type MockBeaconStateMutatorAddPreviousEpochAttestationCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddPreviousEpochAttestationCall) Return() *MockBeaconStateMutatorAddPreviousEpochAttestationCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddPreviousEpochAttestationCall) Do(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddPreviousEpochAttestationCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddPreviousEpochAttestationCall) DoAndReturn(f func(*solid.PendingAttestation)) *MockBeaconStateMutatorAddPreviousEpochAttestationCall { c.Call = c.Call.DoAndReturn(f) @@ -307,22 +286,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddPreviousEpochParticipationAt(ar } // MockBeaconStateMutatorAddPreviousEpochParticipationAtCall wrap *gomock.Call -type MockBeaconStateMutatorAddPreviousEpochParticipationAtCall struct { +type MockBeaconStateMutatorAddPreviousEpochParticipationAtCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall) Return() *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall) Do(f func(int, byte)) *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall) DoAndReturn(f func(int, byte)) *MockBeaconStateMutatorAddPreviousEpochParticipationAtCall { c.Call = c.Call.DoAndReturn(f) @@ -343,22 +319,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddPreviousEpochParticipationFlags } // MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall struct { +type MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall) Do(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall) DoAndReturn(f func(cltypes.ParticipationFlags)) *MockBeaconStateMutatorAddPreviousEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -379,22 +352,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AddValidator(arg0, arg1 any) *Mock } // MockBeaconStateMutatorAddValidatorCall wrap *gomock.Call -type MockBeaconStateMutatorAddValidatorCall struct { +type MockBeaconStateMutatorAddValidatorCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAddValidatorCall) Return() *MockBeaconStateMutatorAddValidatorCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAddValidatorCall) Do(f func(solid.Validator, uint64)) *MockBeaconStateMutatorAddValidatorCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAddValidatorCall) DoAndReturn(f func(solid.Validator, uint64)) *MockBeaconStateMutatorAddValidatorCall { c.Call = c.Call.DoAndReturn(f) @@ -415,22 +385,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) AppendValidator(arg0 any) *MockBea } // MockBeaconStateMutatorAppendValidatorCall wrap *gomock.Call -type MockBeaconStateMutatorAppendValidatorCall struct { +type MockBeaconStateMutatorAppendValidatorCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorAppendValidatorCall) Return() *MockBeaconStateMutatorAppendValidatorCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorAppendValidatorCall) Do(f func(solid.Validator)) *MockBeaconStateMutatorAppendValidatorCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorAppendValidatorCall) DoAndReturn(f func(solid.Validator)) *MockBeaconStateMutatorAppendValidatorCall { c.Call = c.Call.DoAndReturn(f) @@ -451,22 +418,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetCurrentEpochAttestations() *M } // MockBeaconStateMutatorResetCurrentEpochAttestationsCall wrap *gomock.Call -type MockBeaconStateMutatorResetCurrentEpochAttestationsCall struct { +type MockBeaconStateMutatorResetCurrentEpochAttestationsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetCurrentEpochAttestationsCall) Return() *MockBeaconStateMutatorResetCurrentEpochAttestationsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetCurrentEpochAttestationsCall) Do(f func()) *MockBeaconStateMutatorResetCurrentEpochAttestationsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetCurrentEpochAttestationsCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetCurrentEpochAttestationsCall { c.Call = c.Call.DoAndReturn(f) @@ -487,22 +451,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetEpochParticipation() *MockBea } // MockBeaconStateMutatorResetEpochParticipationCall wrap *gomock.Call -type MockBeaconStateMutatorResetEpochParticipationCall struct { +type MockBeaconStateMutatorResetEpochParticipationCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetEpochParticipationCall) Return() *MockBeaconStateMutatorResetEpochParticipationCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetEpochParticipationCall) Do(f func()) *MockBeaconStateMutatorResetEpochParticipationCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetEpochParticipationCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetEpochParticipationCall { c.Call = c.Call.DoAndReturn(f) @@ -523,22 +484,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetEth1DataVotes() *MockBeaconSt } // MockBeaconStateMutatorResetEth1DataVotesCall wrap *gomock.Call -type MockBeaconStateMutatorResetEth1DataVotesCall struct { +type MockBeaconStateMutatorResetEth1DataVotesCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetEth1DataVotesCall) Return() *MockBeaconStateMutatorResetEth1DataVotesCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetEth1DataVotesCall) Do(f func()) *MockBeaconStateMutatorResetEth1DataVotesCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetEth1DataVotesCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetEth1DataVotesCall { c.Call = c.Call.DoAndReturn(f) @@ -559,22 +517,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetHistoricalSummaries() *MockBe } // MockBeaconStateMutatorResetHistoricalSummariesCall wrap *gomock.Call -type MockBeaconStateMutatorResetHistoricalSummariesCall struct { +type MockBeaconStateMutatorResetHistoricalSummariesCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetHistoricalSummariesCall) Return() *MockBeaconStateMutatorResetHistoricalSummariesCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetHistoricalSummariesCall) Do(f func()) *MockBeaconStateMutatorResetHistoricalSummariesCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetHistoricalSummariesCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetHistoricalSummariesCall { c.Call = c.Call.DoAndReturn(f) @@ -595,22 +550,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) ResetPreviousEpochAttestations() * } // MockBeaconStateMutatorResetPreviousEpochAttestationsCall wrap *gomock.Call -type MockBeaconStateMutatorResetPreviousEpochAttestationsCall struct { +type MockBeaconStateMutatorResetPreviousEpochAttestationsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorResetPreviousEpochAttestationsCall) Return() *MockBeaconStateMutatorResetPreviousEpochAttestationsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorResetPreviousEpochAttestationsCall) Do(f func()) *MockBeaconStateMutatorResetPreviousEpochAttestationsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorResetPreviousEpochAttestationsCall) DoAndReturn(f func()) *MockBeaconStateMutatorResetPreviousEpochAttestationsCall { c.Call = c.Call.DoAndReturn(f) @@ -631,22 +583,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetActivationEligibilityEpochForVa } // MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEligibilityEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -667,22 +616,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetActivationEpochForValidatorAtIn } // MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetActivationEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -703,22 +649,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetBlockRootAt(arg0, arg1 any) *Mo } // MockBeaconStateMutatorSetBlockRootAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetBlockRootAtCall struct { +type MockBeaconStateMutatorSetBlockRootAtCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetBlockRootAtCall) Return() *MockBeaconStateMutatorSetBlockRootAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetBlockRootAtCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetBlockRootAtCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetBlockRootAtCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetBlockRootAtCall { c.Call = c.Call.DoAndReturn(f) @@ -739,22 +682,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetCurrentEpochParticipationFlags( } // MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall struct { +type MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall) Do(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall) DoAndReturn(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetCurrentEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -775,22 +715,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetCurrentJustifiedCheckpoint(arg0 } // MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall wrap *gomock.Call -type MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall struct { +type MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall) Return() *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall) Do(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall) DoAndReturn(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetCurrentJustifiedCheckpointCall { c.Call = c.Call.DoAndReturn(f) @@ -811,22 +748,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetCurrentSyncCommittee(arg0 any) } // MockBeaconStateMutatorSetCurrentSyncCommitteeCall wrap *gomock.Call -type MockBeaconStateMutatorSetCurrentSyncCommitteeCall struct { +type MockBeaconStateMutatorSetCurrentSyncCommitteeCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetCurrentSyncCommitteeCall) Return() *MockBeaconStateMutatorSetCurrentSyncCommitteeCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetCurrentSyncCommitteeCall) Do(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetCurrentSyncCommitteeCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetCurrentSyncCommitteeCall) DoAndReturn(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetCurrentSyncCommitteeCall { c.Call = c.Call.DoAndReturn(f) @@ -847,22 +781,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEffectiveBalanceForValidatorAtI } // MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetEffectiveBalanceForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -883,22 +814,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEpochParticipationForValidatorI } // MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall struct { +type MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall) Return() *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall) Do(f func(bool, int, cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall) DoAndReturn(f func(bool, int, cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetEpochParticipationForValidatorIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -919,22 +847,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEth1Data(arg0 any) *MockBeaconS } // MockBeaconStateMutatorSetEth1DataCall wrap *gomock.Call -type MockBeaconStateMutatorSetEth1DataCall struct { +type MockBeaconStateMutatorSetEth1DataCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEth1DataCall) Return() *MockBeaconStateMutatorSetEth1DataCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEth1DataCall) Do(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorSetEth1DataCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEth1DataCall) DoAndReturn(f func(*cltypes.Eth1Data)) *MockBeaconStateMutatorSetEth1DataCall { c.Call = c.Call.DoAndReturn(f) @@ -955,22 +880,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetEth1DepositIndex(arg0 any) *Moc } // MockBeaconStateMutatorSetEth1DepositIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetEth1DepositIndexCall struct { +type MockBeaconStateMutatorSetEth1DepositIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetEth1DepositIndexCall) Return() *MockBeaconStateMutatorSetEth1DepositIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetEth1DepositIndexCall) Do(f func(uint64)) *MockBeaconStateMutatorSetEth1DepositIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetEth1DepositIndexCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetEth1DepositIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -991,22 +913,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetExitEpochForValidatorAtIndex(ar } // MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetExitEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1027,22 +946,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetFinalizedCheckpoint(arg0 any) * } // MockBeaconStateMutatorSetFinalizedCheckpointCall wrap *gomock.Call -type MockBeaconStateMutatorSetFinalizedCheckpointCall struct { +type MockBeaconStateMutatorSetFinalizedCheckpointCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetFinalizedCheckpointCall) Return() *MockBeaconStateMutatorSetFinalizedCheckpointCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetFinalizedCheckpointCall) Do(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetFinalizedCheckpointCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetFinalizedCheckpointCall) DoAndReturn(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetFinalizedCheckpointCall { c.Call = c.Call.DoAndReturn(f) @@ -1063,22 +979,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetFork(arg0 any) *MockBeaconState } // MockBeaconStateMutatorSetForkCall wrap *gomock.Call -type MockBeaconStateMutatorSetForkCall struct { +type MockBeaconStateMutatorSetForkCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetForkCall) Return() *MockBeaconStateMutatorSetForkCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetForkCall) Do(f func(*cltypes.Fork)) *MockBeaconStateMutatorSetForkCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetForkCall) DoAndReturn(f func(*cltypes.Fork)) *MockBeaconStateMutatorSetForkCall { c.Call = c.Call.DoAndReturn(f) @@ -1099,22 +1012,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetInactivityScores(arg0 any) *Moc } // MockBeaconStateMutatorSetInactivityScoresCall wrap *gomock.Call -type MockBeaconStateMutatorSetInactivityScoresCall struct { +type MockBeaconStateMutatorSetInactivityScoresCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetInactivityScoresCall) Return() *MockBeaconStateMutatorSetInactivityScoresCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetInactivityScoresCall) Do(f func([]uint64)) *MockBeaconStateMutatorSetInactivityScoresCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetInactivityScoresCall) DoAndReturn(f func([]uint64)) *MockBeaconStateMutatorSetInactivityScoresCall { c.Call = c.Call.DoAndReturn(f) @@ -1135,22 +1045,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetJustificationBits(arg0 any) *Mo } // MockBeaconStateMutatorSetJustificationBitsCall wrap *gomock.Call -type MockBeaconStateMutatorSetJustificationBitsCall struct { +type MockBeaconStateMutatorSetJustificationBitsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetJustificationBitsCall) Return() *MockBeaconStateMutatorSetJustificationBitsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetJustificationBitsCall) Do(f func(cltypes.JustificationBits)) *MockBeaconStateMutatorSetJustificationBitsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetJustificationBitsCall) DoAndReturn(f func(cltypes.JustificationBits)) *MockBeaconStateMutatorSetJustificationBitsCall { c.Call = c.Call.DoAndReturn(f) @@ -1171,22 +1078,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetLatestBlockHeader(arg0 any) *Mo } // MockBeaconStateMutatorSetLatestBlockHeaderCall wrap *gomock.Call -type MockBeaconStateMutatorSetLatestBlockHeaderCall struct { +type MockBeaconStateMutatorSetLatestBlockHeaderCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetLatestBlockHeaderCall) Return() *MockBeaconStateMutatorSetLatestBlockHeaderCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetLatestBlockHeaderCall) Do(f func(*cltypes.BeaconBlockHeader)) *MockBeaconStateMutatorSetLatestBlockHeaderCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetLatestBlockHeaderCall) DoAndReturn(f func(*cltypes.BeaconBlockHeader)) *MockBeaconStateMutatorSetLatestBlockHeaderCall { c.Call = c.Call.DoAndReturn(f) @@ -1207,22 +1111,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetLatestExecutionPayloadHeader(ar } // MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall wrap *gomock.Call -type MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall struct { +type MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall) Return() *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall) Do(f func(*cltypes.Eth1Header)) *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall) DoAndReturn(f func(*cltypes.Eth1Header)) *MockBeaconStateMutatorSetLatestExecutionPayloadHeaderCall { c.Call = c.Call.DoAndReturn(f) @@ -1243,22 +1144,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetNextSyncCommittee(arg0 any) *Mo } // MockBeaconStateMutatorSetNextSyncCommitteeCall wrap *gomock.Call -type MockBeaconStateMutatorSetNextSyncCommitteeCall struct { +type MockBeaconStateMutatorSetNextSyncCommitteeCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetNextSyncCommitteeCall) Return() *MockBeaconStateMutatorSetNextSyncCommitteeCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetNextSyncCommitteeCall) Do(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetNextSyncCommitteeCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetNextSyncCommitteeCall) DoAndReturn(f func(*solid.SyncCommittee)) *MockBeaconStateMutatorSetNextSyncCommitteeCall { c.Call = c.Call.DoAndReturn(f) @@ -1279,22 +1177,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetNextWithdrawalIndex(arg0 any) * } // MockBeaconStateMutatorSetNextWithdrawalIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetNextWithdrawalIndexCall struct { +type MockBeaconStateMutatorSetNextWithdrawalIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetNextWithdrawalIndexCall) Return() *MockBeaconStateMutatorSetNextWithdrawalIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetNextWithdrawalIndexCall) Do(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetNextWithdrawalIndexCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1315,22 +1210,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetNextWithdrawalValidatorIndex(ar } // MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall struct { +type MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall) Return() *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall) Do(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetNextWithdrawalValidatorIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1351,22 +1243,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetPreviousEpochAttestations(arg0 } // MockBeaconStateMutatorSetPreviousEpochAttestationsCall wrap *gomock.Call -type MockBeaconStateMutatorSetPreviousEpochAttestationsCall struct { +type MockBeaconStateMutatorSetPreviousEpochAttestationsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetPreviousEpochAttestationsCall) Return() *MockBeaconStateMutatorSetPreviousEpochAttestationsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetPreviousEpochAttestationsCall) Do(f func(*solid.ListSSZ[*solid.PendingAttestation])) *MockBeaconStateMutatorSetPreviousEpochAttestationsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetPreviousEpochAttestationsCall) DoAndReturn(f func(*solid.ListSSZ[*solid.PendingAttestation])) *MockBeaconStateMutatorSetPreviousEpochAttestationsCall { c.Call = c.Call.DoAndReturn(f) @@ -1387,22 +1276,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetPreviousEpochParticipationFlags } // MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall wrap *gomock.Call -type MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall struct { +type MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall) Return() *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall) Do(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall) DoAndReturn(f func([]cltypes.ParticipationFlags)) *MockBeaconStateMutatorSetPreviousEpochParticipationFlagsCall { c.Call = c.Call.DoAndReturn(f) @@ -1423,22 +1309,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetPreviousJustifiedCheckpoint(arg } // MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall wrap *gomock.Call -type MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall struct { +type MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall) Return() *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall) Do(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall) DoAndReturn(f func(solid.Checkpoint)) *MockBeaconStateMutatorSetPreviousJustifiedCheckpointCall { c.Call = c.Call.DoAndReturn(f) @@ -1459,22 +1342,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetRandaoMixAt(arg0, arg1 any) *Mo } // MockBeaconStateMutatorSetRandaoMixAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetRandaoMixAtCall struct { +type MockBeaconStateMutatorSetRandaoMixAtCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetRandaoMixAtCall) Return() *MockBeaconStateMutatorSetRandaoMixAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetRandaoMixAtCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetRandaoMixAtCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetRandaoMixAtCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetRandaoMixAtCall { c.Call = c.Call.DoAndReturn(f) @@ -1495,22 +1375,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetSlashingSegmentAt(arg0, arg1 an } // MockBeaconStateMutatorSetSlashingSegmentAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetSlashingSegmentAtCall struct { +type MockBeaconStateMutatorSetSlashingSegmentAtCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetSlashingSegmentAtCall) Return() *MockBeaconStateMutatorSetSlashingSegmentAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetSlashingSegmentAtCall) Do(f func(int, uint64)) *MockBeaconStateMutatorSetSlashingSegmentAtCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetSlashingSegmentAtCall) DoAndReturn(f func(int, uint64)) *MockBeaconStateMutatorSetSlashingSegmentAtCall { c.Call = c.Call.DoAndReturn(f) @@ -1531,22 +1408,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetSlot(arg0 any) *MockBeaconState } // MockBeaconStateMutatorSetSlotCall wrap *gomock.Call -type MockBeaconStateMutatorSetSlotCall struct { +type MockBeaconStateMutatorSetSlotCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetSlotCall) Return() *MockBeaconStateMutatorSetSlotCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetSlotCall) Do(f func(uint64)) *MockBeaconStateMutatorSetSlotCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetSlotCall) DoAndReturn(f func(uint64)) *MockBeaconStateMutatorSetSlotCall { c.Call = c.Call.DoAndReturn(f) @@ -1567,22 +1441,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetStateRootAt(arg0, arg1 any) *Mo } // MockBeaconStateMutatorSetStateRootAtCall wrap *gomock.Call -type MockBeaconStateMutatorSetStateRootAtCall struct { +type MockBeaconStateMutatorSetStateRootAtCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetStateRootAtCall) Return() *MockBeaconStateMutatorSetStateRootAtCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetStateRootAtCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetStateRootAtCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetStateRootAtCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetStateRootAtCall { c.Call = c.Call.DoAndReturn(f) @@ -1603,22 +1474,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorAtIndex(arg0, arg1 any } // MockBeaconStateMutatorSetValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorAtIndexCall) Do(f func(int, solid.Validator)) *MockBeaconStateMutatorSetValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorAtIndexCall) DoAndReturn(f func(int, solid.Validator)) *MockBeaconStateMutatorSetValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -1641,22 +1509,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorBalance(arg0, arg1 any } // MockBeaconStateMutatorSetValidatorBalanceCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorBalanceCall struct { +type MockBeaconStateMutatorSetValidatorBalanceCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorBalanceCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorBalanceCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorBalanceCall) Do(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorBalanceCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorBalanceCall) DoAndReturn(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorBalanceCall { c.Call = c.Call.DoAndReturn(f) @@ -1679,22 +1544,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorInactivityScore(arg0, } // MockBeaconStateMutatorSetValidatorInactivityScoreCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorInactivityScoreCall struct { +type MockBeaconStateMutatorSetValidatorInactivityScoreCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorInactivityScoreCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorInactivityScoreCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorInactivityScoreCall) Do(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorInactivityScoreCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorInactivityScoreCall) DoAndReturn(f func(int, uint64) error) *MockBeaconStateMutatorSetValidatorInactivityScoreCall { c.Call = c.Call.DoAndReturn(f) @@ -1717,22 +1579,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsCurrentMatchingHeadA } // MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall struct { +type MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingHeadAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1755,22 +1614,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsCurrentMatchingSourc } // MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall struct { +type MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingSourceAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1793,22 +1649,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsCurrentMatchingTarge } // MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall struct { +type MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsCurrentMatchingTargetAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1831,22 +1684,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsPreviousMatchingHead } // MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall struct { +type MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingHeadAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1869,22 +1719,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsPreviousMatchingSour } // MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall struct { +type MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingSourceAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1907,22 +1754,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorIsPreviousMatchingTarg } // MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall struct { +type MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorIsPreviousMatchingTargetAttesterCall { c.Call = c.Call.DoAndReturn(f) @@ -1945,22 +1789,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorMinCurrentInclusionDel } // MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall struct { +type MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall) Do(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall) DoAndReturn(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinCurrentInclusionDelayAttestationCall { c.Call = c.Call.DoAndReturn(f) @@ -1983,22 +1824,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorMinPreviousInclusionDe } // MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall struct { +type MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall) Do(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall) DoAndReturn(f func(int, *solid.PendingAttestation) error) *MockBeaconStateMutatorSetValidatorMinPreviousInclusionDelayAttestationCall { c.Call = c.Call.DoAndReturn(f) @@ -2021,22 +1859,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetValidatorSlashed(arg0, arg1 any } // MockBeaconStateMutatorSetValidatorSlashedCall wrap *gomock.Call -type MockBeaconStateMutatorSetValidatorSlashedCall struct { +type MockBeaconStateMutatorSetValidatorSlashedCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetValidatorSlashedCall) Return(arg0 error) *MockBeaconStateMutatorSetValidatorSlashedCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetValidatorSlashedCall) Do(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorSlashedCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetValidatorSlashedCall) DoAndReturn(f func(int, bool) error) *MockBeaconStateMutatorSetValidatorSlashedCall { c.Call = c.Call.DoAndReturn(f) @@ -2057,22 +1892,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetVersion(arg0 any) *MockBeaconSt } // MockBeaconStateMutatorSetVersionCall wrap *gomock.Call -type MockBeaconStateMutatorSetVersionCall struct { +type MockBeaconStateMutatorSetVersionCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetVersionCall) Return() *MockBeaconStateMutatorSetVersionCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetVersionCall) Do(f func(clparams.StateVersion)) *MockBeaconStateMutatorSetVersionCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetVersionCall) DoAndReturn(f func(clparams.StateVersion)) *MockBeaconStateMutatorSetVersionCall { c.Call = c.Call.DoAndReturn(f) @@ -2095,22 +1927,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetWithdrawableEpochForValidatorAt } // MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall) Return(arg0 error) *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall { - c.Call = c.Call.Return(arg0) + c.Call = c.Call.Return(arg0) return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall) Do(f func(int, uint64) error) *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall) DoAndReturn(f func(int, uint64) error) *MockBeaconStateMutatorSetWithdrawableEpochForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) @@ -2131,22 +1960,19 @@ func (mr *MockBeaconStateMutatorMockRecorder) SetWithdrawalCredentialForValidato } // MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall wrap *gomock.Call -type MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall struct { +type MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall struct{ *gomock.Call } - // Return rewrite *gomock.Call.Return func (c *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall) Return() *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall { - c.Call = c.Call.Return() + c.Call = c.Call.Return() return c } - // Do rewrite *gomock.Call.Do func (c *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall) Do(f func(int, common.Hash)) *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall { c.Call = c.Call.Do(f) return c } - // DoAndReturn rewrite *gomock.Call.DoAndReturn func (c *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall) DoAndReturn(f func(int, common.Hash)) *MockBeaconStateMutatorSetWithdrawalCredentialForValidatorAtIndexCall { c.Call = c.Call.DoAndReturn(f) From 9f26d395f7c063782ee1ec0167d50c1325a4c28f Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Fri, 18 Oct 2024 20:49:22 +0400 Subject: [PATCH 6/6] Remove reqs from stEnv --- cmd/evm/internal/t8ntool/execution.go | 1 - cmd/evm/internal/t8ntool/gen_stenv.go | 6 ------ cmd/evm/internal/t8ntool/transition.go | 4 ---- 3 files changed, 11 deletions(-) diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 829a3edce23..4dd289d0de3 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -66,7 +66,6 @@ type stEnv struct { UncleHash libcommon.Hash `json:"uncleHash,omitempty"` Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"` WithdrawalsHash *libcommon.Hash `json:"withdrawalsRoot,omitempty"` - Requests types.Requests `json:"requests,omitempty"` RequestsHash *libcommon.Hash `json:"requestsHash,omitempty"` } diff --git a/cmd/evm/internal/t8ntool/gen_stenv.go b/cmd/evm/internal/t8ntool/gen_stenv.go index 89de04a8e08..9be2ac8d853 100644 --- a/cmd/evm/internal/t8ntool/gen_stenv.go +++ b/cmd/evm/internal/t8ntool/gen_stenv.go @@ -34,7 +34,6 @@ func (s stEnv) MarshalJSON() ([]byte, error) { UncleHash common.Hash `json:"uncleHash,omitempty"` Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"` WithdrawalsHash *common.Hash `json:"withdrawalsRoot,omitempty"` - Requests types.Requests `json:"requests,omitempty"` RequestsHash *common.Hash `json:"requestsHash,omitempty"` } var enc stEnv @@ -54,7 +53,6 @@ func (s stEnv) MarshalJSON() ([]byte, error) { enc.UncleHash = s.UncleHash enc.Withdrawals = s.Withdrawals enc.WithdrawalsHash = s.WithdrawalsHash - enc.Requests = s.Requests enc.RequestsHash = s.RequestsHash return json.Marshal(&enc) } @@ -78,7 +76,6 @@ func (s *stEnv) UnmarshalJSON(input []byte) error { UncleHash *common.Hash `json:"uncleHash,omitempty"` Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"` WithdrawalsHash *common.Hash `json:"withdrawalsRoot,omitempty"` - Requests *types.Requests `json:"requests,omitempty"` RequestsHash *common.Hash `json:"requestsHash,omitempty"` } var dec stEnv @@ -137,9 +134,6 @@ func (s *stEnv) UnmarshalJSON(input []byte) error { if dec.WithdrawalsHash != nil { s.WithdrawalsHash = dec.WithdrawalsHash } - if dec.Requests != nil { - s.Requests = *dec.Requests - } if dec.RequestsHash != nil { s.RequestsHash = dec.RequestsHash } diff --git a/cmd/evm/internal/t8ntool/transition.go b/cmd/evm/internal/t8ntool/transition.go index 384889301f4..d47a7af21c9 100644 --- a/cmd/evm/internal/t8ntool/transition.go +++ b/cmd/evm/internal/t8ntool/transition.go @@ -245,10 +245,6 @@ func Main(ctx *cli.Context) error { return NewError(ErrorVMConfig, errors.New("shanghai config but missing 'withdrawals' in env section")) } - if chainConfig.IsPrague(prestate.Env.Timestamp) && prestate.Env.Requests == nil { - return NewError(ErrorVMConfig, errors.New("prague config but missing 'requests' in env section")) - } - isMerged := chainConfig.TerminalTotalDifficulty != nil && chainConfig.TerminalTotalDifficulty.BitLen() == 0 env := prestate.Env if isMerged {