On this page
  1. §0 The area in one paragraph
  2. §1 The liveness row and the unit clock
  3. §2 The score road: loss, climb, effective score
  4. §3 One block's transitions
  5. §4 Suspension and its exits
  6. §5 Expulsion at score zero, and the floor
  7. §6 Signs of life: receipts and pings
  8. §7 Income: missing, maturity, the payout view
  9. §8 The pre-genesis roll call (type 61)
  10. §9 The leaving registered node (the exit hold)
  11. §10 The previous blocksmith, demoted to round 10
  12. §11 The fork weigher's replay parity
  13. §12 Survival mode
  14. §13 Consensus and local; summary of defects

36 — Liveness and the score road: missing, the unit clock, suspension, expulsion at zero, maturity, the roll call, survival mode

Edition 0.6.1 · verified against the reference implementation, version 0.6.1

Out of scope the draw itself and the timing windows (20); the coinbase lottery and the longevity payout that ask who earns (21, 22); registration, the queue, admission and its pace, the exit and claim transactions, key rotation (09); the receipt cap and the receipts themselves (23); the equivocation reports that also charge a miss (35); the fork weigher that replays this state (24); the governance, release and bridge transactions survival mode freezes (17, 34)

§0 The area in one paragraph

Every registered node has a participation score (stored, 0 … 10¹³, each starting at 20 %, genesis registered nodes included) and a node_liveness row. A node is missing from the first turn it was drawn for and skipped — present or absent — until its next own block; a suspended node also counts as missing. While missing it earns nothing and its score falls by 5 points of 100 per unit, prorated per block; a unit is max(n, 2,880 blocks) (n = the selectable nodes the block was drawn over; DevNet 120), so below 2,880 nodes a silent node at 20 / 60 / 100 % reaches zero after 2 / 6 / 10 days. Its own blocks move the score by the receipts they carry, climbing eight times slower than missing falls (score_climb_ratio 8: 0 → 100 % in 80 days of perfect work, a full block being one receipt per priority peer of either kind, 23). The fall is not written block by block: a unit clock advances one unit's share per block, and a missing node's effective score is its stored score less the loss since its missing stretch began. At the fourth consecutive miss a node is suspended (out of the draw), never within 20 blocks of its last own block; a suspended node may send a ping, which returns it to the draw on probation without erasing its misses. A published receipt only moves "last seen". Score zero is the only way out: the node is expelled — 10 % of its lock to the longevity pool, the rest back — never leaving fewer than three registered nodes, the least recently seen going first. A newcomer earns only once it has produced a block and four units have passed since its admission. Before and just after genesis a roll call keeps absent genesis registered nodes out of the draw and removes them at the end of a 20-block window. The previous block's blocksmith stays in the draw but only from round 10. When fewer than survival_min_producers distinct nodes produced the last 120 blocks the chain is in survival mode: it keeps producing, but expulsions pause, the governance and bridge transactions are refused, and the oracle, bridge and release-governance resolutions wait until enough blocksmiths are back. All of it is consensus, versioned for rollback, carried in snapshots, and replayed along a competing branch by the same step function.

§1 The liveness row and the unit clock

Purpose. The per-node and per-block state the mechanism reads and writes.

Inputs. Applied blocks; admissions (09); the score-road parameters (32 §3).

Output and effect. One versioned row per node in node_liveness(node_id, misses, produced, suspended_height, last_seen_height, latest, height, suspension_since, last_block_height, missing_clock, admitted_clock, last_miss_height):

column meaning
misses consecutive missed turns since the node's last own block (a skipped draw, a proven double-sign or a proven double vote, 35)
produced blocks produced since its admission
suspended_height 0 = not suspended; else the block that suspended it
suspension_since the first block of the current unbroken suspension; 0 when not suspended
last_seen_height the latest sign of life: own block, a receipt's reference block, a ping's reference block
last_block_height the node's last own block; at admission the admission block (a node never seen counts its unseen time from admission)
missing_clock the unit-clock reading its current missing stretch began at (0 when not missing)
admitted_clock the unit-clock reading at its admission (the maturity)
last_miss_height the block of its last missed turn or of its last suspension (the exit hold, §9)
latest, height the version markers; the state at h is the newest row with height ≤ h

Data model. node_liveness: node_id (64-bit signed integer, the registry id) and height (32-bit, the block that wrote the row) are the key; every other column above is an integer (misses, produced 32-bit; heights 32-bit; missing_clock, admitted_clock 64-bit); latest is 1 on the newest row of a node and 0 on the others. A change at block h writes a new row with height = h (replacing a row already written at h) and moves latest to it; the state of a node at h is its newest row with height ≤ h. A pop-off to target deletes every row with height > target and sets latest = 1 on the newest remaining row of each node. score_unit_clock: height (the key), clock (64-bit), unit (64-bit); one row per applied block; a pop-off deletes the rows above the target. liveness_expulsion: node_public_key (32 bytes), height; one row per expulsion; a pop-off deletes the rows above the target. roll_call: node_id (the key), answered (0/1), height; a pop-off deletes the rows above the target. All four are snapshot state tables (26) and are listed in 07.

Missing(r) = misses > 0 or suspended_height > 0. Admission (09) writes a fresh row: last_seen_height = last_block_height = h, admitted_clock = the clock at h − 1, everything else 0. The unit clock is a table score_unit_clock(height, clock, unit): every applied block appends clock(h) = clock(h − 1) + 10¹² div unit(h) with unit(h) = max(n, score_unit_floor_blocks) (never 0; n = the size of the draw set block h was drawn over); 10¹² ticks are one unit whatever its length in blocks. clock_at(h) = the clock of the newest row at or below h, 0 when none.

