How etclabscore/core-geth works
Project type and purpose
• CoreGeth is a Go-based Ethereum protocol provider and full node implementation. It exposes CLI binaries (geth, abigen, bootnode, etc.) and library packages to run, extend, and interface with Ethereum and Ethereum-Classic networks.
• Its purpose is to launch a node that participates in the P2P network, maintains blockchain state, executes transactions via an EVM, offers JSON-RPC and GraphQL APIs, and manages consensus (PoW/PoA).
File structure
• Top-level packages:
• cmd/<tool> – each binary’s CLI entry point
• node – bootstraps and configures the node lifecycle, RPC stack, event feeds
• p2p – discovery and RLPx transport
• eth – Ethereum protocol handlers, block/tx download
• consensus – consensus algorithms (ethash, clique, beacon)
• core – chain management, block validation, state transition
• core/vm – EVM interpreter
• ethdb, trie, triedb – on-disk data storage abstractions (LevelDB, Pebble, filesystem)
• rpc, graphql – JSON-RPC and GraphQL server implementations
• accounts, signer – key management, wallet abstractions
• crypto – cryptographic primitives and cgo integrations
• Configuration files (config.go), build scripts (Makefile, Dockerfile), docs and tests are ancillary.
README for insights
• Emphasizes seamless compatibility with upstream go-ethereum, RPC/CLI APIs, pluggable chain configurations.
• Targets multiple networks (ETC, ETH, PoA, testnets), delivered via the same CLI binary.
Be detailed and complete, but avoid over-engineering
• Break the system into the components above.
• Every major package group is represented.
• Both runtime interactions (P2P, RPC) and internal integrations (state transition, consensus injection).