Blockchain – How to Run Execution Client Without Consensus Client

blockchainclientsconsensus

I'm wondering if it's possible and if there is any reason to run the node only with Execution Client (Geth, or something else), but without any Consensus Client (Prysm, or something else) connected to it?

I have an application that operates on blockchain and uses the endpoint exposed by Geth. But I have also Prysm running with Geth. I'm wondering if Prysm is required for this setup (my Prysm does not work as a validator).

Best Answer

You need to run both: a consensus layer (CL) client with an execution layer (EL) client, because EL clients like Geth, do not have consensus implemented. Currently, EL clients do not know directly much about validators and consensus data such as which blocks have the most attestations, and thus what is the head of the chain.

The interaction between the CL and EL is specified by the Engine API: https://github.com/ethereum/execution-apis/tree/main/src/engine

From an explanation in Are transactions duplicated in both beacon chain and execution layer? you can see that the CL is like the brain, it tells the EL to prepare a payload, get a payload, execute the payload, and tells the EL what the head of the chain is. So an EL without a CL would be like a body without a head/brain.

Engine API test vectors for The Merge based on a discussion of the Engine API is helpful to see how the layers interact. The CL calls engine_forkchoiceUpdatedV1 so that the EL prepares a payload. The CL calls engine_getPayloadV1 to get a payload. The CL then tells the EL to execute the payload by calling engine_newPayloadV1. Assuming that the payload is valid, the CL then tells the EL that the payload is the head of the chain by calling engine_forkchoiceUpdatedV1.


Which client holds the state of the chain? provides examples of how the CL and EL hold different parts of the state.


Here is the question that asked the other way, running consensus clients without execution clients:

What is the incentive for people running execution clients in eth2

The simple answer being that CL clients don't create blocks with transactions and execute smart contracts.

Related Topic