Skip to content

Cheatsheet

This is your quick reference guide for blockchain node operations. Print or bookmark this page for quick access during your interview.


Terminal window
# Install Geth
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.13.14.tar.gz
tar -xzf geth-linux-amd64-1.13.14.tar.gz
sudo mv geth /usr/local/bin/
# Start node with snap sync (RECOMMENDED)
geth --syncmode snap --http --http.port 8545
# Start full node
geth --syncmode full --http --http.port 8545
# Start light node
geth --syncmode light --http --http.port 8545
# Start on testnet
geth --sepolia --syncmode snap --http --http.port 8545

Terminal window
# Get latest block number
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# Get block by number
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", true],"id":1}'
# Get account balance
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...", "latest"],"id":1}'
# Send transaction
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."],"id":1}'
# Get transaction receipt
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x..."],"id":1}'
# Check sync status
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# Get peer count
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'
# Get chain ID
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'

ServicePortDescription
P2P (TCP/UDP)30303Node-to-node communication
HTTP RPC8545JSON-RPC over HTTP
WebSocket8546WebSocket API
Metrics6060Prometheus metrics
pprof6061Profiling API

NetworkChain IDNetwork ID
Ethereum Mainnet11
Sepolia1115511111155111
Goerli55
Holesky1700017000

// In Geth console
geth attach http://localhost:8545
// Check sync status
eth.syncing
// Returns object when syncing, false when synced
// Get current block
eth.blockNumber

Terminal window
# Sync mode
--syncmode snap # Default, fastest
--syncmode full # Full verification
--syncmode light # Light client
# RPC/HTTP
--http # Enable HTTP RPC
--http.addr # Bind address (default: 127.0.0.1)
--http.port # Port (default: 8545)
--http.api # Enabled APIs
--http.corsdomain # CORS allowed domains
# WebSocket
--ws # Enable WebSocket
--ws.port # Port (default: 8546)
# Storage
--datadir # Data directory path
--cache # Memory cache in MB
# Network
--port # P2P port (default: 30303)
--maxpeers # Max peers (default: 50)
--bootnodes # Bootnodes
# Monitoring
--metrics # Enable metrics
--metrics.port # Metrics port (default: 6060)
--pprof # Enable pprof

ComponentMinimumRecommended
CPU4 cores8+ cores
RAM8 GB16-32 GB
Storage1 TB SSD2 TB NVMe
Network25 Mbps100 Mbps
ComponentRequirement
Storage10-12 TB
RAM32-64 GB

You need TWO clients:

  1. Execution Client: Geth, Erigon, Nethermind
  2. Consensus Client: Lighthouse, Prysm, Teku

Communication via Engine API (JWT auth).

Terminal window
# Lighthouse (consensus)
lighthouse validator \
--beacon-node http://localhost:5052 \
--wallet-path /path/to/wallet
# Prysm (consensus)
prysm validator \
--beacon-rpc-provider localhost:4000

A: Use --syncmode snap and wait 2-4 hours. Check with eth.syncing - returns false when synced.

Q: What’s the difference between full and light nodes?

Section titled “Q: What’s the difference between full and light nodes?”

A: Full nodes store entire blockchain (~1.2TB); light nodes only headers (~1GB). Full nodes verify everything; light nodes trust full nodes for data.

A: Ethereum’s transition from PoW to PoS (September 2022). Now uses dual-client architecture (execution + consensus clients).

A: Unit of computation. Transaction fee = Gas Used × Gas Price. EIP-1559 introduced base fee (burned) + priority fee (to validator).

A: Memory pool - holds pending transactions before they’re included in a block.


ProblemSolution
No peersCheck network, firewall, try different bootnodes
Slow syncIncrease peers, check CPU/disk
Stuck at headerRemove chaindata, restart sync
RPC slowAdd caching, increase cache size
Out of diskEnable pruning, use snap sync

/data/ethereum/
├── geth/
│ ├── chaindata/ # Blockchain data
│ ├── triecache/ # Trie cache
│ └── nodes/ # Peer information
├── keystore/ # Account keys (if any)
└── history/ # Historical state (if enabled)

Terminal window
# Backup keystore
cp -r /data/ethereum/keystore /backup/
# Backup wallet (Ledger, etc.)
# Do NOT backup raw private keys - use hardware wallet
# Backup node data
tar -czf eth-node-backup.tar.gz /data/ethereum/

  • Run as non-root user
  • Don’t expose RPC to public internet
  • Use firewall (ufw or iptables)
  • Enable TLS for RPC in production
  • Keep software updated
  • Use rate limiting
  • Monitor for anomalies


  1. When asked to set up a node: Start with geth --syncmode snap --http
  2. To check sync: Use eth.syncing - returns false when done
  3. Quick verification: Compare your block number with etherscan.io
  4. Don’t panic: It’s okay to say “Let me check the documentation”
  5. Explain what you’re doing: Talk through your steps

You’ve prepared well. Remember:

  • Stay calm
  • Think out loud
  • Use the cheat sheet
  • Ask clarifying questions if needed

Last Updated: 2026-02-20