mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 13:55:45 +00:00
Fix txPool: excessBlobGas should be calculated before entering EVM, not after (#2149)
This commit is contained in:
parent
b9187e0493
commit
47605dbdf3
@ -116,8 +116,8 @@ proc newPayload*(ben: BeaconEngineRef,
|
||||
timestamp = ethTime payload.timestamp
|
||||
version = payload.version
|
||||
|
||||
validateVersion(com, timestamp, version, apiVersion)
|
||||
validatePayload(apiVersion, version, payload)
|
||||
validateVersion(com, timestamp, version, apiVersion)
|
||||
|
||||
var header = blockHeader(payload, removeBlobs = true, beaconRoot = ethHash beaconRoot)
|
||||
|
||||
|
@ -19,6 +19,7 @@ import
|
||||
../../utils/utils,
|
||||
../../vm_state,
|
||||
../../vm_types,
|
||||
../eip4844,
|
||||
../clique/[clique_sealer, clique_desc, clique_cfg],
|
||||
../pow/difficulty,
|
||||
../executor,
|
||||
@ -137,6 +138,7 @@ proc resetTxEnv(dh: TxChainRef; parent: BlockHeader; fee: Option[UInt256])
|
||||
prevRandao : dh.prepHeader.prevRandao,
|
||||
difficulty : dh.prepHeader.difficulty,
|
||||
coinbase : dh.feeRecipient,
|
||||
excessBlobGas: calcExcessBlobGas(parent),
|
||||
)
|
||||
|
||||
dh.txEnv.vmState = BaseVMState.new(
|
||||
|
@ -275,8 +275,7 @@ proc vmExecCommit(pst: TxPackerStateRef)
|
||||
|
||||
if vmState.com.forkGTE(Cancun):
|
||||
# EIP-4844
|
||||
let excessBlobGas = calcExcessBlobGas(vmState.parent)
|
||||
xp.chain.excessBlobGas = some(excessBlobGas)
|
||||
xp.chain.excessBlobGas = some(vmState.blockCtx.excessBlobGas)
|
||||
xp.chain.blobGasUsed = some(pst.blobGasUsed)
|
||||
|
||||
proc balanceDelta: UInt256 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user