Skip to content

Conversation

@Dargon789
Copy link
Owner

What was wrong?

Related to Issue #
Closes #

How was it fixed?

Todo:

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

fselmo and others added 30 commits April 21, 2025 13:49
- add ``fixtures_eest`` as a submodule; use ``v4.1.0`` tarball develop fixtures
- update ``fixtures`` to v14.1
- update fixture loader to pull in EEST and ethereum test fixtures
- take Pyspecs fixtures out entirely, rather than collecting & skipping.
- Initial 7702 Commit - ExtCode* opcodes
- 7702 CallCode opcode
- Update EXTCODE* opcodes
- 7702 StaticCall and DelegateCall opcodes
- Adds to Prague fork classes
- Comment out 7702 opcodes for now
- Transaction tests are running - not correct yet
- Fix lint issues; add 7702 TODOs
- Implement block requests and compute the block request hash for
  the block header, post-prague.

- Extend the block header for Prague blocks to include the ``requests_hash``.

- Some refactoring of block preprocessing to get ready for EIP-7002.
  This takes in the ``block``, not just the ``block.header`` as an
  argument so that we have access to the block requests.
- STANDARD_TOKEN_COST as per EIP-7623 is really just another
  way of calculating the current gas schedule. It factors the
  4 out of (4 * zero_bytes) + (16 * non_zero_bytes), leaving
  (zero_bytes + 4 * non_zero_bytes). Leave the current schedule
  untouched and instead compare this to the new data_floor when
  finalizing the computation, subtracting more gas if necessary
  until we reach the data floor cost.
- g1 add, msm, and map fp to g1
- g2 add, msm, and map fp2 to g2
- pairing

- bonus: bump py_ecc version
- newsfragment for ethereum#2204
- Still missing some eips so some test failures are expected
- For ethereum/tests, this is provided in the pre state.
  If users want this functionality for testing, we need to
  deploy these as the respective EIPs define.
- Some precompiles passing
- Add chainId check
- fix error msg typo
- Put back process_authorizations, use correct ecrecover
- Old Call tests passing
- Tests for extcodesize, extcodehash, and extcodecopy passing
- StaticCall tests down to 10 failing, some cleanup
- (DRY) Refactor ``BaseCall`` logic to accommodate some smaller
  changes to call opcodes so we don't have to re-write a bunch of
  code for Prague, only overwrite certain methods.

 - Keep static call logic unchanged.

 - Track message refunds separately. Even if computation fails,
   apply message refunds.

 - Fix some logic to match EIP.

 Along the way:

 - Logic for ``secp256k1n/2`` seems to have been wrong in py-evm.
   Fixed that check and added it to the auth validation.
- Do not pull data floor diff from refunds, nor attempt to use it
  from the computation gas itself. This should be calculated after
  refunds and separate from the computation gas.

- Add an extra ``data_floor_gas`` property to the computation that is
  calculated by the transaction executor. This value can be used to
  calculate the total gas used by the transaction at any point in the
  processing of the computation. This is useful when issueing refunds
  and when making the transaction receipt.
fselmo and others added 21 commits April 21, 2025 16:53
- Add simple test to catch this error in future fork implementations,
  starting from Berlin when TypedTransaction was introduced.
- Turn on PragueVM for other relevant core tests.
Authorizations should not be expected to be built using the
``Authorization`` class in the unsigned version of set code transaction.
Expect these as python types (dicts) and build them into the class from
the dict.
- Address any attribute errors if the parent header is not
  Cancun or Prague, coming into a Prague header.
- Add mainnet block for Cancun.
Removed Discord and build status badges from README.
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @Dargon789, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@Dargon789 Dargon789 enabled auto-merge (rebase) January 25, 2026 08:29
@Dargon789 Dargon789 disabled auto-merge January 25, 2026 08:30
@gemini-code-assist
Copy link

Summary of Changes

Hello @Dargon789, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly updates the Ethereum Virtual Machine (EVM) implementation to support the upcoming Prague hard fork. It introduces several new Ethereum Improvement Proposals (EIPs) that expand transaction capabilities, enhance cryptographic operations, and refine block processing mechanisms. The changes reflect a major evolution in the EVM's functionality and its interaction with the broader Ethereum ecosystem.

Highlights

  • Prague Hard Fork Implementation: The core of this PR is the implementation of the Prague hard fork, including new EIPs like EIP-7685 (block requests), EIP-7623 (calldata cost increase), EIP-2935 (historical block hashes), EIP-7691 (blob throughput increase), EIP-2537 (BLS12-381 precompiles), EIP-6110 (validator deposit block requests), EIP-7002 (withdrawal block requests), EIP-7251 (consolidation block requests), and EIP-7702 (set code transaction).
  • New Transaction Type (EIP-7702 Set Code Transaction): A new transaction type (type 4) is introduced for 'Set Code' transactions, allowing accounts to delegate their code to another address. This involves new validation rules for authorizations and intrinsic gas calculations.
  • BLS12-381 Precompiles (EIP-2537): New precompiled contracts for BLS12-381 curve operations (G1/G2 add, MSM, map to G1/G2, pairing check) are added, enhancing cryptographic capabilities.
  • Block Requests (EIP-7685, EIP-6110, EIP-7002, EIP-7251): The block header now includes a 'requests_hash' field, and the VM processes various block requests (deposit, withdrawal, consolidation) from transaction logs and pre-deployed contracts.
  • Updated Blob Gas Calculation (EIP-7691): The excess blob gas calculation logic is updated for the Prague fork, and the 'MAX_BLOB_GAS_PER_BLOCK' and 'TARGET_BLOB_GAS_PER_BLOCK' constants are adjusted.
  • Historical Block Hashes (EIP-2935): A new system contract at 'HISTORY_STORAGE_ADDRESS' is introduced to store historical block hashes, and the VM's 'block_preprocessing' is updated to manage this.
  • Test Fixture Updates: The project now uses 'fixtures_eest' as a submodule for testing against the EEST test suite, and pre-commit hooks are updated to exclude this new fixture directory.
  • Documentation and Versioning: The 'README.md' and 'docs/introduction.rst' are updated to reflect that the repository is archived and read-only, with Prague being the last supported fork. The project version is bumped to '0.12.1-beta.1'.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Dargon789 Dargon789 enabled auto-merge (squash) January 25, 2026 08:30
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces extensive changes to add support for the Prague hard fork, including implementations for several EIPs like EIP-7702 (Set code transaction), EIP-2537 (BLS12-381 precompiles), and others. The changes span from CI configuration to core VM logic and are generally well-structured. However, I've identified a critical issue with outdated gas costs for the EIP-2537 precompiles, which could lead to consensus failures and must be addressed. I've also included a medium-severity suggestion to improve performance in the block processing logic by avoiding redundant database lookups. Overall, this is a significant and well-executed effort to keep the client up-to-date with the latest Ethereum specifications.

Copy link
Owner Author

@Dargon789 Dargon789 left a comment

Choose a reason for hiding this comment

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

#13

@Dargon789 Dargon789 disabled auto-merge January 25, 2026 08:37
@Dargon789 Dargon789 enabled auto-merge January 25, 2026 08:40
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