Runtime model & ZEVM
Tevm and ZEVM share the same native execution engine, packaged for two different workflows:
- ZEVM is the standalone Zig Ethereum client and native execution library.
- Tevm embeds ZEVM's
NodeRuntimeinside Node.js over Node-API and wraps it in TypeScript/viem ergonomics, HTTP/WS/IPC servers, ethers adapters, MCP tooling, and Solidity bundler plugins.
Ownership split
| Component | Owned by | What it does |
|---|---|---|
| Guillotine Mini | Native Zig | EVM bytecode execution, hardfork rules (including Prague & Osaka), gas metering, debug_traceCall opcode tracer |
| Voltaire | Native Zig | Account & storage state, Ethereum primitives, RLP, cryptography, standard precompiles |
ZEVM (NodeRuntime) | Native Zig | Chain management, mempool, automine/manual/interval mining, receipts, filters, snapshots, state blobs, fork backend, JSON-RPC dispatcher |
@tevm/node | Tevm (JS/TS) | Node-API handle wrapper (createZevmEngine), serialized request queue, NativeRpcError, EventEmitter, ready() / close() |
@tevm/memory-client | Tevm (JS/TS) | Viem client (createMemoryClient) and transport (createTevmTransport) over ZevmEngine |
@tevm/actions | Tevm (JS/TS) | Browser-safe typed RPC helpers (tevmCall, tevmContract, tevmDeploy, etc.) |
@tevm/server | Tevm (JS/TS) | HTTP, WebSocket subscriptions, Unix IPC, Express, and Next.js transport adapters |
Runtime modes in Tevm
1. Local in-process node (default)
createMemoryClient() or createZevmEngine() starts a deterministic local chain at block 0, timestamp 0, chain ID 31337, with 10 prefunded dev accounts and automining enabled.
2. Forked local node
Passing fork: { url, blockNumber } configures ZEVM's fork backend via anvil_reset. State loads lazily from the upstream endpoint at blockNumber; all local mutations, transactions, and mined blocks remain in memory starting at local height 0.
3. Networked server for browsers & external clients
Because the native addon runs in Node.js (>=24) rather than WebAssembly in the browser, browser frontends connect to a local @tevm/server over HTTP or WebSocket using viem's http() or webSocket() transport.
Hardfork activation & deterministic timestamps
Local genesis starts at timestamp 0, independent of wall-clock time. Hardfork rules (such as mainnet Osaka EIP-7939 CLZ, ModExp pricing bounds, and the 16,777,216 transaction gas cap at timestamp 1764798551) activate deterministically when block timestamps cross the chain's activation threshold.
You can test pre-fork and post-fork behavior in the same suite by advancing the timestamp with evm_setNextBlockTimestamp (or viem's setNextBlockTimestamp).
Where to look for native client docs
For standalone Zig CLI usage, light-mode startup checkpoints, or native ZEVM internals, see the ZEVM documentation.
Next: Engine API (ZevmEngine) · Migrating from the JS engine · JSON-RPC reference

