Install a node
A 0G mainnet node from the latest snapshot: unpack the official Aristotle release, run one command against its 0g-home, then start geth and 0gchaind.
One command
First the official release, which carries the binaries, the configs and the genesis: 0gchain-Aristotle releases ↗. Unpack it, then from the directory that holds aristotle-v1.0.6/:
With options:
| --home DIR | the release's 0g-home (it has 0gchaind-home/ and geth-home/), or a copy of it anywhere with enough disk. Its 0gchaind-home/config must exist. |
| --release DIR | where bin/0gchaind and bin/geth are, to check their versions. Default: the directory above --home. |
| --jobs N | parallel downloads, default 8. On a 1 Gbit/s line 8–16 saturate it. |
| --force-version | install even if your binaries are other versions. Do not, unless you know why. |
What happens
- Checks. Linux x86_64, curl, zstd, tar, python3, sha256sum; your 0gchaind and geth versions against the manifest; free disk; an empty
geth-home/geth/chaindataand noapplication.db,state.dborblockstore.dbin0gchaind-home/data. - Download. All parts at once. Each part's sha256 is checked while it streams; byte ranges of the big geth freezer files are written straight to their place, small files unpack from tar — no archive is ever stored.
- Configure. persistent_peers in config.toml if yours are empty. Keys are never overwritten: if the release has no
priv_validator_key.jsonornode_key.json(it ships none), new ones are created with0gchaind init— 0gchaind will not start without them.priv_validator_state.jsonstarts at height 0.
Start it
From the release directory, geth first, then 0gchaind — the same flags the official guide uses, with your paths:
./bin/geth --config geth-config.toml --datadir 0g-home/geth-home \ --networkid 16661 --authrpc.addr 127.0.0.1 --authrpc.port 8551 \ --authrpc.jwtsecret jwt.hex ./bin/0gchaind start --home 0g-home/0gchaind-home \ --chaincfg.kzg.trusted-setup-path=kzg-trusted-setup.json \ --chaincfg.engine.jwt-secret-path=jwt.hex \ --chaincfg.block-store-service.enabled \ --pruning=custom --pruning-keep-recent=100 --pruning-interval=19
First minute. 0gchaind replays the last block of the snapshot through geth (the node was stopped in the middle of it), then asks peers for the blocks produced since.
Then. It catches up through blocksync, geth executing each payload. On our server that runs at several blocks a second, so a snapshot from half an hour ago is behind by a couple of thousand blocks.
Stopping. Stop geth with SIGINT and give it time (we use TimeoutStopSec=600). A killed geth loses the state it kept in memory, comes back behind 0gchaind, and the node stops on payload status is INVALID — that is how our own node lost eighteen days in September.