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

Enable EIP-3529 #1358

Closed
wants to merge 3 commits into from
Closed

Enable EIP-3529 #1358

wants to merge 3 commits into from

Conversation

Mister-EA
Copy link
Contributor

@Mister-EA Mister-EA commented Mar 15, 2023

Description

This PR enables EIP-3529 for BSC on the next hard fork block.

This EIP:

  • Removes gas refund for SELFDESTRUCT.
  • Caps the refund for SSTORE to 1/5th of the gas used in the transaction.
  • Lowers the SstoreClearsScheduleRefund from 15,000 to 4,800 .

Rationale

Currently the code implementing EIP-3592 is present in the repository, but is not enabled. Moreover, no new tests were added in the pull request implementing it in go-ethereum : ethereum/go-ethereum#22733.
Those tests are added here.

Since EIP-3529 is built upon EIP-2929, this PR also enables EIP-2929. For this a new VM instructionset is defined with both EIPs enabled.

Changes

Notable changes:

  • params/config.go : config changes to include hard fork block.
  • vm/jump_table.go : defining a new instructionset with EIP3529 and EIP2929 enabled.
  • core/blockchain_test.go : tests for the gas refunds when EIP3529 is enabled.

@Mister-EA Mister-EA marked this pull request as draft March 15, 2023 13:13
params/config.go Outdated Show resolved Hide resolved
core/blockchain_test.go Outdated Show resolved Hide resolved
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.

3 participants