Cheatsheet
Chapter 57: Quick Reference Cheat Sheet
Section titled “Chapter 57: Quick Reference Cheat Sheet”Overview
Section titled “Overview”This is your quick reference guide for blockchain node operations. Print or bookmark this page for quick access during your interview.
Quick Commands
Section titled “Quick Commands”Geth (Ethereum)
Section titled “Geth (Ethereum)”# Install Gethwget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.13.14.tar.gztar -xzf geth-linux-amd64-1.13.14.tar.gzsudo mv geth /usr/local/bin/
# Start node with snap sync (RECOMMENDED)geth --syncmode snap --http --http.port 8545
# Start full nodegeth --syncmode full --http --http.port 8545
# Start light nodegeth --syncmode light --http --http.port 8545
# Start on testnetgeth --sepolia --syncmode snap --http --http.port 8545JSON-RPC Quick Reference
Section titled “JSON-RPC Quick Reference”Essential RPC Calls
Section titled “Essential RPC Calls”# Get latest block numbercurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# Get block by numbercurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", true],"id":1}'
# Get account balancecurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...", "latest"],"id":1}'
# Send transactioncurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."],"id":1}'
# Get transaction receiptcurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x..."],"id":1}'
# Check sync statuscurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# Get peer countcurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'
# Get chain IDcurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'Important Ports
Section titled “Important Ports”| Service | Port | Description |
|---|---|---|
| P2P (TCP/UDP) | 30303 | Node-to-node communication |
| HTTP RPC | 8545 | JSON-RPC over HTTP |
| WebSocket | 8546 | WebSocket API |
| Metrics | 6060 | Prometheus metrics |
| pprof | 6061 | Profiling API |
Network Chain IDs
Section titled “Network Chain IDs”| Network | Chain ID | Network ID |
|---|---|---|
| Ethereum Mainnet | 1 | 1 |
| Sepolia | 11155111 | 11155111 |
| Goerli | 5 | 5 |
| Holesky | 17000 | 17000 |
Sync Status Check
Section titled “Sync Status Check”// In Geth consolegeth attach http://localhost:8545
// Check sync statuseth.syncing// Returns object when syncing, false when synced
// Get current blocketh.blockNumberImportant Geth Flags
Section titled “Important Geth Flags”# 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 pprofHardware Requirements
Section titled “Hardware Requirements”Ethereum Full Node
Section titled “Ethereum Full Node”| Component | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8+ cores |
| RAM | 8 GB | 16-32 GB |
| Storage | 1 TB SSD | 2 TB NVMe |
| Network | 25 Mbps | 100 Mbps |
Ethereum Archive Node
Section titled “Ethereum Archive Node”| Component | Requirement |
|---|---|
| Storage | 10-12 TB |
| RAM | 32-64 GB |
Ethereum 2.0 (Post-Merge)
Section titled “Ethereum 2.0 (Post-Merge)”Running a Validator
Section titled “Running a Validator”You need TWO clients:
- Execution Client: Geth, Erigon, Nethermind
- Consensus Client: Lighthouse, Prysm, Teku
Communication via Engine API (JWT auth).
Validator Commands
Section titled “Validator Commands”# Lighthouse (consensus)lighthouse validator \ --beacon-node http://localhost:5052 \ --wallet-path /path/to/wallet
# Prysm (consensus)prysm validator \ --beacon-rpc-provider localhost:4000Common Interview Answers
Section titled “Common Interview Answers”Q: How to make node fully sync?
Section titled “Q: How to make node fully sync?”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.
Q: What is The Merge?
Section titled “Q: What is The Merge?”A: Ethereum’s transition from PoW to PoS (September 2022). Now uses dual-client architecture (execution + consensus clients).
Q: What is gas in Ethereum?
Section titled “Q: What is gas in Ethereum?”A: Unit of computation. Transaction fee = Gas Used × Gas Price. EIP-1559 introduced base fee (burned) + priority fee (to validator).
Q: What does the mempool do?
Section titled “Q: What does the mempool do?”A: Memory pool - holds pending transactions before they’re included in a block.
Troubleshooting Quick Fixes
Section titled “Troubleshooting Quick Fixes”| Problem | Solution |
|---|---|
| No peers | Check network, firewall, try different bootnodes |
| Slow sync | Increase peers, check CPU/disk |
| Stuck at header | Remove chaindata, restart sync |
| RPC slow | Add caching, increase cache size |
| Out of disk | Enable pruning, use snap sync |
Filesystem Layout
Section titled “Filesystem Layout”/data/ethereum/├── geth/│ ├── chaindata/ # Blockchain data│ ├── triecache/ # Trie cache│ └── nodes/ # Peer information├── keystore/ # Account keys (if any)└── history/ # Historical state (if enabled)Backup Commands
Section titled “Backup Commands”# Backup keystorecp -r /data/ethereum/keystore /backup/
# Backup wallet (Ledger, etc.)# Do NOT backup raw private keys - use hardware wallet
# Backup node datatar -czf eth-node-backup.tar.gz /data/ethereum/Security Checklist
Section titled “Security Checklist”- 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
Quick Links
Section titled “Quick Links”- Ethereum Docs: https://ethereum.org/developers/
- Geth Docs: https://geth.ethereum.org/
- Etherscan: https://etherscan.io
- Ethereum Block Explorer: https://etherscan.io
Last Minute Interview Tips
Section titled “Last Minute Interview Tips”- When asked to set up a node: Start with
geth --syncmode snap --http - To check sync: Use
eth.syncing- returnsfalsewhen done - Quick verification: Compare your block number with etherscan.io
- Don’t panic: It’s okay to say “Let me check the documentation”
- Explain what you’re doing: Talk through your steps
Good Luck! 🍀
Section titled “Good Luck! 🍀”You’ve prepared well. Remember:
- Stay calm
- Think out loud
- Use the cheat sheet
- Ask clarifying questions if needed
Last Updated: 2026-02-20