-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: implement Operator Fee Fix (Jovian) #17366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
geoknee
merged 38 commits into
ethereum-optimism:develop
from
fakedev9999:taehoon/update-operator-fee-formula
Oct 16, 2025
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
0844194
fix!: multiply operatorFeeScalar by 100 instead of dividing by 1e6
fakedev9999 1c7b2ee
chore: bump to 1.5.0
fakedev9999 3881631
chore: bump to 2.0.0
fakedev9999 c104e98
refac: gate at Jovian
fakedev9999 887699c
missing changes
fakedev9999 7ea9b9e
update
fakedev9999 dea4318
reduce diff
fakedev9999 bf5cabb
snapshot abi + storage layout + remove unncessary change
fakedev9999 fb6cec8
apply comments
fakedev9999 dc89d06
make ci green
fakedev9999 6c247c4
chore: update go.mod
fakedev9999 d7edb95
fix: activate Jovian in e2e tests
leruaa cf895c1
feat: add Jovian upgrate transactions
leruaa 827be39
fix: update GPO bytecode
leruaa 6361ca8
use IsOperatorFeeFix
fakedev9999 c30e0cf
add jovian operator fee acceptance test
fakedev9999 e8098ad
chore: add commit hash for GPO bytecode
leruaa edaa994
chore: remove useless replace in go.mod
leruaa 21f1632
acceptance-tests: push common code for operator fee into dsl
geoknee dd20852
tweak
geoknee 8b3d4a1
refactor IsthmusCostOracle
geoknee f4f2b9e
fix link
geoknee 165c19b
tag TODO for followup
geoknee dd390af
update op-geth
geoknee 13821d1
lint
geoknee e4d4e8f
lint
geoknee 4a85283
revert changes to op-service/txinclude
geoknee d0d0098
Merge remote-tracking branch 'origin/develop' into taehoon/update-ope…
geoknee b3299e0
Merge remote-tracking branch 'origin/develop' into taehoon/update-ope…
geoknee 82a7658
regenerate l1block bytecode and resolve nonce clash
geoknee 34045b6
decouple upgrade transactions, change API to getter and fix tests
geoknee c0a62c0
update op-geth reference
geoknee bac564f
Update packages/contracts-bedrock/test/L2/GasPriceOracle.t.sol
geoknee 1fbc84c
jovian upgrade transactions: reorder deployer addresses
geoknee 866499f
just update-op-geth 5c6d276814f2cce1d4dda25ed9e5a3a1c52e59a4
geoknee d35ba6a
explicitly disallow user transactions in jovian activation block
geoknee 82aad4d
assert on receipts in operator fee acceptance test
geoknee b719641
op-e2e/actions: remove jovianActivationBlock test case
geoknee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 2 additions & 49 deletions
51
op-acceptance-tests/tests/isthmus/operator_fee/operator_fee_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,18 @@ | ||
| package operatorfee | ||
|
|
||
| import ( | ||
| "math/big" | ||
| "testing" | ||
|
|
||
| "github.com/ethereum-optimism/optimism/op-devstack/devtest" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/dsl" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/presets" | ||
| "github.com/ethereum-optimism/optimism/op-node/rollup" | ||
| "github.com/ethereum-optimism/optimism/op-service/eth" | ||
| ) | ||
|
|
||
| func TestOperatorFee(gt *testing.T) { | ||
| t := devtest.SerialT(gt) | ||
| sys := presets.NewMinimal(t) | ||
| require := t.Require() | ||
|
|
||
| err := dsl.RequiresL2Fork(t.Ctx(), sys, 0, rollup.Isthmus) | ||
| require.NoError(err, "Isthmus fork must be active for this test") | ||
|
|
||
| fundAmount := eth.OneTenthEther | ||
| alice := sys.FunderL2.NewFundedEOA(fundAmount) | ||
|
|
||
| alice.WaitForBalance(fundAmount) | ||
| bob := sys.Wallet.NewEOA(sys.L2EL) | ||
|
|
||
| operatorFee := dsl.NewOperatorFee(t, sys.L2Chain, sys.L1EL) | ||
|
|
||
| operatorFee.CheckCompatibility() | ||
| systemOwner := operatorFee.GetSystemOwner() | ||
| sys.FunderL1.FundAtLeast(systemOwner, fundAmount) | ||
|
|
||
| // First, ensure L2 is synced with current L1 state before starting tests | ||
| t.Log("Ensuring L2 is synced with current L1 state...") | ||
| operatorFee.WaitForL2SyncWithCurrentL1State() | ||
|
|
||
| testCases := []struct { | ||
| name string | ||
| scalar uint32 | ||
| constant uint64 | ||
| }{ | ||
| {"ZeroFees", 0, 0}, | ||
| {"NonZeroFees", 300, 400}, | ||
| } | ||
|
|
||
| for _, tc := range testCases { | ||
| t.Run(tc.name, func(t devtest.T) { | ||
| operatorFee.SetOperatorFee(tc.scalar, tc.constant) | ||
| operatorFee.WaitForL2Sync(tc.scalar, tc.constant) | ||
| operatorFee.VerifyL2Config(tc.scalar, tc.constant) | ||
|
|
||
| result := operatorFee.ValidateTransactionFees(alice, bob, big.NewInt(1000), tc.scalar, tc.constant) | ||
|
|
||
| t.Log("Test completed successfully:", | ||
| "testCase", tc.name, | ||
| "gasUsed", result.TransactionReceipt.GasUsed, | ||
| "actualTotalFee", result.ActualTotalFee.String(), | ||
| "expectedOperatorFee", result.ExpectedOperatorFee.String(), | ||
| "vaultBalanceIncrease", result.VaultBalanceIncrease.String()) | ||
| }) | ||
| } | ||
|
|
||
| operatorFee.RestoreOriginalConfig() | ||
| t.Require().NoError(err, "Isthmus fork must be active for this test") | ||
| dsl.RunOperatorFeeTest(t, sys.L2Chain, sys.L1EL, sys.FunderL1, sys.FunderL2) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package jovian | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/ethereum-optimism/optimism/op-devstack/devtest" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/dsl" | ||
| "github.com/ethereum-optimism/optimism/op-devstack/presets" | ||
| "github.com/ethereum-optimism/optimism/op-node/rollup" | ||
| ) | ||
|
|
||
| func TestOperatorFee(gt *testing.T) { | ||
| t := devtest.SerialT(gt) | ||
| sys := presets.NewMinimal(t) | ||
| err := dsl.RequiresL2Fork(t.Ctx(), sys, 0, rollup.Jovian) | ||
| t.Require().NoError(err, "Jovian fork must be active for this test") | ||
| dsl.RunOperatorFeeTest(t, sys.L2Chain, sys.L1EL, sys.FunderL1, sys.FunderL2) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.