forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 284
feat: update L1 data fee in Curie hard fork #755
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
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
21025d6
update fee calculation
Thegaram 1b2fa46
add missing GPO slots to trace
Thegaram 1cf9935
add placeholder for contract update logic
Thegaram 8d3e6be
nit
Thegaram 328145a
update fee calculation
Thegaram 5bba53c
Merge branch 'develop' into feat-curie-gas-oracle
Thegaram 0bf47ae
update formula
Thegaram 5d5a0ff
Merge branch 'develop' into feat-curie-gas-oracle
Thegaram e034053
update GPO slots
Thegaram d24b861
update L1GPO bytecode
Thegaram 7b2cf06
apply Curie in new worker
Thegaram 19a269d
move bytecode to config
Thegaram df68328
create an empty block for curie hard fork
omerfirmak 626f789
Merge branch 'develop' into feat-curie-gas-oracle
Thegaram b8581d5
initialize L1GasPriceOracle storage slots
Thegaram 5a2118e
add comments
Thegaram 896a5c7
add test
Thegaram ec5c347
add IsCurie to traces and tests
Thegaram 63c9bd9
group GPO storage slots into a struct
Thegaram 8f38fc4
update unit test
Thegaram fd406f4
chore: auto version bump [bot]
Thegaram 8316a6e
trigger ci
Thegaram 8dc419a
Merge branch 'develop' into feat-curie-gas-oracle
Thegaram 5c02f09
Merge branch 'develop' into feat-curie-gas-oracle
Thegaram 110238a
update bytecode
Thegaram 71f9770
remove leading 0x
Thegaram 3310746
update comments
Thegaram 70d5402
include rollup fee tests in CI
Thegaram 6c50ae0
Merge branch 'develop' into feat-curie-gas-oracle
Thegaram 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package misc | ||
|
|
||
| import ( | ||
| "github.com/scroll-tech/go-ethereum/common" | ||
| "github.com/scroll-tech/go-ethereum/core/state" | ||
| "github.com/scroll-tech/go-ethereum/log" | ||
| "github.com/scroll-tech/go-ethereum/rollup/rcfg" | ||
| ) | ||
|
|
||
| // ApplyCurieHardFork modifies the state database according to the Curie hard-fork rules, | ||
| // updating the bytecode and storage of the L1GasPriceOracle contract. | ||
| func ApplyCurieHardFork(statedb *state.StateDB) { | ||
| log.Info("Applying Curie hard fork") | ||
|
|
||
| // update contract byte code | ||
| statedb.SetCode(rcfg.L1GasPriceOracleAddress, rcfg.CurieL1GasPriceOracleBytecode) | ||
|
|
||
| // initialize new storage slots | ||
| statedb.SetState(rcfg.L1GasPriceOracleAddress, rcfg.IsCurieSlot, common.BytesToHash([]byte{1})) | ||
Thegaram marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| statedb.SetState(rcfg.L1GasPriceOracleAddress, rcfg.L1BlobBaseFeeSlot, common.BytesToHash([]byte{1})) | ||
| statedb.SetState(rcfg.L1GasPriceOracleAddress, rcfg.CommitScalarSlot, common.BigToHash(rcfg.InitialCommitScalar)) | ||
| statedb.SetState(rcfg.L1GasPriceOracleAddress, rcfg.BlobScalarSlot, common.BigToHash(rcfg.InitialBlobScalar)) | ||
| } | ||
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
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
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
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.