-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add Support for BlockchainTests #2
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.
Some small comments and nits, overall looks great!
src/ethereum_test/types.py
Outdated
if self.ty is None: | ||
# Try to deduce transaction type from included fields | ||
if ( | ||
self.max_fee_per_gas is not None |
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.
If only one is set, will the other be set automatically? I think yes?
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 think it will fail, I checked geth code and it requires both, since there is no way to deduce the other value if only one is set I think.
The only remaining issue seems to be whether to include or remove the invalid transactions from blocks. I can follow up on this in a subsequent PR if that's ok. |
I might be missing something, but it feels like this PR is making an active choice to remove invalid transactions from the RLP and so we should remove that logic from this PR and decide the best way to deal with invalid txs separately. Is there a reason that work is necessary for this specific PR? |
No it was just simply to keep from adding more and more modifications to the PR, but yes now that you mention it, we should not be adding a new import that we are supposed to remove in another PR. Let me add the changes in this PR 👍 |
Looks good to merge once CI goes green! |
Fixes to EIP 4844 blobhash PR
Changes Included
rlp
module import, becauset8n
tool currently returns transactions' RLP that includes rejected ones, and these should be removed before producing the final block.ToDos
currentBasefee
as output of the execution result.mypy
is currently complaining about the usage ofkw_only
property ofdataclass
.kw_only
on alldataclass
classes to force test specs to specify keywords when declaring test objects. The argument to this is that it allows the objects to be updated in the future and not having to refactor all tests due to positional argument conflicts.