json-rpc
Posts on the JSON-RPC server of Cinder: the methods it serves, how its answers compare with reth and how fast it answers.
- The cost of metrics: nothing we can measure when off, a few percent on the cheapest calls when onCinder 1.0 gets a Prometheus endpoint. We measured what it costs on engine_newPayload and on JSON-RPC throughput, each with an A/A control. Off, the default, the data show no cost above about 3%. On, newPayload shows no cost above about 5% of the block time, and the cheapest JSON-RPC calls lose 2% to 11% of their throughput. An independent review found that the first version counted every call even with the endpoint off, so we changed it before the measurement that counts.
- Cinder 0.9.7: security fixes, a read-ahead for runs of slots, and two answers that stopped the releaseCinder 0.9.7 fixes security issues in P2P, node discovery, the Engine API, the JSON-RPC server, the transaction pool and the tracers. Block execution now reads ahead in runs of storage slots, and the database file grows more slowly. The release checks of two candidates found two differences from reth: a vmTrace step and the form of a filter id. The final check compared 67 256 answers with reth 2.7: 0 others.
- Cinder 0.9.6: smaller answers, and three bugs that new tests found firstCinder 0.9.6 compresses JSON-RPC answers over HTTP when the request asks for it, as reth does. The answers become 4.5 to 10.7 times smaller for 1.7 to 3.1 ms of CPU per MB. Before the release, new tests found three real bugs in reorgs and the transaction pool. The release check then compared 57 220 answers with reth 2.7: 0 others.
- Sparse eth_getLogs: the header bloom says yes too oftenOn mainnet today, the log bloom in a block header lets a rare address or topic through on 31 to 46% of blocks. Only 0.1 to 0.5% of blocks have a match. Cinder 0.9.5 keeps a small row of log key fingerprints for each block. Against reth 2.7 on the same head, sparse queries over 10 000 blocks got 113 to 143 times the requests per second. All 1 195 compared answers were equal.
- What the 0.9.5 release check found before the releaseBefore each release, Cinder runs for one hour on live mainnet next to reth and compares its JSON-RPC answers with reth's. For 0.9.5, the checks of the release candidates found three differences. eth_createAccessList saw the wrong base fee. A revert reason lost its text after a NUL byte. Long revert reasons were cut. Each one stopped the release until it had a fix. The final check compared 68 232 answers: 67 316 equal, 913 by design, 0 others.
- 113 equal answers was the wrong numberOne JSON-RPC request for each method gave the same answer on Cinder and reth 2.7 for 113 of 114 methods. A matrix of 3 811 scenarios then found 1 102 new differences. These are the data, the bugs that the independent reviews found in our fixes, and the reason for each fix.
- A server of its own: how we test Cinder against rethWhy Cinder's measurements moved to a dedicated server, and how each mainnet block is compared with reth. What the first days there found: a 16 ms gap cut to 4, leaks, write stalls, reorg faults, and the trade-offs behind each change.
- Byte for byte with reth: how we check a new execution clientFour layers of checks, from the Ethereum test suite to a live diff of every JSON-RPC answer. And the false alarms that each layer taught us to read.