Appearance
Build from source
For the first build, read Install.
PGO and ThinLTO build
A build with profile-guided optimization (PGO) and ThinLTO executes mainnet blocks about 5% faster: 1.049× on the engine benchmark over 196 mainnet blocks. The project kept the build options on 2026-10-01. The project's node runs this build. Train the profile again after large code changes: a profile trained again on the code of 2026-10-12, with 300 mainnet fixtures, gave a further 0.4 ms per block by median.
To make this build, do these steps:
Get mainnet blocks with their execution witnesses from your reth node. The fetcher writes one
.ecfxfile per block:bashpython3 tools/fetch/fetch.py --rpc http://127.0.0.1:8545 --follow 100 --out $DATA/mainnet--follow 100waits for the next 100 blocks, about 20 minutes. In the commands on this page,$DATAis a directory on a disk with enough free space.Train a profile on these blocks. This step builds an instrumented
poc-execand runs it over the files:bashmake pgo-train MAINNET_DIR=$DATA/mainnet LLVM_DIR=/path/to/llvmBuild with the profile and ThinLTO:
bashmake PROFILE=release PGO_USE=build/pgo-data/cinder.profdata LTO=1 LLVM_DIR=/path/to/llvm
The binaries go to build/release-pgo-lto/bin. Each combination of options builds in a directory of its own, so the plain release build stays in build/release. A new profile builds all objects of the PGO build again.
LTO=1 links with ld.lld and makes archives with llvm-ar from LLVM_DIR. In the commands of the other pages, replace build/release/bin with build/release-pgo-lto/bin if you use this build.
Measured with poc-exec --bench 3 over 196 mainnet blocks that the profile was not trained on, each block with the two builds one after the other on one pinned core:
| Build | Total | Geomean | Median |
|---|---|---|---|
| ThinLTO only | 1.020× | 1.008× | 1.010× |
| PGO only | 1.029× | 1.021× | 1.019× |
| PGO and ThinLTO | 1.049× | 1.049× | 1.040× |
The EEST suites and the mainnet blocks that poc-exec checks (39 of 39) give identical results with this build. poc-exec spends much of its time on witness checks, which the node does not do. So the gain on the node can be larger than these numbers.
Build requirements
- Linux on x86-64. The CPU must have the x86-64-v3 instructions and ADX, SHA and AES. Read Hardware requirements.
- clang. GCC 15.2.0 miscompiles the vendored cryptography code.
make PROFILE=releasebuilds with-O3 -march=x86-64-v3 -madx -msha.ARCHsets the target: the default isx86-64-v3.ARCH=nativebuilds for the CPU of the build machine only, inbuild/release-native. Other values go to-marchwithout a change, for exampleARCH=znver3. The debug build and all vendored libraries use the sameARCH.- A release binary must not have instructions above the target. To examine the binaries, run
python3 tools/check_isa.py build/release/bin/cinder build/release/bin/statetest. - Each program examines the CPU when it starts (
src/util/cn_cpu.c). On a CPU without a necessary instruction, it stops with exit status 1 and a message, not withIllegal instruction.