Skip to content

Implement EIP-4844#867

Merged
gurukamath merged 4 commits into
ethereum:forks/cancunfrom
gurukamath:EIP-4844
Feb 8, 2024
Merged

Implement EIP-4844#867
gurukamath merged 4 commits into
ethereum:forks/cancunfrom
gurukamath:EIP-4844

Conversation

@gurukamath
Copy link
Copy Markdown
Contributor

What was wrong?

EIP-4844 was not implemented in the specs

Related to Issue #848

How was it fixed?

Implemented EIP-4844. Updated the evm tools to account for the changes.

Cute Animal Picture

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

Copy link
Copy Markdown
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

I haven't really reviewed for correctness, just for readability and pythonic-ness.

Comment thread src/ethereum/cancun/fork.py
parent_beacon_block_root: Root,
) -> Tuple[Uint, Root, Root, Bloom, State, Root]:
excess_blob_gas: U64,
) -> Tuple[Uint, Root, Root, Bloom, State, Root, Uint]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we make a dataclass for this? It's getting really unwieldy.

Comment thread src/ethereum/cancun/fork.py
preaccessed_addresses.add(env.coinbase)
if isinstance(tx, (AccessListTransaction, FeeMarketTransaction)):
if isinstance(
tx, (AccessListTransaction, FeeMarketTransaction, BlobTransaction)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we make (and backport) a has_access_list function? Not specifically for this pull request, just in general.

Copy link
Copy Markdown
Contributor Author

@gurukamath gurukamath Feb 5, 2024

Choose a reason for hiding this comment

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

Would probably make the maintaining of these properties easier.

Edit: Apparently, mypy is unable to infer the narrowing of types if done inside another function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You need to use User-Defined Type Guards.

Comment thread src/ethereum/cancun/fork.py Outdated
Comment thread src/ethereum/cancun/vm/gas.py Outdated
Comment thread src/ethereum/utils/numeric.py Outdated
Comment thread src/ethereum/cancun/vm/gas.py Outdated
Comment thread src/ethereum/utils/numeric.py Outdated
Comment thread src/ethereum_spec_tools/evm_tools/fixture_loader.py
@gurukamath
Copy link
Copy Markdown
Contributor Author

The currently failing CI is because of missing py.typed file in the consensus-specs that we use for the point evaluation pre-compile. Have already raised a PR

Comment thread src/ethereum/cancun/vm/precompiled_contracts/point_evaluation.py Outdated
@gurukamath gurukamath merged commit 5e500d0 into ethereum:forks/cancun Feb 8, 2024
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