How to compute it. As stated; the rows of every changed node are written after the block's step (§3), the clock row last.

Rule activation. liveness_miss_rule, active from height 0 on every chain. Its warm-up (29 §4a, 0): while Accumulating but not Active, misses are counted and nothing is suspended, lifted or expelled.

Rejections and errors. None; a failed read of a row or of the clock fails the block.

Vector. computed: the TestNet parameters, 11 selectable nodes: unit = max(11, 2,880) = 2,880; the clock advances 10¹² div 2,880 = 347,222,222 ticks per block. DevNet (score_unit_floor_blocks 120): unit 120, 8,333,333,333 per block.

Test cases · §1

2 cases · 2 valid

The unit clock on the testnet (11 registered nodes)36-1-testnet-clockvalid

Loading the test widget…

The unit clock with a floor of 120 blocks36-1-devnet-clockvalid

Loading the test widget…

Defects to match. The step truncates (10¹² div unit), so a unit of blocks is slightly less than 10¹² ticks (2,880 × 347,222,222 = 999,999,999,360); every node truncates the same way.

§2 The score road: loss, climb, effective score

Purpose. The numbers by which a score falls while missing and climbs with own blocks.

Inputs. score_loss_per_unit_bps (500), score_climb_ratio (8), score_unit_floor_blocks (2,880; DevNet 120), batch_receipt_lookback_height (40), linked_receipt_score / unlinked_receipt_score (1 / 1), decrease_score_divider (2), block_time_interval (15), default_participation_score (2 × 10¹²); the receipt cap and |R| (23). A parameter absent from the chain's table takes the compiled default named here (score_climb_ratio 8, score_unit_floor_blocks 2,880, score_loss_per_unit_bps 500).

Output and effect. loss_per_unit = 10¹³ div 10,000 × clamp(score_loss_per_unit_bps, 0, 10,000) = 5 × 10¹¹; climb_per_unit = loss_per_unit div max(1, score_climb_ratio) = 62,500,000,000. Missing loss over ticks clock ticks = min(ticks × loss_per_unit div 10¹², 10¹³) (128-bit, rounded down, 0 for ticks ≤ 0). Effective score = for a node not missing its stored score; for a missing one max(stored − loss(clock − missing_clock), 0).

An own block at h moves the blocksmith's score by a delta computed from receipt_score, the cap, |R| and n:

  • receipt_score = Σ over the block's published receipts of linked_receipt_score (a linked receipt) or unlinked_receipt_score (an unlinked one);
  • cap = the receipt cap (min(|S| − 1, P) under rule small_n_measurement, 23); pivot = cap div 2, half = max(1, cap div 2); with cap = 0: pivot = (P − 1) div 2 and half = max(1, P div 2), P = the priority-peer count max(2, max_assigned_peers) (32 §3);
  • at or above the pivot (receipt_score ≥ pivot): cap_eff = cap > 0 ? cap : P; full = cap_eff × max(1, min(linked_receipt_score, unlinked_receipt_score)); span = max(1, full − pivot); got = min(receipt_score, full) − pivot; delta = got × climb_per_unit × n div (span × unit(n)) in 128-bit, clamped to 10¹³. A block carrying the full set (one receipt per priority peer, of whatever kind) climbs exactly climb_per_unit × n div unit(n); more receipts than the full set climb no more; fewer climb in proportion;
  • below the pivot: delta = −((pivot − receipt_score) × max(0, |R|) × drift div half) with drift = 10¹³ div blocks_per_week div max(1, decrease_score_divider) (blocks_per_week = 604,800 div block_time_interval = 40,320) = 124,007,936 (32 §3), clamped to −10¹³.

The delta applies only from h ≥ batch_receipt_lookback_height. Scores are clamped to [0, 10¹³]. Every registered node starts at default_participation_score (20 %), genesis registered nodes included.

How to compute it. 128-bit intermediates, division toward zero, as written.

Rule activation. liveness_miss_rule, small_n_measurement, receipt_count_active, active from height 0 on every chain.

Rejections and errors. None.

Vector. computed (TestNet parameters, 11 registered nodes, unit 2,880 blocks = 12 h): a silent node at 20 % (2 × 10¹²) reaches 0 after 4 units = 2 days: its effective score first reads 0 at the 11,521st block after its first missed turn (the truncated step makes 11,520 blocks 999,999,999,360 × 4 ticks, a loss of 1,999,999,998,720 that leaves 1,280); at 60 % after 12 units (6 days); at 100 % after 20 units (10 days). Per block a missing node loses 347,222,222 × 5 × 10¹¹ div 10¹² = 173,611,111. One own block over the 11-node draw (cap = min(11 − 1, max_assigned_peers 12) = 10: pivot 5, full 10, span 5) with the full set of 10 receipts: 5 × 62,500,000,000 × 11 div (5 × 2,880) = 238,715,277; with 7 receipts: 2 × 62,500,000,000 × 11 div (5 × 2,880) = 95,486,111; with 3 receipts (below the pivot, |R| = 11): −(2 × 11 × 124,007,936 div 5) = −545,634,918. A perfect blocksmith climbs 6.25 × 10¹⁰ per unit: 0 → 100 % in 160 units = 80 days; from the 20 % start, 128 units = 64 days. DevNet: 20 % → 0 at the 481st block (2 h; 480 blocks lose 1,999,999,999,920 and leave 80).

