Skip to content

Upgrading ​

This page tells what to do for each new version, how to stop the node safely and what happens when it starts again. For the build steps, read Update to a new version.

From 0.9.6 to 0.9.7 ​

0.9.7 uses the same database schema as 0.9.6. It needs no new import. A database with free pages uses them again, the oldest first (#294). Read the full list of changes in the Changelog.

  1. Read-ahead of slot runs (on by default). Block execution reads ahead in runs of storage slots (#361). To turn it off, set CINDER_READ_AHEAD=0. The engine log line of each block shows the counts in its read-ahead part. Read the read-ahead.
  2. A time limit for nodes that serve tracing. On a node that serves the debug or trace namespace to other users, set --rpc-timeout. The limit now also stops a traced call or transaction while it runs (#385). Read JSON-RPC time limit.
  3. Stop older processes first. The reader table of the database is larger in 0.9.7 (#321). The first process that opens the database sets its size. If an older Cinder process (or an older cinder --serve) has the database open when the node starts, the node gets the old table and fewer reader permits, and it writes a note at start. Stop all older processes on the database before you start 0.9.7. Read More JSON-RPC load.
  4. New limits. One client can have at most 256 filters, and all connections together at most 4 096 logs subscriptions. Behind a proxy on another host, all clients have the address of the proxy: set --rpc-filters-per-client 0. The transaction pool keeps at most 16 transactions of one sender (not for local transactions). A request with both Transfer-Encoding and Content-Length gets HTTP status 400. Read Request limits and Filters.
  5. Long stops. A node that is more than about 145 days behind the head of the consensus client does not catch up over P2P. For such a node, use --backfill-rpc or a new database. Read The fetcher.

From 0.9.5 to 0.9.6 ​

0.9.6 uses the same database schema as 0.9.5. It needs no new import. Read the full list of changes in the Changelog.

  1. Compressed HTTP answers (on by default). The user HTTP port now compresses an answer with gzip or deflate when the request asks for it with Accept-Encoding, as reth. A request without that header gets the answer as before. Compression costs some CPU time for each answer. To turn it off, add --http-disable-compression (reth's spelling --http.disable-compression also works). WebSocket messages and the Engine API port are never compressed. Read Compressed answers.
  2. Memory. The trie uses a smaller node for a branch child that is only a hash. The peak memory of the process can be smaller.

From 0.9.4 to 0.9.5 ​

0.9.5 uses the same database schema as 0.9.4. It needs no new import. Read the full list of changes in the Changelog.

  1. JSON-RPC namespaces (breaking). By default, the JSON-RPC API now serves only eth, net and web3, as reth. Up to 0.9.4, Cinder served eth, net, web3, debug, trace, txpool and rpc on every endpoint. If your clients use debug_*, trace_*, txpool_* or rpc_modules, add the namespaces to the command, for example:

    bash
    PATH_TO/cinder --engine --db DIR --jwt JWT_FILE --p2p --http \
        --http-api eth,net,web3,debug,trace,txpool,rpc --ws-api eth,net,web3,debug,trace,txpool,rpc

    --http-api all --ws-api all serves all namespaces, as before. Give the same options to each cinder --serve process. Without them, such a method gets -32601 Method not found. The start line JSON-RPC namespaces: shows what the node serves. Read JSON-RPC namespaces.

  2. Log filter rows. 0.9.5 writes a log filter row for each new block. The rows make an eth_getLogs filter with few matches fast. The older blocks of the database have no rows: the node reads them as before, with the same answers, but more slowly for such a filter. To write their rows, run this command one time, also while the node runs:

    bash
    PATH_TO/cinder --build-log-filters --db DIR

    The rows add about 4.9 KB per block on disk. Read Log filter rows.

  3. Memory. The cache of code analyses can now hold up to 256 MiB (before: 64 MiB). The node can use up to about 200 MiB more memory.

  4. Optional: a time limit for requests. --rpc-timeout D stops a JSON-RPC request that runs longer than D. The default is no limit, as before. Read JSON-RPC time limit.

  5. The revert reason text in the errors of eth_call, eth_estimateGas and the other calls is now the text of reth 2.7. A client that parses the old text can see a different string.

If you go back to 0.9.4, it opens the same database. It does not read the log filter rows.

Stopping safely ​

Send SIGINT (Ctrl-C) or SIGTERM to the process. The node then does these steps:

  1. It stops the JSON-RPC server, the mempool prewarm, the transaction checks and P2P.
  2. It prints stopping: writing in-memory canonical blocks.
  3. It waits for the writer thread and writes all canonical blocks that are still in memory.
  4. It closes the database. The exit status is 0 if the writes succeed and 1 if they fail.

Every database commit is durable (synced). Wait for the process to exit. A forced stop (SIGKILL) loses the blocks that are only in memory. The node then gets them again after the restart.

TIP

The first write after a restart can take long, because the database pages are not in memory yet. One such write took 60 seconds.

After a stop ​

When Cinder starts again, its database head is the last block it wrote. The consensus client sends the current head, and the node gets the blocks between the two as described in Missing blocks.

The writer thread writes several blocks in one database transaction when blocks are waiting. This makes the node faster when it is behind. Over P2P, the node wrote 352 blocks in 10 minutes (197 before a block on an unwritten parent could use that parent's trie nodes).

A mainnet slot is 12 seconds. 10 minutes are 50 blocks of the chain. So the node gains about 300 blocks in 10 minutes in this measurement. Your speed depends on the disk and on the other load on the machine.

A later record measured a long catch-up. After a stop of about one week, the node got about 54 000 blocks over P2P in 10.25 hours, 1.46 blocks per second (live mainnet, dedicated server). Read Warm-up after a restart.

When more than 4 canonical blocks deeper than the persist depth are not written yet, newPayload waits for the writer. Forks do not count. This limit keeps memory and the root work bounded.