Skip to content

Instantly share code, notes, and snippets.

@ralexstokes
Created February 17, 2019 22:07
Show Gist options
  • Save ralexstokes/206d536fbfd7814ffbb748fcb6a8ff4d to your computer and use it in GitHub Desktop.
Save ralexstokes/206d536fbfd7814ffbb748fcb6a8ff4d to your computer and use it in GitHub Desktop.
some notes on `ethereum/go-ethereum` repo organization (12ca3b172)
here are the top-level directories in the geth repo at the above commmit.
(skipping some things relating to CI or repo management)
accounts - an account manager (e.g. perhaps wraps key manager and (tx) signer)
build - config/tools for building parts of this repo
cmd - the various binary commands exposed in the repo
common - series of utilities used across the codebase
consensus - defines various consensus algos, like PoW or PoA
console - bind console to geth node for CLI interaction
containers - dockerfiles
contracts - some random contracts
core - core ETH protocol (exposed by ETH (sub)protocol)
crypto - various cryptographic primitives (EC ops, hashing, signing)
dashboard - integrated dashboard for a geth node
docs - docs (over audits)
eth - impl of the ETH (sub)protocol
ethclient - Go client for the JSON-RPC interface
ethdb - wraps a KV database, e.g. LevelDB
ethstats - exposes node stats
event - code for handling events (across the codebase, not necessarily ETH events)
graphql - GraphQL server for accessing node data
internal - geth specific utilities
les - impl of the LES (sub)protocol
light - light client utilities
log - logging package
metrics - data about the node operation
miner - CPU-based miner (pluggable consensus, (clique - PoA), ethash (PoW))
mobile - facilities for writing mobile dapps...
node - container type for various services related to interfacing w/ the network
- make a node, register various protocols to be managed over the node lifetime
- starts a p2p server
- starts each service, passing a ref to the p2p server
- finally start rpc modules (for interacting w/ protocol state via the node)
p2p - handles impl of the p2p network
params - various parameters and configuration data (e.g. bootnodes, dao hard fork data, gas schedule...)
rlp - rlp serde
rpc - JSON-RPC to talk to node
signer - handles signing data, e.g. signing transactions with private keys
swarm - decentralized storage service ( BZZ subprotocol )
tests - lots of tests
trie - impl of the merkle patricia trie
whisper - whisper client (SHH subprotocol), messaging protocol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment