ZooBC wiki
Running a node

Running a node

A ZooBC node is the ZooBC software running on a computer. It keeps a copy of the chain, checks every block and transaction against the same rules as every other node, and serves a public HTTP API. Anyone can run one, and a node that only follows the chain already lets its owner check everything without trusting anyone. Making blocks is a separate step: a node does that only once it holds a seat in the node registry and its seats.

What a node runs

A node is one process, started as zoobc-node --start node.conf, with one SQLite database. It listens on three ports:

PortUse
8001the peer-to-peer network
8080the HTTP API, which also serves the web wallet
8545the Ethereum-style RPC adapter used by [[metamaskMetaMask]], on the node's own machine (loopback) by default

A node never builds a genesis block. Block 0 must already be in its database, and that block's hash is the chain's identity (see genesis block). If a node finds itself stuck on a branch it cannot leave ("wedged"), it discards its chain and rebuilds itself from the snapshots anchored in the spine chain, because the auto_resync setting is on by default. A release can also ship a release pin, a known spine block that the node's own spine must match. New versions arrive through an updater that runs beside the node and that the owner controls (releases and updates).

From switched on to making blocks

  1. The operator creates two keys: a node key for the machine and an owner key in a wallet (keys of a node).
  2. The owner sends a registration that locks a stake and carries a proof that the two keys belong together (registering a node).
  3. The node waits in a public queue ordered by stake multiplied by time waited (queue).
  4. An admission timer lets in one node at a time, at a slow pace the protocol sets (admission pace).
  5. Once admitted, the node is drawn to make blocks (draw), relays blocks and transactions to its assigned peers (receipts and the network topology) and, after a short maturity, shares the rewards (maturity and earnings).

Each chain starts with 11 genesis seats held by the ZooBC Foundation. Everyone else joins through the queue, and nobody picks who gets in. No seat is granted by hand, and none can be won with computing power as in Proof of Work.

Staying in the registry

A seat is kept by doing the work. A registered node that skips a turn it was drawn for, for any reason, becomes missing until it makes its next own block. While missing it earns nothing, and its participation score falls by 5 points (out of 100) per score unit, which is 12 hours on a network of fewer than 2,880 nodes. Receipts it signs and pings do not end that state; only its own next block does.

At the fourth missed turn in a row the node is also suspended: it leaves the producer draw but keeps its seat. When it is back online, its software sends a ping, a small fee-free transaction that only a suspended node may send, which returns it to the draw on probation. If the score reaches zero, the node is expelled. The details are in missed turns, suspension and expulsion; every way a seat can end is in leaving the registry, and all the numbers are in node parameters on mainnet.

See also

Articles in this topic