{
 "format": "zoobc-conformance-vectors/1",
 "edition": "0.6.1",
 "chapter": "22",
 "license": "CC BY 4.0, ZooBC Foundation",
 "cases": [
  {
   "id": "22-1-h-480",
   "chapter": "22",
   "section": "1",
   "title": "Height 480 on the testnet",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "false",
    "height": "480"
   },
   "expected": {
    "count": "no",
    "p11": "true",
    "epoch": "1",
    "seed_block": "240"
   }
  },
  {
   "id": "22-1-h-12480",
   "chapter": "22",
   "section": "1",
   "title": "Height 12,480 on the testnet",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "false",
    "height": "12480"
   },
   "expected": {
    "count": "no",
    "p11": "true",
    "epoch": "51",
    "seed_block": "12240"
   }
  },
  {
   "id": "22-1-h-172800",
   "chapter": "22",
   "section": "1",
   "title": "Height 172,800: the cycle's last block",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "false",
    "height": "172800"
   },
   "expected": {
    "count": "count",
    "p11": "true",
    "epoch": "719",
    "seed_block": "172560"
   }
  },
  {
   "id": "22-1-h-172800-survival",
   "chapter": "22",
   "section": "1",
   "title": "Height 172,800 judged in survival mode",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "true",
    "height": "172800"
   },
   "expected": {
    "count": "skipped",
    "p11": "true"
   }
  },
  {
   "id": "22-1-h-240",
   "chapter": "22",
   "section": "1",
   "title": "Height 240: P11 waits for two epochs",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "false",
    "height": "240"
   },
   "expected": {
    "count": "no",
    "p11": "false"
   }
  },
  {
   "id": "22-1-rent-exempt",
   "chapter": "22",
   "section": "1",
   "title": "The addresses exempt from account rent",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "longevity_pool": "000000005a42434c4f4e4756000000000000000000000000000000000000000000000000",
    "storage_pool": "000000005a424353544f5245000000000000000000000000000000000000000000000000",
    "carry": "000000005a42434341525259000000000000000000000000000000000000000000000000",
    "apps_pool": "000000005a42434150505300000000000000000000000000000000000000000000000000",
    "datasets": "every ZBS_ address (account type 10)"
   }
  },
  {
   "id": "22-2-due",
   "chapter": "22",
   "section": "2",
   "title": "Escrow 7, the previous block stamped one second past its timeout",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1793700000",
    "clock": "1793700001",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "0",
    "height": "12000",
    "block_timestamp": "1793700016",
    "block_height": "11000"
   },
   "expected": {
    "due": "true",
    "zbc_refund": "101000000",
    "token_return": "0"
   }
  },
  {
   "id": "22-2-rows",
   "chapter": "22",
   "section": "2",
   "title": "Escrow 7's ledger row and new version",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1793700000",
    "clock": "1793700001",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "0",
    "height": "12000",
    "block_timestamp": "1793700016",
    "block_height": "11000"
   },
   "expected": {
    "ledger": "sender +101000000, height 12000, transaction id 7, timestamp 1793700016, event 9",
    "escrow": "status 3 at 12000"
   }
  },
  {
   "id": "22-2-not-due",
   "chapter": "22",
   "section": "2",
   "title": "The previous block stamped exactly at the timeout",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1793700000",
    "clock": "1793700000",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "0",
    "height": "12000",
    "block_timestamp": "1793700016",
    "block_height": "11000"
   },
   "expected": {
    "due": "false",
    "zbc_refund": "0",
    "ledger": "none",
    "escrow": "status 0"
   }
  },
  {
   "id": "22-2-token",
   "chapter": "22",
   "section": "2",
   "title": "A token escrow returns its units and refunds only the commission",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1793700000",
    "clock": "1793700001",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "5",
    "height": "12000",
    "block_timestamp": "1793700016",
    "block_height": "11000"
   },
   "expected": {
    "due": "true",
    "zbc_refund": "1000000",
    "token_return": "100000000"
   }
  },
  {
   "id": "22-2-horizon",
   "chapter": "22",
   "section": "2",
   "title": "An escrow of height 12,500 at block 345,600: below the horizon, expired whatever its timeout",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1893456000",
    "clock": "1793700001",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "0",
    "height": "345600",
    "block_timestamp": "1793700016",
    "block_height": "12500",
    "interval": "172800",
    "min_height": "760"
   },
   "expected": {
    "due": "true",
    "zbc_refund": "101000000",
    "escrow": "status 3 at 345600"
   },
   "note": "horizon(345,600) = 172,800 (12 §5): the escrow row's own block_height 12,500 is below it."
  },
  {
   "id": "22-2-horizon-early",
   "chapter": "22",
   "section": "2",
   "title": "The same escrow at block 345,599: no horizon yet",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1893456000",
    "clock": "1793700001",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "0",
    "height": "345599",
    "block_timestamp": "1793700016",
    "block_height": "12500",
    "interval": "172800",
    "min_height": "760"
   },
   "expected": {
    "due": "false",
    "zbc_refund": "0"
   },
   "note": "horizon(345,599) = 0 (newest 172,800, 172,800 − 172,800 = 0)."
  },
  {
   "id": "22-2-horizon-funded",
   "chapter": "22",
   "section": "2",
   "title": "The same escrow with a funded longevity record: kept",
   "kind": "22-escrow-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "7",
    "timeout": "1893456000",
    "clock": "1793700001",
    "amount": "100000000",
    "commission": "1000000",
    "token_id": "0",
    "height": "345600",
    "block_timestamp": "1793700016",
    "block_height": "12500",
    "interval": "172800",
    "min_height": "760",
    "longevity_deposit": "1000"
   },
   "expected": {
    "due": "false",
    "zbc_refund": "0"
   }
  },
  {
   "id": "22-3-due",
   "chapter": "22",
   "section": "3",
   "title": "Stream 9 after its ten minutes",
   "kind": "22-liquid-completion",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "9",
    "applied_time": "1792000000",
    "complete_minutes": "10",
    "clock": "1792000600",
    "amount": "100000000",
    "height": "5000"
   },
   "expected": {
    "due": "true",
    "recipient": "100000000",
    "sender": "0",
    "ledger": "recipient +100000000, transaction id 9, event 14",
    "status": "status 1 at 5000"
   }
  },
  {
   "id": "22-3-not-due",
   "chapter": "22",
   "section": "3",
   "title": "One second early",
   "kind": "22-liquid-completion",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "9",
    "applied_time": "1792000000",
    "complete_minutes": "10",
    "clock": "1792000599",
    "amount": "100000000",
    "height": "5000"
   },
   "expected": {
    "due": "false",
    "recipient": "0",
    "ledger": "none",
    "status": "status 0"
   }
  },
  {
   "id": "22-4-order",
   "chapter": "22",
   "section": "4",
   "title": "Buy order 41 expires and releases its quote hold",
   "kind": "22-order-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "41",
    "side": "buy",
    "remaining": "300000000",
    "price": "150000000",
    "expiry": "1793700000",
    "clock": "1793700000",
    "height": "5000"
   },
   "expected": {
    "expired": "true",
    "released": "450000000",
    "ledger": "maker +450000000, transaction id 41, event 59",
    "status": "Expired at 5000"
   }
  },
  {
   "id": "22-4-order-no-expiry",
   "chapter": "22",
   "section": "4",
   "title": "An order with expiry 0 never expires here",
   "kind": "22-order-expiry",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "41",
    "side": "buy",
    "remaining": "300000000",
    "price": "150000000",
    "expiry": "0",
    "clock": "1793700000",
    "height": "5000"
   },
   "expected": {
    "expired": "false",
    "released": "0",
    "status": "Open"
   }
  },
  {
   "id": "22-4-solo-cap",
   "chapter": "22",
   "section": "4",
   "title": "The solo payout cap of token 0 and a win of 800,000,000",
   "kind": "22-solo-cap",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "stakes": "2000000000",
    "paid": "1500000000",
    "pool": "10000000000",
    "win": "800000000"
   },
   "expected": {
    "cap": "500000000",
    "pay": "500000000",
    "owed": "300000000"
   }
  },
  {
   "id": "22-5-count",
   "chapter": "22",
   "section": "5",
   "title": "The fee-scale count at 172,800",
   "kind": "22-capped-average",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "today": "1000000",
    "lo": "1",
    "hi": "100000000",
    "counted": "7",
    "votes": "2000000\n900000\n1100000"
   },
   "expected": {
    "held": "1200000\n900000\n1100000",
    "value": "1028571"
   }
  },
  {
   "id": "22-5-skipped",
   "chapter": "22",
   "section": "5",
   "title": "The same count at 172,800 in survival mode is skipped",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "true",
    "height": "172800"
   },
   "expected": {
    "count": "skipped"
   }
  },
  {
   "id": "22-5-not-last",
   "chapter": "22",
   "section": "5",
   "title": "Height 172,799 is not the cycle's last block",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "false",
    "height": "172799"
   },
   "expected": {
    "count": "no"
   }
  },
  {
   "id": "22-6-fees",
   "chapter": "22",
   "section": "6",
   "title": "The storage fee of 218 bytes at the devnet rate",
   "kind": "22-storage-fee",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "218",
    "rate": "100000000",
    "ppm": "1000000"
   },
   "expected": {
    "fees": "20791"
   }
  },
  {
   "id": "22-6-fees-testnet",
   "chapter": "22",
   "section": "6",
   "title": "The storage fee at the testnet rate",
   "kind": "22-storage-fee",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "218\n9\n1048576\n0",
    "rate": "5000000",
    "ppm": "1000000"
   },
   "expected": {
    "fees": "1040\n43\n5000000\n0"
   }
  },
  {
   "id": "22-6-owner-covers",
   "chapter": "22",
   "section": "6",
   "title": "An object of 218 bytes with a deposit of 1,000",
   "kind": "22-dataset-charge",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "218",
    "rate": "5000000",
    "ppm": "1000000",
    "deposit": "1000",
    "prepaid": "0",
    "balance": "10000"
   },
   "expected": {
    "fee": "1040",
    "outcome": "owner covers the shortfall",
    "rows": "17 deposit -1000\n17 owner -40\n19 longevity +1040"
   }
  },
  {
   "id": "22-6-pruned",
   "chapter": "22",
   "section": "6",
   "title": "The same with an owner balance of 30",
   "kind": "22-dataset-charge",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "218",
    "rate": "5000000",
    "ppm": "1000000",
    "deposit": "1000",
    "prepaid": "0",
    "balance": "30"
   },
   "expected": {
    "fee": "1040",
    "outcome": "pruned",
    "rows": "50 deposit -1000\n50 longevity +1000\n18 deposit 0"
   }
  },
  {
   "id": "22-6-one-clock",
   "chapter": "22",
   "section": "6",
   "title": "Two records of one object, written at 100 and 200: one charge, both re-clocked",
   "kind": "22-dataset-clock",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "records": "A 100\nB 200",
    "object_clock": "0",
    "period": "172800",
    "heights": "172899\n172900\n173000"
   },
   "expected": {
    "charges": "172899 not due\n172900 charged\n173000 not due",
    "clocks": "A 172900\nB 172900"
   },
   "note": "The object's clock is the lowest clock of its active rows until its first charge (10 §12)."
  },
  {
   "id": "22-7-thirds",
   "chapter": "22",
   "section": "7",
   "title": "100 over three holders of one unit each",
   "kind": "22-pro-rata",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "total": "100",
    "holders": "000000002222222222222222222222222222222222222222222222222222222222222222 1\n000000001111111111111111111111111111111111111111111111111111111111111111 1\n000000003333333333333333333333333333333333333333333333333333333333333333 1"
   },
   "expected": {
    "shares": "000000002222222222222222222222222222222222222222222222222222222222222222 33\n000000001111111111111111111111111111111111111111111111111111111111111111 34\n000000003333333333333333333333333333333333333333333333333333333333333333 33"
   }
  },
  {
   "id": "22-7-one-two-three",
   "chapter": "22",
   "section": "7",
   "title": "10 over 1, 2 and 3 units",
   "kind": "22-pro-rata",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "total": "10",
    "holders": "000000001111111111111111111111111111111111111111111111111111111111111111 1\n000000002222222222222222222222222222222222222222222222222222222222222222 2\n000000003333333333333333333333333333333333333333333333333333333333333333 3"
   },
   "expected": {
    "shares": "000000001111111111111111111111111111111111111111111111111111111111111111 2\n000000002222222222222222222222222222222222222222222222222222222222222222 3\n000000003333333333333333333333333333333333333333333333333333333333333333 5"
   }
  },
  {
   "id": "22-7-three-seven",
   "chapter": "22",
   "section": "7",
   "title": "1,000 over 3 and 7 units",
   "kind": "22-pro-rata",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "total": "1000",
    "holders": "000000001111111111111111111111111111111111111111111111111111111111111111 3\n000000002222222222222222222222222222222222222222222222222222222222222222 7"
   },
   "expected": {
    "shares": "000000001111111111111111111111111111111111111111111111111111111111111111 300\n000000002222222222222222222222222222222222222222222222222222222222222222 700"
   }
  },
  {
   "id": "22-8-covered",
   "chapter": "22",
   "section": "8",
   "title": "Account rent paid from prepaid storage first",
   "kind": "22-account-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1000000",
    "period": "172800",
    "height": "172900",
    "balance": "5000000",
    "prepaid": "300000",
    "rent_due_height": "172900"
   },
   "expected": {
    "covered": "true",
    "balance": "4300000",
    "prepaid": "0",
    "rent_due_height": "345700",
    "rows": "83 +300000\n24 -1000000",
    "pool": "19 +1000000"
   }
  },
  {
   "id": "22-8-tombstone",
   "chapter": "22",
   "section": "8",
   "title": "Account rent not covered: the account is tombstoned",
   "kind": "22-account-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1000000",
    "period": "172800",
    "height": "172900",
    "balance": "400000",
    "prepaid": "100000",
    "rent_due_height": "172900"
   },
   "expected": {
    "covered": "false",
    "balance": "0",
    "prepaid": "0",
    "rent_due_height": "0",
    "rows": "83 +100000\n25 -500000",
    "pool": "50 +500000"
   }
  },
  {
   "id": "22-8-group",
   "chapter": "22",
   "section": "8",
   "title": "The rent of a group address of weight 284 bytes",
   "kind": "22-group-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1000000",
    "weight": "284",
    "rate": "5000000",
    "ppm": "1000000"
   },
   "expected": {
    "rent": "1001355"
   }
  },
  {
   "id": "22-9-fires",
   "chapter": "22",
   "section": "9",
   "title": "Trigger 12 at height 1,000",
   "kind": "22-height-trigger",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "12",
    "fire_height": "1000",
    "height": "1000",
    "amount": "50000000"
   },
   "expected": {
    "fires": "true",
    "credit": "50000000",
    "pool": "none",
    "status": "status 1 at 1000"
   }
  },
  {
   "id": "22-9-early",
   "chapter": "22",
   "section": "9",
   "title": "Trigger 12 at height 999",
   "kind": "22-height-trigger",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "12",
    "fire_height": "1000",
    "height": "999",
    "amount": "50000000"
   },
   "expected": {
    "fires": "false",
    "credit": "0",
    "status": "status 0"
   }
  },
  {
   "id": "22-9-overflow",
   "chapter": "22",
   "section": "9",
   "title": "Trigger 12 whose recipient's balance would overflow: paid to the longevity pool",
   "kind": "22-height-trigger",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "12",
    "fire_height": "1000",
    "height": "1000",
    "amount": "50000000",
    "recipient_balance": "9223372036854775000"
   },
   "expected": {
    "fires": "true",
    "credit": "0",
    "pool": "event 50 +50000000, transaction id 12",
    "status": "status 1 at 1000"
   },
   "note": "Rule failed_credit_to_pool: the recipient is unchanged and the trigger is marked fired."
  },
  {
   "id": "22-10-kept",
   "chapter": "22",
   "section": "10",
   "title": "A gateway last beating at 1,000, at height 1,720",
   "kind": "22-gateway-prune",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "last_heartbeat_height": "1000",
    "row_height": "900",
    "interval": "240",
    "grace": "480",
    "stake": "10000000000",
    "height": "1720"
   },
   "expected": {
    "pruned": "false",
    "refund": "0"
   }
  },
  {
   "id": "22-10-pruned",
   "chapter": "22",
   "section": "10",
   "title": "The same at height 1,721",
   "kind": "22-gateway-prune",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "last_heartbeat_height": "1000",
    "row_height": "900",
    "interval": "240",
    "grace": "480",
    "stake": "10000000000",
    "height": "1721"
   },
   "expected": {
    "pruned": "true",
    "refund": "10000000000"
   }
  },
  {
   "id": "22-10-genesis-row",
   "chapter": "22",
   "section": "10",
   "title": "A genesis gateway row is never pruned",
   "kind": "22-gateway-prune",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "last_heartbeat_height": "1000",
    "row_height": "0",
    "interval": "240",
    "grace": "480",
    "stake": "10000000000",
    "height": "100000"
   },
   "expected": {
    "pruned": "false"
   }
  },
  {
   "id": "22-11-rent",
   "chapter": "22",
   "section": "11",
   "title": "A file of 1,500,000 bytes with a deposit of 12,000,000",
   "kind": "22-file-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "size": "1500000",
    "rate": "5000000",
    "deposit": "12000000"
   },
   "expected": {
    "rent": "10000000",
    "paid": "true",
    "deposit": "2000000",
    "to_longevity": "0"
   }
  },
  {
   "id": "22-11-pruned",
   "chapter": "22",
   "section": "11",
   "title": "The next period with 2,000,000 left",
   "kind": "22-file-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "size": "1500000",
    "rate": "5000000",
    "deposit": "2000000"
   },
   "expected": {
    "rent": "10000000",
    "paid": "false",
    "deposit": "0",
    "to_longevity": "2000000"
   }
  },
  {
   "id": "22-11-one-mib",
   "chapter": "22",
   "section": "11",
   "title": "A file of 10 bytes pays one MiB",
   "kind": "22-file-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "size": "10",
    "rate": "5000000",
    "deposit": "5000000"
   },
   "expected": {
    "rent": "5000000",
    "paid": "true"
   }
  },
  {
   "id": "22-11-p11-480",
   "chapter": "22",
   "section": "11",
   "title": "P11 at height 480 tallies epoch 1 seeded by block 240",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "false",
    "height": "480"
   },
   "expected": {
    "p11": "true",
    "epoch": "1",
    "seed_block": "240"
   }
  },
  {
   "id": "22-12-rent",
   "chapter": "22",
   "section": "12",
   "title": "A record of 500 payload bytes with a deposit of 3,000",
   "kind": "22-longevity-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "payload_bytes": "500",
    "cost_per_mib": "5000000",
    "deposit": "3000"
   },
   "expected": {
    "rent": "2385",
    "take": "2385",
    "deposit": "615"
   }
  },
  {
   "id": "22-12-last",
   "chapter": "22",
   "section": "12",
   "title": "The next period takes the rest",
   "kind": "22-longevity-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "payload_bytes": "500",
    "cost_per_mib": "5000000",
    "deposit": "615"
   },
   "expected": {
    "rent": "2385",
    "take": "615",
    "deposit": "0"
   }
  },
  {
   "id": "22-13-quorum-7",
   "chapter": "22",
   "section": "13",
   "title": "Seven counted registered nodes, five attestations",
   "kind": "22-oracle-quorum",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "counted": "7",
    "floor": "7",
    "attestations": "5"
   },
   "expected": {
    "meets_floor": "true",
    "quorum": "5",
    "resolves": "true"
   }
  },
  {
   "id": "22-13-below-floor",
   "chapter": "22",
   "section": "13",
   "title": "Six counted registered nodes under a floor of 7",
   "kind": "22-oracle-quorum",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "counted": "6",
    "floor": "7",
    "attestations": "6"
   },
   "expected": {
    "meets_floor": "false",
    "resolves": "false"
   }
  },
  {
   "id": "22-13-quorum-11",
   "chapter": "22",
   "section": "13",
   "title": "Eleven counted registered nodes",
   "kind": "22-oracle-quorum",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "counted": "11",
    "floor": "7",
    "attestations": "7"
   },
   "expected": {
    "meets_floor": "true",
    "quorum": "8",
    "resolves": "false"
   }
  },
  {
   "id": "22-13-p15-survival",
   "chapter": "22",
   "section": "13",
   "title": "The price count at 172,800 in survival mode",
   "kind": "22-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cycle": "172800",
    "epoch_blocks": "240",
    "survival": "true",
    "height": "172800"
   },
   "expected": {
    "count": "skipped"
   }
  },
  {
   "id": "22-13-oracle-pause",
   "chapter": "22",
   "section": "13",
   "title": "A quorum met at a survival height resolves at the first height out of it",
   "kind": "22-oracle-pause",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "event_id": "X:1",
    "value": "01",
    "attestations": "5",
    "height": "5000",
    "counted": "8\n7\n7",
    "flags": "false\ntrue\nfalse",
    "floor": "7"
   },
   "expected": {
    "trace": "4999: quorum 6, not reached\n5000: paused\n5001: quorum 5, resolved",
    "result": "X:1 01 5001"
   },
   "note": "h = 5,000: 8 counted registered nodes as of h − 2, 7 as of h − 1 and h (a node that did not attest is suspended at h − 1)."
  },
  {
   "id": "22-13-veto-age",
   "chapter": "22",
   "section": "13",
   "title": "A veto vote cast at 1,000 across 179,000 survival heights still counts at 180,001",
   "kind": "22-release-window",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "kind": "veto",
    "vote_height": "1000",
    "survival": "1001..180000",
    "height": "180001"
   },
   "expected": {
    "adjusted_age": "1",
    "counts": "true",
    "plain_expiry": "173801"
   }
  },
  {
   "id": "22-13-authority-delay",
   "chapter": "22",
   "section": "13",
   "title": "An authority proposal with 100 survival heights since its oldest vote",
   "kind": "22-release-window",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "kind": "authority",
    "vote_height": "1000",
    "survival": "1001..1100",
    "height": "41320"
   },
   "expected": {
    "adjusted_age": "40220",
    "delay_passed": "false",
    "delay_from": "41420"
   }
  },
  {
   "id": "22-13-authority-full-key",
   "chapter": "22",
   "section": "13",
   "title": "A resolved authority proposal naming a full-key Ethereum form replaces nothing",
   "kind": "22-release-authority",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "address": "04000000abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab"
   },
   "expected": {
    "result": "written",
    "authority": "unchanged"
   },
   "note": "Rule canonical_account_forms: the event stays resolved and the release authority stays."
  },
  {
   "id": "22-13-authority-replaced",
   "chapter": "22",
   "section": "13",
   "title": "A resolved authority proposal naming a ZBC account replaces the authority",
   "kind": "22-release-authority",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "address": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152"
   },
   "expected": {
    "result": "written",
    "authority": "replaced"
   }
  },
  {
   "id": "22-13-authority-current",
   "chapter": "22",
   "section": "13",
   "title": "A resolved authority proposal naming the current authority replaces nothing",
   "kind": "22-release-authority",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "address": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "current": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152"
   },
   "expected": {
    "result": "written",
    "authority": "unchanged"
   }
  },
  {
   "id": "22-14-testnet",
   "chapter": "22",
   "section": "14",
   "title": "Snapshot heights on the testnet (172,800 / 760)",
   "kind": "22-snapshot-heights",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "interval": "172800",
    "min_height": "760",
    "count": "2"
   },
   "expected": {
    "heights": "172040\n344840"
   }
  },
  {
   "id": "22-14-devnet",
   "chapter": "22",
   "section": "14",
   "title": "Snapshot heights on the devnet (240 / 80)",
   "kind": "22-snapshot-heights",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "interval": "240",
    "min_height": "80",
    "count": "3"
   },
   "expected": {
    "heights": "160\n400\n640"
   }
  },
  {
   "id": "22-14-survival-rows",
   "chapter": "22",
   "section": "14",
   "title": "Devnet, h = 10,000, no pending event: survival_state rows below 9,821 are deleted",
   "kind": "22-survival-retention",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "height": "10000",
    "max_rollback_height": "60"
   },
   "expected": {
    "deleted_below": "9821"
   }
  },
  {
   "id": "22-14-survival-rows-pending",
   "chapter": "22",
   "section": "14",
   "title": "The same with a pending bridge deposit last attested at 9,500",
   "kind": "22-survival-retention",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "height": "10000",
    "max_rollback_height": "60",
    "pending": "ZBRDEP1:1 9500"
   },
   "expected": {
    "deleted_below": "9500"
   },
   "note": "Rows 9,500 … 9,820 are kept for the deposit's idle window."
  },
  {
   "id": "22-15-events",
   "chapter": "22",
   "section": "15",
   "title": "Events no processor writes",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "never": "26, 27, 35, 36, 73, ZBC 74"
   }
  }
 ]
}