Test cases · §2

8 cases · 8 valid

An own block with the full set of 10 receipts36-2-full-setvalid

Loading the test widget…

An own block with 7 receipts36-2-sevenvalid

Loading the test widget…

An own block with 3 receipts (below the pivot)36-2-threevalid

Loading the test widget…

A silent node at 20 % reaches zero after 4 units36-2-silent-20valid

Loading the test widget…

A silent node at 60 % reaches zero after 12 units36-2-silent-60valid

Loading the test widget…

A silent node at 100 % reaches zero after 20 units36-2-silent-100valid

Loading the test widget…

A perfect blocksmith climbs from 0 to 100 % in 160 units36-2-climb-from-zerovalid

Loading the test widget…

DevNet: 20 % to zero in 480 blocks36-2-devnet-20valid

Loading the test widget…

Defects to match. A block with exactly pivot receipts climbs 0; a blocksmith's own blocks below the receipt lookback height do not move its score unless it was missing (§3). The drift's fallback block time is 10 s (32 §3).

§3 One block's transitions

Purpose. What one applied block does to the rows and the scores.

Inputs. The block at h; its draw set (20: the selectable nodes it was validated against); the blocksmith and the skipped nodes = every distinct node drawn before the blocksmith (the same list the score uses); the registry after the block; the block's published receipts (signer, reference height); its pings (§6); |R| = the registry size at h − 1 (rule receipt_count_active); the survival flag at h (§12).

Output and effect. In order:

  1. The clock advances (§1).
  2. The blocksmith: score = its effective score (the loss settled up to and including this block) plus the receipt delta (§2, from the lookback height); written when the node was missing or the delta applies. Then misses = 0, produced += 1, last_seen_height = last_block_height = h, missing_clock = 0; a suspension is lifted (suspended_height = suspension_since = 0).
  3. Pings (§6), each from a node other than the blocksmith that is suspended with ref ≥ suspended_height: the suspension is lifted (with consequences) and last_seen_height = max(last_seen, ref); its misses and its loss stay.
  4. Receipts: each signer's last_seen_height = max(last_seen, ref); nothing else.
  5. Misses: each distinct skipped node (not the blocksmith) gets a miss: if not yet missing, missing_clock = clock(h); misses += 1, last_miss_height = h; with consequences, when misses ≥ liveness_miss_limit (4), not suspended yet, and not h − last_block_height < 20 (LIVENESS_SUSPENSION_FLOOR_BLOCKS, counted from its last own block) → suspended (suspended_height = suspension_since = h).
  6. Expulsion at zero (§5), skipped entirely while the survival flag at h is true (§12).

The rows changed are written, every changed score through the participation-score writer (one ledger row of the score history each), then the clock row. A sign of life (a receipt signer or a ping key) that is not in the registry is noted against its node record; a failed note fails the block. A registered blocksmith whose own block never made it — it was drawn and skipped, whatever the reason — has exactly the miss of step 5 and nothing else. That covers a block every node refuses as invalid — for instance one carrying a spent foreign-carrier id or one id twice ("ForeignCarrierReplayed", 19), or an Ethereum carrier whose nonce is not its sender's account nonce ("ForeignCarrierNonce: carrier nonce N, account nonce M (a block carrying it is invalid)", 34 §10): the block is lost, the blocksmith's turn passes to the next in the order (it cannot sign a second block over the same parent, 35 §1), and the miss is the whole consequence on the chain. It also covers a re-sent block that arrived after its height was taken (35 §1). The P2P invalid-block strike (28 §6, 27 §9) falls only on a relaying peer whose call is not bound to a registered node's key, and only for a block refused before it is applied (the transport caps, the serialized size, the header checks of an ids-only copy, or block validation: ForeignCarrierReplayed is one); a registered relayer of an invalid block is not struck. A block that passes block validation and fails when it is applied strikes no relayer at all: ForeignCarrierNonce is such a refusal (the nonce is judged where the transaction is applied, 34 §10): the block is only logged as rejected. A block already applied is bounced as a duplicate with no strike at all.

How to compute it. As the list; a skipped node that also signed a receipt is still charged (only its own block clears a miss).

Rule activation. liveness_miss_rule, liveness_attestation (pings), floor_spares_recent, floor_on_draw_set, active from height 0 on every chain; survival_mode for step 6 (§12).

Rejections and errors. None; a failed read fails the block, and so does a failure to compute the draw the skipped list comes from (never "nobody missed").

Vector. computed (TestNet parameters, unit 2,880, clock step 347,222,222).

  • INPUT: node X's row at height 999: misses 0, produced 40, suspended_height 0, suspension_since 0, last_seen_height 970, last_block_height 970, missing_clock 0, admitted_clock 0, last_miss_height 0, stored score 2,000,000,000,000, clock(999) = 100,000,000,000; X is drawn in round 1 and skipped at blocks 1,000, 1,001, 1,002 and 1,003.
  • EXPECTED OUTPUT: after 1,000: misses 1, missing_clock 100,347,222,222, last_miss_height 1000; after 1,003: misses 4, suspended_height 1003, suspension_since 1003, last_miss_height 1003, stored score unchanged, effective score at 1,003 = 2,000,000,000,000 − (3 × 347,222,222) × 5 × 10¹¹ div 10¹² = 1,999,479,166,667.
  • The same node with last_block_height 990 reaches misses 4 at 1,003 but is not suspended (1,003 − 990 = 13 < 20).

Test cases · §3

2 cases · 2 valid

