Developer advocate from Chainstack here.
Validating on Ethereum needs two clients - consensus client and execution client- to work cohesively together.
In very simple terms:
- An execution client does the computational heavy lifting- it keeps all state data on Ethereum, produces/execute new blocks, verifies transactions, etc.
- A consensus client manages the validating schedule. It monitors the number of validators in the network and receives new blocks from other validators.
To answer your first question: > How does this process take place
When a node validates a consensus block, its consensus client
processes the block and sends the execution payload to the execution
client, which:
- Assembles a block on the execution layer.
- Verifies pre-conditions.
- Executes transactions.
- Verifies post-conditions.
- Sends the validity result back to the consensus client.
- If the block is valid, the execution client includes it in the execution chain and stores the new state in execution state storage.
Source
For your second question: How big is this in-memory representation?
To run an Ethereum node, you don't need all the historical state data from genesis, you just need a snapshot of the current states. But even that requires more than 1 TB of data. This data is stored in your local DB.
Taking Geth as an example, at the time of writing, to run a full Geth node + Consensus client you need:
- 16GB RAM
- 2TB SSD
- quad-core (or dual-core hyperthreaded) CPU
Source
This is for a full node that contains the most recent 128 blocks.
There are other types of nodes that have different storage requirements. For example, an archive node - a node that keeps all historical states - needs 12 TB of disk space. But since you are asking about a validator node, a full node should be sufficient.
If you are interested to learn more we have a technical blog post EVM nodes: A dive into the full nodes vs. archive nodes that may be helpful.
Happy coding.