-
Notifications
You must be signed in to change notification settings - Fork 1
feat(fw): Add and integrate consume engine types #30
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
Conversation
marioevz
left a comment
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 could not even get it to work lol. How do you set HIVE_SIMULATOR in the vscode config?
I think one problem right now is on the src/pytest_plugins/consume/consume.py file with the pytest_configure method, because I don't think this file should try to generate the test cases, and instead this functionality should be moved to a custom pytest_generate_tests in each plugin, consume_direct, consume_via_rlp and consume_via_engine_api.
Method create_test_cases_from_json and class TestCase in src/pytest_plugins/consume/consume.py should be moved and customized too.
Also, I think a rebase is long due, because we are working on top of very old code, and we are duplicating efforts.
|
|
||
| import time | ||
|
|
||
| import jwt |
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 need to add PyJWT==2.8.0 (is this the right one?) to setup.cfg.
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 could not even get it to work lol. How do you set HIVE_SIMULATOR in the vscode config?
I wonder is we should set this automatically, right now its manual:
set -x HIVE_SIMULATOR http://127.0.0.1:3000
I think one problem right now is on the src/pytest_plugins/consume/consume.py file with the pytest_configure method, because I don't think this file should try to generate the test cases, and instead this functionality should be moved to a custom pytest_generate_tests in each plugin, consume_direct, consume_via_rlp and consume_via_engine_api.
Nice! This sounds like the move forward - I think currently its this way as we can apply each test case for every consume method.
danceratopz
left a comment
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.
Regarding the location of the new RPC classes: I'd prefer not to have them under a consume namespace, rather as they were in ethereum_test_tools.rpc. I think they'll get used in tools outside of the scope of consume sooner or later, e.g., ethereum#323.
|
Closing in favor of: #31 |
Thanks for taking a look, @marioevz! I agree, that intuitively, you'd expect the fixtures to be loaded in The problem is that With regards to having all the logic in the base |

🗒️ Description
This PR aims to start creating a structure within
src/ethereum_test_tools/for usage within consume.Its predominant aim is to define a types file specifically for the engine api spec, that can be used within the
tests_consume/test_via_engine_api.pyEEST simulator (and potentially many more). This allows us to:FixtureEngineNewPayloadetc types, apprehending a future deprecation of the hive blockchain fixture format. We can delete these with ease.Key Changes
FixtureBlocktype. Changes incl:base_fee->base_fee_per_gas,reciept_root->reciepts_root,bloom->logs_bloom,mix_digest->prev_randao,hash->block_hash,FixtureBlock:txs->transactionssrc/ethereum_test_tools/rpc/*intosrc/ethereum_test_tools/consume/.src/ethereum_test_tools/consume/types.py, containing engine new payload and execution payload types, specific to the engine api fork version - aligning cleanly with the spec.FixtureBlockinto their respectiveEngine<fork>.NewPayloadV<version>dataclasses.Engine<fork>.NewPayloadV<version>dataclasses to the correct json representation, expected withinengine_rpc.py.Remaining Todos
FixtureBlockto a correct engine new payload json representation:src/ethereum_test_tools/rpc/folder.test_consume_via_engine.pyandengine_rpc.py, cleaning up more code.Other Considerations
coinbasetofeeRecipentto align more with the PoS terminology (also makes the engine spec cleaner).numbertoblock_number.