forked from ethereum/execution-spec-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pytest_plugins/consume_via_engine_api: Initialize fork ruleset.
- Loading branch information
1 parent
ca58d33
commit 7c741df
Showing
3 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
A hive simulator that executes blocks against clients using the Engine API. | ||
""" |
80 changes: 80 additions & 0 deletions
80
src/pytest_plugins/consume_via_engine_api/client_fork_ruleset.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
""" | ||
Fork rules for clients ran within hive, starting from the Merge fork as | ||
we are executing blocks using the Engine API. | ||
""" | ||
|
||
# TODO: 1) Can we programmatically generate this? | ||
# TODO: 2) Can we generate a single ruleset for both rlp and engine_api simulators. | ||
forks = { | ||
"Merge": { | ||
"HIVE_FORK_HOMESTEAD": 0, | ||
"HIVE_FORK_TANGERINE": 0, | ||
"HIVE_FORK_SPURIOUS": 0, | ||
"HIVE_FORK_BYZANTIUM": 0, | ||
"HIVE_FORK_CONSTANTINOPLE": 0, | ||
"HIVE_FORK_PETERSBURG": 0, | ||
"HIVE_FORK_ISTANBUL": 0, | ||
"HIVE_FORK_BERLIN": 0, | ||
"HIVE_FORK_LONDON": 0, | ||
"HIVE_FORK_MERGE": 0, | ||
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0, | ||
}, | ||
"Shanghai": { | ||
"HIVE_FORK_HOMESTEAD": 0, | ||
"HIVE_FORK_TANGERINE": 0, | ||
"HIVE_FORK_SPURIOUS": 0, | ||
"HIVE_FORK_BYZANTIUM": 0, | ||
"HIVE_FORK_CONSTANTINOPLE": 0, | ||
"HIVE_FORK_PETERSBURG": 0, | ||
"HIVE_FORK_ISTANBUL": 0, | ||
"HIVE_FORK_BERLIN": 0, | ||
"HIVE_FORK_LONDON": 0, | ||
"HIVE_FORK_MERGE": 0, | ||
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0, | ||
"HIVE_SHANGHAI_TIMESTAMP": 0, | ||
}, | ||
"MergeToShanghaiAtTime15k": { | ||
"HIVE_FORK_HOMESTEAD": 0, | ||
"HIVE_FORK_TANGERINE": 0, | ||
"HIVE_FORK_SPURIOUS": 0, | ||
"HIVE_FORK_BYZANTIUM": 0, | ||
"HIVE_FORK_CONSTANTINOPLE": 0, | ||
"HIVE_FORK_PETERSBURG": 0, | ||
"HIVE_FORK_ISTANBUL": 0, | ||
"HIVE_FORK_BERLIN": 0, | ||
"HIVE_FORK_LONDON": 0, | ||
"HIVE_FORK_MERGE": 0, | ||
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0, | ||
"HIVE_SHANGHAI_TIMESTAMP": 15000, | ||
}, | ||
"Cancun": { | ||
"HIVE_FORK_HOMESTEAD": 0, | ||
"HIVE_FORK_TANGERINE": 0, | ||
"HIVE_FORK_SPURIOUS": 0, | ||
"HIVE_FORK_BYZANTIUM": 0, | ||
"HIVE_FORK_CONSTANTINOPLE": 0, | ||
"HIVE_FORK_PETERSBURG": 0, | ||
"HIVE_FORK_ISTANBUL": 0, | ||
"HIVE_FORK_BERLIN": 0, | ||
"HIVE_FORK_LONDON": 0, | ||
"HIVE_FORK_MERGE": 0, | ||
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0, | ||
"HIVE_SHANGHAI_TIMESTAMP": 0, | ||
"HIVE_CANCUN_TIMESTAMP": 0, | ||
}, | ||
"ShanghaiToCancunAtTime15k": { | ||
"HIVE_FORK_HOMESTEAD": 0, | ||
"HIVE_FORK_TANGERINE": 0, | ||
"HIVE_FORK_SPURIOUS": 0, | ||
"HIVE_FORK_BYZANTIUM": 0, | ||
"HIVE_FORK_CONSTANTINOPLE": 0, | ||
"HIVE_FORK_PETERSBURG": 0, | ||
"HIVE_FORK_ISTANBUL": 0, | ||
"HIVE_FORK_BERLIN": 0, | ||
"HIVE_FORK_LONDON": 0, | ||
"HIVE_FORK_MERGE": 0, | ||
"HIVE_TERMINAL_TOTAL_DIFFICULTY": 0, | ||
"HIVE_SHANGHAI_TIMESTAMP": 0, | ||
"HIVE_CANCUN_TIMESTAMP": 15000, | ||
}, | ||
} |
3 changes: 2 additions & 1 deletion
3
src/pytest_plugins/consume_via_engine_api/consume_via_engine_api.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
""" | ||
A hive simulator that feeds blocks from test fixtures to clients via the Engine API. | ||
A hive simulator that executes blocks against clients using the `engine_newPayloadVX` method from | ||
the Engine API, verifying the appropriate VALID/INVALID responses. | ||
Implemented using the pytest framework as a pytest plugin. | ||
""" |