engine Methods
Theengine namespace provides 20 methods for consensus layer integration via the Engine API.
The Engine API is used for communication between execution layer (EL) and consensus layer (CL) clients in post-merge Ethereum. Most application developers won’t interact with these methods directly.
Overview
Access engine methods directly on the provider:Engine API Context
The Engine API implements the communication protocol between:- Consensus Layer (CL) - Beacon chain, validators, attestations
- Execution Layer (EL) - Transaction execution, state, EVM
- Payload - Block execution data (transactions, state root, receipts root)
- Forkchoice - Head, safe, and finalized block hashes
- Payload ID - Identifier for a pending payload being built
Payload Methods
engine_newPayloadV1
Verify and execute a payload (pre-Shapella).engine_newPayloadV2
Verify and execute a payload (Shapella/Shanghai).engine_newPayloadV3
Verify and execute a payload (Cancun - includes blobs).payload: ExecutionPayload- Block execution dataexpectedBlobVersionedHashes: Hash[]- Blob KZG commitments (Cancun)parentBeaconBlockRoot: Hash- Parent beacon block root (Cancun)
VALID- Payload executed successfullyINVALID- Payload execution failedSYNCING- Node is syncing, cannot validate yetACCEPTED- Optimistically accepted (pre-finality)
Forkchoice Methods
engine_forkchoiceUpdatedV1
Update forkchoice state and optionally start building a new payload (pre-Shapella).engine_forkchoiceUpdatedV2
Update forkchoice state (Shapella/Shanghai).engine_forkchoiceUpdatedV3
Update forkchoice state (Cancun).forkchoiceState: ForkchoiceState- Head, safe, and finalized hashespayloadAttributes?: PayloadAttributes- Optional payload building parameters
Payload Building Methods
engine_getPayloadV1
Retrieve a built payload by ID (pre-Shapella).engine_getPayloadV2
Retrieve a built payload by ID (Shapella/Shanghai).engine_getPayloadV3
Retrieve a built payload by ID (Cancun - includes blobs).payloadId: Hex- Payload identifier from forkchoiceUpdated
Blob Methods
engine_getBlobsV1
Retrieve blob sidecars for a list of blob versioned hashes.blobVersionedHashes: Hash[]- KZG commitment hashes
Exchange Capabilities
engine_exchangeCapabilities
Exchange supported Engine API capabilities between CL and EL.Transition Methods
engine_exchangeTransitionConfigurationV1
Exchange transition configuration (for merge preparation).Block Validation Methods
engine_getPayloadBodiesByHashV1
Get block bodies (transactions only) by block hashes.engine_getPayloadBodiesByRangeV1
Get block bodies for a range of block numbers.Usage Patterns
Block Production Flow
Version Compatibility
Always use the latest version compatible with your target fork.
Error Handling
Engine API methods return detailed error information:Type Reference
All parameter and return types are defined in the JSON-RPC types module.Next Steps
- Method API - Learn about the method-based API
- eth Methods - Standard Ethereum methods
- debug Methods - Debugging methods
- Events - Subscribe to blockchain events

