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
6 changes: 6 additions & 0 deletions .changeset/sweet-actors-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@eth-optimism/core-utils': patch
'@eth-optimism/l2geth': patch
---

Lower per tx fee overhead to more accurately represent L1 costs
2 changes: 1 addition & 1 deletion go/utils/fees/rollup_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// overhead represents the fixed cost of batch submission of a single
// transaction in gas.
const overhead uint64 = 4200 + 200*params.TxDataNonZeroGasEIP2028
const overhead uint64 = 2750

// feeScalar is used to scale the calculations in EncodeL2GasLimit
// to prevent them from being too large
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/test/rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,7 @@ describe('Basic RPC tests', () => {
expect(decoded).to.deep.eq(BigNumber.from(l2Gaslimit))
expect(estimate.toString().endsWith(l2Gaslimit.toString()))

const l2GasPrice = BigNumber.from(0)
// The L2GasPrice should be fetched from the L2GasPrice oracle contract,
// but it does not yet exist. Use the default value for now
const l2GasPrice = await env.gasPriceOracle.gasPrice()
const expected = TxGasLimit.encode({
data: tx.data,
l1GasPrice,
Expand Down
2 changes: 1 addition & 1 deletion l2geth/rollup/fees/rollup_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (

// overhead represents the fixed cost of batch submission of a single
// transaction in gas.
const overhead uint64 = 4200 + 200*params.TxDataNonZeroGasEIP2028
const overhead uint64 = 2750

// feeScalar is used to scale the calculations in EncodeL2GasLimit
// to prevent them from being too large
Expand Down
2 changes: 1 addition & 1 deletion packages/core-utils/src/fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { remove0x } from './common'
const feeScalar = 10_000_000
const txDataZeroGas = 4
const txDataNonZeroGasEIP2028 = 16
const overhead = 4200 + 200 * txDataNonZeroGasEIP2028
const overhead = 2750
const tenThousand = BigNumber.from(10_000)
export const TxGasPrice = BigNumber.from(feeScalar + feeScalar / 2)
export interface EncodableL2GasLimit {
Expand Down