Four skipped turns suspend a node; its score falls only in the effective view36-3-four-missesvalid

Loading the test widget…

No suspension within 20 blocks of the node's last own block36-3-floorvalid

Loading the test widget…

Defects to match. The skipped list is the distinct set drawn before the blocksmith, so a node not drawn is never charged; a miss is per block, not per round.

§4 Suspension and its exits

Purpose. Taking a node that keeps skipping out of the draw, and the ways back.

Inputs. The rows; the selectable set for the next block.

Output and effect. The draw set for the block after prev is the registry (with the roll call of §8 applied) minus the nodes suspended at prev; when that would be empty, every active node is drawn again (so the chain cannot halt; the first to produce lifts itself). A suspended node counts as missing: it earns nothing and keeps losing score. It returns to the draw by producing a block (lift, misses cleared) or by a ping (§6: lift on probation, its misses kept, so its next miss suspends it again). Suspended registered nodes leave every two-thirds count (the admission pace, the readiness gate, the bridge, the oracle, the price votes, the release veto: the counted registered nodes of 09/17/29/34), except the spine, which counts every registered node among its spine signers (25).

How to compute it. Read the registry at prev, apply the roll call (§8), remove every node whose newest liveness row at or below prev has suspended_height > 0; if nothing is left, use the whole registry.

Rule activation. liveness_miss_rule, active from height 0 on every chain.

Rejections and errors. None.

Vector. computed: with 11 registered nodes and one suspended, the draw is over 10; the bridge's two thirds are of the counted 10 (7).

Test cases · §4

2 cases · 2 valid

With 11 registered nodes and one suspended the draw is over 10 and two thirds are 736-4-one-suspendedvalid

Loading the test widget…

With every registered node suspended the whole registry is drawn again36-4-all-suspendedvalid

Loading the test widget…

Defects to match. A newcomer is suspended like anyone; there is no separate newcomer expulsion.

§5 Expulsion at score zero, and the floor

Purpose. The one road out of the registry.

Inputs. The registered nodes after the block; their effective scores; LIVENESS_FLOOR_ACTIVE 3; node_lock_at_risk_bps 1,000; the survival flag at h (§12).

Output and effect. When the survival flag at h is true nothing in this section happens: no candidate is listed, no row is reset, no node is held or suspended by the floor; nodes at zero stay as they are (suspended nodes stay suspended and keep their misses) and are judged again at the first block whose flag is false. Otherwise, with consequences, every registered node whose effective score (its stored score when it has no row) is ≤ 0 is a candidate, ordered by last_seen_height, then score, then id, ascending (rule floor_spares_recent). Walking the list with remaining = the registry size: while remaining > 3 the candidate is expelled (remaining −= 1); else it is held by the floor and, under floor_on_draw_set, suspended (it leaves the draw, counts as missing; missing_clock set if it was not missing, suspended_height = suspension_since = last_miss_height = h). An expelled node's row is fully reset (misses, suspended_height, suspension_since, produced, last_block_height, missing_clock, admitted_clock, last_miss_height = 0, last_seen_height = h) and its score set to 0, so a key that registers again is a newcomer. The registry then removes it (09): status Deleted, a liveness_expulsion(node_public_key, height) row (the API's expelled_height), floor(lock × 1,000 / 10,000) to the longevity pool (ledger event 76), the rest credited to the owner at once; an expulsion during an exit's hold ends the exit (§9).

How to compute it. As stated.

Rule activation. liveness_miss_rule, floor_spares_recent (the order of the candidates: least recently seen first, then the lower score, then the lower id, so the floor spares the most recent signs of life), floor_on_draw_set, active from height 0 on every chain; survival_mode (the pause, §12).

Rejections and errors. None.

Vector. computed: a 100 ZBC lock expelled → 10 ZBC to the pool, 90 ZBC to the owner; with 3 registered nodes a zero-score node is held and suspended instead; in survival mode the same node is neither expelled nor held.

Test cases · §5

3 cases · 3 valid

A 100 ZBC lock expelled: 10 ZBC to the pool, 90 ZBC to the owner36-5-expelledvalid

Loading the test widget…

With 3 registered nodes a zero-score node is held and suspended36-5-floor-heldvalid

Loading the test widget…

In survival mode the same node is neither expelled nor held36-5-survivalvalid

Loading the test widget…

Defects to match. The floor counts the registry, not the selectable set; a held node can sit at zero indefinitely while the registry has three nodes.

§6 Signs of life: receipts and pings

Purpose. What counts as being alive besides an own block.

Inputs. Receipts in a block (23); a QueueAttendance (type 59) whose sender is a registered node's typed key account 00000000 ‖ node key (the ping; the body's first 4 bytes = its reference height, uint32 LE). Any other sender form names no node.

Output and effect. A receipt marks its signer seen at the receipt's reference block and moves only last_seen_height, which orders the floor (§5). A ping is valid only from a node suspended as of h − 1 and only with ref ≥ suspended_height; any other is refused at admission ("Ping: valid only from a suspended node (LV6); this node is in the draw and proves itself by its blocks", "Ping: its reference block r is older than the node's suspension at s (LV6: dated at its reference block)", "Ping: not a registered node's key"). In a block it returns the node to the draw on probation (§3 step 3); it never erases misses or stops the loss. A ping is a fee-free duty (fee exactly 0), relayed and re-sent like any own duty (28). Survival mode does not freeze pings.

How to compute it. As stated.

Rule activation. liveness_attestation, active from height 0 on every chain.

Rejections and errors. The admission strings above (the LV6 inside them is part of the text).

