-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat/statetest: Implement StateTestOnly, Change Blob Tx 4844 Tests to StateTest, Use latest geth master #368
feat/statetest: Implement StateTestOnly, Change Blob Tx 4844 Tests to StateTest, Use latest geth master #368
Conversation
62db6b4
to
5272ff4
Compare
393e842
to
28fc219
Compare
28fc219
to
6dbdcb1
Compare
6dbdcb1
to
15da48d
Compare
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.
Really nice! Only small suggestions - mostly based on personal preference :)
|
||
### 🔧 EVM Tools | ||
|
||
### 📋 Misc | ||
|
||
- 🔀 Docs: Update `t8n` tool branch to fill tests for development features in the [readme](https://github.com/ethereum/execution-spec-test) ([#338](https://github.com/ethereum/execution-spec-tests/pull/338)). | ||
- 🔀 Filling tool: Updated filling tool to go-ethereum@master ([#368](https://github.com/ethereum/execution-spec-tests/pull/368)) |
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.
We should update it here in the README as well: https://github.com/ethereum/execution-spec-tests/blob/main/README.md?plain=1#L73
Or point people to the evm-config.yaml
file in the README.
I think I prefer the latter, easier to maintain - what do you think? Could be a seperate PR, I'm happy to add it :)
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 makes sense to include it right here, I'll update it 👍
@@ -305,22 +306,50 @@ def pre( # noqa: D103 | |||
""" | |||
return { | |||
TestAddress: Account(balance=total_account_minimum_balance + account_balance_modifier), | |||
TestAddress2: Account(balance=10**9), |
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.
This seems to only be used by the blockchain test version of test_invalid_tx_max_fee_per_blob_gas
, leading me to take a look at the usage of non_zero_blob_gas_used_genesis_block
from conftest.py
. Which also is only used in that test within blob_txs.py
.
I think this threw me off when reviewing! My preference would be to keep the test how it was before, purely for readability. It also has added benefit of keeping the fixtures slightly smaller
More below on the latter :)
|
||
|
||
@pytest.fixture | ||
def blocks( |
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.
We could remove blocks
here only retaining test_block
, assuming the latter below
txs: List[Transaction], | ||
): | ||
""" | ||
Reject blocks with invalid blob txs due to: |
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.
Reject blocks with invalid blob txs due to: | |
Reject an invalid blob transaction due to: |
if parent_blobs: | ||
pre[TestAddress2] = Account(balance=10**9) | ||
blocks.insert(0, non_zero_blob_gas_used_genesis_block) |
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.
My preference would be to keep this here as its specific to this test within the module
341351e
to
9e13d24
Compare
Co-authored-by: spencer-tb <spencer.taylor-brown@ethereum.org>
9e13d24
to
6524d86
Compare
🗒️ Description
Included changes
Requires this geth branch: https://github.com/marioevz/go-ethereum/tree/t8n-statetest-fixesImportant considerations
One issue I have not been able to figure out is the use of parent blob gas used in BlockchainTest vs StateTest:
In the state test we can modify
currentExcessBlobGas
to state the blob gas in the current header of the environment where the transaction is supposed to be executed.In the blockchain test, we cannot set this directly, so we generate a Block 1 to introduce blob transactions and bump the value of block 2 for the test to actually happen.
Right now, since the
env
for each test is different, I could not think of a better solution than to create two different test functions:StateTestOnly
which generates only the state test, but not a blockchain test.I'll keep thinking of a way to solve this.
Merging
I'm planning to merge this using rebase, because the three commits included all do very different things, but they are all required to pass the CI tests (updating to master breaks some test fillers).
🔗 Related Issues
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.