Are transactions duplicated in both beacon chain and execution layer

beacon-chainbeacon-nodesconsensusthe-mergetransactions

What exactly is the content of blocks on the beacon chain? partially answers the question but still not complete to me.

I understand that since the merge, execution layer info are in beacon chain.

  1. Does the execution layer still corresponds to another "chain" then or are the transactions only written in beacon chain ?

  2. Does that mean that beacon chain block size has increased since the merge (since they bear eth1 info)

  3. When we install a node with geth+prysm, both are syncing. But if prysm is downloading data about consensus AND execution layer, what is geth downloading ?

I've been through the doc and so on but I can't understand what is stored where for exec layer info (between execution layer and beacon chain).

Thanks in advance for your time, you already are amazing <3

Best Answer

The Merge was the implementation of the Bellatrix consensus (layer) specs, the Paris execution (layer) specs, and the Engine API.

Bellatrix: https://github.com/ethereum/consensus-specs/tree/dev/specs/bellatrix

Paris: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md

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

Q1

The execution layer has blocks all the way since genesis; beacon blocks only started having transactions in Bellatrix. So each layer can be considered to be a "chain".

On the question of transactions duplicated since the Merge, from the specs alone, EIP-3675 does not specify any removal or optimizations of transactions at the execution layer. As the rationale of EIP-3675 states: "This EIP was designed to minimize the complexity of hot-swapping the live consensus of the Ethereum network. Both the safety of the operation and time to production were taken into consideration." So the answer to Q1 is it depends on the implementation of the execution client. In practice, transactions are probably duplicated.

Q2

Yes, the Bellatrix spec states the extensions and additions. The BeaconBlockBody and BeaconState are extended with ExecutionPayload and ExecutionPayloadHeader respectively.

Q3

The consensus layer (CL) and execution layer (EL) largely operate as they did before the Merge. For example, the EL manages the mempool and gathering up transactions for a block, and it syncs from genesis.

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.

Related Topic