mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
cmd/evm, eth/gasestimator, miner: apply the EIP-8037
This commit is contained in:
parent
76e61c5a1a
commit
184bef1ec3
3 changed files with 8 additions and 6 deletions
|
|
@ -185,7 +185,9 @@ func Transaction(ctx *cli.Context) error {
|
|||
}
|
||||
}
|
||||
|
||||
if chainConfig.IsOsaka(new(big.Int), 0) && tx.Gas() > params.MaxTxGas {
|
||||
isOsaka := chainConfig.IsOsaka(new(big.Int), 0)
|
||||
isAmsterdam := chainConfig.IsAmsterdam(new(big.Int), 0)
|
||||
if isOsaka && !isAmsterdam && tx.Gas() > params.MaxTxGas {
|
||||
r.Error = errors.New("gas limit exceeds maximum")
|
||||
}
|
||||
results = append(results, r)
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ func Estimate(ctx context.Context, call *core.Message, opts *Options, gasCap uin
|
|||
}
|
||||
|
||||
// Cap the maximum gas allowance according to EIP-7825 if the estimation targets Osaka
|
||||
if hi > params.MaxTxGas {
|
||||
if opts.Config.IsOsaka(opts.Header.Number, opts.Header.Time) {
|
||||
hi = params.MaxTxGas
|
||||
}
|
||||
isOsaka := opts.Config.IsOsaka(opts.Header.Number, opts.Header.Time)
|
||||
isAmsterdam := opts.Config.IsAmsterdam(opts.Header.Number, opts.Header.Time)
|
||||
if hi > params.MaxTxGas && isOsaka && !isAmsterdam {
|
||||
hi = params.MaxTxGas
|
||||
}
|
||||
|
||||
// Normalize the max fee per gas the call is willing to spend.
|
||||
|
|
|
|||
|
|
@ -560,7 +560,7 @@ func (miner *Miner) fillTransactions(ctx context.Context, interrupt *atomic.Int3
|
|||
if env.header.ExcessBlobGas != nil {
|
||||
filter.BlobFee = uint256.MustFromBig(eip4844.CalcBlobFee(miner.chainConfig, env.header))
|
||||
}
|
||||
if miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) {
|
||||
if miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) && !miner.chainConfig.IsAmsterdam(env.header.Number, env.header.Time) {
|
||||
filter.GasLimitCap = params.MaxTxGas
|
||||
}
|
||||
filter.BlobTxs = false
|
||||
|
|
|
|||
Loading…
Reference in a new issue