Skip to content

Debugging

This chapter covers tools and techniques for debugging blockchain nodes.


Terminal window
geth --pprof --pprof.addr 0.0.0.0 --pprof.port 6061
Terminal window
# View profiles
curl http://localhost:6061/debug/pprof/
# CPU profile
go tool pprof http://localhost:6061/debug/pprof/profile

Terminal window
geth --http --http.api eth,net,web3,debug
Terminal window
# Get block with more info
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_getBlockRlp","params":["0x0"],"id":1}'

Terminal window
# Start node with tracing
geth --http --http.api eth,net,web3,debug,trace
Terminal window
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"trace_block","params":["0x0"],"id":1}'

Terminal window
# Check CPU
top
htop
# Check Memory
free -h
# Check Disk I/O
iostat -x 1
# Check Network
netstat -i

  • Use pprof for performance analysis
  • Debug API for detailed block info
  • Trace for transaction analysis

Last Updated: 2026-02-20