CHAIN connecting…

Run a node, keep a copy of the chain

Check Dznye Chain yourself: run a follower node, keep an archive anywhere, start from a snapshot, join the peer network, or become a validator. Commands included.

You never have to trust us about the chain. Anyone can download every block and check every rule and signature. The more people who keep a copy, the harder the chain is to lose or rewrite. This page shows how, from easiest to most involved.

You need Node.js 24 (nothing else) and a copy of the chain's code from the chain/ folder of the repository.

Follow and check (the easy way)

A follower holds no key. It copies every block, checks every rule and signature, and raises an alert if anything is wrong.

node chain/node/server.mjs --follow https://api.dznye.com --data ./dznye-data

It serves the same read API on your own computer (port 8787), so you can use it as your own private node.

Keep an archive

An archive is the whole chain as plain files: blocks in groups of 1,000, and an index that lists every file with its checksum. Keep one anywhere: a folder, a USB stick, a git repository, a web server, cloud storage, IPFS.

node chain/archive.mjs update --node https://api.dznye.com --out ./dznye-archive

Run it again any time: only new blocks are fetched, and finished files never change, so every old copy stays valid. The chain also publishes its own archive at chain.dznye.com/archive/index.json. A node can start from any archive, and still checks every block:

node chain/node/server.mjs --follow ./dznye-archive,https://api.dznye.com --data ./dznye-data

Start from a snapshot (fast)

Replaying a long history takes time. A node can instead start from a recent snapshot: the whole state at one block. Take the block's hash from several nodes you trust (the status page and GET / show it), and start with it:

SNAPSHOT_FROM=https://api.dznye.com TRUST_HASH=<that hash> node chain/node/server.mjs --follow https://api.dznye.com --data ./dznye-data

The snapshot is used only if its block has exactly that hash and the state matches the block's fingerprint. Everything after it is checked as usual.

Join the peer network

--follow accepts several sources, separated by commas: nodes and archives. A follower copies from all of them, carries on when any one dies, and raises an alert if one shows a different history. Nodes also share the places they know at GET /peers. If your node has a public address, it can announce itself:

PUBLIC_URL=https://my-node.example.org node chain/node/server.mjs --follow https://api.dznye.com --host 0.0.0.0 --data ./dznye-data

An announced address is only listed after the others check that it really holds this chain, and private network addresses are never accepted.

Watch several nodes

node chain/launch/check.mjs https://api.dznye.com https://my-node.example.org --genesis chain/launch/dznye-1.genesis.json

This checks that the nodes run the same chain, agree on the latest block, and are not behind. It exits with 0 when healthy, 1 when something needs attention, and 2 for a fork. It also prints a snapshot hash several nodes agree on.

Become a validator

Validators take part in agreeing blocks, so there is a little more to it. Independent operators are welcome, and every new validator makes the network stronger:

  1. Make a key for the validator: node chain/cli.mjs key new validator.json. Keep it on one machine only.
  2. Run a node with that key and the other validators as peers. Copy chain/launch/validator.env.example and fill it in, then node chain/node/server.mjs --env validator.env --data /var/lib/dznye.
  3. Get at least 1,000 DZY into the same account and stake it. See validators and staking.
  4. Keep it running. A systemd service file is in chain/launch/dznye-node.service.

The complete step-by-step is the runbook: chain/launch/RUNBOOK.md. It covers keys, the genesis file, handing over to staking, watching for problems, what to do when things go wrong, and coordinated upgrades.

Settings reference

SettingMeans
--follow <sources>Where to copy from: node addresses and archives, comma-separated.
--data <folder>Where this node keeps its data. One node per folder.
--port, --hostWhere it listens (8787; 127.0.0.1 unless you say 0.0.0.0).
GENESISThe genesis file: sets the chain and checks its hash.
VALIDATOR_ADDRESS, VALIDATOR_SECRET, PEERSA validator's key and the other validators' addresses.
SNAPSHOT_EVERYKeep a snapshot every this many blocks (default 1000).
SNAPSHOT_FROM, TRUST_HASHStart an empty node from a snapshot with this block hash.
PUBLIC_URLThis node's public address, to announce it.
HALT_HEIGHTStop at this block, for a planned upgrade.