Skip to content

Conversation

spencer-tb
Copy link
Collaborator

Description

Adds new simulator to test block production (not just validation) by having clients build blocks from mempool transactions.

Problem: Erigon validators on the Hoodi testnet produced invalid blocks. Existing tests only validate pre-built blocks via engine_newPayload, not the production path engine_forkchoiceUpdated + engine_getPayload.

Solution:
This PR adds a new consume simulator (consume production) that tests the block production/building flow:

  1. Initialize: engine_forkchoiceUpdatedV3 → genesis (establish chain head)
  2. Send Transaction: eth_sendRawTransaction → mempool (submit transaction)
  3. Request Build: engine_forkchoiceUpdatedV3 (with PayloadAttributes) → returns payload_id
  4. Retrieve Block: engine_getPayloadV4/V5 (with payload_id) → returns built ExecutionPayload
  5. Verify: Check gas usage, state root, and transaction inclusion match fixture expectations
  6. Submit: engine_newPayloadV4 (with built payload) → verify client accepts its own block
  7. Finalize: engine_forkchoiceUpdatedV3 → finalize built block
  8. Confirm: eth_getTransactionReceipt → verify successful execution

Limitations: Currently only supports single-transaction valid payloads to simplify verification and focus on initialization bugs.

@spencer-tb spencer-tb added type:feat type: Feature scope:consume Scope: Consume command suite labels Oct 17, 2025
@spencer-tb
Copy link
Collaborator Author

Note this PR will be re-opened in EELS following the Weld.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:consume Scope: Consume command suite type:feat type: Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant