Appearance
Configuration
Cinder has no configuration file. You give all settings to the cinder binary as command-line options. Most defaults are the values that the project measured as best, so a mainnet node needs few options. Options can change between versions: Upgrading gives the changes of each version.
This page has four parts:
- Recommended mainnet setup: one command for a node next to a consensus client.
- When to change a setting: the options for each task.
- Measured effects: what each setting costs and gives, with the measurement.
- All options: the full reference.
Recommended mainnet setup
This command starts a mainnet node next to a consensus client, with P2P and a local JSON-RPC API:
bash
PATH_TO/cinder --engine \
--db DIR \
--jwt JWT_FILE \
--p2p \
--httpOptional, recommended: give the binary the CAP_SYS_NICE capability one time after each build. The executing thread can then run at a higher priority.
bash
sudo setcap cap_sys_nice+ep PATH_TO/cinderBefore you start, you need a Cinder database from Import state from reth and a JWT secret file from Run with a consensus client. Connect the consensus client to http://127.0.0.1:8552 with the same JWT secret file. For the command of each client, read Run with a consensus client.
| Option or step | Why |
|---|---|
--engine | The node runs behind a consensus client and serves the Engine API on 127.0.0.1:8552. |
--db DIR | The database that cinder-import made. |
--jwt JWT_FILE | The JWT secret. The consensus client must use the same file. |
--p2p | The node gets missing blocks from peers after a stop, serves blocks to peers and receives transactions. With the transactions, it prewarms the state of the next block: the mean block time went from 222 to 174 ms. Open port 30303, TCP and UDP. |
--http | The JSON-RPC API on 127.0.0.1:8547, HTTP and WebSocket, with the eth, net and web3 namespaces as in reth. Leave it out if you do not need JSON-RPC. For debug, trace and txpool, add --http-api and --ws-api: read JSON-RPC namespaces. |
no --threads | The default is min(8, CPUs - 2), at least 1. The project measures with 8. |
no --cache-mb | The default of 1024 MB was as fast as 4, 8 and 16 GB. |
setcap cap_sys_nice+ep | The executing thread runs at nice -5 on a core of its own during each block. With the core, this gave -2.3 ms per block by median. |
On a machine with more than one NUMA node, also start the node with numactl on one NUMA node. Read NUMA.
Why some settings are off by default
- JSON-RPC (
--http) is off. The JSON-RPC API has no authentication. Any client that can connect can send transactions and costly calls, for exampleeth_callwith up to 50 000 000 gas. With the API off by default, a node never opens it by accident. reth also starts without it. When you turn it on, the default address is127.0.0.1. - P2P (
--p2p) is off. Port 30303 is the default P2P port of Ethereum nodes, and another program on the machine can use it. P2P also opens a port to the internet. Thus you turn it on when you know the port. Without--p2por--backfill-rpc, the node cannot get blocks that it missed during a stop.
Run the node with systemd
This unit file runs the recommended setup. Replace the words in capitals.
ini
[Unit]
Description=Cinder execution node
After=network-online.target
Wants=network-online.target
[Service]
User=USER
ExecStart=PATH_TO/cinder --engine --db DIR --jwt JWT_FILE --p2p --http
AmbientCapabilities=CAP_SYS_NICE
Restart=on-failure
[Install]
WantedBy=multi-user.targetWith AmbientCapabilities, the binary does not need setcap. On a stop, systemd sends SIGTERM. The node then writes the blocks that are only in memory. Read Upgrading.
When to change a setting
More JSON-RPC load
The engine process executes the blocks. Heavy JSON-RPC requests on the same process take CPU from it. Start one or more read-only processes on the same database and send the JSON-RPC traffic to them:
bash
PATH_TO/cinder --serve --db DIR --http-port 8548- Give each
--serveprocess a port of its own. Put a proxy or a load balancer in front of them. - One client can have at most 256 filters (
eth_newFilterand the other filter methods). A proxy on the same host removes this limit, because clients on the same host have no limit of their own. Behind a proxy on another host, all clients have the address of the proxy: set--rpc-filters-per-client 0. Read Filters. - To limit the cost of one call, set
--rpc-gascap Glower than the default of 50 000 000 gas. - To stop slow requests (a big trace, a wide
eth_getLogs), set--rpc-timeout D. Read JSON-RPC time limit. - On a public endpoint, serve only the namespaces that the clients need.
debugandtraceare expensive. Read JSON-RPC namespaces. - One
debug_executionWitnessruns at a time by default. One witness can take some GB of memory, 8 threads at a lower priority and up to 60 s. To allow more at the same time, set--rpc-max-witness-requests N. - To limit the CPU and memory that traces use, set
--rpc-max-tracing-requests Nand--rpc-js-memory-mb M. A JavaScript tracer also stops after itstimeoutoption (default 60 s). - JavaScript tracers run in worker processes, not in the node. Read JavaScript tracers.
- The node compresses an HTTP answer when the request asks for it. This costs CPU time. If a proxy in front of the node does the compression, or the clients are on a fast local link, set
--http-disable-compression. Read Compressed answers. - Each JSON-RPC request takes a reader permit of the database before it reads, and each element of a batch takes one in turn. The node has 3696 permits: the 4208 reader slots of the database less 512 slots for its own reads. At the default
--rpc-max-connectionsof 500, no request waits for a permit. With a higher cap, a request over the permits waits until a permit is free, or until its--rpc-timeoutlimit. reth also lets itseth_calland similar requests wait for a permit. 0.9.6 and earlier had a table of 624 slots and no permits (#321). - All processes on the database share one reader table. A
cinder --serveprocess on the same database uses the same table. With one such process, keep the sum of the connection caps of the two processes below 3000. - The first process that opens the database sets the size of the reader table. After an upgrade, stop all processes on the database (also an older
cinder --serveand MDBX tools) before you start the node. Else the node gets the old, smaller table and writes a note at start. Read Troubleshooting. - A
--serveprocess has no transaction pool. Sendeth_sendRawTransactionand the pending-transaction calls to the engine process, with--http.
JavaScript tracers
The JavaScript engine of debug_trace* runs in worker processes. A crash in the engine stops one worker, not the node. The request gets the error -32603 JavaScript tracer: the worker process stopped, and the next request gets a new worker.
- A worker is the
cinderexecutable itself, started again in worker mode. You do not install or configure it. A worker serves one request: after the request, the node stops it. The node keeps 2 new workers ready, so a request does not wait for a start (a start takes about 1 to 2 ms). - Standard input, output and error of a worker go to
/dev/null. The worker maps its shared memory with the node and closes that descriptor: it keeps no other descriptor. A system call filter (seccomp) on all threads of the worker refuses the other system calls. Thus a worker opens no files, has no network access, starts no programs and makes no executable memory. It cannot change its limits or send signals to other processes. It writes no core dumps. When memory runs out, the kernel stops a worker before the node (OOM score 1000). The node sets hard limits on its address space (the tracer's memory limit plus 2 GiB) and on its CPU time (one hour). - The node kills a worker that runs past the tracer's
timeout(plus 150 ms): the request getsexecution timeout, as before. A worker that stops answering, or that sends messages without end, does not hold the request longer. The limits of--rpc-max-tracing-requestsand--rpc-js-memory-mbapply as before: one worker for each running request. A request with a JavaScript tracer can use two CPUs: the node runs the EVM while the worker runs the tracer. - When the node stops, it stops all its workers. A worker also stops when its node stops.
- The hooks run in the worker while the EVM goes on. A state read through
dbgets the state of its step: the node finds it in its journal of the transaction. If a hook throws (its call frame reverts, as in reth), the node runs the transaction again. Each hook then waits for the worker. The node also does this for a state read in a call frame that reverted before the worker read it. The second run has a time limit of its own. Thus a trace with a hook that throws can take up to two times itstimeout. The answer is the same as in the node's own process. Read the measurements indocs/results/2026-10-js-worker.mdin the repository. - To see the standard error of the workers when you debug, start the node with
CINDER_JS_WORKER_STDERR=1.
Less memory
--cache-mb Nwith a smaller N, for example256, uses less memory of its own.0turns the cache off, and with it the contract code cache of up to 128 MB.- Most memory of a running node is the page cache of the operating system, not memory of the node. The kernel gives it back when other programs need it. With less page cache, more reads go to the disk and blocks are slower.
The project did not measure the block time with a smaller cache. Read Memory.
A second read-only JSON-RPC process
Start cinder --serve on the database of the engine process, on a different port:
bash
PATH_TO/cinder --serve --db DIR --http-addr 127.0.0.1 --http-port 8548The process opens the database read-only and serves the same JSON-RPC API. It follows the database head, which can be a few blocks behind the chain head. Read JSON-RPC. It uses only --http-addr, --http-port, --rpc-gascap, --rpc-max-tracing-requests, --rpc-max-witness-requests, --rpc-js-memory-mb, --rpc-max-connections, --http-api, --ws-api, --rpc-timeout, --http-disable-compression, --rpc-filters-per-client and --rpc-max-log-subscriptions.
Another execution client on the same machine
You do not need a second execution client to run Cinder. A machine can also run one, for example reth for a comparison. Cinder uses other default ports than reth for the Engine API (8552, reth 8551) and for JSON-RPC (8547, reth 8545). Both use port 30303 for P2P. On such a machine:
| Setting | Change |
|---|---|
| P2P port | --p2p-port 30304, and open this port, TCP and UDP. |
| CPUs | Give each node CPUs of its own with taskset -c LIST or numactl -N NODE -m NODE. The default --threads and the executing-thread core then use only the CPUs of that set. |
| Engine API | Keep the default port 8552. To send the same blocks to both nodes for a comparison, read Engine mode and shadow mode. |
| Disk | Put the two databases on different disks if you can. Both nodes read and write much at each block. |
A slow disk
- Add memory. More page cache means fewer reads from the disk. Read Memory.
- Keep
--p2pon and do not give--no-warm. The mempool prewarm reads the state of the next block before it comes. - Keep
--persist-depth 0. The node then writes each block in the background right after it. - Look at the
writtenlines in the log. If more than 4 blocks wait for the writer, a new block waits too. Read Monitoring.
A hard disk does not work. Read Disk.
Other programs on the same machine
- Set
--threads Nlower than the default to keep CPUs free for the other programs. - The executing thread takes the first CPU of the set that the process can use. If a different program must use that CPU, give
--no-exec-iso, or limit the CPUs of the node withtaskset.
No P2P, or only known peers
--backfill-rpc URLgets missing blocks from the JSON-RPC API of a reth node. Use it in place of--p2p.--peer ENODE(up to 16 times) connects only to the peers that you give. The node does not search for other peers.
Measured effects
Where the numbers come from
Most numbers on this page come from one mainnet node on a desktop, which other services shared, against reth 2.0. The numbers of the executing-thread core and of the memory kept between blocks come from the dedicated server (read Performance). On your machine they can be different.
Cinder has few settings. Most defaults are the values that the project measured as best. This part tells what each setting costs and what it gives, with the measurement behind it. For the full option list, read All options.
Summary
| Setting | Default | Measured effect |
|---|---|---|
--threads N | min(8, CPUs - 2), at least 1 | the project runs 8. More prewarm threads gave no gain |
executing-thread core (--no-exec-iso turns it off) | on, with 4 or more CPUs | -2.3 ms per block by median |
CAP_SYS_NICE on the binary | not set | lets the executing thread run at nice -5. Part of the -2.3 ms above |
one NUMA node (numactl) | not set | the project runs each node on one NUMA node. Not measured alone |
| memory kept between blocks | on, no setting | -0.8 ms per block by median |
--cache-mb N | 1024 | 4, 8 and 16 GB were not faster than 1 GB |
--persist-depth K | 0 | with 0, the database head is at most 4 blocks behind the chain head. The JSON-RPC latest is the chain head with any value (#33) |
--no-warm | off (prewarm on with --p2p) | the mempool prewarm cut the mean from 222 to 174 ms |
| PGO and ThinLTO build | off | +4.9% on mainnet block execution |
| huge pages for the cache | on | cache lookups about 30% faster in a microbenchmark |
| database page size | 4 KB | 16 KB was slower on a machine with a small page cache |
Threads
--threads N sets the worker threads for sender recovery, the prewarm, the state root and the trie prefetch. The default is min(8, CPUs - 2), at least 1, from the CPUs that the process can use. With 1 thread, the node does not run the block prewarm or the trie prefetch, and it does not start the pools below. The project's measurements of the node use --threads 8.
With --threads above 1, the node also starts these threads, and their number does not change with --threads:
- a pool of 32 threads for the state root's trie reads. These threads mostly wait on the disk. This pool cut the root's prefetch from 39 to 20 ms.
- a pool of 16 threads at low priority (
cn-pfio) for the trie reads of the prewarm and of the streaming state root. - the coordinator thread of the streaming state root (
cn-sroot), at low priority. - a pool of 8 threads for the writer, at low priority. The writer thread itself runs with any
--threadsvalue.
The prewarm threads run at nice 5, so the executing thread keeps its core. In two A/B runs on a loaded machine, this cut the mean from 195 to 170 ms and from 162 to 137 ms.
What did not help:
| Change | Result |
|---|---|
| 16 prewarm threads in place of 8 | 5.72 against 5.71 ms per Mgas. Reverted |
| a third prewarm pass | read wait 39.9 against 39.0 ms. The extra runs take CPU from execution with 8 threads. Not merged |
| storage roots during execution on 4 or 8 more workers | net zero or slower. The workers take CPU from execution |
More cores can change these results. The project has not measured other thread counts on its dedicated server yet.
Executing thread core
In engine mode, the node keeps one CPU for the thread that executes the blocks. The node takes the first CPU of the set that the process can use. The SMT siblings of that CPU stay free, and all other threads of the node run on the remaining CPUs. The node prints this line at start:
text
exec isolation: executing thread on CPU N, its siblings left free, other threads on M CPUsThe node does not keep the core when the process can use fewer than 4 CPUs. --no-exec-iso turns it off. Read Executing thread core.
During a block, the executing thread also runs at nice -5. A process needs the CAP_SYS_NICE capability to raise its priority. Give the capability to the binary:
bash
sudo setcap cap_sys_nice+ep PATH_TO/cinderDo this again after each build, because a new binary has no capabilities. With systemd, you can give AmbientCapabilities=CAP_SYS_NICE or a LimitNICE that allows -5 in place of setcap. Without the capability, the node keeps the core and skips the priority.
In an interleaved A/B on live mainnet, the core and the priority cut the time of a block by 2.3 ms by median (95% CI -3.2 to -1.4).
NUMA
On a machine with more than one NUMA node, run the node on one NUMA node, with its memory on the same node:
bash
numactl -N NODE -m NODE PATH_TO/cinder --engine ...The node then takes the first CPU of that NUMA node for the executing thread. The other threads stay on the same NUMA node. Give each node (Cinder, reth, the consensus client) a NUMA node of its own if the machine has enough of them. The project measures this way on its dedicated server. The project did not measure the gain of numactl alone.
Cache size
--cache-mb N sets the cross-block cache of accounts, slots and trie nodes. The default is 1024 (1 GB). 0 turns the cache off.
The project measured 1, 4, 8 and 16 GB, each with 45 minutes of warm-up and 30 minutes of measurement:
| Cache | Cinder mean | reth mean, same window | Ratio |
|---|---|---|---|
| 1 GB | 118.9 ms | 105.5 ms | 1.13× |
| 8 GB | 181.9 ms | 162.5 ms | 1.12× |
| 16 GB | 147.6 ms | 116.8 ms | 1.26× |
| 1 GB, control | 102.8 ms | 96.9 ms | 1.06× |
| 4 GB, again | 160.1 ms | 134.3 ms | 1.19× |
A bigger cache gave no gain. The cache never grew past about 2.6 GB of anonymous memory in 75 minutes. The misses per block did not change: they are keys that the node reads for the first time.
The node also keeps these tables across blocks:
- contract bytecode, up to 128 MB, only with the cache on. It cut the executing thread's reads from 573 to 168 per block and execution per Mgas by 22%.
- JUMPDEST analyses and the code copies that the interpreter runs, up to 256 MiB (64 MiB before 0.9.5). The JSON-RPC threads can fill at most half of it.
- results of the costly precompiles, 8 192 slots. They cut the execution CPU per Mgas from 1.80 to 1.42 ms.
Memory kept between blocks
A block uses large memory areas (arenas) for its state, its tries and the work of the thread pools. After each block, the node keeps up to 512 MB in the main scratch arena and up to 64 MB in each other arena. It gives the rest back to the operating system. It gives free heap pages back (malloc_trim) only when the heap is above 1 GB. There is no setting for this.
Before, the node gave more of this memory back after each block, and the next block faulted the pages in again. In a profile, about 20% of the engine thread's samples were in the kernel, where it freed this memory. Kept, the blocks were 0.8 ms faster by median, and the p99 went from 25 to 17 ms.
Persist depth
--persist-depth K sets how many blocks the node keeps in memory below the head before it writes them. The default is 0. The writer then writes the head right after the forkchoice answer, in the background. The JSON-RPC tag latest is the chain head with any depth: the blocks not written yet come from memory (read JSON-RPC).
With depth 0, the next block waits only a few milliseconds for the writer (read Writing blocks). Keep the default.
Mempool prewarm
With --p2p, the node runs pool transactions on the head state every 150 ms between blocks. The state that a block reads is then in memory before the block comes. The prewarm pauses while a block executes and while the writer writes (#32).
- It gives: mean 222 to 174 ms, p90 400 to 288 ms (A/B).
- It costs: CPU between blocks. CPU per block went up from 1.15 to 1.35 s between two measurements. The prewarm and the parallel account trie came between them.
--no-warm turns it off.
Huge pages
The cross-block cache allocates its tables with mmap and MADV_HUGEPAGE. There is no flag for this.
- In a microbenchmark, random lookups over 1 GB took 60 to 66 ns with huge pages and 82 to 93 ns with 4 KB pages.
- On the node, 348 MB of the cache was on huge pages after 20 minutes. Anonymous memory stayed the same (1.12 GB).
The measurement ran with the kernel's transparent huge pages in the madvise mode.
Database page size
cinder-import --page-size BYTES sets the page size of a new database. The default is the operating system page (4 KB).
A 16 KB page can take one B-tree level off each read. But on a machine with little memory for the page cache, reads were slower: the read wait was 73.9 ms against 40 to 47 ms. Writes were faster: 1.4 s mean per block against 4 to 6 s. These write times are from before the background writer. The project went back to 4 KB. The option is for machines with more memory for the page cache. This result is on the list for a new measurement.
All options
This part lists every option of cinder and cinder-import and every environment variable, grouped by purpose. For a short list of the options of every binary, see the command line reference.
Modes
The cinder binary runs in one of three modes. Give exactly one mode option and --db:
| Option | Meaning |
|---|---|
--engine | Run the node behind a consensus client. The node serves the Engine API and, with options, P2P and JSON-RPC. |
--serve | Serve the JSON-RPC API from a database that a different cinder process writes. This mode only reads the database. You can run more than one such process. |
--shadow | Follow a reth node over JSON-RPC. Execute each block, compare the result with the header and write the block. |
--db DIR | The Cinder database directory. cinder-import makes this directory. Required in all modes. |
Use --engine for normal operation. Use --serve to add JSON-RPC processes that read the database of an engine-mode node. Use --shadow to check a new database against reth before you connect a consensus client.
Engine API
These options apply to --engine.
| Option | Default | Meaning |
|---|---|---|
--jwt FILE | none, required | The file with the JWT secret in hex. Use the same file as the consensus client. |
--authrpc-addr A | 127.0.0.1 | The address of the Engine API. |
--authrpc-port P | 8552 | The port of the Engine API. |
The Engine API requires JWT authentication on each call. The Engine API port has a limit of its own: 64 open connections, which --authrpc-max-connections N changes. --rpc-max-connections does not change it. At the limit, a new connection closes the connection that waited for its next request for the longest time. If no connection waits, the new one gets HTTP status 429, and the node closes it. The same timeouts as for JSON-RPC apply.
Execution and memory
| Option | Default | Meaning |
|---|---|---|
--threads N | min(8, CPUs - 2), at least 1 | The size of the worker pool and of the prewarm pool. With 1, the node starts no worker pool and no block prewarm. |
--cache-mb N | 1024 | The size in MB of the cross-block cache of accounts, storage slots and trie nodes. 0 disables the cache. |
--persist-depth K | 0 | The number of canonical blocks that the node keeps in memory below the head before it writes them to the database. |
--no-exec-iso | off | Do not keep a core for the executing thread. See Executing thread core. |
Threads
Without --threads, the node takes min(8, CPUs - 2) threads, at least 1. CPUs are the CPUs that the process can use: taskset, numactl and the CPUAffinity setting of systemd make the number smaller. At start, the node prints the number:
text
threads: T (the default for C usable CPUs; --threads N to change)With one thread, the node starts no worker pool and does not prewarm blocks.
With more than one thread (N), the node starts these thread pools:
- A worker pool of N threads for sender recovery and state roots.
- A prewarm pool of N threads, at a lower priority than execution.
- Pools for trie reads: 32 threads, and 16 threads at a lower priority. The streaming state root also reads on the pool of 16 threads.
- 8 threads for the writer thread, at a lower priority.
The coordinator thread of the streaming state root runs with any --threads value, at the priority of the prewarm. With --threads 1, it reads the trie nodes itself.
With --p2p, mempool prewarm uses a pool of N threads, at least 2. The project measures the node with --threads 8.
Executing thread core
In engine mode, the node by default keeps one core for the thread that executes the blocks. At start, it takes the first CPU that the process can use. During a block, the executing thread runs on that CPU, and the SMT siblings of that CPU stay free. All other threads of the node run on the remaining CPUs. If the process can raise its priority (with CAP_SYS_NICE or a LimitNICE that allows it), the executing thread runs at nice -5 during the block. If it cannot, the node keeps the core and skips the priority. At start, the node prints a line that starts with exec isolation:.
The node does not keep the core when the process can use fewer than 4 CPUs. To limit the CPUs of the node, use taskset, numactl or the CPUAffinity setting of systemd. The node then takes the first CPU of that set. For the capability and the NUMA setup, read Tuning.
Use --no-exec-iso if a different program must use the first CPU of the set.
Cache size
The cross-block cache keeps accounts, storage slots and trie nodes of the database head in memory. With the cache on, the node also keeps contract bytecode across blocks, up to 128 MB.
A test with caches of 1, 4, 8 and 16 GB showed no gain from a cache larger than 1 GB. Thus the default is 1024 MB.
Persist depth
With the default of 0, the node gives the head block to the writer thread right after the forkchoice response. The database head can be a few blocks behind. The JSON-RPC tag latest follows the chain head, and the pending block comes after it. Read JSON-RPC.
With a larger value, the node keeps more blocks in memory below the head, and the database head is behind the chain head. The node also writes every canonical block deeper than the persist depth. It always writes the blocks at or below the finalized block.
Some new blocks have a written parent 1 or 2 blocks below the database head, for example a sibling of the head. Such a block executes at engine_newPayload, and the node answers VALID or INVALID. A deeper fork stays pending until a forkchoice update selects it.
A forkchoice update to a fork below the database head is possible. It does not write to the database. The fork becomes the head in memory at once. The writer thread then removes the blocks above the fork base with their undo records and writes the fork, in one transaction. JSON-RPC latest is the fork at once, before this write. The node keeps undo records for the last 128 written blocks.
The writer thread writes blocks in the background, up to 64 blocks in one write transaction. If more than 4 canonical blocks deeper than the persist depth are not written yet, a new engine_newPayload call waits for the writer. Forks do not count.
Catching up
After an import or a stop, the database is behind the chain. These options tell the node where to get the missing blocks:
| Option | Default | Meaning |
|---|---|---|
--p2p | off | Get missing blocks from peers on the Ethereum network. See P2P. |
--backfill-rpc URL | none | Get missing blocks from the JSON-RPC API of a reth node, with eth_getBlockByHash and debug_getRawBlock. The node accepts an answer of at most 256 MiB. Read Answers from other nodes. |
If you give both, the node uses P2P and ignores --backfill-rpc. The node checks each block body against its header before it executes the block.
Unsupported forks
This version does not implement the Amsterdam fork. Mainnet has no Amsterdam time yet. Thus the guard on block timestamps is off by default. It is on only if you give --amsterdam-time T. Without it, only the Engine API methods of Amsterdam (engine_newPayloadV5, engine_forkchoiceUpdatedV4 and later) are refused, as described below.
| Option | Default | Meaning |
|---|---|---|
--amsterdam-time T | none (guard off) | The Unix time in seconds of the first Amsterdam block. It must be a number of digits, later than the BPO2 fork time (1767747671) and later than the time of the database head. Else the node does not start. Not for --serve. |
With --amsterdam-time T, the node refuses each block with a timestamp of T or later. It reads the timestamp before it decodes the full header. It does not execute such a block with the Osaka rules, and it does not mark the block as invalid:
engine_newPayloadV1toengine_newPayloadV4for such a block, andengine_newPayloadV5for any block, answer error-38005(Unsupported fork).engine_forkchoiceUpdatedV1toengine_forkchoiceUpdatedV3apply the forkchoice state. Payload attributes with a timestamp of T or later answer-38005.engine_forkchoiceUpdatedV4answers-38005and does not apply the state.- A method version that this version does not know answers
-32601(method not found). This is a method of a fork after Amsterdam, or a version that does not exist, for exampleengine_getPayloadV7. - The P2P catch-up gets and executes the blocks before the Amsterdam block. Then it stops. It stops only if the head of the consensus client is an Amsterdam block, so one peer cannot stop it with a false header. It disconnects a peer that sends an Amsterdam header with a timestamp more than 60 seconds in the future. The
--backfill-rpccatch-up stops at the Amsterdam block. - Shadow mode stops at the Amsterdam block.
For each refused block, the node writes this message to standard error one time:
text
Amsterdam fork at block N is not supported by this version; upgradeIf the node does not know the block number, the message has no number: Amsterdam fork is not supported by this version; upgrade. This occurs when engine_forkchoiceUpdatedV4 names a head block that the node does not have.
After the message, the node continues to serve JSON-RPC from the blocks that it has. It does not follow the chain. Install a version that implements Amsterdam.
P2P
| Option | Default | Meaning |
|---|---|---|
--p2p | off | Join the network. The node finds peers with discv4 and with the mainnet DNS node list. It gets missing blocks, serves blocks to peers and receives transaction gossip. |
--p2p-port P | 30303 | The listening port, TCP and UDP. |
--p2p-peers N | 100 | The maximum number of outbound peers (as reth). The node has at most 160 peers in total, inbound and outbound. |
--p2p-inbound N | 30 | The maximum number of inbound peers (as reth). |
--peer ENODE | none | A fixed peer. Give the option once for each peer, up to 16 times. This option also turns on --p2p. |
--no-warm | off | Do not prewarm the state of gossiped transactions between blocks. |
The node keeps two files in the database directory:
DIR/nodekey: the P2P key. If the file does not exist, the node makes a new key and writes it there. Thus the enode stays the same after a restart. The node prints its enode at start.DIR/p2p-nodes: the known nodes, with the dial backoff of each node and the time when it last served a header or a block. The node reads the file at start and writes it after each crawl. Thus after a restart the node dials the good peers of before first. You can remove the file while the node does not run. The node then starts from the bootnodes and the DNS list again.
How the node finds and selects peers: P2P.
With --peer, the node dials only the peers that you give. It does not crawl and does not dial other nodes. Inbound peers can still connect.
For inbound peers, open the P2P port, TCP and UDP, in the firewall and in the NAT of the router. Change --p2p-port if a different client on the machine uses port 30303. If the node cannot listen on the TCP port, it prints a message and accepts no inbound peers.
With --p2p, the node by default runs the transactions of its pool between blocks to load their state into the cache. This is mempool prewarm. --no-warm stops it.
JSON-RPC
These options apply to --engine. --serve uses only --http-addr, --http-port, --rpc-gascap, --rpc-max-tracing-requests, --rpc-max-witness-requests, --rpc-js-memory-mb, --rpc-max-connections, --http-api, --ws-api, --rpc-timeout, --http-disable-compression, --rpc-filters-per-client and --rpc-max-log-subscriptions.
| Option | Default | Meaning |
|---|---|---|
--http | off | Serve the JSON-RPC API. HTTP and WebSocket use the same port. |
--http-addr A | 127.0.0.1 | The address of the JSON-RPC API. This option also turns on --http. |
--http-port P | 8547 | The port of the JSON-RPC API. This option also turns on --http. |
--rpc-gascap G | 50000000 | The gas cap for eth_call, eth_estimateGas and other calls. 0 keeps the default. |
--rpc-txfeecap ETH | 1.0 | The maximum fee, in ether, of a transaction sent over JSON-RPC, as in reth. 0 means no cap. |
--rpc-max-tracing-requests N | the usable CPUs less 2, at least 2 | The tracing requests (debug_trace*, trace_*) that run at the same time, as reth's --rpc.max-tracing-requests (that spelling also works). The other tracing requests wait for a free place, in the order they came. Other requests do not wait. |
--rpc-max-witness-requests N | 1 | The debug_executionWitness requests that run at the same time. The others wait for a turn, at most 120 s, then get an error. |
--rpc-js-memory-mb M | 1024 | The memory of all JavaScript tracers together, in MiB, at least 16. A request with a JavaScript tracer reserves 256 MiB (or M, if smaller) when it starts, for all its transactions. It gives the memory back at its end. The copies that the helper functions of the tracer make (toHex, toWord, toAddress, toContract, toContract2, slice, isPrecompiled and the db functions) also count toward this memory. 0.9.6 and earlier did not count them (#324). A request that does not fit waits, in order. The wait counts in its timeout. Thus a trace that started never fails because of other requests. With the default, 4 requests with JavaScript tracers run at the same time. |
--rpc-max-connections N | 500 | The open connections at a time, HTTP and WebSocket together, as reth's --rpc.max-connections (that spelling also works). At the limit, a new connection closes the HTTP connection that waited for its next request for the longest time. If no connection waits, the new one gets HTTP status 429 with the text Too many connections. Please try again later., and the node closes it. A connection whose request headers are not complete for the longest time also goes before the refusal. Each request also takes a reader permit of the database. Read More JSON-RPC load. |
--http-api LIST | eth,net,web3 | The namespaces that HTTP serves, as reth's --http.api (that spelling also works). Read JSON-RPC namespaces. |
--ws-api LIST | eth,net,web3 | The namespaces that WebSocket serves, as reth's --ws.api (that spelling also works). |
--rpc-timeout D | none | The time limit of each JSON-RPC request. Read JSON-RPC time limit. |
--http-disable-compression | off | Do not compress HTTP answers. By default, the node compresses an answer with gzip or deflate when the request asks for it with Accept-Encoding, as reth. reth's --http.disable-compression also works. Read Compressed answers. |
--rpc-filters-per-client N | 256 | The filters (eth_newFilter and the other filter methods) of one client at most, of the 1 024 filters that the node keeps. 0 means no limit for one client. A client is an IPv4 address or the first 64 bits of an IPv6 address. A client on the same host (127.0.0.0/8 or ::1) has no limit of its own, so a proxy on the same host removes the limit. Behind a proxy on another host, set 0. reth has no filter limits. Read Filters. |
--rpc-max-log-subscriptions N | 4096 | The WebSocket logs subscriptions of all connections together at most. 0 means no limit. Over the limit, eth_subscribe gets -32000 too many subscriptions. reth has no such limit. |
JSON-RPC namespaces
--http-api and --ws-api select the namespaces that the node serves on HTTP and on WebSocket. HTTP and WebSocket use the same port, but each has its own list. The names, the syntax and the default are reth's:
- A comma list of
admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,miner,mevandtesting. The node removes spaces around each name. The names are case-sensitive:Ethis an error, and the node does not start. allornoneas the first item, in any case, selects all namespaces or none. The node ignores the items after it.- Without the option, the list is
eth,net,web3. - Cinder has methods only in
eth,net,web3,debug,trace,txpoolandrpc. It accepts the other names, as reth does, but they serve nothing.
A method of a namespace that the node does not serve gets the answer that reth gives for a method that does not exist: -32601 Method not found. The node does not read the parameters first. rpc_modules is in the rpc namespace, as in reth: it answers only when rpc is in the list, and it lists the served namespaces of that transport. eth_subscribe needs eth in --ws-api. The Engine API is only on its own port (--authrpc-port), and these options do not change it.
To serve all namespaces, as Cinder did before 0.9.5:
bash
PATH_TO/cinder --engine --db DIR --jwt JWT_FILE --p2p --http --http-api all --ws-api allAt the start, the node writes the namespaces of each transport, for example JSON-RPC namespaces: HTTP eth,net,web3 | WebSocket eth,net,web3.
JSON-RPC time limit
--rpc-timeout D gives each JSON-RPC request a time limit. D is a number of seconds (30, 2.5) or a duration (500ms, 30s, 2m), from 1 ms to 1 day. 0 means no limit. The default is no limit, as in reth. reth has no such option.
The limit starts when the node reads an HTTP body or a WebSocket message. A batch has one limit for all its requests. The node checks the limit at these points:
- Before each request of a batch. A request that starts after the limit gets the error and does not run.
- While a request waits for a tracing turn (
--rpc-max-tracing-requests) or a witness turn (--rpc-max-witness-requests). - Before each call:
eth_call, each step ofeth_estimateGas, each call ofeth_callManyand ofeth_simulateV1. - Before each transaction that a trace replays, and before each block of
trace_filter. - While a traced call or a traced transaction runs (
debug_trace*and thetracenamespace). The node reads the clock during the run and stops the run at the limit (#385). Without a limit (the default), a trace does not change. - Every 64 blocks that
eth_getLogsscans. - A JavaScript tracer stops at the limit, if its own
timeoutis longer.debug_executionWitnessstops at the limit, if its own limit of 60 s is longer.
A request that the limit stops gets -32603 with the message request timed out: it took longer than the limit of D s. The node closes the read transaction of the request, so the database can use its pages again.
A call without a trace can run past the limit: eth_call, a step of eth_estimateGas, a call of eth_callMany or of eth_simulateV1. The node checks between these calls, not inside a call. --rpc-gascap limits the time of one call. A traced call or transaction stops inside the run. 0.9.6 and earlier checked a traced run only before each call and each transaction. On a node that serves the debug or trace namespace to other users, set --rpc-timeout.
The JSON-RPC server also closes a connection in these cases:
- A new connection does not send a byte in 30 s.
- An HTTP connection does not send a new request for 120 s.
- The headers of a request do not arrive in 30 s.
- A request stops for 30 s before all of its bytes arrive.
- The client does not read the response for 30 s.
A WebSocket connection has no idle limit. Each open connection uses a thread. For the differences from reth, read Differences from reth.
No authentication
The JSON-RPC API has no authentication. Do not put it on a public address.
State queries work for the last 128 blocks. The node keeps block history (bodies, receipts, transaction lookups) from the block where it started.
Block building
| Option | Default | Meaning |
|---|---|---|
--builder-gaslimit G | 60000000 | The gas limit that built blocks move toward, as in reth on mainnet. |
--builder-extradata S | cinder/v<version>/linux | The extra data of built blocks. |
The node builds blocks when the consensus client sends engine_forkchoiceUpdatedV3 with payload attributes.
Shadow mode
These options apply to --shadow.
| Option | Default | Meaning |
|---|---|---|
--rpc URL | http://127.0.0.1:8545 | The JSON-RPC URL of the reth node. It must serve the eth and debug namespaces. |
--confirm K | 2 | The number of blocks to stay behind the head of the reth node. |
--blocks N | 0 | Stop after N blocks. 0 means no limit. |
--receipts | off | Compare each receipt, byte for byte, with debug_getRawReceipts of reth. |
--threads N | min(8, CPUs - 2), at least 1 | Worker threads for sender recovery and state roots. Execution runs on one thread. |
Shadow mode stops on the first difference. It also stops if a reorg is deeper than --confirm blocks.
Import
These options apply to cinder-import.
| Option | Default | Meaning |
|---|---|---|
--reth-db DIR | none, required | The db directory of a reth data directory. |
--db OUT | none, required | The new Cinder database directory. Not required with --check-only. |
--rpc URL | http://127.0.0.1:8545 | The JSON-RPC URL of the same reth node. |
--check-only | off | Compare sample accounts with the reth RPC, then stop. Do not import. |
--force | off | Import also if the sample check fails or if the free disk space is less than the estimate. The import still stops if less than 64 GB stays free. |
--page-size BYTES | the OS page, 4 KB | The page size of the new database. You can set it only when cinder-import makes the database. |
A test with 16 KB pages made reads slower on a machine with a small page cache. Keep the default unless the machine has much memory for the page cache.
Environment
cinder and the tools read these environment variables at start. The variables of the streaming state root are for tests and for problem reports. Keep their defaults on a normal node.
| Variable | Meaning |
|---|---|
CINDER_KZG_SETUP | The path of a KZG trusted setup file to use. If it is not set, the node uses the setup in the binary. |
CINDER_WITNESS_DEBUG | If set, poc-exec reports which witness lookup failed. |
CINDER_SROOT | 0 turns off the streaming state root. The node then computes the root after execution only. Use it only if you think that the stream has a bug. |
CINDER_SROOT_CHECK | 1 computes each streamed root also without the stream and compares the two. A difference goes to the log. This makes each block slower. Debug builds compare by default, and 0 stops it. |
CINDER_SROOT_IO | 0 makes the coordinator of the stream read the trie nodes of the write log itself, one at a time, not on the prefetch pool. For tests. |
CINDER_SROOT_TIMEOUT_MS | The time in ms that the root waits for the stream after execution. The default is 2000. After this time, the node computes the root without the stream. |
CINDER_READ_AHEAD | 0 turns off the read-ahead of slot runs. By default it is on when --threads is 2 or more. The engine log line then has a read-ahead part (read Monitoring). Use 0 only to compare or to report a problem. |
CINDER_JS_WORKER_STDERR | 1 gives the JavaScript tracers' workers the node's standard error, for debugging. By default, it goes to /dev/null. |
CINDER_JS_WORKER | Set only by the node for its JavaScript workers. If you set it, cinder stops with a message. |