ethpandaops / ethereum-package

A Kurtosis package that deploys a private, portable, and modular Ethereum devnet
MIT License
244 stars 135 forks source link

Setting up standalone Beacon node, Validator node and Execution node. #807

Closed anuprshetty closed 7 hours ago

anuprshetty commented 11 hours ago

My understanding: Consensus Layer (CL) (Beacon node/chain) --> responsible for PoS consensus, managing validators, finality, etc. Validator layer (VL) --> producing blocks, attestation, etc. Execution layer (EL) --> Executing smart contracts.

My requirement: For learning purpose, I want to spin up below nodes or machines using kurtosis ethereum-package.

Total = 3 CL + 4 (VL + EL) + 3 EL

For all above combination, I am using lighthouse and reth clients. And I am using docker desktop kubernetes cluster on mac.

I think the above node/machine types exists in real ethereum blockchain too. Correct me if I am wrong.

My network_params.yaml (NOTE: only necessary fields shown here):

participants:
  - cl_type: lighthouse
    validator_count: 0
    supernode: false
    count: 3

  - vc_type: lighthouse
    vc_count: 1
    validator_count: null
    supernode: false
    el_type: reth
    use_remote_signer: false
    count: 4
    keymanager_enabled: null

  - el_type: reth
    validator_count: 0
    supernode: false
    count: 3

participants_matrix: {}

network_params:
  network: "kurtosis"
  network_id: "3151908"
  num_validator_keys_per_node: 16
  preregistered_validator_keys_mnemonic: "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete"
  preregistered_validator_count: 0

additional_services: []

wait_for_finalization: false
global_log_level: "info"
apache_port: null
keymanager_enabled: false
checkpoint_sync_enabled: false

Expected output: Total = 3 CL + 4 (VL + EL) + 3 EL

Actual output: Total = 3 (CL + EL) + 4 (CL + VL + EL) + 3 (CL + EL)

So please help me on what I am missing here.

kurtosis_ethereum_package_issue
barnabasbusa commented 11 hours ago

3 consensus layer nodes (Beacon nodes) --> Here in these 3 machines, it should be running just CL without (VL and EL).

You can disable validator, but you can only optimistically sync to head without an EL. Currently the package doesn't allow you to disable an EL unless you manually shut it off after the package has been initialized.

4 Validator nodes --> Here in these 4 machines, it should be running just VL and EL without CL.

VC (that's the short hand notation for validator client) can only validate and propose blocks if it communicates to a CL which verifies with an EL. So you need all 3 components to run a VC.

3 Execution nodes --> Here in these 3 machines, it should be running just EL without (CL and VL).

You can't run an EL only on a PoS chain (proof of stake). The CL must drive the EL during sync.

I think the above node/machine types exists in real ethereum blockchain too. Correct me if I am wrong.

You are wrong. Most people run all 3 components and if you are not a validator then EL + CL to stay synced to the chain.

anuprshetty commented 9 hours ago

@barnabasbusa Thank you. Your answer clarifies everything.

Summary: In general (high level), normally we have two types of nodes in ethereum blockchain.

  1. Normal node = CL + EL
  2. Validator node. = CL + VL + EL.

I think we can close this issue now.