Setup Node Workshop

Setup the client pair

Execution client: Geth

  1. Download the geth's pre-built binary (in tar.gz) and the stable release (in .asc)

  2. Download the signature

    • openPGP signature
  3. Import the key

    โ€‹โ€‹โ€‹โ€‹gpg --import macos_builder_key.asc 
    
    โ€‹โ€‹โ€‹โ€‹cat macos_builder_key.asc 
    

    When cat, should return:

    โ€‹โ€‹โ€‹โ€‹-----BEGIN PGP PUBLIC KEY BLOCK-----
    โ€‹โ€‹โ€‹โ€‹Comment: Hostname: 
    โ€‹โ€‹โ€‹โ€‹Version: Hockeypuck 2.2
    
    โ€‹โ€‹โ€‹โ€‹xsFNBFggyxoBEAC299KoAS43p0FyJetAc7E0m1B/wnpyQesFycop/1csNQCjSGMy
    โ€‹โ€‹โ€‹โ€‹EvERt8Mv5VvbyZ696gTnzyLP/YHvx5+j/lKZhixw+7VkOng6JgPF3YgN3WrykIjK
    โ€‹โ€‹โ€‹โ€‹.....
    โ€‹โ€‹โ€‹โ€‹-----END PGP PUBLIC KEY BLOCK-----
    
  4. Verify the downloaded binary with the key

    โ€‹โ€‹โ€‹โ€‹gpg --verify Geth_Darwin_AMD64_1.15.2.asc Geth_Darwin_AMD64_1.15.2.tar.gz 
    

    Should return:

    โ€‹โ€‹โ€‹โ€‹gpg: Signature made Lun 17 fรฉv 13:16:21 2025 CET
    โ€‹โ€‹โ€‹โ€‹gpg:                using RSA key 558915E17B9E2481
    โ€‹โ€‹โ€‹โ€‹gpg: Good signature from "Go Ethereum macOS Builder <geth-ci@ethereum.org>" [unknown]
    โ€‹โ€‹โ€‹โ€‹gpg: WARNING: This key is not certified with a trusted signature!
    โ€‹โ€‹โ€‹โ€‹gpg:          There is no indication that the signature belongs to the owner.
    โ€‹โ€‹โ€‹โ€‹Primary key fingerprint: 6D1D AF5D 0534 DEA6 1AA7  7AD5 5589 15E1 7B9E 2481
    
  5. Unpack the Geth binary

    โ€‹โ€‹โ€‹โ€‹tar -xzf Geth_Darwin_AMD64_1.15.2.tar.gz 
    

Consensus light: Lighthouse

  1. Download the lighthouse's pre-built binary (in tar.gz) and the stable release (in .asc)
  2. Obtain & importe the PGP key
    • lighthouse PGP key: 15E66D941F697E28F49381F426416DC3F30674B0 from its release page
    โ€‹โ€‹โ€‹โ€‹gpg --keyserver keys.openpgp.org --search-keys 15E66D941F697E28F49381F426416DC3F30674B0
    โ€‹โ€‹โ€‹โ€‹gpg --recv-keys 15E66D941F697E28F49381F426416DC3F30674B0
    
    Should return:
    โ€‹โ€‹โ€‹โ€‹gpg: data source: http://keys.openpgp.org:11371
    โ€‹โ€‹โ€‹โ€‹(1)	Sigma Prime <security@sigmaprime.io>
    โ€‹โ€‹โ€‹โ€‹    4096 bit RSA key 26416DC3F30674B0, created: 2020-11-27
    โ€‹โ€‹โ€‹โ€‹Keys 1-1 of 1 for "15E66D941F697E28F49381F426416DC3F30674B0".  Enter number(s), N)ext, or Q)uit > 
    
    โ€‹โ€‹โ€‹โ€‹gpg: key 26416DC3F30674B0: public key "Sigma Prime <security@sigmaprime.io>" imported
    โ€‹โ€‹โ€‹โ€‹gpg: Total number processed: 1
    โ€‹โ€‹โ€‹โ€‹gpg:               imported: 1
    
  3. Verify the downloaded binary with the key
    โ€‹โ€‹โ€‹โ€‹gpg --verify Lighthouse_v6.0.1_macOS.tar.gz.asc Lighthouse_v6.0.1_macOS.tar.gz 
    
    Should return:
    โ€‹โ€‹โ€‹โ€‹gpg: Signature made Lun 16 dรฉc 05:07:42 2024 CET
    โ€‹โ€‹โ€‹โ€‹gpg:                using RSA key 15E66D941F697E28F49381F426416DC3F30674B0
    โ€‹โ€‹โ€‹โ€‹gpg: Good signature from "Sigma Prime <security@sigmaprime.io>" [unknown]
    โ€‹โ€‹โ€‹โ€‹gpg: WARNING: This key is not certified with a trusted signature!
    โ€‹โ€‹โ€‹โ€‹gpg:          There is no indication that the signature belongs to the owner.
    โ€‹โ€‹โ€‹โ€‹Primary key fingerprint: 15E6 6D94 1F69 7E28 F493  81F4 2641 6DC3 F306 74B0
    
  4. Unpack the lighthouse binary
    โ€‹โ€‹โ€‹โ€‹tar -xzf Lighthouse_v6.0.1_macOS.tar.gz 
    

