Skip to content

1176 - Initial python/pypy 3.11 refactors #1179

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

Open
wants to merge 44 commits into
base: forks/prague
Choose a base branch
from

Conversation

Carsons-Eels
Copy link
Collaborator

@Carsons-Eels Carsons-Eels commented Apr 3, 2025

What was wrong?

New pypy version was released supporting python 3.11. Basic upgrades to code were needed.

Closes #1176
Related to Issue #1144

How was it fixed?

Refactored

  • Use primitive Union type introduced by python 3.10 rather than typing.Union
  • Import assert_type from typing rather than typing_extensions

Word of Caution ⚠️

This should be merged AFTER PR #1177

Cute Animal Picture

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

gurukamath and others added 30 commits January 21, 2025 16:33
* enable testing for all forks

* catch invalid signatures

* refactor validate_transaction

* define accessed_addresses at the start

* update variable name to BLOB_BASE_FEE_UPDATE_FRACTION

* refund_counter definition

* create encode_receipt function

* create process_system_transaction

* update gas calc

* explicitly define code_address in call*

* fix decode_receipt
SamWilsn and others added 13 commits February 13, 2025 16:34
* refactor blob gas logic

There are parallels between how the regular block gas is handled and how the blob gas is handled. This commit
refactors blob gas canculation to bring them in line with block gas

* create BlockEnvironment and TransactionEnvironment

Create the BlockEnvironment and TransactionEnvironment dataclasses

BlockEnvironment holds data that is chain or block scoped
TransactionEnvironment holds data that is transaction scoped
Message holds data that is specific to a message call

* refactor validate_header

* update t8n

* update evm tracing

* backport changes to cancun

* port to shanghai

* port changes to paris

* port to london

* port berlin

* port istanbul

* port constantinople

* port byzantium

* port spurious_dragon

* port older forks

* fix t8n receipts

* update testing

* process_withdrawals update

* fixes for doc

* remove execution_spec_tests entry

The tests from execution_spec_tests should now be a part of EEST

* use default_factory in BlockOutput

* minor fixes 1

* define current_block_number in block_hash opcode

* rename tx_index to index_in_block

* fix vm test runs
…m#1138)

* validate_transaction now raises InvalidTransaction

* Update src/ethereum/cancun/transactions.py

Co-authored-by: Guruprasad Kamath <[email protected]>

* Update src/ethereum/cancun/transactions.py

Co-authored-by: Guruprasad Kamath <[email protected]>

* Update src/ethereum/cancun/transactions.py

Co-authored-by: Guruprasad Kamath <[email protected]>

* exception specified within InvalidTransaction

* isort formatting issue resolved

* fix issues from static checks

---------

Co-authored-by: Guruprasad Kamath <[email protected]>
Co-authored-by: Guruprasad Kamath <[email protected]>
* Simplified validate_header func in post-merge forks

* Simplified parent hash calculation in post-merge forks

* validate_header modification in paris and prague forks

* fix formatting

---------

Co-authored-by: Guruprasad Kamath <[email protected]>
* type for blob_gas_used updated

* type inconsitencies in op resolved
- markdown docs (README, CONTRIBUTING)
- github workflows (test, gh-pages)
- setup config
@Carsons-Eels Carsons-Eels changed the title 1176 inital 311 refactors 1176 - initial 311 refactors Apr 3, 2025
@Carsons-Eels Carsons-Eels changed the title 1176 - initial 311 refactors 1176 - Initial 311 refactors Apr 3, 2025
@Carsons-Eels Carsons-Eels force-pushed the 1176_inital_311_refactors branch 3 times, most recently from 0d98a63 to 18059e7 Compare April 3, 2025 22:52
- refactored assert_type import from typing_extensions to typing
- refactored Union to use primitive type offered by 3.10
@Carsons-Eels Carsons-Eels force-pushed the 1176_inital_311_refactors branch from 18059e7 to 3778acd Compare April 3, 2025 23:28
@Carsons-Eels Carsons-Eels changed the title 1176 - Initial 311 refactors 1176 - Initial python/pypy 3.11 refactors Apr 8, 2025
@Carsons-Eels Carsons-Eels marked this pull request as ready for review April 8, 2025 19:05
@Carsons-Eels
Copy link
Collaborator Author

I included the commit from PR #1177 because otherwise you can't test it locally as it requires the upgrade to py/py 3.11 to function correctly. That commit can either be dropped pre-approval, or this commit can just be merged immediately after 1177.

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.

7 participants