Skip to content

Commit 066ba7c

Browse files
committed
miner: add inclusionList to BuildPayloadArgs and generateParams
1 parent 71abcf4 commit 066ba7c

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

miner/payload_building.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ import (
3737
// Check engine-api specification for more details.
3838
// https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#payloadattributesv3
3939
type BuildPayloadArgs struct {
40-
Parent common.Hash // The parent block to build payload on top
41-
Timestamp uint64 // The provided timestamp of generated payload
42-
FeeRecipient common.Address // The provided recipient address for collecting transaction fee
43-
Random common.Hash // The provided randomness value
44-
Withdrawals types.Withdrawals // The provided withdrawals
45-
BeaconRoot *common.Hash // The provided beaconRoot (Cancun)
46-
Version engine.PayloadVersion // Versioning byte for payload id calculation.
40+
Parent common.Hash // The parent block to build payload on top
41+
Timestamp uint64 // The provided timestamp of generated payload
42+
FeeRecipient common.Address // The provided recipient address for collecting transaction fee
43+
Random common.Hash // The provided randomness value
44+
Withdrawals types.Withdrawals // The provided withdrawals
45+
BeaconRoot *common.Hash // The provided beaconRoot (Cancun)
46+
InclusionList types.InclusionList // The provided inclusion list transactions
47+
Version engine.PayloadVersion // Versioning byte for payload id calculation.
4748
}
4849

4950
// 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
241242
endTimer := time.NewTimer(time.Second * 12)
242243

243244
fullParams := &generateParams{
244-
timestamp: args.Timestamp,
245-
forceTime: true,
246-
parentHash: args.Parent,
247-
coinbase: args.FeeRecipient,
248-
random: args.Random,
249-
withdrawals: args.Withdrawals,
250-
beaconRoot: args.BeaconRoot,
251-
noTxs: false,
245+
timestamp: args.Timestamp,
246+
forceTime: true,
247+
parentHash: args.Parent,
248+
coinbase: args.FeeRecipient,
249+
random: args.Random,
250+
withdrawals: args.Withdrawals,
251+
beaconRoot: args.BeaconRoot,
252+
inclusionList: args.InclusionList,
253+
noTxs: false,
252254
}
253255

254256
for {

miner/worker.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,15 @@ type newPayloadResult struct {
9494

9595
// generateParams wraps various settings for generating sealing task.
9696
type generateParams struct {
97-
timestamp uint64 // The timestamp for sealing task
98-
forceTime bool // Flag whether the given timestamp is immutable or not
99-
parentHash common.Hash // Parent block hash, empty means the latest chain head
100-
coinbase common.Address // The fee recipient address for including transaction
101-
random common.Hash // The randomness generated by beacon chain, empty before the merge
102-
withdrawals types.Withdrawals // List of withdrawals to include in block (shanghai field)
103-
beaconRoot *common.Hash // The beacon root (cancun field).
104-
noTxs bool // Flag whether an empty block without any transaction is expected
97+
timestamp uint64 // The timestamp for sealing task
98+
forceTime bool // Flag whether the given timestamp is immutable or not
99+
parentHash common.Hash // Parent block hash, empty means the latest chain head
100+
coinbase common.Address // The fee recipient address for including transaction
101+
random common.Hash // The randomness generated by beacon chain, empty before the merge
102+
withdrawals types.Withdrawals // List of withdrawals to include in block (shanghai field)
103+
beaconRoot *common.Hash // The beacon root (cancun field).
104+
inclusionList types.InclusionList // List of inclusion list transactions.
105+
noTxs bool // Flag whether an empty block without any transaction is expected
105106
}
106107

107108
// generateWork generates a sealing block based on the given parameters.

0 commit comments

Comments
 (0)