-
Notifications
You must be signed in to change notification settings - Fork 248
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
Implement EIP-4844 #867
Implement EIP-4844 #867
Conversation
There was a problem hiding this 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.
@@ -420,7 +438,8 @@ def apply_body( | |||
chain_id: U64, | |||
withdrawals: Tuple[Withdrawal, ...], | |||
parent_beacon_block_root: Root, | |||
) -> Tuple[Uint, Root, Root, Bloom, State, Root]: | |||
excess_blob_gas: U64, | |||
) -> Tuple[Uint, Root, Root, Bloom, State, Root, Uint]: |
There was a problem hiding this comment.
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.
set_account_balance(env.state, sender, sender_balance_after_gas_fee) | ||
|
||
preaccessed_addresses = set() | ||
preaccessed_storage_keys = set() | ||
preaccessed_addresses.add(env.coinbase) | ||
if isinstance(tx, (AccessListTransaction, FeeMarketTransaction)): | ||
if isinstance( | ||
tx, (AccessListTransaction, FeeMarketTransaction, BlobTransaction) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
The currently failing CI is because of missing |
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