Vector. computed.

  • INPUT: a node suspended at 5,000 (misses 4) sends a QueueAttendance with fee 0 whose body begins 92130000 (reference height 5,010), mined at 5,012. EXPECTED OUTPUT: suspended_height 0, suspension_since 0, last_seen_height 5010, misses 4; its next skipped turn suspends it again.
  • INVALID INPUT: the same transaction with reference height 4,990 (7e130000) → Ping: its reference block 4990 is older than the node's suspension at 5000 (LV6: dated at its reference block).
  • INVALID INPUT: a QueueAttendance from a registered node that is not suspended → Ping: valid only from a suspended node (LV6); this node is in the draw and proves itself by its blocks.

Test cases · §6

5 cases · 2 valid · 3 invalid

A ping returns a suspended node to the draw on probation; its next skipped turn suspends it again36-6-pingvalid

Loading the test widget…

A ping dated at 5,010 from a node suspended at 5,000 is admitted36-6-ping-admittedvalid

Loading the test widget…

A ping dated before the suspension is refused36-6-ping-oldinvalid

Loading the test widget…

A ping from a node in the draw is refused36-6-ping-not-suspendedinvalid

Loading the test widget…

A ping from a key outside the registry is refused36-6-ping-unregisteredinvalid

Loading the test widget…

Defects to match. A receipt never lifts a suspension; a suspended node that only signs receipts stays out of the draw until it pings or a draw that includes it (every node suspended) lets it produce.

§7 Income: missing, maturity, the payout view

Purpose. Who earns at a block.

Inputs. The rows and the unit clock at the payout instant; maturity_units 4; the roll call (§8).

Output and effect. The payout instant for block h is h − 1 (rule payout_instant). A node earns when it is not missing, not left out by the roll call, and mature: a genesis registered node is mature from genesis; a newcomer once produced > 0 and clock − admitted_clock ≥ maturity_units × 10¹² (4 units: 2 days on the TestNet below 2,880 nodes, 480 blocks on the DevNet). Earning covers every payout: the coinbase lottery with the block fees and the longevity slice (21, 22), the storage and archive rewards (11, 26), and the market taker fee of a block it produces (a ZBC taker fee of a blocksmith that earns nothing goes to the lottery like the block fees; a token taker fee is then not taken, 15). When no node can win the lottery the reward waits in the lottery carry (event 75) for the next block's lottery; it never goes to the blocksmith. A failed read of the rows, the clock, the roll call or the blocksmith's owner fails the block. Survival mode does not change who earns.

How to compute it. For each node read its newest liveness row at or below h − 1 and the clock at h − 1; it earns when Missing is false, the roll call does not leave it out and it is mature as stated.

Rule activation. payout_instant, liveness_miss_rule, active from height 0 on every chain.

Rejections and errors. None.

Vector. computed: a node admitted at 10,000 on the TestNet (11 registered nodes) that produces at 10,500 is mature from 10,000 + 4 × 2,880 = 21,520 (it earns from the block after its row shows both). computed (the genesis files, 06): at height 0 every one of the 11 genesis registered nodes of either chain reads "earns":true,"mature":true with participation_score 2,000,000,000,000 on GET /api/v1/nodes (31 §8): mature from genesis, not missing, nothing drawn yet.

Test cases · §7

2 cases · 2 valid · 1 reference

A newcomer admitted at 10,000 that produces at 10,500 is mature from 21,52036-7-maturityvalid

Loading the test widget…

At height 0 every genesis registered node of either chain is mature and earns36-7-genesis-nodevalidreference

Mature from genesis, not missing, nothing drawn yet (31 §8).

A stated value: there is nothing to compute. A compatible node shows the same value.

request
GET /api/v1/nodes
rows
11
value
"participation_score":2000000000000,…,"earns":true,"mature":true

Defects to match. The maturity counts clock units, so a registry above 2,880 registered nodes lengthens it with the unit.

§8 The pre-genesis roll call (type 61)

Purpose. Start the chain only with the genesis registered nodes that are actually present.

Inputs. roll_call_blocks (20 on every chain; builder minimum 2); a RollCall transaction (type 61): a fee-free node duty, empty body, signed by a genesis registered node's node key, its sender the typed key account 00000000 ‖ node key; the roll_call(node_id PK, answered, height) table.

Output and effect. A RollCall is valid only in blocks 1 … roll_call_blocks, once per genesis registered node (registration height 0); anything else is refused at admission and a no-op if mined. Its block records (node_id, answered = 1, height). The draw: block 1 is drawn over every registered node; for blocks 2 … the window's last, once at least half of the genesis registered nodes have answered (answered > 0 and 2 × answered ≥ genesis registered nodes) a genesis registered node whose RollCall is in no earlier block is not selectable and earns nothing; with fewer answers there is no restriction. At the window's last block, after its transactions, every genesis registered node without an answer leaves the registry: a removal, not an expulsion (status Deleted, its lock, if any, back in full, no score road, a roll_call row with answered = 0), never leaving fewer than three registered nodes (then nobody is removed and the score road deals with the absent ones). A genesis registered node sends its RollCall (version 3, an expiry before the window closes) as soon as it runs on the genesis, before the genesis time too, and re-sends it every 120 s until it is mined. The table is rolled back by height and carried in snapshots.

How to compute it. As stated: count the answered genesis registered nodes as of h − 1; if answered > 0 and 2 × answered ≥ genesis registered nodes, drop the unanswered genesis registered nodes from the draw of h; at the window's last block list the unanswered ones and remove them unless fewer than three registered nodes would remain.

