{
 "format": "zoobc-conformance-vectors/1",
 "edition": "0.6.1",
 "chapter": "08",
 "license": "CC BY 4.0, ZooBC Foundation",
 "cases": [
  {
   "id": "08-1-bare-sender",
   "chapter": "08",
   "section": "1",
   "title": "A SendZBC whose sender is a bare 32-byte key is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "1111111111111111111111111111111111111111111111111111111111111111",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "accounts are typed: a bare 32-byte key is not an account on this chain"
   }
  },
  {
   "id": "08-1-full-key-recipient",
   "chapter": "08",
   "section": "1",
   "title": "A SendZBC whose recipient is an Ethereum full-key form (68 bytes) is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "040000002c67e6ec6aa795e8ae01447ac9f3a57616dc2cf17ddbe367d8dfc564e923c1e268487e15e10d153c32c41a2820a383628098d155fc6eefb44ba37e93e99f05f1",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   },
   "note": "The envelope bytes cannot carry this form; a block received by named fields can, and it is then invalid."
  },
  {
   "id": "08-1-canonical-recipient",
   "chapter": "08",
   "section": "1",
   "title": "The same payment to the 20-byte Keccak address of that key runs",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "040000003bc64c92d9bb1c5826643b081108b892e2e7f590",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-1-full-key-sender",
   "chapter": "08",
   "section": "1",
   "title": "A sender in a Bitcoin full-key form (37 bytes) is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "05000000027777777777777777777777777777777777777777777777777777777777777777",
    "recipient": "000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   }
  },
  {
   "id": "08-1-survival-freeze",
   "chapter": "08",
   "section": "1",
   "title": "A SetConsensusParam in a survival-mode block makes the block invalid",
   "kind": "08-survival-freeze",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "51",
    "height": "5000",
    "survival": "true"
   },
   "expected": {
    "error": "SurvivalMode: transaction type 51 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)"
   },
   "note": "The same text refuses it at admission when the flag of tip + 1 is true."
  },
  {
   "id": "08-1-survival-attest",
   "chapter": "08",
   "section": "1",
   "title": "An AttestEvent in a survival-mode block makes the block invalid (the bridge category)",
   "kind": "08-survival-freeze",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "17",
    "height": "5000",
    "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": "08-1-survival-payment",
   "chapter": "08",
   "section": "1",
   "title": "A SendZBC in a survival-mode block is accepted",
   "kind": "08-survival-freeze",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "height": "5000",
    "survival": "true"
   },
   "expected": {
    "accepted": "true"
   }
  },
  {
   "id": "08-1-carrier-nonce",
   "chapter": "08",
   "section": "1",
   "title": "An Ethereum carrier with nonce 3 from an account at nonce 2 makes its block invalid",
   "kind": "04-carrier-nonce",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "account_nonce": "2",
    "queued": "",
    "message": "02f878840883e00303843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c080a088fbfdcd5ed499b584925342bde13160ee7a6050ada03e97262f832443af1734a02306a8704892dc1ffcc68877e6c9b76be875b27ee8b2af4687f128f6051851c1",
    "at": "block"
   },
   "expected": {
    "error": "ForeignCarrierNonce: carrier nonce 3, account nonce 2 (a block carrying it is invalid)"
   },
   "note": "No fee, no row; the account's nonce stays 2 and the carrier id is not marked spent."
  },
  {
   "id": "08-1-carrier-nonce-equal",
   "chapter": "08",
   "section": "1",
   "title": "The same carrier with nonce 2 runs",
   "kind": "04-carrier-nonce",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "account_nonce": "2",
    "queued": "",
    "message": "02f878840883e00302843b9aca00862b4f2c6af9e8825208946139a624f2d5cc37803f0d99136e3ac387396377880de0b6b3a764000080c001a01321b32cfd268e48b89fb9cef632b4924ed43eee6f125b032402e486b33f1620a06dc7b9c6bae20eddd305bc865ccbde39264d6231860dc62cf354f296e0b78007",
    "at": "block"
   },
   "expected": {
    "nonce": "2",
    "expected": "2",
    "verdict": "the nonce is the expected one"
   },
   "note": "The payment runs and the account's nonce becomes 3."
  },
  {
   "id": "08-1-carrier-replay",
   "chapter": "08",
   "section": "1",
   "title": "Two carriers of one block whose messages canonicalise to one Ethereum transaction hash make it invalid",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "ForeignCarrierReplayed"
   }
  },
  {
   "id": "08-1-carrier-spent",
   "chapter": "08",
   "section": "1",
   "title": "A carrier whose hash is already in spent_foreign_message makes its block invalid",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "ForeignCarrierReplayed"
   }
  },
  {
   "id": "08-2-empty-settle",
   "chapter": "08",
   "section": "2",
   "title": "An Empty transaction pays its fee and gets the overpay back",
   "kind": "08-settlement",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "0",
    "balance": "10000000",
    "amount": "0",
    "fee": "5000000",
    "floor": "2500000"
   },
   "expected": {
    "balance_after": "7500000",
    "rows": "1:-5000000\n22:2500000"
   }
  },
  {
   "id": "08-2-empty-unpaid",
   "chapter": "08",
   "section": "2",
   "title": "An Empty transaction whose sender cannot pay is mined and nothing is taken",
   "kind": "08-settlement",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "0",
    "balance": "1000",
    "amount": "0",
    "fee": "5000000",
    "floor": "2500000"
   },
   "expected": {
    "balance_after": "1000",
    "rows": "22:5000000\n47:-5000000"
   }
  },
  {
   "id": "08-2-empty-check",
   "chapter": "08",
   "section": "2",
   "title": "An Empty transaction with an empty body passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "0",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "",
    "fee": "5000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-3-send",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC of 10 ZBC passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-3-send-settle",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC of 10 ZBC: the sender's balance after the settlement",
   "kind": "08-settlement",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "balance": "5000000000",
    "amount": "1000000000",
    "fee": "5000000",
    "floor": "2500000"
   },
   "expected": {
    "balance_after": "3997500000",
    "rows": "1:-1005000000\n22:2500000"
   }
  },
  {
   "id": "08-3-p2wsh",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC to a P2WSH address is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "08000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "Recipient address type cannot hold spendable funds (transfer would be permanently locked)"
   }
  },
  {
   "id": "08-3-zbs",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC to a ZBS_ deposit address is accepted",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "0a000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-3-short-body",
   "chapter": "08",
   "section": "3",
   "title": "A 7-byte SendZBC body is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "body": "00ca9a3b000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "Invalid SendZBC transaction body"
   }
  },
  {
   "id": "08-3-negative",
   "chapter": "08",
   "section": "3",
   "title": "A negative SendZBC amount is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "body": "ffffffffffffffff",
    "fee": "100000000"
   },
   "expected": {
    "error": "Transaction amount cannot be negative"
   }
  },
  {
   "id": "08-3-above-supply",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC of one unit above the total supply is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "body": "56554025a6d70b00",
    "fee": "100000000"
   },
   "expected": {
    "error": "SendZBC amount above total supply"
   }
  },
  {
   "id": "08-3-at-supply",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC of exactly the total supply passes that check",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "body": "55554025a6d70b00",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-3-no-recipient",
   "chapter": "08",
   "section": "3",
   "title": "A SendZBC without a recipient is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
    "recipient": "",
    "body": "00ca9a3b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "Missing recipient address"
   }
  },
  {
   "id": "08-3_1-body",
   "chapter": "08",
   "section": "3.1",
   "title": "A SendZBCBatch body of two payments",
   "kind": "08-batch-body",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "payments": "000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 100000000\n000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40 200000000"
   },
   "expected": {
    "body": "020024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2000e1f5050000000024000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4000c2eb0b00000000",
    "length": "92",
    "count": "2",
    "total": "300000000"
   }
  },
  {
   "id": "08-3_1-valid",
   "chapter": "08",
   "section": "3.1",
   "title": "The two-payment batch passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "020024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2000e1f5050000000024000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4000c2eb0b00000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-3_1-trailing",
   "chapter": "08",
   "section": "3.1",
   "title": "A batch with one byte after the last payment is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "020024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2000e1f5050000000024000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4000c2eb0b0000000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "SendZBCBatch: trailing bytes after the last payment"
   }
  },
  {
   "id": "08-3_1-count-zero",
   "chapter": "08",
   "section": "3.1",
   "title": "A batch whose count is 0 is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "000024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2000e1f5050000000024000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4000c2eb0b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "SendZBCBatch: a batch carries at least one action"
   }
  },
  {
   "id": "08-3_1-recipient",
   "chapter": "08",
   "section": "3.1",
   "title": "A batch with an envelope recipient is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "020024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2000e1f5050000000024000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4000c2eb0b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "SendZBCBatchTransaction: a batch names its recipients in its body; the envelope recipient must be empty"
   }
  },
  {
   "id": "08-3_1-full-key",
   "chapter": "08",
   "section": "3.1",
   "title": "A batch whose second payment names a Bitcoin full-key form (37 bytes) is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "020024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2000e1f50500000000250500000002777777777777777777777777777777777777777777777777777777777777777700c2eb0b00000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "SendZBCBatchTransaction: payment 1: a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   }
  },
  {
   "id": "08-3_1-zero-amount",
   "chapter": "08",
   "section": "3.1",
   "title": "A batch payment of 0 is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "257",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "010024000000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f200000000000000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "SendZBCBatchTransaction: payment 0: the amount must be positive"
   }
  },
  {
   "id": "08-4-body",
   "chapter": "08",
   "section": "4",
   "title": "A LiquidPayment of 0.1 ZBC over 3 minutes and the stop body of its id",
   "kind": "08-liquid-body",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "10000000",
    "complete_minutes": "3",
    "token_id": "",
    "payment_id": "-3909169050934266947"
   },
   "expected": {
    "body": "80969800000000000300000000000000",
    "stop_body": "bdb31cb875d7bfc9"
   }
  },
  {
   "id": "08-4-valid",
   "chapter": "08",
   "section": "4",
   "title": "The LiquidPayment passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "6",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "80969800000000000300000000000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-4-stop-66",
   "chapter": "08",
   "section": "4",
   "title": "A stop 66 s into a 180 s stream pays the recipient ceil(10,000,000 × 66 / 180)",
   "kind": "08-liquid-stop",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "10000000",
    "complete_minutes": "3",
    "applied_time": "1793600000",
    "stop_time": "1793600066"
   },
   "expected": {
    "recipient": "3666667",
    "sender": "6333333"
   }
  },
  {
   "id": "08-4-stop-180",
   "chapter": "08",
   "section": "4",
   "title": "A stop at the end of the stream pays the recipient everything",
   "kind": "08-liquid-stop",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "10000000",
    "complete_minutes": "3",
    "applied_time": "1793600000",
    "stop_time": "1793600180"
   },
   "expected": {
    "recipient": "10000000",
    "sender": "0"
   }
  },
  {
   "id": "08-4-stop-late",
   "chapter": "08",
   "section": "4",
   "title": "A stop after the end pays the recipient everything",
   "kind": "08-liquid-stop",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "10000000",
    "complete_minutes": "3",
    "applied_time": "1793600000",
    "stop_time": "1793600500"
   },
   "expected": {
    "recipient": "10000000",
    "sender": "0"
   }
  },
  {
   "id": "08-4-stop-exact",
   "chapter": "08",
   "section": "4",
   "title": "1 ZBC over 10 minutes stopped 66 s in pays exactly 11,000,000",
   "kind": "08-liquid-stop",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "100000000",
    "complete_minutes": "10",
    "applied_time": "1793600000",
    "stop_time": "1793600066"
   },
   "expected": {
    "recipient": "11000000",
    "sender": "89000000"
   }
  },
  {
   "id": "08-4-row",
   "chapter": "08",
   "section": "4",
   "title": "The LiquidPayment's row and its sender's ledger row",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "amount": "10000000",
    "applied_time": "1793600000",
    "complete_minutes": "3",
    "status": "0",
    "sender_row": "event 13, -(10000000 + fee), timestamp 1793599990"
   },
   "note": "Signed at 1,793,599,990 and mined in a block stamped 1,793,600,000: the stream starts at the block's timestamp."
  },
  {
   "id": "08-4-completion",
   "chapter": "08",
   "section": "4",
   "title": "Without a stop, the first block whose previous block is at or past the end pays the recipient",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "recipient +10,000,000 (row event 14) in the first block whose previous block's timestamp is ≥ 1,793,600,180"
   }
  },
  {
   "id": "08-4-zero-amount",
   "chapter": "08",
   "section": "4",
   "title": "A LiquidPayment of amount 0 is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "6",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "00000000000000000300000000000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "LiquidPayment: amount must be positive"
   }
  },
  {
   "id": "08-4-stop-early",
   "chapter": "08",
   "section": "4",
   "title": "A stop dated before the payment started is refused at admission",
   "kind": "08-liquid-stop",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "amount": "10000000",
    "complete_minutes": "3",
    "applied_time": "1793600000",
    "stop_time": "1793599999"
   },
   "expected": {
    "error": "LiquidPaymentStop: the stop is dated 1793599999, before the payment started (1793600000); a stop's timestamp is its vesting clock and may not precede the payment"
   }
  },
  {
   "id": "08-4-stop-early-block",
   "chapter": "08",
   "section": "4",
   "title": "A stop mined in a block stamped before the payment started is a paid no-op",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "a paid no-op"
   },
   "note": "Possible only through a reorganisation that re-dates the creating block."
  },
  {
   "id": "08-5-valid",
   "chapter": "08",
   "section": "5",
   "title": "A height trigger body passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "15",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "d09c01000000000040420f0000000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-5-id",
   "chapter": "08",
   "section": "5",
   "title": "The trigger id of a hash beginning 01 00 … 00",
   "kind": "08-trigger-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "hash": "0100000000000000000000000000000000000000000000000000000000000000"
   },
   "expected": {
    "trigger_id": "1"
   }
  },
  {
   "id": "08-5-id-zero",
   "chapter": "08",
   "section": "5",
   "title": "A hash beginning with eight zero bytes also gives trigger id 1",
   "kind": "08-trigger-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "hash": "0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff"
   },
   "expected": {
    "trigger_id": "1"
   }
  },
  {
   "id": "08-5-create",
   "chapter": "08",
   "section": "5",
   "title": "The trigger created in block 105,000",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "trigger_id": "1",
    "fire_height": "105680",
    "status": "0",
    "rows": "-fee (event 1), -1,000,000 (event 61)"
   }
  },
  {
   "id": "08-5-fire",
   "chapter": "08",
   "section": "5",
   "title": "The trigger fires at its height",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "at block 105,680 the recipient +1,000,000 (event 23) and status 1"
   }
  },
  {
   "id": "08-5-fire-overflow",
   "chapter": "08",
   "section": "5",
   "title": "A fire whose credit would overflow the recipient pays the longevity pool",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "the longevity pool +1,000,000 (event 50, transaction_id 1), status 1, the recipient unchanged"
   },
   "note": "The recipient holds 9,223,372,036,854,775,807 at block 105,680."
  },
  {
   "id": "08-5-short",
   "chapter": "08",
   "section": "5",
   "title": "An 8-byte CreateTrigger body is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "15",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "d09c010000000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "CreateTrigger body too short (need fire_height + amount)"
   }
  },
  {
   "id": "08-5-past",
   "chapter": "08",
   "section": "5",
   "title": "A trigger whose fire height is not above the block height makes the block invalid",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "Trigger fire height must be in the future"
   }
  },
  {
   "id": "08-6-faucet-row",
   "chapter": "08",
   "section": "6",
   "title": "The TestNet genesis faucet schedule (its first vesting entry)",
   "kind": "07-genesis-vesting",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "funder": "ZBC_CIHOJSU5_EWGXKZLJ_AHWEQNZX_HYDXMM3J_VV263DLD_7IY4PYFX_5ADSND7R",
    "recipient": "ZBC_ELBIB5B3_UOEFOFEK_W7YICC7B_PL4HD7ED_RPF3TULW_HS667KIA_7A7XAJUC",
    "token_id": "0",
    "per_fire_amount": "160000000000",
    "interval_seconds": "86400",
    "remaining_fires": "600",
    "cliff_seconds": "0",
    "cancel_policy": "1",
    "funding_mode": "1",
    "index": "0",
    "genesis_timestamp": "1793509027"
   },
   "expected": {
    "trigger_id": "9216412776157539296"
   },
   "note": "kind 2 in pull mode (funding_mode 1), fire_time = the genesis timestamp."
  },
  {
   "id": "08-6-faucet",
   "chapter": "08",
   "section": "6",
   "title": "The TestNet genesis faucet schedule and its fire in block 1",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "trigger_id": "9216412776157539296",
    "kind": "2",
    "funding_mode": "1",
    "per_fire_amount": "160000000000",
    "interval_seconds": "86400",
    "cancel_policy": "1",
    "fire_time": "1793509027",
    "fires_in_block": "1",
    "rows": "treasury -160000000000 (event 29), faucet +160000000000 (event 29)",
    "remaining_fires_after": "599",
    "fire_time_after": "1793595427"
   },
   "note": "The genesis file lists 600 fires; the n-th fire lands in the first block whose previous block is stamped at or after 1,793,509,027 + (n - 1) x 86,400."
  },
  {
   "id": "08-6-vesting",
   "chapter": "08",
   "section": "6",
   "title": "A pre-locked schedule of 100 ZBC × 3 fires, interval 3,600, cliff 60",
   "kind": "08-schedule",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "body": "000000000000000000e40b5402000000100e000000000000030000003c000000000000000000000000000000000000",
    "block_timestamp": "1793700000"
   },
   "expected": {
    "per_fire_amount": "10000000000",
    "remaining_fires": "3",
    "kind": "2",
    "locked_remaining": "30000000000",
    "fire_time": "1793700060",
    "fire_times": "1793700060\n1793703660\n1793707260",
    "last_tranche": "10000000000"
   }
  },
  {
   "id": "08-6-valid",
   "chapter": "08",
   "section": "6",
   "title": "The schedule body passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "29",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "000000000000000000e40b5402000000100e000000000000030000003c000000000000000000000000000000000000",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-6-end-refund-pool",
   "chapter": "08",
   "section": "6",
   "title": "A schedule ended by its end_time whose refund to the owner is refused pays the longevity pool",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "status": "1",
    "value": "the remaining 10,000,000,000 to the longevity pool (event 50, transaction_id = the schedule id)"
   },
   "note": "The 100 ZBC x 3 schedule above with end_time T + 4,000: after the second fire, next = T + 7,260 is past end_time."
  },
  {
   "id": "08-6-fires-521",
   "chapter": "08",
   "section": "6",
   "title": "A schedule of 521 fires is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "29",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "000000000000000000e40b5402000000100e000000000000090200003c000000000000000000000000000000000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "remaining_fires out of range"
   }
  },
  {
   "id": "08-6-reserved",
   "chapter": "08",
   "section": "6",
   "title": "A schedule whose reserved byte is 1 is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "29",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "000000000000000000e40b5402000000100e000000000000030000003c000000000000000000000000000000000001",
    "fee": "100000000"
   },
   "expected": {
    "error": "reserved byte must be 0"
   }
  },
  {
   "id": "08-6-short",
   "chapter": "08",
   "section": "6",
   "title": "A 46-byte schedule body is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "29",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "body": "000000000000000000e40b5402000000100e000000000000030000003c0000000000000000000000000000000000",
    "fee": "100000000"
   },
   "expected": {
    "error": "Invalid ScheduledTransfer body"
   }
  },
  {
   "id": "08-7-body",
   "chapter": "08",
   "section": "7",
   "title": "The CancelSchedule body of the faucet schedule",
   "kind": "08-id-bytes",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "id": "9216412776157539296"
   },
   "expected": {
    "bytes": "e0eb3dda9646e77f"
   }
  },
  {
   "id": "08-7-valid",
   "chapter": "08",
   "section": "7",
   "title": "The CancelSchedule body passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "30",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "e0eb3dda9646e77f",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-7-not-authorized",
   "chapter": "08",
   "section": "7",
   "title": "The treasury may not cancel the irrevocable faucet schedule",
   "kind": "reference",
   "validity": "invalid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "error": "CancelSchedule: not authorized to cancel"
   }
  },
  {
   "id": "08-7-recipient",
   "chapter": "08",
   "section": "7",
   "title": "The faucet (the recipient) may decline the schedule",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "status": "2",
    "refund": "0"
   },
   "note": "A pull schedule locks nothing, so nothing is returned."
  },
  {
   "id": "08-7-short",
   "chapter": "08",
   "section": "7",
   "title": "A 7-byte CancelSchedule body is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "30",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "e0eb3dda9646e7",
    "fee": "100000000"
   },
   "expected": {
    "error": "CancelSchedule body too short"
   }
  },
  {
   "id": "08-8-valid",
   "chapter": "08",
   "section": "8",
   "title": "A ReassignSchedule to a typed ZBC account passes the stateless checks",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "31",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "e0eb3dda9646e77f000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-8-extra",
   "chapter": "08",
   "section": "8",
   "title": "A ReassignSchedule body with one extra byte is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "31",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "e0eb3dda9646e77f000000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4000",
    "fee": "100000000"
   },
   "expected": {
    "error": "ReassignSchedule: new_recipient length mismatch"
   }
  },
  {
   "id": "08-8-p2wsh",
   "chapter": "08",
   "section": "8",
   "title": "A ReassignSchedule to a P2WSH address is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "31",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "e0eb3dda9646e77f080000002122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f40",
    "fee": "100000000"
   },
   "expected": {
    "error": "ReassignSchedule: new_recipient address type cannot hold spendable funds"
   }
  },
  {
   "id": "08-9-split",
   "chapter": "08",
   "section": "9",
   "title": "A split policy sending 50 % to the release authority passes",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "0124000000007d8bd8a41dceea4986d1e99dfe99ca9303874b7c3aac7eeecd60a82f619025728813",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-9-split-clear",
   "chapter": "08",
   "section": "9",
   "title": "The body 00 clears the split policy",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "00",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-9-transact",
   "chapter": "08",
   "section": "9",
   "title": "SetTransactPolicy with mask 5 passes",
   "kind": "08-tx-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "50",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "0500",
    "fee": "100000000"
   },
   "expected": {
    "valid": "true"
   }
  },
  {
   "id": "08-9-over-100",
   "chapter": "08",
   "section": "9",
   "title": "Shares of 10,001 basis points are refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "0124000000007d8bd8a41dceea4986d1e99dfe99ca9303874b7c3aac7eeecd60a82f619025721127",
    "fee": "100000000"
   },
   "expected": {
    "error": "SplitPolicy: shares add up to more than 100%"
   }
  },
  {
   "id": "08-9-zero-share",
   "chapter": "08",
   "section": "9",
   "title": "A share of 0 basis points is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "0124000000007d8bd8a41dceea4986d1e99dfe99ca9303874b7c3aac7eeecd60a82f619025720000",
    "fee": "100000000"
   },
   "expected": {
    "error": "SplitPolicy: a share must be at least 1 basis point"
   }
  },
  {
   "id": "08-9-self",
   "chapter": "08",
   "section": "9",
   "title": "The sender as its own split recipient is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000007d8bd8a41dceea4986d1e99dfe99ca9303874b7c3aac7eeecd60a82f61902572",
    "recipient": "",
    "body": "0124000000007d8bd8a41dceea4986d1e99dfe99ca9303874b7c3aac7eeecd60a82f619025728813",
    "fee": "100000000"
   },
   "expected": {
    "error": "SplitPolicy: the account cannot be its own recipient (leave the share unassigned instead)"
   }
  },
  {
   "id": "08-9-empty",
   "chapter": "08",
   "section": "9",
   "title": "An empty split-policy body is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "",
    "fee": "100000000"
   },
   "expected": {
    "error": "SplitPolicy: empty body"
   }
  },
  {
   "id": "08-9-full-key",
   "chapter": "08",
   "section": "9",
   "title": "A split entry in an Ethereum full-key form (68 bytes) is refused",
   "kind": "08-tx-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "54",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "body": "0144040000005a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a8813",
    "fee": "100000000"
   },
   "expected": {
    "error": "SplitPolicy: a recipient: a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   }
  },
  {
   "id": "08-10-shares",
   "chapter": "08",
   "section": "10",
   "title": "123,456,789 arriving at a holder with one entry of 5,000 bp",
   "kind": "08-split-share",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "123456789",
    "shares_bp": "5000"
   },
   "expected": {
    "shares": "61728394",
    "kept": "61728395"
   }
  },
  {
   "id": "08-10-seven",
   "chapter": "08",
   "section": "10",
   "title": "7 units at 5,000 bp",
   "kind": "08-split-share",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "7",
    "shares_bp": "5000"
   },
   "expected": {
    "shares": "3",
    "kept": "4"
   }
  },
  {
   "id": "08-10-one",
   "chapter": "08",
   "section": "10",
   "title": "1 unit at 5,000 bp: the share is 0 and stays",
   "kind": "08-split-share",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "amount": "1",
    "shares_bp": "5000"
   },
   "expected": {
    "shares": "0",
    "kept": "1"
   }
  },
  {
   "id": "08-11-recipient",
   "chapter": "08",
   "section": "11",
   "title": "A SendZBC to an account with transact_policy 1 is refused",
   "kind": "08-transact-policy",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender_mask": "0",
    "recipient_mask": "1"
   },
   "expected": {
    "error": "Refused by transact policy: the recipient's transact policy refuses Payments transactions (SetTransactPolicy bit 0, mask 1)"
   }
  },
  {
   "id": "08-11-sender",
   "chapter": "08",
   "section": "11",
   "title": "A TransferToken from an account with transact_policy 4 is refused",
   "kind": "08-transact-policy",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "11",
    "sender_mask": "4"
   },
   "expected": {
    "error": "Refused by transact policy: the sender's transact policy refuses Tokens transactions (SetTransactPolicy bit 2, mask 4)"
   }
  },
  {
   "id": "08-11-allowed",
   "chapter": "08",
   "section": "11",
   "title": "A SendZBC between accounts with no policy goes through",
   "kind": "08-transact-policy",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "sender_mask": "0",
    "recipient_mask": "0"
   },
   "expected": {
    "category": "Payments",
    "refused": "false"
   }
  },
  {
   "id": "08-11-none",
   "chapter": "08",
   "section": "11",
   "title": "SetTransactPolicy is never refused (category None)",
   "kind": "08-transact-policy",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "50",
    "sender_mask": "511"
   },
   "expected": {
    "category": "None",
    "refused": "false"
   }
  },
  {
   "id": "08-11-genesis",
   "chapter": "08",
   "section": "11",
   "title": "Every account row the genesis build writes has transact policy 0",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "transact_policy": "0"
   }
  },
  {
   "id": "08-12-pull-fires",
   "chapter": "08",
   "section": "12",
   "title": "The faucet schedule's fire in block 1 writes two rows of event 29",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "two rows of event 29"
   }
  }
 ]
}
