Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
ea2efbde
Unverified
Commit
ea2efbde
authored
Sep 08, 2021
by
Mark Tyneway
Committed by
GitHub
Sep 08, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1423 from ethereum-optimism/kevin/fixFees
Lower per tx fee overhead
parents
087f1f4e
dfe3598f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
6 deletions
+10
-6
sweet-actors-hope.md
.changeset/sweet-actors-hope.md
+6
-0
rollup_fee.go
go/utils/fees/rollup_fee.go
+1
-1
rpc.spec.ts
integration-tests/test/rpc.spec.ts
+1
-3
rollup_fee.go
l2geth/rollup/fees/rollup_fee.go
+1
-1
fees.ts
packages/core-utils/src/fees.ts
+1
-1
No files found.
.changeset/sweet-actors-hope.md
0 → 100644
View file @
ea2efbde
---
'
@eth-optimism/core-utils'
:
patch
'
@eth-optimism/l2geth'
:
patch
---
Lower per tx fee overhead to more accurately represent L1 costs
go/utils/fees/rollup_fee.go
View file @
ea2efbde
...
@@ -9,7 +9,7 @@ import (
...
@@ -9,7 +9,7 @@ import (
// overhead represents the fixed cost of batch submission of a single
// overhead represents the fixed cost of batch submission of a single
// transaction in gas.
// transaction in gas.
const
overhead
uint64
=
4200
+
200
*
params
.
TxDataNonZeroGasEIP2028
const
overhead
uint64
=
2750
// feeScalar is used to scale the calculations in EncodeL2GasLimit
// feeScalar is used to scale the calculations in EncodeL2GasLimit
// to prevent them from being too large
// to prevent them from being too large
...
...
integration-tests/test/rpc.spec.ts
View file @
ea2efbde
...
@@ -420,9 +420,7 @@ describe('Basic RPC tests', () => {
...
@@ -420,9 +420,7 @@ describe('Basic RPC tests', () => {
expect
(
decoded
).
to
.
deep
.
eq
(
BigNumber
.
from
(
l2Gaslimit
))
expect
(
decoded
).
to
.
deep
.
eq
(
BigNumber
.
from
(
l2Gaslimit
))
expect
(
estimate
.
toString
().
endsWith
(
l2Gaslimit
.
toString
()))
expect
(
estimate
.
toString
().
endsWith
(
l2Gaslimit
.
toString
()))
const
l2GasPrice
=
BigNumber
.
from
(
0
)
const
l2GasPrice
=
await
env
.
gasPriceOracle
.
gasPrice
()
// The L2GasPrice should be fetched from the L2GasPrice oracle contract,
// but it does not yet exist. Use the default value for now
const
expected
=
TxGasLimit
.
encode
({
const
expected
=
TxGasLimit
.
encode
({
data
:
tx
.
data
,
data
:
tx
.
data
,
l1GasPrice
,
l1GasPrice
,
...
...
l2geth/rollup/fees/rollup_fee.go
View file @
ea2efbde
...
@@ -25,7 +25,7 @@ var (
...
@@ -25,7 +25,7 @@ var (
// overhead represents the fixed cost of batch submission of a single
// overhead represents the fixed cost of batch submission of a single
// transaction in gas.
// transaction in gas.
const
overhead
uint64
=
4200
+
200
*
params
.
TxDataNonZeroGasEIP2028
const
overhead
uint64
=
2750
// feeScalar is used to scale the calculations in EncodeL2GasLimit
// feeScalar is used to scale the calculations in EncodeL2GasLimit
// to prevent them from being too large
// to prevent them from being too large
...
...
packages/core-utils/src/fees.ts
View file @
ea2efbde
...
@@ -8,7 +8,7 @@ import { remove0x } from './common'
...
@@ -8,7 +8,7 @@ import { remove0x } from './common'
const
feeScalar
=
10
_000_000
const
feeScalar
=
10
_000_000
const
txDataZeroGas
=
4
const
txDataZeroGas
=
4
const
txDataNonZeroGasEIP2028
=
16
const
txDataNonZeroGasEIP2028
=
16
const
overhead
=
4200
+
200
*
txDataNonZeroGasEIP2028
const
overhead
=
2750
const
tenThousand
=
BigNumber
.
from
(
10
_000
)
const
tenThousand
=
BigNumber
.
from
(
10
_000
)
export
const
TxGasPrice
=
BigNumber
.
from
(
feeScalar
+
feeScalar
/
2
)
export
const
TxGasPrice
=
BigNumber
.
from
(
feeScalar
+
feeScalar
/
2
)
export
interface
EncodableL2GasLimit
{
export
interface
EncodableL2GasLimit
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment