Skip to content

Implement EIP-5920: PAY #8382

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

Draft
wants to merge 380 commits into
base: master
Choose a base branch
from
Draft

Implement EIP-5920: PAY #8382

wants to merge 380 commits into from

Conversation

benaadams
Copy link
Member

https://eips.ethereum.org/EIPS/eip-5920

Changes

  • Implement the PAY opcode

Types of changes

What types of changes does your code introduce?

  • New feature (a non-breaking change that adds functionality)

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

@benaadams benaadams added this to the Fusaka HardFork milestone Mar 18, 2025
@benaadams benaadams requested a review from Copilot March 29, 2025 00:01
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements EIP-5920 by introducing the PAY opcode into the EVM. Key changes include adding an IsEip5920Enabled flag in several spec interfaces and classes, registering the PAY opcode in the opcode lookup table, and providing a full PAY instruction implementation.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Nethermind/Nethermind.Specs/ReleaseSpec.cs Added IsEip5920Enabled property.
src/Nethermind/Nethermind.Specs.Test/OverridableReleaseSpec.cs Added forwarding of the IsEip5920Enabled flag.
src/Nethermind/Evm/Instructions/EvmInstructions.cs Registers the PAY opcode when enabled.
src/Nethermind/Evm/Instructions/EvmInstructions.Call.cs Implements the PAY instruction logic.
src/Nethermind/Evm/Instruction.cs Adds PAY enum entry.
src/Nethermind/Core/Specs/ReleaseSpecDecorator.cs Adds IsEip5920Enabled property for spec decoration.
src/Nethermind/Core/Specs/IReleaseSpec.cs Introduces IsEip5920Enabled in the spec interface.
Comments suppressed due to low confidence (1)

src/Nethermind/Nethermind.Evm/Instructions/EvmInstructions.Call.cs:417

  • [nitpick] For consistency with other checks in the method, consider using !transferValue.IsZero instead of transferValue != 0.
else if (spec.ClearEmptyAccountWhenTouched && transferValue != 0 && state.IsDeadAccount(target))

Base automatically changed from feature/evm/eof to master April 15, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants