{
 "format": "zoobc-conformance-vectors/1",
 "edition": "0.6.1",
 "chapter": "04",
 "license": "CC BY 4.0, ZooBC Foundation",
 "cases": [
  {
   "id": "04-1-rent-8-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 8 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "8",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "39"
   }
  },
  {
   "id": "04-1-rent-16-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 16 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "16",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "77"
   }
  },
  {
   "id": "04-1-rent-24-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 24 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "24",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "115"
   }
  },
  {
   "id": "04-1-rent-76-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 76 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "76",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "363"
   }
  },
  {
   "id": "04-1-rent-137-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 137 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "137",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "654"
   }
  },
  {
   "id": "04-1-rent-1048576-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 1,048,576 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "1048576",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "5000000"
   }
  },
  {
   "id": "04-1-rent-8-100000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 8 bytes at 100,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "8",
    "cost_per_mib": "100000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "763"
   }
  },
  {
   "id": "04-1-rent-75-100000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 75 bytes at 100,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "75",
    "cost_per_mib": "100000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "7153"
   }
  },
  {
   "id": "04-1-rent-394-100000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 394 bytes at 100,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "394",
    "cost_per_mib": "100000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "37575"
   }
  },
  {
   "id": "04-1-rent-8-1",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 8 bytes at 1 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "8",
    "cost_per_mib": "1",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "1"
   }
  },
  {
   "id": "04-1-rent-0-5000000",
   "chapter": "04",
   "section": "1",
   "title": "The rent of 0 bytes at 5,000,000 units per MiB",
   "kind": "04-storage-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000"
   },
   "expected": {
    "rent": "0"
   }
  },
  {
   "id": "04-1-route",
   "chapter": "04",
   "section": "1",
   "title": "The fee-estimate route reports the same period rents at the TestNet prices",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "survival_rent_per_period_8_bytes": "39",
    "survival_rent_per_period_24_bytes": "115",
    "survival_rent_per_period_137_bytes": "654"
   },
   "note": "The survival_rent_per_period field of GET /api/v1/blockchain/estimate-fee (§12)."
  },
  {
   "id": "04-2-testnet-default",
   "chapter": "04",
   "section": "2",
   "title": "The floor of the default SendZBC at the TestNet parameters (11 registered nodes)",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "period_rent": "39",
    "persistence_rent": "44",
    "scaled_base": "2500000",
    "floor": "2500044"
   },
   "note": "The 11 genesis registered nodes of the TestNet file (06 §6)."
  },
  {
   "id": "04-2-testnet-body24",
   "chapter": "04",
   "section": "2",
   "title": "The floor of a 24-byte body (a CreateApp) at the TestNet parameters",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "24",
    "body_length": "24",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "period_rent": "115",
    "persistence_rent": "132",
    "floor": "2500132"
   }
  },
  {
   "id": "04-2-testnet-batch3",
   "chapter": "04",
   "section": "2",
   "title": "A SendZBCBatch of three payments pays three one-action floors",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "body_length": "137",
    "message_length": "0",
    "actions": "3",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "7500132"
   }
  },
  {
   "id": "04-2-one-node-8-0",
   "chapter": "04",
   "section": "2",
   "title": "The floor with one registered node: body 8, message 0",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "1"
   },
   "expected": {
    "floor": "2500004"
   }
  },
  {
   "id": "04-2-one-node-16-0",
   "chapter": "04",
   "section": "2",
   "title": "The floor with one registered node: body 16, message 0",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "16",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "1"
   },
   "expected": {
    "floor": "2500008"
   }
  },
  {
   "id": "04-2-one-node-65536-256",
   "chapter": "04",
   "section": "2",
   "title": "The floor with one registered node: body 65,536, message 256",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "65536",
    "message_length": "256",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "1"
   },
   "expected": {
    "floor": "2531373",
    "period_rent": "313721"
   }
  },
  {
   "id": "04-2-devnet-8",
   "chapter": "04",
   "section": "2",
   "title": "The floor on DevNet prices with one node: body 8",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "100000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "240",
    "period": "240",
    "fee_scale": "1000000",
    "registry_size": "1"
   },
   "expected": {
    "floor": "2500763"
   }
  },
  {
   "id": "04-2-devnet-394",
   "chapter": "04",
   "section": "2",
   "title": "The floor on DevNet prices with one node: body 394",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "394",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "100000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "240",
    "period": "240",
    "fee_scale": "1000000",
    "registry_size": "1"
   },
   "expected": {
    "floor": "2537575"
   }
  },
  {
   "id": "04-2-scale-2000000",
   "chapter": "04",
   "section": "2",
   "title": "The scaled base fee at a fee scale of 2,000,000",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "2000000",
    "registry_size": "11"
   },
   "expected": {
    "scaled_base": "5000000"
   }
  },
  {
   "id": "04-2-scale-500000",
   "chapter": "04",
   "section": "2",
   "title": "The scaled base fee at a fee scale of 500,000",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "500000",
    "registry_size": "11"
   },
   "expected": {
    "scaled_base": "1250000"
   }
  },
  {
   "id": "04-2-scale-1",
   "chapter": "04",
   "section": "2",
   "title": "The scaled base fee at a fee scale of 1",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1",
    "registry_size": "11"
   },
   "expected": {
    "scaled_base": "3"
   }
  },
  {
   "id": "04-2-fee-one-below",
   "chapter": "04",
   "section": "2",
   "title": "A SendZBC declaring one unit below its floor is refused",
   "kind": "04-fee-floor",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "fee": "2500043",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "error": "Transaction fee too low"
   }
  },
  {
   "id": "04-2-fee-at-floor",
   "chapter": "04",
   "section": "2",
   "title": "A SendZBC declaring exactly its floor is accepted",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "fee": "2500044",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "2500044"
   }
  },
  {
   "id": "04-2-duty-fee",
   "chapter": "04",
   "section": "2",
   "title": "A storage proof (a node duty) with a fee of 1 is refused",
   "kind": "04-fee-floor",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "41",
    "body_length": "72",
    "message_length": "0",
    "actions": "0",
    "fee": "1",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "error": "Transaction fee must be exactly 0: a node duty declares a fee of exactly zero (this one declares 1)"
   }
  },
  {
   "id": "04-2-duty-zero",
   "chapter": "04",
   "section": "2",
   "title": "A storage proof declaring 0 is accepted",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "41",
    "body_length": "72",
    "message_length": "0",
    "actions": "0",
    "fee": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "exactly_zero": "true"
   }
  },
  {
   "id": "04-2-empty-zero",
   "chapter": "04",
   "section": "2",
   "title": "An Empty transaction with a fee of 0 is refused",
   "kind": "04-fee-floor",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "0",
    "body_length": "0",
    "message_length": "0",
    "actions": "0",
    "fee": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "error": "Transaction fee too low"
   }
  },
  {
   "id": "04-3-genesis-row",
   "chapter": "04",
   "section": "3",
   "title": "The fee scale from the genesis row, at every height before the first count block",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "fee_scale": "1000000",
    "effective_min_fee": "2500000",
    "first_count_block": "172800"
   },
   "note": "What GET /api/v1/blockchain/fee-params reports there (§12); 04-fee-floor computes the scaled base 2,500,000 at fee scale 1,000,000."
  },
  {
   "id": "04-3-genesis-scale",
   "chapter": "04",
   "section": "3",
   "title": "The scaled base fee at the genesis fee scale",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "scaled_base": "2500000"
   }
  },
  {
   "id": "04-3-count",
   "chapter": "04",
   "section": "3",
   "title": "Five registered nodes, three votes: each vote limited, the silent registered nodes count today's scale",
   "kind": "04-fee-scale-count",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "today": "1000000",
    "counted_nodes": "5",
    "votes": "2000000\n400000\n1100000",
    "survival": "false"
   },
   "expected": {
    "limited": "1200000\n500000\n1100000",
    "sum": "4800000",
    "next": "960000",
    "row_written": "true"
   }
  },
  {
   "id": "04-3-count-survival",
   "chapter": "04",
   "section": "3",
   "title": "The same count block in survival mode writes no row",
   "kind": "04-fee-scale-count",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "today": "1000000",
    "counted_nodes": "5",
    "votes": "2000000\n400000\n1100000",
    "survival": "true"
   },
   "expected": {
    "next": "1000000",
    "row_written": "false"
   }
  },
  {
   "id": "04-4-testnet",
   "chapter": "04",
   "section": "4",
   "title": "The escrow of the version-2 envelope at TestNet prices",
   "kind": "04-escrow-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "approver_length": "36",
    "instruction_length": "19",
    "multi_party": "false",
    "cosigner_length": "0",
    "timestamp": "1793509627",
    "timeout": "1793516827",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "period": "172800"
   },
   "expected": {
    "escrow_bytes": "76",
    "period_rent": "363",
    "duration_blocks": "480",
    "rent": "2"
   }
  },
  {
   "id": "04-4-devnet",
   "chapter": "04",
   "section": "4",
   "title": "The same escrow at DevNet prices",
   "kind": "04-escrow-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "approver_length": "36",
    "instruction_length": "19",
    "multi_party": "false",
    "cosigner_length": "0",
    "timestamp": "1793509627",
    "timeout": "1793516827",
    "cost_per_mib": "100000000",
    "multiplier_ppm": "1000000",
    "period": "240"
   },
   "expected": {
    "period_rent": "7248",
    "rent": "14496"
   }
  },
  {
   "id": "04-4-route",
   "chapter": "04",
   "section": "4",
   "title": "The fee-estimate route's answer for that escrow (11 registered nodes)",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "escrow_kind": "single",
    "escrow_envelope_bytes": "76",
    "escrow_rent": "2",
    "total_debit_excluding_amount": "2500046"
   },
   "note": "GET /api/v1/blockchain/estimate-fee?escrow=1&escrow_instruction_length=19&escrow_lock_seconds=7200 (§12): 2,500,044 + 2."
  },
  {
   "id": "04-4-timeout-now",
   "chapter": "04",
   "section": "4",
   "title": "An escrow whose timeout equals the transaction time is refused",
   "kind": "04-escrow-rent",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "approver_length": "36",
    "instruction_length": "19",
    "multi_party": "false",
    "cosigner_length": "0",
    "timestamp": "1793509627",
    "timeout": "1793509627",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "period": "172800"
   },
   "expected": {
    "error": "Escrow timeout must be a future Unix timestamp (now + lock duration); got 1793509627 <= tx time 1793509627"
   }
  },
  {
   "id": "04-5-createapp",
   "chapter": "04",
   "section": "5",
   "title": "A CreateApp with a 24-byte body keeps its floor and refunds the rest",
   "kind": "04-fee-settlement",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "1800000001fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215202000000404b4c00000000001800000012000000000000000000ca9a3b00000000010300010001000200000000000000",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "2500132",
    "charged": "2500132",
    "refund": "2499868"
   },
   "note": "GET /api/v1/transactions/<hash> reports these as fee_charged and fee_refund; the block header carries total_fee 5,000,000."
  },
  {
   "id": "04-5-fee-in-token-floor",
   "chapter": "04",
   "section": "5",
   "title": "A fee-in-token TransferToken (a 17-byte body, the flag byte included) has the floor 2,500,099",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "11",
    "body_length": "17",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "period_rent": "82",
    "persistence_rent": "99",
    "floor": "2500099"
   }
  },
  {
   "id": "04-5-fee-in-token-drained",
   "chapter": "04",
   "section": "5",
   "title": "That transfer whose token's backing was drained earlier in the block, sender holding 6,000,000 ZBC",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "debit_event_1": "-5000000",
    "refund_event_22": "2499901",
    "net": "2500099"
   },
   "note": "The backing cannot pay the floor, so the declared fee is paid in ZBC and the overpay comes back."
  },
  {
   "id": "04-5-fee-in-token-unpaid",
   "chapter": "04",
   "section": "5",
   "title": "The same with a sender holding 3,000,000 ZBC: nothing is charged",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "row_event_22": "5000000",
    "row_event_47": "-5000000",
    "charged": "0"
   },
   "note": "The debit of 5,000,000 fails; the rows of step 3 are written with no balance change."
  },
  {
   "id": "04-5-escrowed-send",
   "chapter": "04",
   "section": "5",
   "title": "The rows of the version-2 escrowed SendZBC mined on the TestNet",
   "kind": "04-fee-settlement",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "2500110",
    "charged": "2500110",
    "refund": "2499890",
    "sender_rows": "16:-105001000\n22:2499890\n37:-10000000\n45:-2",
    "pool_rows": "50:2"
   }
  },
  {
   "id": "04-5-exact-floor",
   "chapter": "04",
   "section": "5",
   "title": "The same transaction declaring exactly its floor gets no refund row",
   "kind": "04-fee-settlement",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b670e2626000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "refund": "0",
    "sender_rows": "16:-102501110\n37:-10000000\n45:-2",
    "pool_rows": "50:2"
   }
  },
  {
   "id": "04-6-expired",
   "chapter": "04",
   "section": "6",
   "title": "A version-3 SendZBC submitted after its 7,200-second window",
   "kind": "04-admission-window",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "now": "1793516828"
   },
   "expected": {
    "error": "Transaction expired: its timestamp 1793509627 is more than 7200 s in the past; sign it again"
   }
  },
  {
   "id": "04-6-future",
   "chapter": "04",
   "section": "6",
   "title": "The same transaction submitted more than an hour before its timestamp",
   "kind": "04-admission-window",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "now": "1793506026"
   },
   "expected": {
    "error": "Transaction timestamp 1793509627 is more than 3600 s in the future; check the signer's clock"
   }
  },
  {
   "id": "04-6-in-window",
   "chapter": "04",
   "section": "6",
   "title": "The same transaction inside its window",
   "kind": "04-admission-window",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "now": "1793516827"
   },
   "expected": {
    "window": "7200"
   }
  },
  {
   "id": "04-6-pending-cap",
   "chapter": "04",
   "section": "6",
   "title": "A 51st pending transaction of one sender",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "Too many pending transactions from this sender (max 50)"
   }
  },
  {
   "id": "04-6-duty-duplicate",
   "chapter": "04",
   "section": "6",
   "title": "A second attendance of one node for the same window",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "A duty transaction for this window is already pending from this node"
   }
  },
  {
   "id": "04-6-survival-vote",
   "chapter": "04",
   "section": "6",
   "title": "A fee vote reveal while the chain is in survival mode",
   "kind": "04-survival-freeze",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "263",
    "survival": "true"
   },
   "expected": {
    "error": "SurvivalMode: transaction type 263 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)"
   }
  },
  {
   "id": "04-6-survival-attest",
   "chapter": "04",
   "section": "6",
   "title": "An AttestEvent (the bridge category) in the same state",
   "kind": "04-survival-freeze",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "17",
    "survival": "true"
   },
   "expected": {
    "error": "SurvivalMode: transaction type 17 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)"
   }
  },
  {
   "id": "04-6-survival-send",
   "chapter": "04",
   "section": "6",
   "title": "A SendZBC in the same state is admitted",
   "kind": "04-survival-freeze",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "survival": "true"
   },
   "expected": {
    "frozen_type": "false"
   }
  },
  {
   "id": "04-6-carrier-nonce-gap",
   "chapter": "04",
   "section": "6",
   "title": "A carrier with nonce 7 while nonce 5 is pooled and none with 6 is refused",
   "kind": "04-carrier-nonce",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "account_nonce": "5",
    "queued": "5",
    "message": "02f878840883e00307843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c001a0d9da162398d18ad5d92816ca237384c9c84a3e7843a493e3ebc3ac4ac0a3551da079ea717ff9ea9d4278aaa9e4baec1f3fcdb2b19b6850a870468710cbf8d0fe49",
    "at": "admission"
   },
   "expected": {
    "error": "carrier nonce 7, account nonce 6"
   },
   "note": "The next free nonce: the first at or above the account's (5) that no pooled or staged carrier of the sender holds."
  },
  {
   "id": "04-6-carrier-nonce-next",
   "chapter": "04",
   "section": "6",
   "title": "The same with nonce 6 is admitted and pooled behind the first",
   "kind": "04-carrier-nonce",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "account_nonce": "5",
    "queued": "5",
    "message": "02f878840883e00306843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c080a04b1afaf81e7fa654170269cd71bf81a7d3f4d0d4e48315e3b86255fb1c3abc0ca017f59ef4219aa50dc79828bcd0adb2e478a0da838f43623d1033951d108dd0e8",
    "at": "admission"
   },
   "expected": {
    "nonce": "6",
    "expected": "6",
    "verdict": "the nonce is the expected one"
   }
  },
  {
   "id": "04-6-carrier-nonce-assembly",
   "chapter": "04",
   "section": "6",
   "title": "At block assembly the nonce-6 carrier waits: the account nonce is still 5",
   "kind": "04-carrier-nonce",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "account_nonce": "5",
    "queued": "5",
    "message": "02f878840883e00306843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c080a04b1afaf81e7fa654170269cd71bf81a7d3f4d0d4e48315e3b86255fb1c3abc0ca017f59ef4219aa50dc79828bcd0adb2e478a0da838f43623d1033951d108dd0e8",
    "at": "assembly"
   },
   "expected": {
    "error": "carrier nonce 6, account nonce 5"
   },
   "note": "Of queued nonces 5 and 6 only 5 enters a block (§10)."
  },
  {
   "id": "04-7-reserve",
   "chapter": "04",
   "section": "7",
   "title": "The version-2 escrowed SendZBC reserves fee, commission, escrow rent, amount and survival",
   "kind": "04-reservation",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "spendable": "115001002",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "required": "115001002",
    "reserved": "115001002",
    "spendable_after": "0"
   }
  },
  {
   "id": "04-7-short",
   "chapter": "04",
   "section": "7",
   "title": "The same with one unit less spendable",
   "kind": "04-reservation",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "spendable": "115001001",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "error": "Insufficient balance (considering pending transactions)"
   }
  },
  {
   "id": "04-7-commission-negative",
   "chapter": "04",
   "section": "7",
   "title": "The same with commission -1 is refused",
   "kind": "04-reservation",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67ffffffffffffffff1be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "spendable": "115001002",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "error": "Escrow commission cannot be negative"
   }
  },
  {
   "id": "04-8-v2",
   "chapter": "04",
   "section": "8",
   "title": "The version-2 escrowed SendZBC ranks by its floor per byte",
   "kind": "04-fee-per-byte",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "2500110",
    "effective_fee": "2500110",
    "size": "268",
    "fee_per_byte": "93287686"
   }
  },
  {
   "id": "04-8-v2-at-floor",
   "chapter": "04",
   "section": "8",
   "title": "Declaring exactly the floor ranks the same",
   "kind": "04-fee-per-byte",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b670e2626000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "fee_per_byte": "93287686"
   }
  },
  {
   "id": "04-8-v2-overpay",
   "chapter": "04",
   "section": "8",
   "title": "Declaring 9,000,000 ranks the same",
   "kind": "04-fee-per-byte",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67405489000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "fee_per_byte": "93287686"
   }
  },
  {
   "id": "04-8-v3",
   "chapter": "04",
   "section": "8",
   "title": "The version-3 SendZBC (189 signed bytes)",
   "kind": "04-fee-per-byte",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "2500044",
    "size": "189",
    "fee_per_byte": "132277460"
   },
   "note": "This transaction carries no message: its own floor is 2,500,044."
  },
  {
   "id": "04-9-v2",
   "chapter": "04",
   "section": "9",
   "title": "The worst-case outflow of the version-2 escrowed SendZBC",
   "kind": "04-max-outflow",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "max_outflow": "115001002"
   }
  },
  {
   "id": "04-9-dataset",
   "chapter": "04",
   "section": "9",
   "title": "A SetupAccountDataset: the fee only",
   "kind": "04-max-outflow",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "0300000001fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215202000000404b4c00000000000800000000000000000000000200000000000000",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "max_outflow": "5000000"
   }
  },
  {
   "id": "04-9-order",
   "chapter": "04",
   "section": "9",
   "title": "A sell order of 7 ZBC on a ZBC-based market adds the amount and the market-rent share",
   "kind": "04-max-outflow",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "1600000001fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215202000000cc252600000000001900000001000000000000000100e1f505000000000027b929000000000200000000000000",
    "market_base_token": "0",
    "market_quote_token": "1",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "max_outflow": "703000053"
   },
   "note": "The market-rent share is ceil(2,500,044 x 2,000 / 10,000) = 500,009."
  },
  {
   "id": "04-9-attendance",
   "chapter": "04",
   "section": "9",
   "title": "A QueueAttendance takes nothing from a balance",
   "kind": "04-max-outflow",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "unsigned": "3b00000001fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215202000000cc252600000000000800000000000000000000000200000000000000",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "max_outflow": "0"
   }
  },
  {
   "id": "04-10-oldest",
   "chapter": "04",
   "section": "10",
   "title": "Two transactions of one sender with equal timestamps: the smaller id is taken",
   "kind": "04-assembly-pick",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "candidates": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406 100\n0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f62639912c7472a9f2098d9ddd7a837829584fee1b16076a053b2448fdb81a56c862fb1dd7187ee46f61ab68b10730035196663bdbfe8238fbe8fb396e9919f5adc03 101",
    "block_timestamp": "1793509637",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11",
    "balance": "1000000000"
   },
   "expected": {
    "ids": "8615971514693487621\n903506686709085004",
    "taken": "4c337c698be6890c83c2f073c37440b653954c6a37ad304c0c726f2b9e02ab08",
    "notes": ""
   },
   "note": "The version-3 SendZBC of 02 §1 and the version-2 escrowed SendZBC of 03 §1; the other stays pooled for a later block."
  },
  {
   "id": "04-10-sender-gate",
   "chapter": "04",
   "section": "10",
   "title": "With a confirmed balance of 115,001,001 the sender gate skips it",
   "kind": "04-assembly-pick",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "candidates": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406 100\n0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f62639912c7472a9f2098d9ddd7a837829584fee1b16076a053b2448fdb81a56c862fb1dd7187ee46f61ab68b10730035196663bdbfe8238fbe8fb396e9919f5adc03 101",
    "block_timestamp": "1793509637",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11",
    "balance": "115001001"
   },
   "expected": {
    "taken": "",
    "notes": "4c337c698be6890c83c2f073c37440b653954c6a37ad304c0c726f2b9e02ab08 sender cannot cover the ZBC this transaction takes with its confirmed balance"
   },
   "note": "out = the worst-case outflow of §9 (115,001,002), which counts the header survival and the escrow rent once."
  },
  {
   "id": "04-10-sender-gate-exact",
   "chapter": "04",
   "section": "10",
   "title": "With a confirmed balance of exactly 115,001,002 the sender gate takes it",
   "kind": "04-assembly-pick",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "candidates": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406 100\n0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f62639912c7472a9f2098d9ddd7a837829584fee1b16076a053b2448fdb81a56c862fb1dd7187ee46f61ab68b10730035196663bdbfe8238fbe8fb396e9919f5adc03 101",
    "block_timestamp": "1793509637",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11",
    "balance": "115001002"
   },
   "expected": {
    "taken": "4c337c698be6890c83c2f073c37440b653954c6a37ad304c0c726f2b9e02ab08",
    "notes": ""
   },
   "note": "Its §9 outflow: fee 5,000,000 + amount 100,000,000 + header survival 10,000,000 + commission 1,000 + escrow rent 2."
  },
  {
   "id": "04-10-carrier-oldest",
   "chapter": "04",
   "section": "10",
   "title": "Two pooled envelopes around one Ethereum carrier: the one that arrived first is taken",
   "kind": "04-assembly-pick",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "candidates": "0100000001fbc8e66a000000000400000036590dc6986e0755e42c7d4c8f385389403230fc040000006139a624f2d5cc37803f0d99136e3ac38739637700e1f505000000000800000000e1f50500000000020000007b00000002f878840883e00380843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c080a040419a401f5f23cd56dd17d5974dc28fab86a339b3075cee3e8b6d814c3e6a6ca026f704c6235fb648b42627f6c9e93088f728ab3fa8f46e584dd0ecc142f5e55d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 100\n0100000001fcc8e66a000000000400000036590dc6986e0755e42c7d4c8f385389403230fc040000006139a624f2d5cc37803f0d99136e3ac38739637700e1f505000000000800000000e1f50500000000020000007b00000002f878840883e00380843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c080a040419a401f5f23cd56dd17d5974dc28fab86a339b3075cee3e8b6d814c3e6a6ca026f704c6235fb648b42627f6c9e93088f728ab3fa8f46e584dd0ecc142f5e55d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 101",
    "block_timestamp": "1793509637",
    "balance": "1000000000",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "taken": "a61ceec884093cccab4a5d807ec86a8e798ba577edb54ae0efeb7e70a50bd3cd",
    "notes": "7f1d97f08fc97240d4cddf04584652563555e91500fa226a0a0aea981bb4b71c ForeignCarrierReplayed"
   },
   "note": "The same native id, different ZooBC timestamps, arrivals 100 and 101; the later copy is skipped with that note."
  },
  {
   "id": "04-11-not-found",
   "chapter": "04",
   "section": "11",
   "title": "The status of a hash the node never saw",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "http": "404",
    "status": "not_found"
   }
  },
  {
   "id": "04-11-confirmed",
   "chapter": "04",
   "section": "11",
   "title": "The status of a transaction mined at height 500",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "status": "confirmed",
    "block_height": "500"
   }
  },
  {
   "id": "04-12-fee-params",
   "chapter": "04",
   "section": "12",
   "title": "The TestNet fee parameters",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "{\"min_fee\":2500000,\"min_node_registration_fee\":2500000,\"fee_scale\":1000000,\"initial_fee_scale\":1000000,\"effective_min_fee\":2500000,\"one_zbc\":100000000,\"dataset_storage_cost_per_mib\":5000000,\"storage_oracle_multiplier_ppm\":1000000,\"min_payload_persistence_blocks\":17280,\"dataset_billing_period_blocks\":172800,\"block_time_interval\":15,\"token_persist_period_cost\":10000000,\"token_free_persist_blocks\":172800,\"min_token_persist_blocks\":5760,\"account_rent_period_cost\":1000000,\"account_rent_period_blocks\":172800,\"node_registration_minimum\":10000000000,\"node_registration_entry_minimum\":10000000000,\"queue_median_fraction_bps\":5000,\"producer_share_bps\":0,\"overpay_kept\":false,\"fee_above_minimum\":\"refunded\"}"
   },
   "note": "What the route answers on a chain built from the TestNet genesis file, 11 registered nodes, before the first count block, the queue empty."
  },
  {
   "id": "04-12-estimate-default",
   "chapter": "04",
   "section": "12",
   "title": "The fee estimate with no parameters",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "minimum_fee": "2500044",
    "duty": "false",
    "fee_exactly_zero": "false",
    "survival": "0",
    "survival_active": "true",
    "transaction_version": "1",
    "survival_minimum": "10000000",
    "survival_below_minimum": "false",
    "survival_payload_bytes": "8",
    "survival_rent_per_period": "39",
    "survival_periods": "0",
    "total_debit_excluding_amount": "2500044",
    "fee_above_minimum": "refunded",
    "producer_share_bps": "0",
    "escrow_rent": "0",
    "overpay_refunded": "true",
    "one_zbc": "100000000",
    "survival_free_until_height_at_tip_0": "345601"
   },
   "note": "survival_free_until_height and survival_paid_through_height are tip + 1 plus two cycles; timestamp is the node's clock."
  },
  {
   "id": "04-12-estimate-default-floor",
   "chapter": "04",
   "section": "12",
   "title": "Its minimum_fee is the floor of the default SendZBC",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "body_length": "8",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "floor": "2500044"
   }
  },
  {
   "id": "04-12-estimate-duty",
   "chapter": "04",
   "section": "12",
   "title": "A storage proof must declare exactly 0",
   "kind": "04-fee-floor",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "41",
    "body_length": "72",
    "message_length": "0",
    "actions": "0",
    "cost_per_mib": "5000000",
    "multiplier_ppm": "1000000",
    "persistence_blocks": "17280",
    "period": "172800",
    "fee_scale": "1000000",
    "registry_size": "11"
   },
   "expected": {
    "exactly_zero": "true"
   }
  },
  {
   "id": "04-12-estimate-duty-route",
   "chapter": "04",
   "section": "12",
   "title": "The fee estimate of a storage proof (type=41)",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "minimum_fee": "0",
    "duty": "true",
    "fee_exactly_zero": "true",
    "note": "A node duty declares a fee of exactly 0; with any other fee it is refused.",
    "fee_above_minimum": "refused",
    "overpay_refunded": "false"
   }
  },
  {
   "id": "04-12-estimate-batch",
   "chapter": "04",
   "section": "12",
   "title": "The fee estimate of a three-payment batch (type=257&actions=3)",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "minimum_fee": "7500132",
    "batch_actions": "3",
    "survival_payload_bytes": "137"
   }
  },
  {
   "id": "04-12-bogus-kind",
   "chapter": "04",
   "section": "12",
   "title": "An unknown escrow_kind is refused",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "escrow_kind must be single, request, cosigned or cosigned_request",
    "http": "400",
    "body": "{\"success\":false,\"error\":\"escrow_kind must be single, request, cosigned or cosigned_request\",\"code\":400}"
   }
  }
 ]
}
