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)/reenable 1559 #578

Closed
wants to merge 25 commits into from
Closed

(Feat)/reenable 1559 #578

wants to merge 25 commits into from

Conversation

NazariiDenha
Copy link

@NazariiDenha NazariiDenha commented Nov 23, 2023

1. Purpose or design rationale of this PR

Currently Scroll does not support EIP-1559 transactions, fee markets, block fields, and opcodes (BASEFEE). We want to enable this as part of the next hard fork.
https://app.asana.com/0/1202293017617135/1205896809138440/f

Testing

EIP-1559 transactions and baseFeePerGas

  • Set up local network with Banach fork activated in block number 15
  • During first 15 blocks it wasn't possible to send non-legacy tx and received custom error: EIP-1559 not activated
  • After that network started to accept EIP-1559 txs
  • For the blocks before 15 getBlockByNumber didn't return field baseFeePerGas at all
  • For later blocks it started to return baseFeePerGas that changes

BASEFEE opcode

  • created and deployed simple contract
contract BaseFeeChecker {
    uint256 public basefee;

    function setBaseFee() public {
        basefee = block.basefee;
    }
}
  • called setBaseFee method before Banach block. It returned error (code: -32000, message: invalid opcode: BASEFEE, data: None)
  • called setBaseFee method after fork activation and checked the stored value with eth_getStorageAt. The value stored in basefee variable was the same as baseFeePerGas of corresponding block

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:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

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

@NazariiDenha NazariiDenha changed the base branch from develop to feat/conf-for-hard-fork November 23, 2023 11:19
@NazariiDenha NazariiDenha changed the title [WIP](Feat)/reenable 1559 [WIP not ready for review](Feat)/reenable 1559 Nov 23, 2023
@NazariiDenha NazariiDenha marked this pull request as ready for review November 23, 2023 11:26
@NazariiDenha NazariiDenha changed the title [WIP not ready for review](Feat)/reenable 1559 (Feat)/reenable 1559 Dec 4, 2023
colinlyguo
colinlyguo previously approved these changes Jan 16, 2024
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.

LGTM.

0xmountaintop
0xmountaintop previously approved these changes Jan 17, 2024
@lispc
Copy link

lispc commented Jan 26, 2024

Will this be merged soon?will be helpful for circuit side integration and testing.

Base automatically changed from feat/conf-for-hard-fork to develop February 9, 2024 12:46
@Thegaram Thegaram dismissed stale reviews from 0xmountaintop and colinlyguo February 9, 2024 12:46

The base branch was changed.

Comment on lines 286 to 287
// Make sure that transaction gasFeeCap is greater than the baseFee (post london)
if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
// Make sure that transaction gasFeeCap is greater than the baseFee (post Banach)
if st.evm.ChainConfig().IsBanach(st.evm.Context.BlockNumber) {
Copy link

Choose a reason for hiding this comment

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

London has already happened on Scroll mainnet and Scroll Sepolia (meaning that IsLondon is already true). So changing this here would be a breaking change, it would change the state transition function, and lead to l2geth not being able to sync the chain.

@Thegaram
Copy link

Thegaram commented Feb 9, 2024

I think the safest approach is to leave IsLondon everywhere and change the logic to IsBanach where there was BaseFeeEnabled. I'll push some changes.

@Thegaram
Copy link

Closing for #634.

@Thegaram Thegaram closed this Feb 18, 2024
@0xmountaintop 0xmountaintop deleted the feat/reenable-1559 branch June 18, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants