6

Since the merge, the execution client (such as Geth) is insufficient to run full-node on Ethereum. You also need Consensus Client (such as a lighthouse).

Whats the difference between them? Which one is syncing the ethereum state? Which one is receiving the Ethereum transactions?

2 Answers 2

8

The Execution Client listens and executes transactions and maintains the latest state and database of all Ethereum data, while the Consensus Client provides consensus (using PoS algorithm) from validated data from the Execution Client. These two clients work together to sync the Ethereum state. The Execution Client is receiving Ethereum transactions.

See: https://ethereum.org/en/developers/docs/nodes-and-clients/

1

In short, the consensus layer (CL) client governs consensus and the execution layer (EL) client. The EL client creates blocks with transactions and executes smart contracts.

The interaction between the consensus layer and execution layer 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.

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.

The EL is receiving transactions, and both are syncing different parts of the Ethereum state.

As explained in Which client holds the state of the chain?, both hold the state. For example, consensus layer rewards accrue in the validator's balance on the beacon chain, while transaction tips accrue in the fee recipient address on the execution layer.

Related references:

Run Execution Client without Consensus Client

What is the incentive for people running execution clients in eth2?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.