Skip to content

feat: add initial EIP-7805 #1214

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 71 commits into
base: eips/osaka/eip-7805
Choose a base branch
from

Conversation

jacobkaufmann
Copy link

What was wrong?

N/A

How was it fixed?

add initial implementation of EIP-7805.

Cute Animal Picture

TODO

gurukamath and others added 30 commits April 10, 2025 09:50
* 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
* 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
try:
tx = decode_transaction(tx)
index = Uint(len(transactions))
process_transaction(block_env, block_output, tx, index)

Choose a reason for hiding this comment

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

We don't execute IL transactions. We just need to check its nonce and balance, and see if there is sufficient gas left to include any missing IL transactions.

Current version of EIP is misleading and we have a pending PR that fixes it: https://github.com/ethereum/EIPs/pull/9381/files

Copy link
Author

Choose a reason for hiding this comment

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

ah I see. I forgot about this PR, and so I was just going off what I saw in the EIP.

Copy link
Contributor

@gurukamath gurukamath May 22, 2025

Choose a reason for hiding this comment

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

In addition to checking for nonce and balance, would we need to perform some basic checks to make sure that the transaction is well formed? Including perhaps the checks that are performed in the validate_transaction and check_transaction functions?

Choose a reason for hiding this comment

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

The EL builds an IL with transactions from the mempool and each transaction is validated when added to the mempool. That being said, it makes sense to specify that IL transactions are intrinsically valid.

@jacobkaufmann jacobkaufmann changed the base branch from eips/prague/eip-7805 to eips/osaka/eip-7805 May 27, 2025 15:32
@@ -705,6 +709,13 @@ def apply_body(
for i, tx in enumerate(map(decode_transaction, transactions)):
process_transaction(block_env, block_output, tx, Uint(i))

validate_inclusion_list(
Copy link

@jihoonsong jihoonsong May 30, 2025

Choose a reason for hiding this comment

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

I want to share an idea about an edge case testing. It would be nice if we could test such situations that some withdrawal address become available to cover some IL transaction that they couldn't after process_withdrawals. That missing IL transaction should not reorg the block.

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.

10 participants