Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion beacon_chain/consensus_object_pools/consensus_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ proc prepareNextSlot*(
when consensusFork >= ConsensusFork.Gloas:
PayloadAttributesV4.init(timestamp, prevRandao, feeRecipient,
get_expected_withdrawals(forkyState.data).withdrawals,
beaconHead.blck.bid.root, proposalSlot)
beaconHead.blck.bid.root, proposalSlot,
self[].getGasLimit(nextProposer))
else:
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/cancun.md#payloadattributesv3
PayloadAttributesV3.init(timestamp, prevRandao, feeRecipient,
Expand Down
2 changes: 2 additions & 0 deletions beacon_chain/el/el_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ func init*(
withdrawals: sink seq[capella.Withdrawal],
consensusHead: Eth2Digest,
slot: Slot,
targetGasLimit: uint64,
): T =
T(
timestamp: Quantity timestamp,
Expand All @@ -464,6 +465,7 @@ func init*(
withdrawals: withdrawals.toEngineWithdrawals(),
parentBeaconBlockRoot: consensusHead.to(Hash32),
slotNumber: Quantity(slot),
targetGasLimit: Quantity(targetGasLimit),
)

func init(
Expand Down
1 change: 1 addition & 0 deletions beacon_chain/validators/block_payloads.nim
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ proc getExecutionPayload*(
PayloadAttributesV4.init(
timestamp, prevRandao, feeRecipient, withdrawals,
beaconHead.blck.bid.root, slot,
node.consensusManager[].getGasLimit(validator_pubkey),
)
else:
PayloadAttributesV3.init(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_el_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ suite "EL Manager - getPayload":
state = ForkchoiceStateV1.init(ZERO_HASH, ZERO_HASH, ZERO_HASH)
attrs = PayloadAttributesV4.init(
0'u64, ZERO_HASH, default(Eth1Address),
default(seq[capella.Withdrawal]), ZERO_HASH, Slot(1))
default(seq[capella.Withdrawal]), ZERO_HASH, Slot(1), 60_000_000'u64)
resp =
waitFor manager.getPayload(gloas.ExecutionPayloadForSigning, state, attrs)

Expand Down
Loading