Rule activation. None (unconditional).

Rejections and errors. Admission refuses a RollCall outside the window, from a non-genesis key, or from a registered node that answered; a failed read of the answers refuses it too, never "not answered yet", and the node's sender then skips that cycle. /api/v1/nodes shows a registered node whose RollCall waits in the pool as "pending" (31).

Vector. computed: 11 genesis registered nodes (both chains), 7 answer in block 1: blocks 2–20 are drawn over those 7; at block 20 the other 4 leave the registry. With 5 answering (5 × 2 < 11) blocks 2–20 are drawn over all 11. With every node answering in block 1, GET /api/v1/nodes reads "roll_call":{"window_end":20,"open":false,"answered":11,"absent":0,"removed":0,"pending":0,…} from block 20 on, every registered node {"state":"answered","height":1}.

Test cases · §8

3 cases · 3 valid · 1 reference

7 of 11 genesis registered nodes answer: the window draws over 7, 4 leave at its end36-8-seven-of-elevenvalid

Loading the test widget…

5 of 11 answer (5 × 2 < 11): the window draws over all 1136-8-five-of-elevenvalid

Loading the test widget…

Every genesis registered node answers in block 1: the roll call from block 20 on36-8-all-answeredvalidreference

Each registered node's row carries row_roll_call.

A stated value: there is nothing to compute. A compatible node shows the same value.

request
GET /api/v1/nodes
roll_call
{"window_end":20,"open":false,"answered":11,"absent":0,"removed":0,"pending":0,…}
row_roll_call
{"state":"answered","height":1}

Defects to match. The spine's first block after the window is judged against the full genesis list (its required spine signatures still count the removed registered nodes, 25); with 5 or fewer of 11 present the spine cannot start, so the operators check the answers before the genesis time.

§9 The leaving registered node (the exit hold)

Purpose. The score-road side of a registered node's exit (the transactions are 09's).

Inputs. exit_cooldown_blocks (40,320; DevNet 1,680); the node_exit table; last_miss_height.

Output and effect. A registered node whose owner exits stays registered, drawn, producing, earning and on the score road until leave_height = exit block + exit_cooldown_blocks; at that block, after its liveness step, it leaves with its whole lock, or less node_lock_at_risk_bps (to the pool) when it missed a turn or was suspended during the hold (last_miss_height ≥ the exit block) or was missing at the exit. "Missing at the exit" is read as of the exit block's own height (its newest row at or below it, a miss charged earlier in that block counting), the same read a stranger's executed claim makes. Owners are compared as typed accounts, one form each. An expulsion at zero during the hold ends the exit with the expulsion's own rule; in survival mode the hold runs on, since nothing is expelled.

How to compute it. missed = missing_at_exit or (last_miss_height ≠ 0 and last_miss_height ≥ exit block); return = lock when not missed, else lock − floor(lock × node_lock_at_risk_bps / 10,000) (the difference to the longevity pool).

Rule activation. None (unconditional).

Rejections and errors. 09.

Vector. computed (TestNet cooldown): a registered node with a 100 ZBC lock that exits at 50,000 and misses no turn leaves at 90,320 with 100 ZBC; one skipped turn at 60,000 → 90 ZBC, 10 ZBC to the pool.

Test cases · §9

2 cases · 2 valid

A registered node that misses no turn leaves at 90,320 with its whole lock36-9-clean-exitvalid

Loading the test widget…

One skipped turn during the hold costs 10 %36-9-missed-exitvalid

Loading the test widget…

Defects to match. None of its own.

§10 The previous blocksmith, demoted to round 10

Purpose. No node produces twice in a row while another answers, without halting a lone survivor.

Inputs. The previous block's blocksmith; max_priority_blocksmiths (10; the builder caps it).

Output and effect. The previous blocksmith stays in the draw set; its draws in rounds below max_priority_blocksmiths count as round max_priority_blocksmiths (its effective round is max(r, max_priority_blocksmiths)), the last round whose block may still carry transactions. A lone survivor produces every block at round 10 (150 s apart at 15-s rounds, weight D/10, 20).

How to compute it. As stated; 20 applies it to the draw and the windows.

Rule activation. None (unconditional).

Rejections and errors. A block by the previous blocksmith in an earlier round is invalid (20).

Vector. computed: two live nodes A and B; after A produces, B is drawn in round 1 and A only from round 10: B produces next unless silent, else A resumes 150 s late.

Test cases · §10

3 cases · 3 valid · 1 reference

After A produces, A's draws count from round 1036-10-demotedvalid

Loading the test widget…

B, not the previous blocksmith, keeps its round 136-10-not-demotedvalid

Loading the test widget…

A lone previous blocksmith resumes 150 s late36-10-latevalidreference

A stated value: there is nothing to compute. A compatible node shows the same value.

value
B produces next unless silent, else A resumes 150 s late (round 10 at 15-s rounds).

Defects to match. Demotion is by key equality with the previous block's blocksmith.

§11 The fork weigher's replay parity

Purpose. Weigh a competing branch under its own liveness, scores and survival flag (24).

Inputs. The rows, stored scores, registry and unit clock at the common block; the stored survival flag at the common block and the blocksmiths of the main-chain blocks [max(1, common − 119), common]; the branch's blocks.

