Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement and add changes for EIPs 7002, 6110, 7685 #10533

Merged
merged 26 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d47a1d3
Add EIP-7002 basic support
somnathb1 May 25, 2024
c22dfe5
Changes Reqeust into interface
somnathb1 May 28, 2024
20974ec
Add working withdrawal requests block decode
somnathb1 May 28, 2024
a3a44f9
Add requests to Finalize interface in consensus
somnathb1 May 28, 2024
e1dc205
Fix deposit and refactor
somnathb1 May 28, 2024
11b95f4
Fix Requests EncodeRLP and thus tests
somnathb1 May 29, 2024
76500ae
Fix encoding tests
somnathb1 May 30, 2024
5d28a3e
Silence requests test in block withdrawals test
somnathb1 May 30, 2024
2dcd6f3
Add tests and silience HashCheck req root check momentarily
somnathb1 May 31, 2024
7c91c32
Use make for Requests ptr
somnathb1 May 31, 2024
2875ee2
gencodec
somnathb1 May 31, 2024
937e48a
Add grpc marshalling
somnathb1 Jun 3, 2024
8565fa2
Merge branch 'main' into som/eip7002
somnathb1 Jun 3, 2024
a6ff6f5
Fix deposits deepequal in finalize
somnathb1 Jun 3, 2024
3ff3ffa
Requests passing all
somnathb1 Jun 3, 2024
0d69887
Cleanup
somnathb1 Jun 3, 2024
f5c7385
Cleanup
somnathb1 Jun 3, 2024
75c2aca
Fix gen and lint
somnathb1 Jun 3, 2024
310209c
Review comments
somnathb1 Jun 4, 2024
55e3d20
Remove req root calc in finalize
somnathb1 Jun 4, 2024
8c1cf53
Copy requests to current
somnathb1 Jun 5, 2024
96a47b2
Fix nil
somnathb1 Jun 5, 2024
d40d970
Ptr ref instead of copy
somnathb1 Jun 5, 2024
d475907
Return finalize err in mining exec
somnathb1 Jun 5, 2024
0e0f083
Add notes for PR comments
somnathb1 Jun 5, 2024
6bd8c31
Merge branch 'main' into som/eip7002
somnathb1 Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cl/phase1/forkchoice/optimistic/optimistic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (t *optimisticTestSuite) TestAddOptimisticCandidate() {
t.Require().Equal(&opNode{
execBlockNum: 1,
parent: common.Hash{0},
children: []common.Hash{common.Hash{2}},
children: []common.Hash{{2}},
}, node)
node, ok = t.opStore.optimisticRoots[mockBlock2.StateRoot]
t.Require().True(ok)
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type stEnv struct {
UncleHash libcommon.Hash `json:"uncleHash,omitempty"`
Withdrawals []*types.Withdrawal `json:"withdrawals,omitempty"`
WithdrawalsHash *libcommon.Hash `json:"withdrawalsRoot,omitempty"`
Requests []*types.Request `json:"requests,omitempty"`
Requests types.Requests `json:"requests,omitempty"`
RequestsRoot *libcommon.Hash `json:"requestsRoot,omitempty"`
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/evm/internal/t8ntool/gen_stenv.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ func Main(ctx *cli.Context) error {
t8logger := log.New("t8ntool")
chainReader := consensuschain.NewReader(chainConfig, tx, nil, t8logger)
result, err := core.ExecuteBlockEphemerally(chainConfig, &vmConfig, getHash, engine, block, reader, writer, chainReader, getTracer, t8logger)

if hashError != nil {
return NewError(ErrorMissingBlockhash, fmt.Errorf("blockhash error: %v", err))
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/cli/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ func (e *remoteConsensusEngine) Prepare(_ consensus.ChainHeaderReader, _ *types.
panic("remoteConsensusEngine.Prepare not supported")
}

func (e *remoteConsensusEngine) Finalize(_ *chain.Config, _ *types.Header, _ *state.IntraBlockState, _ types.Transactions, _ []*types.Header, _ types.Receipts, _ []*types.Withdrawal, _ consensus.ChainReader, _ consensus.SystemCall, _ log.Logger) (types.Transactions, types.Receipts, error) {
func (e *remoteConsensusEngine) Finalize(_ *chain.Config, _ *types.Header, _ *state.IntraBlockState, _ types.Transactions, _ []*types.Header, _ types.Receipts, _ []*types.Withdrawal, _ consensus.ChainReader, _ consensus.SystemCall, _ log.Logger) (types.Transactions, types.Receipts, types.Requests, error) {
panic("remoteConsensusEngine.Finalize not supported")
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/state/exec3/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (rw *Worker) RunTxTaskNoLock(txTask *state.TxTask) {
return core.SysCallContract(contract, data, rw.chainConfig, ibs, header, rw.engine, false /* constCall */)
}

_, _, err := rw.engine.Finalize(rw.chainConfig, types.CopyHeader(header), ibs, txTask.Txs, txTask.Uncles, txTask.BlockReceipts, txTask.Withdrawals, txTask.Requests, rw.chain, syscall, rw.logger)
_, _, _, err := rw.engine.Finalize(rw.chainConfig, types.CopyHeader(header), ibs, txTask.Txs, txTask.Uncles, txTask.BlockReceipts, txTask.Withdrawals, txTask.Requests, rw.chain, syscall, rw.logger)
if err != nil {
txTask.Error = err
} else {
Expand Down
2 changes: 1 addition & 1 deletion cmd/state/exec3/state_recon.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (rw *ReconWorker) runTxTask(txTask *state.TxTask) error {
syscall := func(contract libcommon.Address, data []byte) ([]byte, error) {
return core.SysCallContract(contract, data, rw.chainConfig, ibs, header, rw.engine, false /* constCall */)
}
if _, _, err := rw.engine.Finalize(rw.chainConfig, types.CopyHeader(header), ibs, txTask.Txs, txTask.Uncles, txTask.BlockReceipts, txTask.Withdrawals, txTask.Requests, rw.chain, syscall, rw.logger); err != nil {
if _, _, _, err := rw.engine.Finalize(rw.chainConfig, types.CopyHeader(header), ibs, txTask.Txs, txTask.Uncles, txTask.BlockReceipts, txTask.Withdrawals, txTask.Requests, rw.chain, syscall, rw.logger); err != nil {
if _, readError := rw.stateReader.ReadError(); !readError {
return fmt.Errorf("finalize of block %d failed: %w", txTask.BlockNum, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/state/exec3/trace_worker2.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (rw *TraceWorker2) RunTxTask(txTask *state.TxTask) {
return core.SysCallContract(contract, data, rw.execArgs.ChainConfig, ibs, header, rw.execArgs.Engine, false /* constCall */)
}

_, _, err := rw.execArgs.Engine.Finalize(rw.execArgs.ChainConfig, types.CopyHeader(header), ibs, txTask.Txs, txTask.Uncles, txTask.BlockReceipts, txTask.Withdrawals, txTask.Requests, rw.chain, syscall, rw.logger)
_, _, _, err := rw.execArgs.Engine.Finalize(rw.execArgs.ChainConfig, types.CopyHeader(header), ibs, txTask.Txs, txTask.Uncles, txTask.BlockReceipts, txTask.Withdrawals, txTask.Requests, rw.chain, syscall, rw.logger)
if err != nil {
txTask.Error = err
}
Expand Down
20 changes: 10 additions & 10 deletions consensus/aura/aura.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,11 +703,11 @@ func (c *AuRa) applyRewards(header *types.Header, state *state.IntraBlockState,

// word `signal epoch` == word `pending epoch`
func (c *AuRa) Finalize(config *chain.Config, header *types.Header, state *state.IntraBlockState, txs types.Transactions,
uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request,
uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests,
chain consensus.ChainReader, syscall consensus.SystemCall, logger log.Logger,
) (types.Transactions, types.Receipts, error) {
) (types.Transactions, types.Receipts, types.Requests, error) {
if err := c.applyRewards(header, state, syscall); err != nil {
return nil, nil, err
return nil, nil, nil, err
}

// check_and_lock_block -> check_epoch_end_signal (after enact)
Expand All @@ -716,14 +716,14 @@ func (c *AuRa) Finalize(config *chain.Config, header *types.Header, state *state
}
pendingTransitionProof, err := c.cfg.Validators.signalEpochEnd(header.Number.Uint64() == 0, header, receipts)
if err != nil {
return nil, nil, err
return nil, nil, nil, err
}
if pendingTransitionProof != nil {
if header.Number.Uint64() >= DEBUG_LOG_FROM {
fmt.Printf("insert_pending_transition: %d,receipts=%d, lenProof=%d\n", header.Number.Uint64(), len(receipts), len(pendingTransitionProof))
}
if err = c.e.PutPendingEpoch(header.Hash(), header.Number.Uint64(), pendingTransitionProof); err != nil {
return nil, nil, err
return nil, nil, nil, err
}
}
// check_and_lock_block -> check_epoch_end_signal END
Expand All @@ -732,17 +732,17 @@ func (c *AuRa) Finalize(config *chain.Config, header *types.Header, state *state
c.EpochManager.finalityChecker.print(header.Number.Uint64())
epochEndProof, err := isEpochEnd(chain, c.e, finalized, header)
if err != nil {
return nil, nil, err
return nil, nil, nil, err
}
if epochEndProof != nil {
c.EpochManager.noteNewEpoch()
logger.Info("[aura] epoch transition", "block_num", header.Number.Uint64())
if err := c.e.PutEpoch(header.Hash(), header.Number.Uint64(), epochEndProof); err != nil {
return nil, nil, err
return nil, nil, nil, err
}
}

return txs, receipts, nil
return txs, receipts, nil, nil
}

func buildFinality(e *EpochManager, chain consensus.ChainHeaderReader, er *NonTransactionalEpochReader, validators ValidatorSet, header *types.Header, syscall consensus.SystemCall) []unAssembledHeader {
Expand Down Expand Up @@ -842,8 +842,8 @@ func allHeadersUntil(chain consensus.ChainHeaderReader, from *types.Header, to l
//}

// FinalizeAndAssemble implements consensus.Engine
func (c *AuRa) FinalizeAndAssemble(config *chain.Config, header *types.Header, state *state.IntraBlockState, txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request, chain consensus.ChainReader, syscall consensus.SystemCall, call consensus.Call, logger log.Logger) (*types.Block, types.Transactions, types.Receipts, error) {
outTxs, outReceipts, err := c.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger)
func (c *AuRa) FinalizeAndAssemble(config *chain.Config, header *types.Header, state *state.IntraBlockState, 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) {
outTxs, outReceipts, _, err := c.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger)
if err != nil {
return nil, nil, nil, err
}
Expand Down
8 changes: 4 additions & 4 deletions consensus/clique/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,18 +378,18 @@ func (c *Clique) CalculateRewards(config *chain.Config, header *types.Header, un
// Finalize implements consensus.Engine, ensuring no uncles are set, nor block
// rewards given.
func (c *Clique) Finalize(config *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, r types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request,
txs types.Transactions, uncles []*types.Header, r types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests,
chain consensus.ChainReader, syscall consensus.SystemCall, logger log.Logger,
) (types.Transactions, types.Receipts, error) {
) (types.Transactions, types.Receipts, types.Requests, error) {
// No block rewards in PoA, so the state remains as is and uncles are dropped
header.UncleHash = types.CalcUncleHash(nil)
return txs, r, nil
return txs, r, nil, nil
}

// FinalizeAndAssemble implements consensus.Engine, ensuring no uncles are set,
// nor block rewards given, and returns the final block.
func (c *Clique) FinalizeAndAssemble(chainConfig *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request, chain consensus.ChainReader, syscall consensus.SystemCall, call consensus.Call, logger log.Logger,
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) {
// No block rewards in PoA, so the state remains as is and uncles are dropped
header.UncleHash = types.CalcUncleHash(nil)
Expand Down
6 changes: 3 additions & 3 deletions consensus/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,16 @@ type EngineWriter interface {
// Note: The block header and state database might be updated to reflect any
// consensus rules that happen at finalization (e.g. block rewards).
Finalize(config *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request, chain ChainReader, syscall SystemCall, logger log.Logger,
) (types.Transactions, types.Receipts, error)
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests, chain ChainReader, syscall SystemCall, logger log.Logger,
) (types.Transactions, types.Receipts, types.Requests, error)

// FinalizeAndAssemble runs any post-transaction state modifications (e.g. block
// rewards) and assembles the final block.
//
// Note: The block header and state database might be updated to reflect any
// consensus rules that happen at finalization (e.g. block rewards).
FinalizeAndAssemble(config *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request, chain ChainReader, syscall SystemCall, call Call, logger log.Logger,
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests, chain ChainReader, syscall SystemCall, call Call, logger log.Logger,
) (*types.Block, types.Transactions, types.Receipts, error)

// Seal generates a new sealing request for the given input block and pushes
Expand Down
10 changes: 5 additions & 5 deletions consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,23 +566,23 @@ func (ethash *Ethash) Initialize(config *chain.Config, chain consensus.ChainHead
// Finalize implements consensus.Engine, accumulating the block and uncle rewards,
// setting the final state on the header
func (ethash *Ethash) Finalize(config *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, r types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request,
txs types.Transactions, uncles []*types.Header, r types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests,
chain consensus.ChainReader, syscall consensus.SystemCall, logger log.Logger,
) (types.Transactions, types.Receipts, error) {
) (types.Transactions, types.Receipts, types.Requests, error) {
// Accumulate any block and uncle rewards and commit the final state root
accumulateRewards(config, state, header, uncles)
return txs, r, nil
return txs, r, nil, nil
}

// FinalizeAndAssemble implements consensus.Engine, accumulating the block and
// uncle rewards, setting the final state and assembling the block.
func (ethash *Ethash) FinalizeAndAssemble(chainConfig *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, r types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request,
txs types.Transactions, uncles []*types.Header, r 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) {

// Finalize block
outTxs, outR, err := ethash.Finalize(chainConfig, header, state, txs, uncles, r, withdrawals, requests, chain, syscall, logger)
outTxs, outR, _, err := ethash.Finalize(chainConfig, header, state, txs, uncles, r, withdrawals, requests, chain, syscall, logger)
if err != nil {
return nil, nil, nil, err
}
Expand Down
53 changes: 44 additions & 9 deletions consensus/merge/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"math/big"
"reflect"

"github.com/holiman/uint256"

Expand Down Expand Up @@ -131,16 +132,16 @@ func (s *Merge) CalculateRewards(config *chain.Config, header *types.Header, unc
}

func (s *Merge) Finalize(config *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, r types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request,
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests,
chain consensus.ChainReader, syscall consensus.SystemCall, logger log.Logger,
) (types.Transactions, types.Receipts, error) {
) (types.Transactions, types.Receipts, types.Requests, error) {
if !misc.IsPoSHeader(header) {
return s.eth1Engine.Finalize(config, header, state, txs, uncles, r, withdrawals, requests, chain, syscall, logger)
return s.eth1Engine.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger)
}

rewards, err := s.CalculateRewards(config, header, uncles, syscall)
if err != nil {
return nil, nil, err
return nil, nil, nil, err
}
for _, r := range rewards {
state.AddBalance(r.Beneficiary, &r.Amount)
Expand All @@ -149,7 +150,7 @@ func (s *Merge) Finalize(config *chain.Config, header *types.Header, state *stat
if withdrawals != nil {
if auraEngine, ok := s.eth1Engine.(*aura.AuRa); ok {
if err := auraEngine.ExecuteSystemWithdrawals(withdrawals, syscall); err != nil {
return nil, nil, err
return nil, nil, nil, err
}
} else {
for _, w := range withdrawals {
Expand All @@ -159,20 +160,54 @@ func (s *Merge) Finalize(config *chain.Config, header *types.Header, state *stat
}
}

return txs, r, nil
var rs types.Requests
if config.IsPrague(header.Time) {
yperbasis marked this conversation as resolved.
Show resolved Hide resolved
rs = make(types.Requests, 0)
allLogs := types.Logs{}
for _, rec := range receipts {
allLogs = append(allLogs, rec.Logs...)
}
ds, err := types.ParseDepositLogs(allLogs, config.DepositContract)
rs = append(rs, ds...)
if err != nil {
return nil, nil, nil, fmt.Errorf("error: could not parse requests logs: %v", err)
}

rs = append(rs, misc.DequeueWithdrawalRequests7002(syscall)...)
if requests != nil || header.RequestsRoot != 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)
}
sds := requests.Deposits()
if !reflect.DeepEqual(sds, ds.Deposits()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need a similar check for withdrawal requests - see https://discord.com/channels/595666850260713488/892088344438255616/1247841586147229696

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Withdrawal request validations are done at the smart contract itself, so dequeue would get out the exact set of withdrawals.
Deposits are obtained from logs, which happens outside of EVM and in the above lines, and must be checked.
However, this check is already embedded with checking the requestsRoot as there is no scenario in which a different set of deposits passed in would lead to the same requestsRoot.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't understand why there should be a difference between deposit and withdrawal requests in terms of checks. At the end of a block expected deposit requests are calculated by ParseDepositLogs(logs), while withdrawal requests are calculated by DequeueWithdrawalRequests7002(syscall). If we rely solely on the *header.RequestsRoot != rh check for withdrawal requests, then we should do the same for deposit ones and remove the !reflect.DeepEqual(sds, ds.Deposits()) check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will add the DeepEqual check for withdrawal_requests in a later PR - under the assumption that there can be other request types in future.
Alternatively, until there is another type of request introduced, we can remove this check altogether and rely on block.HashCheck() combined with the root check above

return nil, nil, nil, fmt.Errorf("error: invalid deposits in block")
}
//TODO @somnathb1 add DeepEqual check for WithdrawaRequests too, because in future there could be other types of requests
}
}

return txs, receipts, rs, nil
}

func (s *Merge) FinalizeAndAssemble(config *chain.Config, header *types.Header, state *state.IntraBlockState,
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests []*types.Request, chain consensus.ChainReader, syscall consensus.SystemCall, call consensus.Call, logger log.Logger,
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) {

if !misc.IsPoSHeader(header) {
return s.eth1Engine.FinalizeAndAssemble(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, call, logger)
}
outTxs, outReceipts, err := s.Finalize(config, header, state, txs, uncles, receipts, withdrawals, requests, chain, syscall, logger)
header.RequestsRoot = 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
}
return types.NewBlock(header, outTxs, uncles, outReceipts, withdrawals, requests), outTxs, outReceipts, nil
if config.IsPrague(header.Time) {
if rs == nil {
rs = make(types.Requests, 0)
}
}
return types.NewBlock(header, outTxs, uncles, outReceipts, withdrawals, rs), outTxs, outReceipts, nil
}

func (s *Merge) SealHash(header *types.Header) (hash libcommon.Hash) {
Expand Down
Loading
Loading