mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
miner: add inclusionList to BuildPayloadArgs and generateParams
This commit is contained in:
parent
ed28133754
commit
3111ae8157
2 changed files with 26 additions and 23 deletions
|
|
@ -37,13 +37,14 @@ import (
|
|||
// Check engine-api specification for more details.
|
||||
// https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#payloadattributesv3
|
||||
type BuildPayloadArgs struct {
|
||||
Parent common.Hash // The parent block to build payload on top
|
||||
Timestamp uint64 // The provided timestamp of generated payload
|
||||
FeeRecipient common.Address // The provided recipient address for collecting transaction fee
|
||||
Random common.Hash // The provided randomness value
|
||||
Withdrawals types.Withdrawals // The provided withdrawals
|
||||
BeaconRoot *common.Hash // The provided beaconRoot (Cancun)
|
||||
Version engine.PayloadVersion // Versioning byte for payload id calculation.
|
||||
Parent common.Hash // The parent block to build payload on top
|
||||
Timestamp uint64 // The provided timestamp of generated payload
|
||||
FeeRecipient common.Address // The provided recipient address for collecting transaction fee
|
||||
Random common.Hash // The provided randomness value
|
||||
Withdrawals types.Withdrawals // The provided withdrawals
|
||||
BeaconRoot *common.Hash // The provided beaconRoot (Cancun)
|
||||
InclusionList types.InclusionList // The provided inclusion list transactions
|
||||
Version engine.PayloadVersion // Versioning byte for payload id calculation.
|
||||
}
|
||||
|
||||
// Id computes an 8-byte identifier by hashing the components of the payload arguments.
|
||||
|
|
@ -241,14 +242,15 @@ func (miner *Miner) buildPayload(args *BuildPayloadArgs, witness bool) (*Payload
|
|||
endTimer := time.NewTimer(time.Second * 12)
|
||||
|
||||
fullParams := &generateParams{
|
||||
timestamp: args.Timestamp,
|
||||
forceTime: true,
|
||||
parentHash: args.Parent,
|
||||
coinbase: args.FeeRecipient,
|
||||
random: args.Random,
|
||||
withdrawals: args.Withdrawals,
|
||||
beaconRoot: args.BeaconRoot,
|
||||
noTxs: false,
|
||||
timestamp: args.Timestamp,
|
||||
forceTime: true,
|
||||
parentHash: args.Parent,
|
||||
coinbase: args.FeeRecipient,
|
||||
random: args.Random,
|
||||
withdrawals: args.Withdrawals,
|
||||
beaconRoot: args.BeaconRoot,
|
||||
inclusionList: args.InclusionList,
|
||||
noTxs: false,
|
||||
}
|
||||
|
||||
for {
|
||||
|
|
|
|||
|
|
@ -94,14 +94,15 @@ type newPayloadResult struct {
|
|||
|
||||
// generateParams wraps various settings for generating sealing task.
|
||||
type generateParams struct {
|
||||
timestamp uint64 // The timestamp for sealing task
|
||||
forceTime bool // Flag whether the given timestamp is immutable or not
|
||||
parentHash common.Hash // Parent block hash, empty means the latest chain head
|
||||
coinbase common.Address // The fee recipient address for including transaction
|
||||
random common.Hash // The randomness generated by beacon chain, empty before the merge
|
||||
withdrawals types.Withdrawals // List of withdrawals to include in block (shanghai field)
|
||||
beaconRoot *common.Hash // The beacon root (cancun field).
|
||||
noTxs bool // Flag whether an empty block without any transaction is expected
|
||||
timestamp uint64 // The timestamp for sealing task
|
||||
forceTime bool // Flag whether the given timestamp is immutable or not
|
||||
parentHash common.Hash // Parent block hash, empty means the latest chain head
|
||||
coinbase common.Address // The fee recipient address for including transaction
|
||||
random common.Hash // The randomness generated by beacon chain, empty before the merge
|
||||
withdrawals types.Withdrawals // List of withdrawals to include in block (shanghai field)
|
||||
beaconRoot *common.Hash // The beacon root (cancun field).
|
||||
inclusionList types.InclusionList // List of inclusion list transactions.
|
||||
noTxs bool // Flag whether an empty block without any transaction is expected
|
||||
}
|
||||
|
||||
// generateWork generates a sealing block based on the given parameters.
|
||||
|
|
|
|||
Loading…
Reference in a new issue