Launch the client pair

  1. Launch geth in default

    โ€‹โ€‹โ€‹โ€‹./geth
    
  2. Create a separate folder to store data

    โ€‹โ€‹โ€‹โ€‹mkdir geth_data lighthouse_data
    
  3. See the comments/ flags

    โ€‹โ€‹โ€‹โ€‹geth --help
    โ€‹โ€‹โ€‹โ€‹lighthouse --help
    
  4. Launch geth with config

    โ€‹โ€‹โ€‹โ€‹geth --sepolia \
    โ€‹โ€‹โ€‹โ€‹--datadir geth_data \
    โ€‹โ€‹โ€‹โ€‹--syncmode snap \
    โ€‹โ€‹โ€‹โ€‹--http \
    โ€‹โ€‹โ€‹โ€‹--http.port 8545 \
    โ€‹โ€‹โ€‹โ€‹--authrpc.jwtsecret /tmp/jwt \
    โ€‹โ€‹โ€‹โ€‹--authrpc.port 8551
    
  5. Cat a JWT secret file (should return a 64-bit code)

    โ€‹โ€‹โ€‹โ€‹cat /tmp/jwt
    
  6. Launch lighthouse with config

    โ€‹โ€‹โ€‹โ€‹lighthouse beacon_node \
    โ€‹โ€‹โ€‹โ€‹--network sepolia \
    โ€‹โ€‹โ€‹โ€‹--datadir lighthouse_data \
    โ€‹โ€‹โ€‹โ€‹--http \
    โ€‹โ€‹โ€‹โ€‹--checkpoint-sync-url https://checkpoint-sync.sepolia.ethpandaops.io \
    โ€‹โ€‹โ€‹โ€‹--execution-endpoint http://127.0.0.1:8551 \
    โ€‹โ€‹โ€‹โ€‹--execution-jwt /tmp/jwt
    

    I had some trouble when connecting to Holesky testnet, which always return error as below (probably due to the recent Pectra upgrade situation, if switch to Sepolia, everything works fine)

    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:32.566 INFO Logging to file                         path: "lighthouse_data/beacon/logs/beacon.log"
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:32.569 INFO Lighthouse started                      version: Lighthouse/v6.0.1-0d90135
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:32.569 INFO Configured for network                  name: holesky
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:32.578 INFO Data directory initialised              datadir: lighthouse_data
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:32.585 INFO Deposit contract                        address: 0x4242424242424242424242424242424242424242, deploy_block: 0
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:32.651 INFO Blob DB initialized                     oldest_data_column_slot: None, oldest_blob_slot: Some(Slot(950272)), path: "lighthouse_data/beacon/blobs_db", service: freezer_db
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:33:37.180 INFO Starting checkpoint sync                remote_url: https://checkpoint-sync.holesky.ethpandaops.io/, service: beacon
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:36:37.877 CRIT Failed to start beacon node             reason: Error loading checkpoint state from remote: HttpClient(, kind: timeout, detail: operation timed out)
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:36:37.877 INFO Internal shutdown received              reason: Failed to start beacon node
    โ€‹โ€‹โ€‹โ€‹Feb 24 11:36:37.878 INFO Shutting down..                         reason: Failure("Failed to start beacon node")
    โ€‹โ€‹โ€‹โ€‹Failed to start beacon node
    

Launch the client pair with ephemery

  1. Download the testnet_all.tar.gz from the ephemery release
  2. Init the ephemery on Geth
    โ€‹โ€‹โ€‹โ€‹geth --datadir geth-ephemery init Ephemery_tester_all/genesis.json 
    โ€‹โ€‹โ€‹โ€‹source Ephemery_tester_all/nodevars_env.txt 
    
    Should return
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.200] Maximum peer count                       ETH=50 total=50
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.204] Set global gas cap                       cap=50,000,000
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.204] Initializing the KZG library             backend=gokzg
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.226] Defaulting to pebble as the backing database
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.227] Allocated cache and file handles         database=/Users/.../ephemery/geth/chaindata cache=16.00MiB handles=16
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.284] Opened ancient database                  database=/Users/.../ephemery/geth/chaindata/ancient/chain readonly=false
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.284] State schema set to default              scheme=path
    โ€‹โ€‹โ€‹โ€‹ERROR[02-24|12:50:57.284] Head block is not reachable
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.321] Opened ancient database                  database=/Users/.../ephemery/geth/chaindata/ancient/state readonly=false
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.321] Writing custom genesis block
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.428] Successfully wrote genesis state         database=chaindata hash=a45355..e0c1d2
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.428] Defaulting to pebble as the backing database
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.428] Allocated cache and file handles         database=/Users/.../ephemery/geth/lightchaindata cache=16.00MiB handles=16
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.481] Opened ancient database                  database=/Users/.../ephemery/geth/lightchaindata/ancient/chain readonly=false
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.481] State schema set to default              scheme=path
    โ€‹โ€‹โ€‹โ€‹ERROR[02-24|12:50:57.481] Head block is not reachable
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.520] Opened ancient database                  database=/Users/.../ephemery/geth/lightchaindata/ancient/state readonly=false
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.520] Writing custom genesis block
    โ€‹โ€‹โ€‹โ€‹INFO [02-24|12:50:57.600] Successfully wrote genesis state         database=lightchaindata hash=a45355..e0c1d2
    
  3. Launch geth with config
    โ€‹โ€‹โ€‹โ€‹geth --datadir geth-ephemery --authrpc.jwtsecret=/tmp/jwt --bootnodes $BOOTNODE_ENODE --networkid $CHAIN_ID  --http
    
  4. Launch lighthouse with config
    โ€‹โ€‹โ€‹โ€‹lighthouse beacon_node -t ephemery_test_all --execution-endpoint http://localhost:8551 --execution-jwt=/tmp/jwt --boot-nodes=$BOOTNODE_ENR_LIST
    

Query the data

Through JSON-RPC API

  1. Query the eth_blockNumber
    โ€‹โ€‹โ€‹โ€‹curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' localhost:8545
    
  2. Query the syncing status
    โ€‹โ€‹โ€‹โ€‹curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","id":1}' localhost:8545
    
  3. More info

Through IPC

geth attach ./geth_data/geth.ipc

Resource