Simulated backend
In-process, in-memory simulation for Go unit tests and CI pipelines.
Dev mode
Single-node, no-networking environment with instant block production. Ideal for local contract development.
Kurtosis
Full multi-client testnet with real consensus and execution clients. Best for integration testing.
Option 1: Simulated backend
If you are writing Go code and need an Ethereum environment for tests or CI, the simulated backend is the simplest option. It runs entirely in memory inside the same process as your tests — no separate process, no ports, no disk. See the Native Bindings documentation for usage details.Option 2: Dev mode
Dev mode starts a single Geth node that simulates a fully functional Ethereum environment without any networking or external consensus layer. It is intended for fast, iterative development.What dev mode does
- Pre-funded account: A random developer account is created, pre-funded with a large balance (
10^49 ETH), and automatically unlocked. The private key is printed to the log at startup so you can import it into tools like MetaMask or cast. - Instant block sealing: Geth only produces a block when there is at least one pending transaction in the mempool. If
--dev.periodis set to a non-zero value, blocks are produced on a fixed interval even when empty. - No networking: Peer discovery is disabled, the maximum peer count is
0, and there is no listen address. The node cannot connect to or be reached by any other node. - In-memory database: Unless
--datadiris specified, the chain is stored entirely in memory and is lost when the process exits.
Dev mode flags
| Flag | Default | Description |
|---|---|---|
--dev | (flag) | Enable dev mode |
--dev.period | 0 | Block period in seconds (0 = mine only when transactions are pending) |
--dev.gaslimit | 11500000 | Initial block gas limit |
Example: attach a console
Option 3: Custom genesis with geth init
For a more realistic private network — for example, one shared among a small team — you can define a custom genesis block and initialise Geth from it.
Create a genesis.json file
Define the chain parameters, initial balances, and any network upgrades:Choose a unique
chainId that does not conflict with any public network.Initialise the data directory
Post-Merge private networks require a consensus layer running alongside each execution node. For a purely Clique-based (proof-of-authority) private network predating the Merge configuration, this may still work for test scenarios, but a full post-Merge setup requires pairing each Geth instance with a beacon node. Use Kurtosis (below) for that.
Option 4: Kurtosis (multi-client testnet)
Kurtosis is the recommended approach when you need a realistic multi-node test network that includes both execution and consensus clients. Kurtosis automates the orchestration of multiple Geth (and other client) instances alongside beacon nodes, giving you:- Multiple execution + consensus client pairs
- Realistic peer-to-peer networking between nodes
- Configurable genesis and fork parameters
- Support for mixed-client environments (Geth + Lighthouse, Geth + Prysm, etc.)
