Skip to content
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

feat: update L1 data fee in Curie hard fork #755

Merged
merged 29 commits into from
May 28, 2024
Merged

Conversation

Thegaram
Copy link

@Thegaram Thegaram commented May 17, 2024

1. Purpose or design rationale of this PR

Add updated GasPriceOracle contract code and fee calculation logic at Curie hard fork.

Corresponding contract change: scroll-tech/scroll#1343

Steps:

  • Add new GPO storage slots.
  • Add new slots to trace.
  • Support different L1 data fee logic based on block number.
  • Add "special state transition" at Curie fork block.
  • Ensure that Curie fork block contains 0 transactions.
  • Finalize Curie data fee calculation.
  • Insert new GPO bytecode at fork block.
  • Add unit tests.

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • feat: A new feature

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

Copy link
Member

@colinlyguo colinlyguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Have a small question, where can I find Add "special state transition" at Curie fork block implementation, and what's its rationale?

@Thegaram
Copy link
Author

Great work. Have a small question, where can I find Add "special state transition" at Curie fork block implementation, and what's its rationale?

It will basically be one line:

statedb.SetCode(rcfg.L1GasPriceOracleAddress, newBytecode)

Switch out the predeploy implementation to the new contract.

@colinlyguo colinlyguo requested a review from zimpha May 20, 2024 06:58
@Thegaram Thegaram requested review from omerfirmak and removed request for HAOYUatHZ May 23, 2024 12:10
@Thegaram Thegaram marked this pull request as ready for review May 23, 2024 13:25
omerfirmak
omerfirmak previously approved these changes May 23, 2024
zimpha
zimpha previously approved these changes May 23, 2024
colinlyguo
colinlyguo previously approved these changes May 23, 2024
rollup/fees/rollup_fee_test.go Show resolved Hide resolved
@Thegaram
Copy link
Author

Let's merge after scroll-tech/scroll#1343, in case we need to update the bytecode in this PR.

rollup/fees/rollup_fee.go Show resolved Hide resolved
params/version.go Outdated Show resolved Hide resolved
@Thegaram Thegaram dismissed stale reviews from colinlyguo, zimpha, and omerfirmak via 8dc419a May 26, 2024 20:28
@Thegaram Thegaram marked this pull request as draft May 26, 2024 20:45
@Thegaram Thegaram marked this pull request as ready for review May 28, 2024 06:16
colinlyguo
colinlyguo previously approved these changes May 28, 2024
zimpha
zimpha previously approved these changes May 28, 2024
@Thegaram Thegaram dismissed stale reviews from zimpha and colinlyguo via 6c50ae0 May 28, 2024 10:59
@Thegaram Thegaram merged commit bfe8030 into develop May 28, 2024
7 checks passed
@Thegaram Thegaram deleted the feat-curie-gas-oracle branch May 28, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants