feat(test-consume): add engine-witness simulator for witness verification#2724
Draft
spencer-tb wants to merge 1 commit intoethereum:projects/zkevmfrom
Draft
feat(test-consume): add engine-witness simulator for witness verification#2724spencer-tb wants to merge 1 commit intoethereum:projects/zkevmfrom
spencer-tb wants to merge 1 commit intoethereum:projects/zkevmfrom
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).
jsign
reviewed
Apr 20, 2026
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def test_suite_name() -> str: |
Collaborator
There was a problem hiding this comment.
Should this new name be added to
?| "requires empty witness when not VALID)" | ||
| ) | ||
|
|
||
| if payload.valid(): |
Collaborator
There was a problem hiding this comment.
Is this missing an else and some check payload.validation_error?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ 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):.