Output and effect. The replayed liveness state is seeded at the common block and advanced block by block with the branch's own facts through the same step (§3) the chain runs (one function, so the two cannot drift); the branch registry replays the roll call, the exit hold and key changes (24); the equivocation charges of §4 and 35 §7 carried by the branch's blocks are replayed as misses once per pair not charged in the shared history. When survival_min_producers (N, §12) > 0 a survival tracker follows the flag along the branch: it holds the blocksmiths of the last up to 120 blocks (seeded with those of the common block and the 119 below it, oldest first; a main-chain block missing from the seed window is an error and the branch is not weighed), gives each branch block the flag of §12 computed over that window as the "expulsions paused" fact of that block's step where rule survival_mode is active at that height, then appends the block's blocksmith and drops the oldest beyond 120. The weigher reads the replayed suspensions, expulsions and scores.

How to compute it. As stated.

Rule activation. As §1–§5 and §12 at each branch height.

Rejections and errors. None; in memory.

Vector. none.

Test cases · §11

1 case · 1 valid · 1 reference

The fork weigher's replay parity has no vector36-11-nonevalidreference

A stated value: there is nothing to compute. A compatible node shows the same value.

value
none

Defects to match. Admissions along the branch are not replayed (the branch's scratch registry, 24).

§12 Survival mode

Purpose. Keep a chain that has lost most of its blocksmiths running, while freezing what the remaining few could otherwise change alone: governance, the bridge, release governance and expulsions.

Inputs.

  • N = the consensus parameter survival_min_producers (32 §12; the minimum number of distinct blocksmiths), read from the consensus_parameters table: no table or no row → 0; an integer row v → v when v > 0, else 0; a row that is present but not an integer → an error that fails the block being judged. N = 0 means off. Both relaunched chains name 5; the mainnet template names none (off; the genesis builder warns loudly). The builder accepts 0 or 1 … 10,000 and refuses a value above the number of genesis registered nodes − 2 (with one genesis registered node, above 1).
  • The blocksmiths (blocksmith_public_key) of the main-chain blocks at heights [W(h), h − 1] with W(h) = h > 120 ? h − 120 : 1 (SURVIVAL_WINDOW_BLOCKS = 120): at most 120 blocks, fewer below height 121, none at height 1.
  • The stored flag of the parent, survival_state at h − 1 (read; a failed read fails the block; its value does not enter the formula).

Output and effect.

  • The flag the block at height h is judged by: flag(0) = false; for h ≥ 1, flag(h) = (N = 0) ? false : (made < N), made = the number of distinct blocksmith keys in the window. Survival mode therefore ends at the first height whose window holds N or more distinct blocksmiths, and a window of exactly N ends it. With N > 0 a fresh chain starts in survival mode at height 1 (an empty window) and leaves it at the first height whose window holds N distinct blocksmiths.
  • Storage. When N > 0 every applied block at h writes survival_state(height = h, active = flag(h)) (table survival_state: height 32-bit integer, the key; active integer, 1 = true, 0 = false; one row per height, not versioned); when N = 0 no row is written, and a missing row reads false. A pop-off to target deletes the rows with height > target. The table is one of the snapshot's state tables (26: height field height, not versioned, key height), so a fast-synced node continues from the stored flags. Retention: the per-block prune (22) deletes a survival_state row only when its height is below h − (max_rollback_height + 120) + 1 and below the oldest height still counted by a pending event: the smallest newest-attestation height among the unresolved events that are neither parameter votes nor release votes whose survival-adjusted idleness (below) is at most 720, and the smallest vote height among the unresolved release votes whose survival-adjusted age is at most 172,800 + max_rollback_height; the snapshot leaves out exactly the rows that prune deletes, so a joiner and a node that ran the chain hold the same rows. An implementation that recomputes the flag instead of storing it must obtain the same value at every height.
  • While flag(h) is true:
    1. A block at h is invalid when it carries a transaction of the frozen set: the governance category — FeeVoteCommitment (7), FeeVoteReveal (263), RegisterRelease (32), ReleaseAuthorityPropose (33), ReleaseAuthorityAccept (34), RevokeRelease (35), SetConsensusParam (51) — and the bridge category, AttestEvent (17): every attestation, the generic oracle's and the release votes' included.
    2. Admission refuses a transaction of the frozen set judged for the block it would land in (tip + 1); a blocksmith leaves admitted ones in its pool and builds without them (and also holds them when the flag cannot be read); they can enter the first block whose flag is false.
    3. A cycle-end count whose block has the flag true is skipped: the parameter-vote count at the snapshot cycle's last block and the fee-vote count at its count block do nothing, and that cycle's votes and reveals lapse (17).
    4. The liveness step's expulsion scan is skipped (§5): nobody is expelled, no candidate's row is reset, the floor holds and suspends nobody. Nodes at zero are expelled at the first block whose flag is false.
    5. The oracle resolution, the two bridge resolution steps and the release-governance step (22 §13, 17 §4, §6, 34 §4, §6) do not run: the attestations already on chain stay pending and are resolved at the first block whose flag is false. An unreadable flag in any of these steps fails the block.
  • Survival-adjusted ages. Every window that times a pending vote or event counts only the heights outside survival mode: the age of a height v at h is (h − v) − (the number of stored survival rows with height in (v, h] and active = 1). The bridge and oracle idle window (720, 34 §7), the release-vote window (172,800 blocks) and the authority hand-off delay (40,320) read this age wherever rule survival_mode is active (17 §6); a freeze longer than the window therefore does not expire the votes cast before it: they count at the first unfrozen block.
  • Unchanged in survival mode: every other transaction type (payments, registrations, receipts, pings, roll calls, equivocation reports, exits, claims, key changes), suspensions and lifts, scores, misses, income and the draw.
  • The read API GET /api/v1/blockchain/status reports survival_mode (the flag the next block, tip + 1, is judged by; false where the rule is not active at tip + 1), survival_mode_tip (the stored flag at the tip), survival_min_producers (N) and survival_distinct_producers (the count for the window of tip + 1, [W(tip + 1), tip]) (31).

How to compute it.

  1. Read N once per block. If N = 0: the flag is false, write nothing, stop.
  2. Read the parent's stored flag (a failed read fails the block).
  3. made = |{ blocksmith_public_key of main-chain block k : W(h) ≤ k ≤ h − 1 }| (0 when h − 1 < W(h)).
  4. flag(h) = made < N.
  5. Judge the block's transactions, its liveness step and its resolution steps with flag(h), then store (h, flag(h)) with the block.

Rule activation. Rule survival_mode, active from height 0 on every chain (the flag is read and stored only where the rule is active at the block's height; it writes state, so it is not retirable). A chain whose genesis does not name survival_min_producers has N = 0 and never enters survival mode.

Rejections and errors.

  • At admission and in a block, one text: SurvivalMode: transaction type <T> is not accepted while fewer than survival_min_producers distinct producers made the last 120 blocks (survival mode: governance and bridge are frozen until N produce again) (the letter N stands as written; in these texts "producers" means blocksmiths). In a block it comes from the transaction validity that block validation runs at the block's height (19 §2), so the block is invalid with it; the executor's own wording of the same check is never reached, since every transaction it applies has passed that validation.
  • An unreadable flag, N or window: SurvivalMode: the survival state could not be read: … at admission and in a block; in the block's own steps the block fails on this node. A skipped cycle count or a resolution step whose flag cannot be read fails the block too.

Vector. computed (N = 5, both chains):

  • A fresh chain: blocks 1–4 produced by A, B, C, D. flag(1) = (0 < 5) = true … flag(5) = (4 < 5) = true; block 5 by E → flag(6) = (5 < 5) = false. A SetConsensusParam or an AttestEvent in block 5 makes it invalid; in block 6 it is valid, and the oracle, bridge and release steps of block 6 run over everything attested before.
  • At height 10,000 the window is [9,880, 9,999]. If those 120 blocks were produced by 4 distinct keys, flag(10,000) = true and an AttestEvent (17) or a FeeVoteReveal (263) in block 10,000 makes it invalid; a node at score zero in block 10,000's step is not expelled. If they were produced by 5 or more distinct keys, flag(10,000) = false.
  • A release vote cast at 10,000 on a chain whose stored flag is true exactly at heights 10,050 … 10,149 (100 heights): at 182,900 its plain age is 172,900 but its survival-adjusted age 172,800, so it still counts; at 182,901 (adjusted 172,801) it no longer does.
  • GET /api/v1/blockchain/status at tip 10,000 with the four-key window above and flag(10,000) stored true → "survival_mode":true,"survival_mode_tip":true,"survival_min_producers":5,"survival_distinct_producers":4.

Test cases · §12

11 cases · 7 valid · 4 invalid

Survival ends when the fifth blocksmith has made a block36-12-fresh-chainvalid

Loading the test widget…

A SetConsensusParam in block 5 of a fresh chain (N = 5)36-12-frozen-block-5invalid

Loading the test widget…

An AttestEvent in block 5 of the same chain36-12-frozen-block-5-attestinvalid

Loading the test widget…

The same transaction in block 6 is valid36-12-free-block-6valid

Loading the test widget…

At 10,000, four distinct blocksmiths in [9,880, 9,999]: a FeeVoteReveal makes the block invalid36-12-four-blocksmithsinvalid

Loading the test widget…

At 10,000 with four blocksmiths an AttestEvent makes the block invalid36-12-four-blocksmiths-attestinvalid

Loading the test widget…

At 10,000 with five distinct blocksmiths the flag is false36-12-five-blocksmithsvalid

Loading the test widget…

A node at score zero in block 10,000's step, with flag(10,000) true, is not expelled36-12-expulsion-pausedvalid

Loading the test widget…

A release vote cast at 10,000, 100 survival heights later: at 182,900 its adjusted age is 172,80036-12-vote-age-countsvalid

Loading the test widget…

The same vote at 182,901 (adjusted age 172,801) no longer counts36-12-vote-age-lapsedvalid

Loading the test widget…

GET /api/v1/blockchain/status at tip 10,000 with four blocksmiths and flag(10,000) stored true36-12-status-fourvalid

Loading the test widget…

Defects to match. None.

§13 Consensus and local; summary of defects

Consensus: everything in §1–§12 except the RollCall's re-send cadence (§8) — the rows, the unit clock, the score arithmetic, the transitions, the suspension and floor, the expulsion and its lock share, the income view, the roll call's window, draw and removal, the exit hold, the demotion, the survival flag, its stored rows, its retention and its effects. All rules involved are active from height 0 on every chain; the score-road numbers and survival_min_producers are genesis parameters (32 §3, §12).

Defects an implementation must reproduce or know about: (1) the unit step truncates (§1); (2) a block with exactly the pivot of receipts climbs nothing (§2); (3) a receipt never lifts a suspension, only an own block or a ping (§6); (4) the floor counts the registry, so a zero-score node can be held indefinitely at three registered nodes (§5); (5) the maturity lengthens with the unit above 2,880 registered nodes (§7); (6) the spine's first post-window block still counts the roll call's removed registered nodes (§8).

A question about this chapter, or a statement that does not match the network? Discuss on zoobc.pro.