{
 "format": "zoobc-conformance-vectors/1",
 "edition": "0.6.1",
 "chapter": "18",
 "license": "CC BY 4.0, ZooBC Foundation",
 "cases": [
  {
   "id": "18-1-address",
   "chapter": "18",
   "section": "1",
   "title": "The group address of a founding link whose hash is 32 bytes of AB",
   "kind": "18-group-address",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "hash": "abababababababababababababababababababababababababababababababab"
   },
   "expected": {
    "address": "0000000026089158c66e9217872cc1780ced187ce334413ba93844edd2813c77bdf13e67"
   }
  },
  {
   "id": "18-1-no-group",
   "chapter": "18",
   "section": "1",
   "title": "The group view of the TestNet treasury while it is in no group",
   "kind": "reference",
   "validity": "valid",
   "source": "computed",
   "inputs": {},
   "expected": {
    "value": "{\"address\":\"00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807\",\"role\":\"none\",\"max_members\":100}"
   },
   "note": "account_group_max_members is 100 in both live genesis files and the mainnet template."
  },
  {
   "id": "18-2-link-digest",
   "chapter": "18",
   "section": "2",
   "title": "A link digest for an Ethereum member",
   "kind": "18-consent-digest",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "tag": "link",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
    "a": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "b": "040000002222222222222222222222222222222222222222",
    "valid_until": "1000",
    "link_seq": "0"
   },
   "expected": {
    "digest": "999e96f16db8bf3be83b59fce3dfc56f3cc7fa0397dc80bcbaa502f24ff66120"
   }
  },
  {
   "id": "18-2-control-digest",
   "chapter": "18",
   "section": "2",
   "title": "The same with the control tag and link_seq 3",
   "kind": "18-consent-digest",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "tag": "control",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
    "a": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "b": "040000002222222222222222222222222222222222222222",
    "valid_until": "1000",
    "link_seq": "3"
   },
   "expected": {
    "digest": "7b3637c306eff8f6ffefc9bc316263c292a2fbf6f4a5e01c6dba57b70278334d"
   }
  },
  {
   "id": "18-2-testnet-digest",
   "chapter": "18",
   "section": "2",
   "title": "The link digest of two ZooBC accounts under the vectors' identity G",
   "kind": "18-consent-digest",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "tag": "link",
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871",
    "a": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "b": "00000000b6675786bedf28b3e7dcd8bac9bf99758b3a64604570bffd12fd10cbf20b39ea",
    "valid_until": "20000",
    "link_seq": "0"
   },
   "expected": {
    "digest": "d503c25a8d7a14e9ca38dcad639cc4e0494a0092372fcb405051444ec490d3e9"
   }
  },
  {
   "id": "18-2-tron-digest",
   "chapter": "18",
   "section": "2",
   "title": "The link digest and the signed payload of a Tron member's kind-2 consent",
   "kind": "18-consent-digest",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "tag": "link",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
    "a": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "b": "0f0000009c1a9d01f45581f7cb95bf81aa1a95997700a10d",
    "valid_until": "1000",
    "link_seq": "0",
    "prefix": "tron"
   },
   "expected": {
    "digest": "593b9f220abadf8a96d5733a1f36c79a8077fa6f183622a25ab3b94d977ab78f",
    "payload": "1954524f4e205369676e6564204d6573736167653a0a3332593b9f220abadf8a96d5733a1f36c79a8077fa6f183622a25ab3b94d977ab78f",
    "payload_keccak": "1e17891291c4ac4417f478fa95ecdb7b25edcbcf9e51376320094bb0fb9c3b16"
   }
  },
  {
   "id": "18-2-tron-consent",
   "chapter": "18",
   "section": "2",
   "title": "A LinkAccount whose Tron member consents with TronLink's message signature (102 bytes)",
   "kind": "18-group-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "body": "01180f0000009c1a9d01f45581f7cb95bf81aa1a95997700a10de803000000000000024100794b89322d095e896374056a925d77680e6389f62281d377b93797ae3247901378543cda4d13f245951a32eb454232ba2b40bb849e81f453ac29940ad4ff8d421b",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
   },
   "expected": {
    "verdict": "valid"
   },
   "note": "The signature is RFC 6979, low s, v = 27; the key it recovers has the member's address."
  },
  {
   "id": "18-2-tron-v00",
   "chapter": "18",
   "section": "2",
   "title": "The same body with the signature's last byte 1B replaced by 00",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "body": "01180f0000009c1a9d01f45581f7cb95bf81aa1a95997700a10de803000000000000024100794b89322d095e896374056a925d77680e6389f62281d377b93797ae3247901378543cda4d13f245951a32eb454232ba2b40bb849e81f453ac29940ad4ff8d4200",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
   },
   "expected": {
    "error": "LinkAccount: member consent: the consent signature: Ethereum signature recovery id must be 27 or 28"
   }
  },
  {
   "id": "18-2-tron-full-key",
   "chapter": "18",
   "section": "2",
   "title": "The Tron member written as its full-key form",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "body": "01440f000000c74549af6b5471375c00f48bf2871a78117b781b9d0154fbfc54230c7c8d1a6be2688171e8dabf5e0643891613bf0c84ba94f8cfa1fd02c170d27dc4df63bcb3e803000000000000024100794b89322d095e896374056a925d77680e6389f62281d377b93797ae3247901378543cda4d13f245951a32eb454232ba2b40bb849e81f453ac29940ad4ff8d421b",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
   },
   "expected": {
    "error": "LinkAccount: the member: 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": "18-2-multisig-digest",
   "chapter": "18",
   "section": "2",
   "title": "The link digest of the multisig member",
   "kind": "18-consent-digest",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "tag": "link",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
    "a": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "b": "00000000c5ac58f44d7b642638605b72bccc34739f5fd4b4e5d69563f071b8f1fb07de90",
    "valid_until": "1000",
    "link_seq": "0"
   },
   "expected": {
    "digest": "26a7907da15846173799482f599da3ff04982968e4facd694859b54cd42a7846"
   }
  },
  {
   "id": "18-2-multisig-consent",
   "chapter": "18",
   "section": "2",
   "title": "A LinkAccount whose 1-of-2 multisig member consents through one participant (202 bytes)",
   "kind": "18-group-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "body": "012400000000c5ac58f44d7b642638605b72bccc34739f5fd4b4e5d69563f071b8f1fb07de90e8030000000000000101000000070000000000000002240000000041f9a78a8e744e097002de7303fb0648f44ed0d5d3ea195accd8bfa7897e61f14000aa9759cc18bffddb061df8eecd3d6ad1bea0dbb039bc7c10bf74a44ab954fba3b891b946abff433a60f64c4113922cb367ba75a1e37d2b34064c26b20439360224000000007d045551b600b10c872d2e53507911dc52cfe11ad3966b60ecc87c875e3bca4e0000",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
   },
   "expected": {
    "verdict": "valid"
   },
   "note": "The member is the typed account 00000000 || H of the participants, the threshold 1 and the nonce 7."
  },
  {
   "id": "18-2-multisig-nonce-8",
   "chapter": "18",
   "section": "2",
   "title": "The same body with nonce 8",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "000000001111111111111111111111111111111111111111111111111111111111111111",
    "body": "012400000000c5ac58f44d7b642638605b72bccc34739f5fd4b4e5d69563f071b8f1fb07de90e8030000000000000101000000080000000000000002240000000041f9a78a8e744e097002de7303fb0648f44ed0d5d3ea195accd8bfa7897e61f14000aa9759cc18bffddb061df8eecd3d6ad1bea0dbb039bc7c10bf74a44ab954fba3b891b946abff433a60f64c4113922cb367ba75a1e37d2b34064c26b20439360224000000007d045551b600b10c872d2e53507911dc52cfe11ad3966b60ecc87c875e3bca4e0000",
    "genesis": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
   },
   "expected": {
    "error": "LinkAccount: member consent: multisig consent: the participants, threshold and nonce do not hash to the consenting address"
   }
  },
  {
   "id": "18-2-link-body",
   "chapter": "18",
   "section": "2",
   "title": "A LinkAccount body consented by the member's Ed25519 key (here the key of seed 32 bytes of 11)",
   "kind": "18-link-body",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871",
    "sender": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "seed": "1111111111111111111111111111111111111111111111111111111111111111",
    "valid_until": "20000",
    "link_seq": "0"
   },
   "expected": {
    "length": "113"
   }
  },
  {
   "id": "18-2-permissions-body",
   "chapter": "18",
   "section": "2",
   "title": "A SetMemberPermissions body: spend, 0.5 ZBC per 1,000 blocks",
   "kind": "18-permissions-body",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "member": "00000000b6675786bedf28b3e7dcd8bac9bf99758b3a64604570bffd12fd10cbf20b39ea",
    "flags": "1",
    "limit": "50000000",
    "period": "1000"
   },
   "expected": {
    "body": "012400000000b6675786bedf28b3e7dcd8bac9bf99758b3a64604570bffd12fd10cbf20b39ea0180f0fa0200000000e8030000",
    "length": "51"
   }
  },
  {
   "id": "18-2-tokens-without-spend",
   "chapter": "18",
   "section": "2",
   "title": "The token permission without the spend permission",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "57",
    "sender": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "body": "012400000000b6675786bedf28b3e7dcd8bac9bf99758b3a64604570bffd12fd10cbf20b39ea02000000000000000000000000",
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871"
   },
   "expected": {
    "error": "SetMemberPermissions: the token permission (bit 1) needs the spend permission (bit 0)"
   }
  },
  {
   "id": "18-2-bare-member",
   "chapter": "18",
   "section": "2",
   "title": "A member field holding a bare 32-byte key",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "body": "0120b6675786bedf28b3e7dcd8bac9bf99758b3a64604570bffd12fd10cbf20b39ea204e00000000000000400033333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333",
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871"
   },
   "expected": {
    "error": "LinkAccount: the member address is malformed"
   }
  },
  {
   "id": "18-2-trailing",
   "chapter": "18",
   "section": "2",
   "title": "A LinkAccount body with one trailing byte",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "55",
    "sender": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "body": "012400000000b6675786bedf28b3e7dcd8bac9bf99758b3a64604570bffd12fd10cbf20b39ea204e0000000000000040003333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333300",
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871"
   },
   "expected": {
    "error": "LinkAccount: truncated body or trailing bytes"
   }
  },
  {
   "id": "18-3-found",
   "chapter": "18",
   "section": "3",
   "title": "C founds a group with M: what moves",
   "kind": "18-link-found",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "hash": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
    "controller_balance": "297449945",
    "member_balance": "100000000",
    "valid_until": "20000",
    "height": "19000",
    "again": "false",
    "member_tokens": "5"
   },
   "expected": {
    "link_seq": "1",
    "group_balance": "397449945",
    "rows": "48 C -297449945\n49 G 297449945\n48 M -100000000\n49 G 100000000",
    "members": "C 0 19000\nM 0 19000"
   }
  },
  {
   "id": "18-3-again",
   "chapter": "18",
   "section": "3",
   "title": "The same link sent again",
   "kind": "18-link-found",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "hash": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
    "controller_balance": "297449945",
    "member_balance": "100000000",
    "valid_until": "20000",
    "height": "19000",
    "again": "true",
    "member_tokens": "5"
   },
   "expected": {
    "error": "LinkAccount: link_seq 0 does not match the group's counter 1"
   }
  },
  {
   "id": "18-3-expired",
   "chapter": "18",
   "section": "3",
   "title": "The link at height 20,001",
   "kind": "18-link-found",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "hash": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
    "controller_balance": "297449945",
    "member_balance": "100000000",
    "valid_until": "20000",
    "height": "20001",
    "again": "false",
    "member_tokens": "5"
   },
   "expected": {
    "error": "LinkAccount: the consent expired at height 20000"
   }
  },
  {
   "id": "18-4-unlink",
   "chapter": "18",
   "section": "4",
   "title": "The controller removes M",
   "kind": "18-manage",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "0",
    "limit": "0",
    "period": "0",
    "type": "56",
    "sender": "C",
    "target": "M",
    "with_x": "true"
   },
   "expected": {
    "active": "false",
    "flags": "0",
    "spend_limit": "0",
    "period_blocks": "0",
    "window_start": "0",
    "window_spent": "0"
   }
  },
  {
   "id": "18-4-controller-leaves",
   "chapter": "18",
   "section": "4",
   "title": "The controller names itself",
   "kind": "18-manage",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "0",
    "limit": "0",
    "period": "0",
    "type": "56",
    "sender": "C",
    "target": "C",
    "with_x": "true"
   },
   "expected": {
    "error": "UnlinkAccount: the controller cannot leave; transfer control to another member first"
   }
  },
  {
   "id": "18-4-third-member",
   "chapter": "18",
   "section": "4",
   "title": "A third member removes M",
   "kind": "18-manage",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "0",
    "limit": "0",
    "period": "0",
    "type": "56",
    "sender": "X",
    "target": "M",
    "with_x": "true"
   },
   "expected": {
    "error": "Account group: only the group's controller can remove another member"
   },
   "note": "X is a member of the group, so the member gate answers before the group state is read."
  },
  {
   "id": "18-5-permissions",
   "chapter": "18",
   "section": "5",
   "title": "The controller lets M spend 0.5 ZBC per 1,000 blocks",
   "kind": "18-manage",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "1",
    "limit": "50000000",
    "period": "1000",
    "type": "57",
    "sender": "C",
    "target": "M",
    "with_x": "false"
   },
   "expected": {
    "flags": "1",
    "spend_limit": "50000000",
    "period_blocks": "1000",
    "window_start": "0",
    "window_spent": "0"
   }
  },
  {
   "id": "18-5-control",
   "chapter": "18",
   "section": "5",
   "title": "The controller hands control to M",
   "kind": "18-manage",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "0",
    "limit": "0",
    "period": "0",
    "type": "58",
    "sender": "C",
    "target": "M",
    "with_x": "false"
   },
   "expected": {
    "controller": "M",
    "link_seq": "2",
    "former": "0"
   }
  },
  {
   "id": "18-5-permissions-by-member",
   "chapter": "18",
   "section": "5",
   "title": "M sends the permissions body",
   "kind": "18-manage",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "1",
    "limit": "50000000",
    "period": "1000",
    "type": "57",
    "sender": "M",
    "target": "M",
    "with_x": "false"
   },
   "expected": {
    "error": "SetMemberPermissions: the controller's own rights are not set by permissions"
   },
   "note": "The member the body names is the sender, so the stateless check refuses it."
  },
  {
   "id": "18-5-permissions-by-member-x",
   "chapter": "18",
   "section": "5",
   "title": "M sends a permissions body naming X",
   "kind": "18-manage",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "1",
    "limit": "50000000",
    "period": "1000",
    "type": "57",
    "sender": "M",
    "target": "X",
    "with_x": "true"
   },
   "expected": {
    "error": "Account group: only the group's controller can send this transaction type for the group"
   }
  },
  {
   "id": "18-5-permissions-full-key",
   "chapter": "18",
   "section": "5",
   "title": "A SetMemberPermissions body naming the Tron member in its full-key form",
   "kind": "18-group-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "57",
    "sender": "00000000120ee4ca9d258d75656901ec4837373e07763369ad75ed8d63fa31c7e0b7e807",
    "body": "01440f000000c74549af6b5471375c00f48bf2871a78117b781b9d0154fbfc54230c7c8d1a6be2688171e8dabf5e0643891613bf0c84ba94f8cfa1fd02c170d27dc4df63bcb30180f0fa0200000000e8030000",
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871"
   },
   "expected": {
    "error": "SetMemberPermissions: the member: 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": "18-5-control-by-member",
   "chapter": "18",
   "section": "5",
   "title": "M, not the controller, hands control to X",
   "kind": "18-manage",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "height": "19500",
    "flags": "0",
    "limit": "0",
    "period": "0",
    "type": "58",
    "sender": "M",
    "target": "X",
    "with_x": "true"
   },
   "expected": {
    "error": "Account group: only the group's controller can send this transaction type for the group"
   },
   "note": "M is a member of the group, so the member gate answers before the group state is read."
  },
  {
   "id": "18-6-moves",
   "chapter": "18",
   "section": "6",
   "title": "M joins with 1 ZBC and 5 units of token 1",
   "kind": "18-link-found",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "hash": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
    "controller_balance": "0",
    "member_balance": "100000000",
    "valid_until": "20000",
    "height": "19000",
    "again": "false",
    "member_tokens": "5"
   },
   "expected": {
    "rows": "48 M -100000000\n49 G 100000000",
    "group_tokens": "5",
    "member_tokens": "0"
   }
  },
  {
   "id": "18-7-gateway-owner",
   "chapter": "18",
   "section": "7",
   "title": "The genesis gateway's owner founds a group",
   "kind": "18-blocker",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "gateway_key": "93cbcbc3e3d3b7459b881eafdbf0ec462824599de215fe48d181805441bf908a",
    "gateway_owner": "00000000ed52418c88a6df31fc4dae2523c1673cb2e286710b0d1c99ef1bb27501014451",
    "address": "00000000ed52418c88a6df31fc4dae2523c1673cb2e286710b0d1c99ef1bb27501014451",
    "role": "founder"
   },
   "expected": {
    "verdict": "allowed"
   }
  },
  {
   "id": "18-7-gateway-key",
   "chapter": "18",
   "section": "7",
   "title": "The account over the gateway's key as a member",
   "kind": "18-blocker",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "gateway_key": "93cbcbc3e3d3b7459b881eafdbf0ec462824599de215fe48d181805441bf908a",
    "gateway_owner": "00000000ed52418c88a6df31fc4dae2523c1673cb2e286710b0d1c99ef1bb27501014451",
    "address": "0000000093cbcbc3e3d3b7459b881eafdbf0ec462824599de215fe48d181805441bf908a",
    "role": "member"
   },
   "expected": {
    "error": "LinkAccount: the member cannot join: the address is the signing key of a registered node, gateway, relay or archival; its own transactions (blocks, votes, heartbeats, proofs) must come from that key's own account, so it cannot join a group (its OWNER can)"
   }
  },
  {
   "id": "18-7-pool",
   "chapter": "18",
   "section": "7",
   "title": "The longevity pool as a member",
   "kind": "18-blocker",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "gateway_key": "93cbcbc3e3d3b7459b881eafdbf0ec462824599de215fe48d181805441bf908a",
    "gateway_owner": "00000000ed52418c88a6df31fc4dae2523c1673cb2e286710b0d1c99ef1bb27501014451",
    "address": "000000005a42434c4f4e4756000000000000000000000000000000000000000000000000",
    "role": "member"
   },
   "expected": {
    "error": "LinkAccount: the member cannot join: a system pool cannot join a group"
   }
  },
  {
   "id": "18-8-over-limit",
   "chapter": "18",
   "section": "8",
   "title": "A member sends 0.48 ZBC with a fee of 0.0255",
   "kind": "18-member-gate",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "flags": "1",
    "limit": "50000000",
    "period": "1000",
    "window_start": "0",
    "window_spent": "0",
    "height": "500",
    "fee": "2550000",
    "amount": "48000000"
   },
   "expected": {
    "error": "Account group: the member's spending limit would be exceeded (0 of 50000000 used this period, this transaction can take up to 50550000)"
   }
  },
  {
   "id": "18-8-within",
   "chapter": "18",
   "section": "8",
   "title": "A member sends 0.47 ZBC with a fee of 0.0255",
   "kind": "18-member-gate",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "flags": "1",
    "limit": "50000000",
    "period": "1000",
    "window_start": "0",
    "window_spent": "0",
    "height": "500",
    "fee": "2550000",
    "amount": "47000000"
   },
   "expected": {
    "verdict": "measured",
    "max_outflow": "49550000"
   }
  },
  {
   "id": "18-8-receive-only",
   "chapter": "18",
   "section": "8",
   "title": "A receive-only member sends anything",
   "kind": "18-member-gate",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "flags": "0",
    "limit": "0",
    "period": "0",
    "window_start": "0",
    "window_spent": "0",
    "height": "500",
    "fee": "2550000",
    "amount": "1"
   },
   "expected": {
    "error": "Account group: this address is a receive-only member of its group; the controller has not enabled it to spend"
   }
  },
  {
   "id": "18-8-window",
   "chapter": "18",
   "section": "8",
   "title": "After the measured spend: the group's net decrease is counted",
   "kind": "18-member-window",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "limit": "50000000",
    "period": "1000",
    "window_start": "0",
    "window_spent": "0",
    "height": "500",
    "outflow": "49500000"
   },
   "expected": {
    "window_start": "0",
    "window_spent": "49500000"
   }
  },
  {
   "id": "18-9-two",
   "chapter": "18",
   "section": "9",
   "title": "A controller and one member",
   "kind": "18-group-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1000000",
    "cost_per_mib": "5000000",
    "ppm": "1000000",
    "controller": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "members": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\n00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67"
   },
   "expected": {
    "weight": "284",
    "rent": "1001355"
   }
  },
  {
   "id": "18-9-one",
   "chapter": "18",
   "section": "9",
   "title": "The controller alone",
   "kind": "18-group-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1000000",
    "cost_per_mib": "5000000",
    "ppm": "1000000",
    "controller": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "members": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152"
   },
   "expected": {
    "weight": "208",
    "rent": "1000992"
   }
  },
  {
   "id": "18-9-hundred",
   "chapter": "18",
   "section": "9",
   "title": "One hundred addresses, the controller included",
   "kind": "18-group-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1000000",
    "cost_per_mib": "5000000",
    "ppm": "1000000",
    "controller": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "members": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\n0000000012883d887d4df16f95aeccd7a16d2e06ce448050da897009f525174a14e529c8\n0000000055592506c44db4ce2f1c7e6c4537d0db3b29e9b3a554864ae21689722e20213e\n00000000078c1e3f3478b865371d5526bda1beb486e7e81d4e3c84d130a4b2edb420c9d4\n00000000f3d343d4ed1b854f8e209dee7a0a3f5c5a293fe09017e342755f4f9dfcee80a5\n00000000a0e8e34dd0d5850972ff43af35ae7a8e04e7cd8b8227375123644a6d77cd3e2b\n00000000347ba62a65ff0c4bcd0f350706721e4c215778dcc983667c87bfd076fb528002\n00000000138980fbd751d24f65c804cad4c1dbe2dc60c8444b527ed2c94f2c13730a5654\n00000000f865c6838b2c4b2e41622545122b964700e9d20b52f12a1231c9521b2ccb6b72\n00000000e0eb54120f0dd10275245f5f02b3ba7326a3f40a3eeda8d26a097f6e34b81166\n000000007fc6f92637021da6368a4e6c0ea3499b4e2c770b70648b9c0d1d0989455d895b\n00000000030c6b566a218698827dc716d472403365f16c8ed4954bbbf0551b1f6d69f86c\n0000000049b4efc528e5bc28dfe6e2fe6d4b3a1ca6dc49aad013cc4f2bbb879e26de8713\n000000006a9efb32c91095fc6662060d6fb2dc24b89f35bc32fc30358bd210acd2578730\n00000000d7a7563201c8cd084b4ef62ab090c00b06dbad349b10c12c27af9a9958428777\n0000000099ce16cf75a174306decfee31b9279eaab1782676c72e0a4994edc046487393a\n00000000db4d9ff3b064da1deb42055fca6d140c2da48cd40bdb37a904fb799953765556\n00000000e05564524edfef69e214d1b0dff905e3e620b961372f2ad7640e8010a551b14b\n00000000e11b9058c88689c1a0284ed62f824fbbbde2edd7f3eb136f4ef39977b2d8df9e\n000000003d93fbf274f6f5275db299d27cf6617c3e3caf2b434f7c40528461940efbbf78\n0000000098823b550a8509e20a2e6c817d1ee4248214878c497a48e31e635ecb757e1fec\n00000000458961bea60bac9a5dfcb07e225e04f711f02d59d6b0325b7ed3632c70932501\n000000003afeea7967f2054d624aebc44d7ae288666ab41319be84a7b688cb7cf771227e\n0000000053be0413ea61c357d24ba4ce9e801e6aef1b1f01ae38d94ea396e640bb5cc8b9\n000000007299e9d04a71491079d82ab4cf3417cf999d84b6d4a32f231380be7ba6e374bf\n00000000fa09bd34cd39c78d889881c3a3056ddc65dce84eecea7d390b5f723d7398de9a\n000000009cb91c8254f54e7b5fc2ae7b6ee6e017e451244e6ccbe306082a7c6ca898f6d9\n00000000eb0d60a9dab2a35c0d3ab6fd008dd4d74a83b0926ca6bf44f7ee59b6a7933837\n00000000b00656f0d4b78d8c8fd728af7898b138047a59f042846bbb3d28f344e652e073\n0000000001849eb27be1f7a991fa2d1b6e01bf53f8010f7a60d8ad226a19361aeb31f43b\n000000006a7bd1732388f549834107472dc792c4b8cac4eb77818afcd0a2e0343f057dbf\n00000000015e8c7bb17f7a8e63a04751a82270cd7afffc57db2481b3ccef6ad34bc4283e\n000000008e866884594c69d80742eee7f7e6848a9a1435a4fd362bf05a937efce4cc9f70\n00000000f8cf46a6a5699f245888938a28d971dcb3afb935d177d5b42811427918b788c7\n00000000e29a0a39c5d7b5683b27d9d60afb33d0c7db9002bd666ea34be87b7fb2133522\n0000000028f1aea7a2bb94092ec9925440d24cd6c1d3789dde909a3ff77ad874edc394f9\n00000000391204ca5088ecde1918703a81bad64d5cc24639aa9de0011481cf48099ccf6b\n00000000732078ea0fcf99ec3fc7a387b13b344ea1b93a418682106c8a04774eb6f1c545\n00000000312e1c702d68c82a6ae3ad2275fc7126ff0f69acb319a4362d3a976e0411689d\n00000000c687f6b7b9df4518cdb3126b2201baf25cc746c230ad11d39245c71e33590dd8\n00000000309ea8917fd221af436daea36f69f34d50b40e4752a30861e2393dbea07b93db\n00000000fd244d9b46dfdc4e9538da9a1667fe3f0b3ded1d6de26e5fc3f2ba1e30f42810\n00000000b5a7b4bca045b3642ddfb720aa17709d9fdad2313e4cb98c92931b548e1790a0\n00000000634fb7fdb3b1f985c66b2dea1992b05e362c2dc31bb0178a187cc69df1e861a6\n00000000282741ff324c8a4cc001d33e6db395667f52a6ba46a26b076908173a29c66bc2\n000000004a90b50f6e4f1e61baf31447d2a5ad22273c54687040835db67fca2641d17ef0\n000000007159795a185f2de930960d027dac510c6d9e90c91ffb8cacd6cc07cce8214aa0\n00000000227f2334c5c9121216a7709d96f83f52ab7abb9aceace4b323e966a8ad01d653\n0000000065bbfe743536fde54b03e72e05288073a571224375fc2de02e1667a81f0456d3\n00000000977ca8c6c5b60eeac9bb2f39086a90baca4032a491744da0a5cc90c2505e75d9\n000000005dbd0f3899d508993221bd8da7a39bcd0e4263c08e8b0b8cc41707b6e35b6a66\n000000007b7db4392a0356f0e138c3b2c6be12a118512b339eea7876c8f9c7804a90b11e\n000000005cd5603bc7c6230a36a9873a676ee2114e28b2dfd6deca5037cee744b0e51810\n00000000ac1fe0c061d2097d730ad7f049d03e5b6af2c4889782d4fbfc33e837ce5594d7\n00000000c6365858870d33c13c90b89913833bce0370dd9472c54315fb9e81a7b1ee0882\n00000000d618a9642f63224e349ac6b28127ab1b58a15a62ee66997624eaad7e1fafbb79\n00000000a5e4e402e661e1fba378d4229e4985da55356288bd146a7de058149b680c99a4\n0000000052370dfcd9d066585d42b573dcdac1cbfe814fcf776b67a521541e366fcb7480\n0000000085cf8c05e093c1dce825bffe8599a4baf1d6b6b8e947350ac1097908bc8a9bb8\n00000000a1615e54a5a334b939f1c945225a19eb6c07b7bc2912cb4974fc2b28f240fbca\n00000000f39b15162c2b3e36d9f9388358793a3393c3e8543855f1d633f0849ca249e0cd\n00000000d8be4729a9a2aa816de4f40d654528fa246fff584ba2c97fb646aa8f0b194875\n00000000c8b3791d3ba1d4925e221ee8e4cf3322e60107a673f85df19d1f0901e499778c\n00000000a93bfec643da537da4eb092426796dbc181df33f7ee4953a21940693c979cc68\n000000000d0c376637ff11ef56c3ebe1075fb138d29b82a1c0835819cb857e8493c5e316\n0000000029428881f48a99b3d9daefeacdaa9a396da9b7a52dc8022d04bc3960b5189ac3\n00000000bec2e4007a0dbe1d7d63623543fa7a8b981c304b12652dad74033af9b39b3407\n00000000616842342e8ca4273efe2d087b5cc6d9147179ea3feaf900269f94909ca744b7\n00000000acdb1ee79023391eb89fd96505ea0f51076587d55f550af41ecf971c5adc316e\n00000000c0e845aff5dbaf8309356389cf31c3fbbe093a3f37c7b33d6e06589e4cded4c8\n000000000233490b1af3f47bb091e6ccbb514c56d6dce052e1b71d154b2479d772376d70\n0000000000123371d570ad860831a1412d04229ef479a1366edd468981bef15fd0f7810e\n00000000efa2d59cffa6036314bfeeec00c9408833159db850c849f7253c5272c3690d72\n000000004a1330462205d8f62747bfb7e4f9f0c9ee4a68d39cc3dc5ab2501814b52c90a8\n0000000007822f979a72fd0b8904122e20a154273d2605e0caa9987d57647a397317efb8\n0000000019775628608bb46e177a4fb94df4e260d2b38a53e702303bc5f19a9e34cf32e7\n0000000042fb84f6410d688974d0e8ec389119c82567bd5fe56efdb1f622b8d1c40332d8\n00000000e2bede12c28f6d9f5b652131b234b57558dc3e516ebe287bfb2671fe5d7b732f\n00000000b913e90ac1f37b0a618559b8d500efb374229749bb2bd4f96707e7a9fbf7dc6b\n000000007c753c7f006503487cbeb25d2921f658f24fa0433b8d8eacdf016078d614dd7e\n00000000a243608afcacfc835e5a8ecde5c93a127d6982da637cd90d80afc4a12645cd7d\n000000003816f315a354193c6c889812a5fd57d8c5f2b41e4c1d81594f16e0aa58f155cb\n000000008000d9dac6659cc28a2a03de53aadeca4381d84d596c5acc95c722885710a633\n00000000949963e4af3557a00aad28d6aa181b25ba52b6a30650bebe236741c6163c1188\n00000000d4a0cb99ae245d02794c8b96286afd1e3b2628d73d92f382fa71cbcf567bc2f6\n0000000023f5d74aae5764a046be0b9ff2ab0f55a1ce759c60fdd21540d3e34fa6ca224c\n0000000013bc309b8b5e0d47e613c2851d579e79dec551d3d7da66c26e720ca678611375\n0000000037db7f8b9de8f0226f3517d93ee0b5b3bd78e9d4208e0265796a2a40ae301771\n0000000014cd17fdd29733028bc22b23a5a9915887aacb37f4a436cb05bd26bdc548ea2e\n00000000319018722ea585f6de7e5dea00e55346a64fbda9b3140ed899db58fa4ddf826f\n0000000034d8dd4fdf65371898f5231df454e9b00804d6eea19dbcb9d4cd744b37abe97e\n00000000060e06a5701f89761b0c25883364bbacbba76c1ef169ed2a95b74bce4926d428\n00000000a85fe24690e86c4712b225c965b1d478c6fd5ee66e7162359203c70051174b2c\n00000000cc39fbe9d7085a320a00b7d4276c97007d707cc60d69e1605f64ffa480801376\n000000002a7eb9418a67350fb7f24c88bcbe02141509ef0ecd116aa6114e2956956d8ed8\n00000000476b55c43801174f7ff96c977cc82c3a062eab6e162d9e18ae5be111ca25965a\n0000000038fe447f6a7d225bd80294a67e7713c956134c8e88701bc627b787bce99904e1\n00000000ff574bf1eac42b9dca1e3e2919d233660e2721d714500d439455cd0974111b15\n00000000900c41875cca8fc09ea8b24499bb17e3d6132d20474a01bf6ce4f9ffd365a7e2\n000000005971f7922ec5561c1c1f2371a9a8c0ed3c5d23e7b07d74c31002518053981af1"
   },
   "expected": {
    "weight": "7732",
    "storage": "36870"
   }
  },
  {
   "id": "18-9-pruned",
   "chapter": "18",
   "section": "9",
   "title": "A group due its rent of 1,001,355 holding 900,000 is pruned",
   "kind": "13-account-rent",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "cost": "1001355",
    "period": "172800",
    "height": "172800",
    "due": "172800",
    "balance": "900000",
    "prepaid": "0"
   },
   "expected": {
    "outcome": "pruned",
    "pool": "50 +900000"
   }
  }
 ]
}
