How ethereum/go-ethereum works
Go Ethereum is an Ethereum execution-layer client and protocol implementation. The principal workflow is to start geth, connect and synchronize with peers, validate and execute chain data, persist chain/state, and expose node services through RPC for users and other processes. Its runtime also includes transaction-pool admission, account/key management, consensus and Engine API integration, and contract-binding tools. The README documents the node, sync, console/RPC and developer utilities; sampled source confirms selected RPC, account-manager, and Engine API behaviors, but not all subsystem call wiring.
Main entry points: backend.go Ethereum backend · main.go geth CLI · blockchain.go Blockchain · server.go JSON-RPC server
Components 24
Node runtime
- geth CLI
cmd/geth/main.go - Ethereum backend
eth/backend.go - P2P server
p2p/server.go - ETH protocol
eth/protocols/eth/handler.go - Chain downloader
eth/downloader/downloader.go - Transaction pool
core/txpool/txpool.go - Beacon Engine API
eth/catalyst/api.go
Execution and storage
- Blockchain
core/blockchain.go - Execution state
core/state/statedb.go - EVM
core/vm/evm.go - Consensus engines
consensus/consensus.go - Chain database
core/rawdb/database.go
User interfaces
- JSON-RPC server
rpc/server.go - JavaScript console
console/console.go - Account manager
accounts/manager.go - Keystore
accounts/keystore/keystore.go - Ethereum client library
ethclient/ethclient.go
Developer tools
- Binding generator
cmd/abigen/main.go - ABI processing
accounts/abi/abi.go - EVM utility
cmd/evm/main.go
Other components
- Node operator
- RPC user
- Ethereum peers
- Consensus client
Connections 25
- Node operator → geth CLI: starts node
- geth CLI → Ethereum backend: configures
- Ethereum backend → P2P server: starts networking
- P2P server → Ethereum peers: connects to
- ETH protocol → Ethereum peers: exchanges chain data
- Ethereum backend → ETH protocol: registers protocol
- Ethereum backend → Chain downloader: coordinates sync
- Chain downloader → ETH protocol: requests data
- Chain downloader → Blockchain: delivers chain data
- Blockchain → Consensus engines: validates blocks
- Blockchain → Execution state: executes transactions
- Execution state → EVM: runs contract code
- Blockchain → Chain database: persists chain state
- Ethereum backend → Transaction pool: manages transactions
- geth CLI → JSON-RPC server: exposes APIs
- RPC user → JSON-RPC server: sends requests
- JavaScript console → JSON-RPC server: issues requests
- Ethereum client library → JSON-RPC server: calls APIs
- geth CLI → JavaScript console: starts console
- geth CLI → Account manager: manages accounts
- Account manager → Keystore: uses key storage
- Ethereum backend → Beacon Engine API: serves Engine API
- Consensus client → Beacon Engine API: sends engine calls
- Binding generator → ABI processing: parses contract ABI
- Node operator → EVM utility: runs isolated execution