feat(test-consume): add engine-witness simulator for witness verification#2724
feat(test-consume): add engine-witness simulator for witness verification#2724spencer-tb wants to merge 1 commit into
Conversation
Adds `consume engine-witness`, a Hive simulator that drives Amsterdam blockchain-engine fixtures through a witness-emitting endpoint and diffs the client-generated `ExecutionWitness` against the fixture's expected witness (set-equality on state/codes/headers). Supports two transports: - Default: JSON-RPC `engine_newPayloadWithWitnessVX` with RLP witness (geth PR #30069, already implemented in go-ethereum and forks). - `--ssz`: REST `POST /new-payload-with-witness` with SSZ witness (execution-apis PR ethereum#773, implemented on Ethrex `feat/zkengine-http`). Both paths converge on a shared `NewPayloadWithWitnessResponse` dataclass and the same assertion helper. Clients that do not implement the chosen transport skip cleanly (HTTP 404/405 for REST, `-32601 Method not found` for JSON-RPC).
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def test_suite_name() -> str: |
There was a problem hiding this comment.
Should this new name be added to
?| "requires empty witness when not VALID)" | ||
| ) | ||
|
|
||
| if payload.valid(): |
There was a problem hiding this comment.
Is this missing an else and some check payload.validation_error?
|
This PR has had no recent activity and has been marked as stale. |
|
Hey, I’m interested in helping move this forward. I noticed this PR’s REST+SSZ path is based on the earlier ethereum/execution-apis#773 design:
Since the newer REST-SSZ Engine API draft in ethereum/execution-apis#793 has moved toward I’m thinking of starting narrowly with the REST+SSZ branch : |
This PR actaully should be closed, since it is already merged (with some fixes in I'll close this PR to avoid confusion! |
OK, thanks! I will do it in |
|
cc @developeruche ^ fyi |
🗒️ Description
Fully vibe coded experimental.
Adds a new
consume engine-witnessHive simulator that drives Amsterdam blockchain-engine fixtures through a witness-emitting Engine API endpoint and verifies the client-generatedExecutionWitnessagainst thefixture's expected witness.
Supports two transports on a single simulator:
engine_newPayloadWithWitnessVX--sszPOST /new-payload-with-witnessfeat/zkengine-httpprototype onlyBoth paths converge on a shared
NewPayloadWithWitnessResponsedataclass and the sameassert_witness_matcheshelper. Clients that do not implement the chosen transport skip cleanly:404/405raisesEngineWitnessEndpointNotImplementedError-32601 Method not foundis caught and turned intopytest.skipThe simulator also skips whole fixtures with no
executionWitnesson any payload (i.e. pre-Amsterdam forks).Usage
Still to test!
🔗 Related Issues or PRs
jsign-support-blockchain-test-engine), already merged onprojects/zkevm.✅ Checklist
just statictype(scope):.