Skip to content

BIP395: Unspendable Internal Keys for Wallet Policies - #2340

Open
2099999997690000 wants to merge 18 commits into
bitcoin:masterfrom
bitryonix:bip-unspendable-internal-keys
Open

2099999997690000 wants to merge 18 commits into
bitcoin:masterfrom
bitryonix:bip-unspendable-internal-keys

Conversation

@2099999997690000

Copy link
Copy Markdown

This proposes _ as an unspendable Taproot internal-key placeholder in wallet policies. Wallets and signers can reproduce the internal key from the policy and derivation path, without keeping a separate random tweak.

The construction uses the BIP 341 NUMS point as the public key of a synthetic BIP 32 root. Its chain code commits to the normalized policy, including both the keys and the policy structure. Child keys are then derived using unhardened BIP 32 derivation.

This builds on the Delving discussion and the earlier work in #1746. I shared an earlier draft on the Bitcoin Development Mailing List.

I've included a Python reference implementation, fixed JSON test vectors, and instructions for running the checks. All 21 offline tests pass, and the export and derivation cross-check passes all 20 cases against Bitcoin Core 31.0.

@jonatack jonatack changed the title Add BIP: Unspendable Internal Keys for Wallet Policies BIP draft: Unspendable Internal Keys for Wallet Policies Nov 1, 2026

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and complete. Ran the tests and check_core.py.

Test run and check_core run

(e18f81a2...):~/bitcoin/bips$ python3 -B bip-unspendable-internal-keys/tests.py
test_all_key_permutations (__main__.ConstructionTests.test_all_key_permutations) ... ok
test_compressed_parity_is_preserved_between_steps (__main__.ConstructionTests.test_compressed_parity_is_preserved_between_steps) ... ok
test_equivalences_and_distinctions (__main__.ConstructionTests.test_equivalences_and_distinctions) ... ok
test_export_preserves_input_and_indexes (__main__.ConstructionTests.test_export_preserves_input_and_indexes) ... ok
test_fixed_vectors (__main__.ConstructionTests.test_fixed_vectors) ... ok
test_full_records_control_musig_sorting (__main__.ConstructionTests.test_full_records_control_musig_sorting) ... ok
test_invalid_vectors (__main__.ConstructionTests.test_invalid_vectors) ... ok
test_manual_preimages (__main__.ConstructionTests.test_manual_preimages) ... ok
test_network_only_changes_root_version_and_checksum (__main__.ConstructionTests.test_network_only_changes_root_version_and_checksum) ... ok
test_no_multipath_has_one_expansion (__main__.ConstructionTests.test_no_multipath_has_one_expansion) ... ok
test_normalization_idempotence (__main__.ConstructionTests.test_normalization_idempotence) ... ok
test_record_count_compactsize_boundary (__main__.ConstructionTests.test_record_count_compactsize_boundary) ... ok
test_recorded_core_results_match_vectors (__main__.ConstructionTests.test_recorded_core_results_match_vectors) ... ok
test_stops_at_first_invalid_child (__main__.ConstructionTests.test_stops_at_first_invalid_child) ... ok
test_template_length_compactsize_boundary (__main__.ConstructionTests.test_template_length_compactsize_boundary) ... ok
test_base58check (__main__.PrimitiveTests.test_base58check) ... ok
test_bip32_public_derivation (__main__.PrimitiveTests.test_bip32_public_derivation) ... ok
test_compactsize (__main__.PrimitiveTests.test_compactsize) ... ok
test_invalid_children_and_zero_tweak (__main__.PrimitiveTests.test_invalid_children_and_zero_tweak) ... ok
test_invalid_points (__main__.PrimitiveTests.test_invalid_points) ... ok
test_nums_point_and_fingerprint (__main__.PrimitiveTests.test_nums_point_and_fingerprint) ... ok

----------------------------------------------------------------------
Ran 21 tests in 0.758s

OK
jon|(e18f81a2...):~/bitcoin/bips$ python3 -B bip-unspendable-internal-keys/check_core.py
{
  "core_version": "/Satoshi:32.1.0/",
  "network": "regtest",
  "checks": [
    {
      "name": "single",
      "expansion": 0,
      "index": 0,
      "internal_key": "c3fdf3b6a04fafa134e5d0c8f9926bf45e3377ae4f27d1d26a880f357bdeb904",
      "addresses": [
        "bcrt1pcf34kqg3n4v0zev84rswat52ysz0a3kgyvlw83pqnz84lcuqq20sek65cu"
      ]
    },
    {
      "name": "single",
      "expansion": 1,
      "index": 0,
      "internal_key": "bf113123683375fd195a4f0df956937fdc5a393d1091900aacba81b3cf77a97b",
      "addresses": [
        "bcrt1paj5g4g8qczcqpnautjwsrmdujud5ylzc3vlweunzxwn69pgq5sjqqrqvgz"
      ]
    },
    {
      "name": "single",
      "expansion": 0,
      "index": 2147483647,
      "internal_key": "a51f4adcf9999994ea499a81d6ff3b2390ee567d57486c81ecc0aed2d140f5b9",
      "addresses": [
        "bcrt1pv5lxmsgnz2855t0c4fje370pl9spdj2q83gptq4sxtaltd5fauqsmnph6w"
      ]
    },
    {
      "name": "single-expanded",
      "expansion": 0,
      "index": 0,
      "internal_key": "c3fdf3b6a04fafa134e5d0c8f9926bf45e3377ae4f27d1d26a880f357bdeb904",
      "addresses": [
        "bcrt1pcf34kqg3n4v0zev84rswat52ysz0a3kgyvlw83pqnz84lcuqq20sek65cu"
      ]
    },
    {
      "name": "single-expanded",
      "expansion": 0,
      "index": 1,
      "internal_key": "66aa19a3b73ca4058d910da7c95cd89e96b7f116a7608b0207d034a03da2a16d",
      "addresses": [
        "bcrt1pgph6mhru3w8s56y5h4lnxeszy4ax0pn7hxfzxl3yvj69fmcetgcqxv0lnv"
      ]
    },
    {
      "name": "four-expansions",
      "expansion": 0,
      "index": 0,
      "internal_key": "82c15b1dd33d5dc1b491bc16a38c5a9c70fbfd00534101d79404c9a5972cca9e",
      "addresses": [
        "bcrt1pcr9frk0qn4vjxmgescfsn3my8t2s0fnjpsnvdjqcfz50qgf6y24qx5gsaa"
      ]
    },
    {
      "name": "four-expansions",
      "expansion": 1,
      "index": 0,
      "internal_key": "65dba4f2e2e730df7cbe8b1d8b8435ca9ee4dfc36d933deb4a9564c392446c97",
      "addresses": [
        "bcrt1pp64wha9y4eeh4kfq3sc8wkfysck690l5g5n6ra3py8h0nt0gyvaqttk5ps"
      ]
    },
    {
      "name": "four-expansions",
      "expansion": 3,
      "index": 17,
      "internal_key": "0f7611b6c84637620caa3f1d7e6db6837187362f45fad0acab86430e82249dff",
      "addresses": [
        "bcrt1p98zgq9q9wtukvtcupyzxzd7f62e9edxf3jklj8ddgrs9n3rzjxzsld0dvs"
      ]
    },
    {
      "name": "sorted",
      "expansion": 0,
      "index": 0,
      "internal_key": "fcea15adb7040910c1dc9c4339045e2647578a216b7ad3cea7fa8a2a86f70ad0",
      "addresses": [
        "bcrt1pl3upn3aw0c0td9y0c78q8qz8px04f7ydqvnpxjgqutefm90rxats9wqpy8"
      ]
    },
    {
      "name": "sorted",
      "expansion": 0,
      "index": 1,
      "internal_key": "87ffa4a79a969cc397fdafcf2dbd7b17040ba22dd6f1cf42fb35830630471fe6",
      "addresses": [
        "bcrt1pmz0aq2ylxmzlcg0ht042ng6a456qkjtrahvjkuwmxd2z97j2mm8qhv40v8"
      ]
    },
    {
      "name": "sorted-permuted",
      "expansion": 0,
      "index": 0,
      "internal_key": "fcea15adb7040910c1dc9c4339045e2647578a216b7ad3cea7fa8a2a86f70ad0",
      "addresses": [
        "bcrt1pl3upn3aw0c0td9y0c78q8qz8px04f7ydqvnpxjgqutefm90rxats9wqpy8"
      ]
    },
    {
      "name": "sorted-permuted",
      "expansion": 0,
      "index": 1,
      "internal_key": "87ffa4a79a969cc397fdafcf2dbd7b17040ba22dd6f1cf42fb35830630471fe6",
      "addresses": [
        "bcrt1pmz0aq2ylxmzlcg0ht042ng6a456qkjtrahvjkuwmxd2z97j2mm8qhv40v8"
      ]
    },
    {
      "name": "musig",
      "expansion": 0,
      "index": 0,
      "internal_key": "be56170918b1939bdd676aab8750ed7ce5183fc8216276c361c3d6335eca0f57",
      "addresses": [
        "bcrt1pr8yxfqf0kadcu43at4svt7rckc7wcwz6drcvgeud2q6t0lppt4fqjcy0fr"
      ]
    },
    {
      "name": "musig",
      "expansion": 0,
      "index": 1,
      "internal_key": "1f4b7a9af7e7e11263c91aa5b68a22b32139020729e7cdea0bc0bd49cebbc0a1",
      "addresses": [
        "bcrt1pr9f55lxma77y5m5pjvc6z7t0c8zezjsk4y0qaufsxtfj24u46pls08w0cy"
      ]
    },
    {
      "name": "tree",
      "expansion": 0,
      "index": 0,
      "internal_key": "01a9ed75464a9fdc15dd77ac565d39e48a4e30179da2a65fbe08c7823837fdd5",
      "addresses": [
        "bcrt1plp0rw0egy7a086nynmq8nwajm5f9acsyzcyqj4h8ks9tyuf8ga4qsgkvsw"
      ]
    },
    {
      "name": "tree",
      "expansion": 0,
      "index": 1,
      "internal_key": "63209dc77a6cfedcc6a2f983d689f3e1331d449db8b827f0786cff1f27cf6a8c",
      "addresses": [
        "bcrt1pzmr5fdal78aq5w6rmfpgtg5en3l78xek8dg4yhvc63ln7h5jpuzslpxk3d"
      ]
    },
    {
      "name": "tree-swapped",
      "expansion": 0,
      "index": 0,
      "internal_key": "01a9ed75464a9fdc15dd77ac565d39e48a4e30179da2a65fbe08c7823837fdd5",
      "addresses": [
        "bcrt1plp0rw0egy7a086nynmq8nwajm5f9acsyzcyqj4h8ks9tyuf8ga4qsgkvsw"
      ]
    },
    {
      "name": "tree-swapped",
      "expansion": 0,
      "index": 1,
      "internal_key": "63209dc77a6cfedcc6a2f983d689f3e1331d449db8b827f0786cff1f27cf6a8c",
      "addresses": [
        "bcrt1pzmr5fdal78aq5w6rmfpgtg5en3l78xek8dg4yhvc63ln7h5jpuzslpxk3d"
      ]
    },
    {
      "name": "timelock",
      "expansion": 0,
      "index": 0,
      "internal_key": "ed2c0c0f14e63b15f9302782b74654b8a7808085e210906fb663d3c242883436",
      "addresses": [
        "bcrt1pz0f3cnsend3832wjc29l8g0kfxgfl05nlezhhvyf9m5jcngv6fuskqmwd5"
      ]
    },
    {
      "name": "timelock",
      "expansion": 0,
      "index": 1,
      "internal_key": "432bffa5c9ea820bd654662756d052d2d19153610b99ce445249e45714c56356",
      "addresses": [
        "bcrt1pxduf9wpjquelxsp6yuru9g6sdtvzp0fct5ph4lm9wmyqqgaynqksdppysq"
      ]
    }
  ]
}

Comment thread bip-0395.mediawiki Outdated

== Motivation ==

A Taproot policy that uses a fixed unspendable internal key produces outputs that are recognizable when script-path spends reveal that key. [[bip-0341.mediawiki#constructing-and-spending-taproot-outputs|BIP 341]] recommends ''H + rG'' with a fresh ''r''. Current implementations use various approaches, such as taking entropy from the keys or choosing and retaining a random ''r''. Deriving the public tweaks from a policy commitment lets independent implementations reproduce the internal key from a policy backup, without additional secret material. Committing to the policy's structure also distinguishes descriptors that use the same keys under different spending conditions.

@jonatack jonatack Nov 1, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps worth a line on the post-quantum verification property described in https://groups.google.com/g/bitcoindev/c/se3TkNnbno4/m/NC5TeBFrBAAJ (anyone with the policy can re-derive the internal key and prove the key path was unspendable).

A Taproot policy that uses a fixed unspendable internal key produces outputs that are recognizable when script-path spends reveal that key. [[bip-0341.mediawiki#constructing-and-spending-taproot-outputs|BIP 341]] recommends ''H + rG'' with a fresh ''r''. Current implementations use various approaches, such as taking entropy from the keys or choosing and retaining a random ''r''. Deriving the public tweaks from a policy commitment lets independent implementations reproduce the internal key from a policy backup, without additional secret material. Committing to the policy's structure also distinguishes descriptors that use the same keys under different spending conditions.
+
+Anyone holding the policy can also re-derive the internal key and thereby prove the key path was unspendable. This can be useful in post-quantum settings or for exposure classification.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, thanks.

Anyone holding the policy can also re-derive the internal key and thereby prove the key path was unspendable. This can be useful in post-quantum settings or for exposure classification.

Comment thread bip-unspendable-internal-keys.mediawiki Outdated

A [[bip-unspendable-internal-keys/reference.py|reference implementation for Python 3.10 or later]] and standalone [[bip-unspendable-internal-keys/vectors.json|JSON test vectors]] are provided. The implementation is for demonstration and interoperability testing, not production use.

The recursive parser and normalizer may exceed Python's recursion limit and raise <code>RecursionError</code> on deeply nested inputs. This is a resource limitation of the reference implementation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 The recursive parser and normalizer may exceed Python's recursion limit and raise <code>RecursionError</code> on deeply nested inputs. This is a resource limitation of the reference implementation.
+
+Production implementations should use iterative parsing (or raise the limit) if deep nesting is expected.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the note for production implementations.

Production implementations should use iterative parsing (or raise the limit) if deep nesting is expected.

Comment thread bip-unspendable-internal-keys.mediawiki Outdated

== Backward compatibility ==

Descriptor consumers that support the exported expressions can use the exported form without recognizing <code>_</code>. Export does not guarantee acceptance by a BIP 388 wallet-policy consumer: for example, this construction permits records with equal public keys and different chain codes, while BIP 388 requires pairwise distinct public keys in its key-information vector.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe an example would make the BIP 388 rejection clearer.

 Descriptor consumers that support the exported expressions can use the exported form without recognizing <code>_</code>. Export does not guarantee acceptance by a BIP 388 wallet-policy consumer: for example, this construction permits records with equal public keys and different chain codes, while BIP 388 requires pairwise distinct public keys in its key-information vector.
+
+An export that lists the same public key under two different chain codes will be rejected by a strict BIP 388 consumer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expanded this paragraph to cover duplicate public keys, repeated MuSig indexes, and overlapping derivation paths, with a link to the relevant BIP 388 rules.

Descriptor consumers that support the exported expressions can use the exported form without recognizing <code>_</code>. Export does not guarantee acceptance by a [[bip-0388.mediawiki#additional-rules|BIP 388 wallet-policy consumer]]. This construction permits duplicate public keys in the key-information vector, even with different chain codes; repeated key indexes within <code>musig(...)</code>; and repeated or overlapping multipath alternatives for the same key placeholder. BIP 388 forbids these cases. For the path-overlap rule, <code>musig</code> placeholders with the same set of key indexes count as the same placeholder regardless of participant order.

Also added tests covering them:

def test_export_preserves_bip388_public_key_conflicts(self):
# Check BIP 388's "Additional rules" directly, without a wallet validator.
first, second = self.cases["musig-same-point"]["given"]["keys_info"]
template = "tr(_/**,{pk(@0/**),pk(@1/**)})"
for name, keys_info, record_count in (
("different-chain-codes", [first, second], 2),
("identical-xpubs", [first, first], 1)):
with self.subTest(case=name):
policy = ref.normalize_policy(template, keys_info)
self.assertEqual(len(policy.records), record_count)
self.assertEqual(len(ref.derive_internal_key(policy, 0, 0)), 32)
exported = ref.export_policy(template, keys_info)
self.assertEqual(exported.template, "tr(@2/**,{pk(@0/**),pk(@1/**)})")
self.assertEqual(exported.keys_info[:-1], tuple(keys_info))
parsed = [bip32.parse_xpub(info) for info in exported.keys_info[:-1]]
# BIP 388 requires distinct public keys, regardless of chain codes.
self.assertEqual(parsed[0][0], parsed[1][0])
self.assertEqual(len({chain_code for _, chain_code in parsed}), record_count)
def test_export_preserves_bip388_repeated_musig_indexes(self):
given = self.cases["musig-repeated"]["given"]
policy = ref.normalize_policy(given["template"], given["keys_info"])
self.assertEqual(len(ref.derive_internal_key(policy, 0, 0)), 32)
exported = ref.export_policy(given["template"], given["keys_info"])
self.assertEqual(exported.template, "tr(@2/**,pk(musig(@0,@1,@0)/**))")
self.assertEqual(exported.keys_info[:-1], tuple(given["keys_info"]))
tree = ref.Parser(exported.template.split(",", 1)[1][:-1]).tree()
key, = ref.keys(tree)
self.assertEqual(key.kind, "musig")
# BIP 388 forbids repeated key indexes within a musig placeholder.
self.assertLess(len(set(key.indexes)), len(key.indexes))
def test_export_preserves_bip388_path_conflicts(self):
original = self.cases["sorted"]["given"]["keys_info"]
for tree, key_count, overlap in (
("{pk(@0/**),pk(@0/**)}", 1, {"0", "1"}),
("{pk(@0/<0;1>/*),pk(@0/<1;2>/*)}", 1, {"1"}),
("{pk(musig(@0,@1)/**),pk(musig(@1,@0)/<1;2>/*)}", 2, {"1"})):
with self.subTest(tree=tree):
template = f"tr(_/**,{tree})"
keys_info = original[:key_count]
policy = ref.normalize_policy(template, keys_info)
self.assertEqual(len(ref.derive_internal_key(policy, 0, 0)), 32)
exported = ref.export_policy(template, keys_info)
self.assertEqual(exported.template, f"tr(@{key_count}/**,{tree})")
self.assertEqual(exported.keys_info[:-1], tuple(keys_info))
exported_tree = ref.Parser(exported.template.split(",", 1)[1][:-1]).tree()
left, right = ref.keys(exported_tree)
# BIP 388 identifies musig placeholders by their set of indexes.
self.assertEqual(left.kind, right.kind)
self.assertEqual(set(left.indexes), set(right.indexes))
# Alternatives for the same placeholder must be disjoint in BIP 388.
self.assertEqual(set(left.path[0].values) & set(right.path[0].values), overlap)

Thank you.

@fametrano fametrano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e18f81a

I implemented normalization, the commitment and the export from the BIP text, without the reference code, on btclib-org's BIP 32 and hashing code (btclib-wallet, btclib, ecc), which I maintain. This adds to the runs of tests.py and check_core.py above an implementation that shares no code with the reference. It reproduces every intermediate value of all 51 valid vectors, the 105 internal keys and the 51 exports, agrees with the 11 equivalent groups and 13 distinct pairs, and rejects the 50 invalid vectors at their stated stage. btclib-wallet's descriptor parser reads back the exports of 42 valid vectors and derives the same 86 internal keys; it refuses the leaves of the other 9 as not sane or not satisfiable. Its addresses match the 20 Bitcoin Core results in core-checks.json, and gen_vectors.py prints vectors.json byte for byte. Scripts and output: https://gist.github.com/fametrano/d8966a1925a4f8d1800c05f2422d365a/d26bc4f8de24a38d6389cdfc3e7c2e4c7e4a5f40

… this bip may process descriptors that bip388 rejects

@fametrano fametrano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a2175a1

Since e18f81a only the BIP text and tests.py changed; reference.py, vectors.json and core-checks.json are byte-identical, so the btclib-org reproduction in my earlier review still holds: https://gist.github.com/fametrano/d8966a1925a4f8d1800c05f2422d365a/d26bc4f8de24a38d6389cdfc3e7c2e4c7e4a5f40. On this head tests.py passes its 24 tests, gen_vectors.py still prints vectors.json byte for byte, and the three cases the new Backward compatibility paragraph lists are the ones BIP 388's Additional rules forbid.

Not blocking: when the policy has keys, the export gives the root the last index but places it first, as in tr(@2/**,{pk(@0/**),pk(@1/**)}), while the same Additional rules say the key vector should be ordered so that @0 appears first; the paragraph could say so. And "Production implementations should use iterative parsing (or raise the limit)" now comes before the RecursionError paragraph, so "the limit" is not yet defined there; it belongs after it.

@2099999997690000

Copy link
Copy Markdown
Author

ACK a2175a1

Since e18f81a only the BIP text and tests.py changed; reference.py, vectors.json and core-checks.json are byte-identical, so the btclib-org reproduction in my earlier review still holds: https://gist.github.com/fametrano/d8966a1925a4f8d1800c05f2422d365a/d26bc4f8de24a38d6389cdfc3e7c2e4c7e4a5f40. On this head tests.py passes its 24 tests, gen_vectors.py still prints vectors.json byte for byte, and the three cases the new Backward compatibility paragraph lists are the ones BIP 388's Additional rules forbid.

Not blocking: when the policy has keys, the export gives the root the last index but places it first, as in tr(@2/**,{pk(@0/**),pk(@1/**)}), while the same Additional rules say the key vector should be ordered so that @0 appears first; the paragraph could say so. And "Production implementations should use iterative parsing (or raise the limit)" now comes before the RecursionError paragraph, so "the limit" is not yet defined there; it belongs after it.

Thanks, addressed both points in 9a4073f.

The exporter now assigns the synthetic root to @0 and numbers the other placeholders by first appearance. Your example now exports as tr(@0/**,{pk(@1/**),pk(@2/**)}):

def export_policy(template: str, keys_info: list[str], network: str = "mainnet") -> ExportedPolicy:
policy = normalize_policy(template, keys_info)
root = construct_root(policy).serialize(network)
assigned = {}
def reindex(match):
i = int(match[1])
if i not in assigned:
assigned[i] = len(assigned) + 1
return "@" + str(assigned[i])
exported_template = re.sub(r"@([0-9]+)", reindex, template)
# Parsing has established that the first underscore is the internal key.
exported_template = exported_template.replace("_", "@0", 1)
order = list(assigned) + [i for i in range(len(keys_info)) if i not in assigned]
exported_keys = (root,) + tuple(keys_info[i] for i in order)
descriptor = re.sub(r"@([0-9]+)", lambda m: exported_keys[int(m[1])], exported_template)
return ExportedPolicy(exported_template, exported_keys, descriptor.replace("/**", "/<0;1>/*"))

I added a regression test covering the ordering across all 51 valid vectors and updated the expected exports. The resolved descriptors and derived internal keys are unchanged. All 25 tests pass.

def test_export_indexes_follow_first_appearance(self):
for case in self.vectors["valid"]:
with self.subTest(case=case["name"]):
given = case["given"]
exported = ref.export_policy(given["template"], given["keys_info"], given["network"])
self.assertEqual(exported.keys_info[0], case["expected"]["synthetic_xpub"])
self.assertCountEqual(exported.keys_info[1:], given["keys_info"])
seen = set()
for index in map(int, re.findall(r"@([0-9]+)", exported.template)):
if index not in seen:
self.assertEqual(index, len(seen))
seen.add(index)

Also moved the production guidance after the explanation of the recursion limit:

The recursive parser and normalizer may exceed Python's recursion limit and raise <code>RecursionError</code> on deeply nested inputs. This is a resource limitation of the reference implementation. Production implementations should use iterative parsing (or raise the limit) if deep nesting is expected.

@jonatack

jonatack commented Nov 4, 2026

Copy link
Copy Markdown
Member

Assigned 395. Please update, and add a README entry.

@jonatack jonatack changed the title BIP draft: Unspendable Internal Keys for Wallet Policies BIP395: Unspendable Internal Keys for Wallet Policies Nov 4, 2026
@2099999997690000

Copy link
Copy Markdown
Author

@jonatack Done. If there's anything more to change, please let me know. Thank you.

@fametrano fametrano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

One issue should be fixed before merge: the Export section does not say how the exported placeholders are numbered, and the exported templates and key vectors in vectors.json depend on it.

Both points of my previous review are addressed. Since a2175a1, vectors.json changes only in the exported templates and key vectors, in 42 of the 51 valid cases; the other 9 have no key but the root. The exported descriptors, intermediate values and derivations are unchanged. On this head tests.py passes its 25 tests and gen_vectors.py prints vectors.json byte for byte. My btclib-org reproduction, written from the text, matches none of the 42 changed exports; with the reference's numbering it matches all 51. Scripts and outputs: https://gist.github.com/fametrano/d8966a1925a4f8d1800c05f2422d365a/4930f34468b34971a06ea52153de72d84b60a703

One sentence in Export would close it: after _ is replaced, the root is @0, the other placeholders are renumbered by first appearance, and the key vector follows that order, with unreferenced items last, in their input order.

@2099999997690000

Copy link
Copy Markdown
Author

@fametrano Thanks, addressed in 68bdb20. The Export section now explicitly states:

https://github.com/bitryonix/bips/blob/68bdb208c8c649f0220429bea65247c80fb8a897/bip-0395.mediawiki#L91

@2099999997690000

Copy link
Copy Markdown
Author

BTW, should I change the status to complete?

@fametrano fametrano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 68bdb20

The new Export paragraph is enough to reproduce the vectors. I rewrote the export() of my btclib-org reproduction from it, and it now matches all 51 exported templates and key vectors in vectors.json; the version written from the previous text failed 42 of them. The rest still passes: 105 derivations, 50 of 50 invalid vectors rejected at the stated stage, and the 20 recorded Bitcoin Core addresses. Only bip-0395.mediawiki changed since 69875aa, so the reference code and vectors are the ones I checked there. Script, commands and output: https://gist.github.com/fametrano/d8966a1925a4f8d1800c05f2422d365a/6b4edd1ed4d7524247e26a892468d8696f194f6d

@murchandamus murchandamus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, should I change the status to complete?

Please leave the status at Draft. Publication usually prompts additional review that often leads to further improvements. This proposal has only been open for a few days, it would be good to get review from some of the mentioned descriptor experts.

@2099999997690000

Copy link
Copy Markdown
Author

Sure, I'll leave it as is. Thank you.

@danielabrozzoni danielabrozzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 68bdb20

Overall it looks good, I left a few improvement ideas :)

Comment thread bip-0395.mediawiki Outdated
The input consists of a descriptor template and a key-information vector in [[bip-0388.mediawiki#formal-definition|BIP 388's representation]], with the following syntax for normalization:

* The template is <code>tr(KEY,TREE)</code>, with the binary tree syntax of [[bip-0386.mediawiki#tree-expression|BIP 386]], where <code>KEY</code> is <code>_</code> followed by a derivation suffix. Leaves use the Tapscript fragment syntax and translation table of [[bip-0379.md#translation-table|BIP 379]], or [[bip-0387.mediawiki#sortedmulti_a|BIP 387's]] <code>sortedmulti_a</code> syntax. The latter forms a whole leaf.
* A key expression is <code>@i</code> or <code>musig(@i,...)</code>, followed by an optional derivation suffix in the syntax of [[bip-0380.mediawiki#key-expressions|BIP 380]] and [[bip-0389.mediawiki#specification|BIP 389]]. The abbreviation <code>/**</code> means <code>/<0;1>/*</code>.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this to:
"Every key espression in TREE's leaves is..."

I was initially a bit confused, I thought this sentence was telling me to use @i in KEY, but that didn't make much sense :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, clarified that this rule applies to key expressions in TREE's leaves.

* Every key expression in <code>TREE</code>'s leaves is <code>@i</code> or <code>musig(@i,...)</code>, followed by an optional derivation suffix in the syntax of [[bip-0380.mediawiki#key-expressions|BIP 380]] and [[bip-0389.mediawiki#specification|BIP 389]]. The abbreviation <code>/**</code> means <code>/<0;1>/*</code>.

Comment thread bip-0395.mediawiki Outdated

The commitment covers the whole normalized policy because committing only to its keys would give every policy over the same keys the same internal key. Script-path spends would then reveal equal internal keys and link those policies. A coordinator could also reuse one wallet's internal keys in another. Binding thresholds, timelocks, roles, ranges, repetition, and tree structure prevents both.

The public key and chain code determine every derived key, so these are the only fields in a record. Version bytes, depth, parent fingerprint, child number, and origin do not change derived keys. Including them in the commitment would give an xpub and its tpub form, or the same key with and without an origin, different internal keys for identical addresses. The excluded fields stay in the input because export needs them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including them in the commitment would give an xpub and its tpub form, or the same key with and without an origin, different internal keys for identical addresses.

This sentence is correct, but a bit hard to parse, I would restructure it as:

Including them in the commitment would produce different internal keys for an xpub and its tpub form, or for the same key with and without an origin, even though these generate identical scripts.

Also I would say identical scripts rather than identical addresses, because in the xpub vs tpub form the address would change, because of different network bytes (e.g. bc1... vs tb1...)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Restructured the sentence as suggested and changed it to refer to identical derived keys and script trees, avoiding the network-dependent address wording.

The public key and chain code determine every derived key, so these are the only fields in a record. Version bytes, depth, parent fingerprint, child number, and origin do not change derived keys. Including them in the commitment would produce different internal keys for an xpub and its tpub form, or for the same key with and without an origin, even though the derived keys and script trees are identical. The excluded fields stay in the input because export needs them.

Comment thread bip-0395.mediawiki Outdated

For a referenced key-information item with public key ''K<sub>i</sub>'' and chain code ''c<sub>i</sub>'', define its 65-byte ''record'' as ''R<sub>i</sub> = ser<sub>P</sub>(K<sub>i</sub>) || c<sub>i</sub>''. The operator ''||'' denotes byte concatenation, and ''ser<sub>P</sub>'' is the compressed public-key serialization from [[bip-0032.mediawiki#conventions|BIP 32's conventions]]. Origins, network versions, depth, parent fingerprints, and child numbers are excluded. Unreferenced items are omitted.

The following ''serialization rules'' apply to the template and to every key expression, leaf, and subtree in it. They MUST be serialized as ASCII without whitespace or checksum. Integers MUST use their shortest unsigned decimal representation, and hexadecimal MUST be lowercase. Implementations MUST use the syntactic sugar <code>pk</code>, <code>pkh</code>, <code>and_n</code>, <code>t:</code>, <code>l:</code>, and <code>u:</code> from the [[bip-0379.md#translation-table|BIP 379 translation table]] wherever the expanded forms match. They MUST use <code>l:</code> when both <code>l:</code> and <code>u:</code> match, and MUST join adjacent wrappers as specified there. A terminal <code>/<0;1>/*</code> MUST be written as <code>/**</code>. Implementations MUST preserve all other derivation steps and the order of multipath alternatives, and MUST NOT perform any other rewrite.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found by Opus 5: you currently allow both h and ' for hardened derivations, is that on purpose? I also see it in the test vector in bip-0395/gen_vectors.py L112 (hardened-leaf-syntax), where you are mixing both markers in a single template. I think you should either stick with one, to avoid two obviously equivalent expressions to produce different outputs, or explicitly mention that both are allowed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both spellings remain accepted, but now normalize to h for commitment serialization. This includes fixed steps, multipath alternatives, and hardened wildcards.

The following ''serialization rules'' apply to the template and to every key expression, leaf, and subtree in it. They MUST be serialized as ASCII without whitespace or checksum. Integers MUST use their shortest unsigned decimal representation, and hexadecimal MUST be lowercase. Derivation suffixes may use either <code>h</code> or <code>'</code> as a hardened marker. For commitment serialization, implementations MUST write <code>h</code> for every hardened marker, including those in multipath alternatives and wildcard steps. Implementations MUST use the syntactic sugar <code>pk</code>, <code>pkh</code>, <code>and_n</code>, <code>t:</code>, <code>l:</code>, and <code>u:</code> from the [[bip-0379.md#translation-table|BIP 379 translation table]] wherever the expanded forms match. They MUST use <code>l:</code> when both <code>l:</code> and <code>u:</code> match, and MUST join adjacent wrappers as specified there. A terminal <code>/<0;1>/*</code> MUST be written as <code>/**</code>. Implementations MUST preserve all other derivation steps and the order of multipath alternatives, and MUST NOT perform any other rewrite.

Updated the parser accordingly:

bips/bip-0395/policy.py

Lines 88 to 101 in 54321b4

def step_value(self) -> str:
text = self.match(r"[0-9]+[h']?")
child_number(text)
return str(int(text.rstrip("h'"))) + ("h" if text[-1] in "h'" else "")
def path(self) -> tuple[Step, ...]:
steps = []
while self.take("/"):
if self.take("**"):
steps.extend((Step("tuple", ("0", "1")), Step("wildcard", ("*",))))
break
if self.take("*"):
marker = self.match(r"[h']") if self.text[self.pos:self.pos+1] in ("h", "'") else ""
steps.append(Step("wildcard", ("*" + ("h" if marker else ""),)))

Added equivalence cases covering mixed markers, all h, and all apostrophes, and regenerated the vectors. Export still preserves the original input spelling.

add("hardened-leaf-syntax", "tr(_/**,pk(@0/1h/<2';3h>/*'))", [A])
add("hardened-leaf-h", "tr(_/**,pk(@0/1h/<2h;3h>/*h))", [A])
add("hardened-leaf-apostrophe", "tr(_/**,pk(@0/1'/<2';3'>/*'))", [A])
add("index-ten", "tr(_/**,multi_a(1,@1/**,@10/**))", [A, B] + [C] * 9)
equivalent = [
["single", "single-expanded", "single-unused", "single-origin", "single-metadata", "single-testnet"],
["sorted", "sorted-permuted"], ["musig", "musig-permuted"],
["musig-repeated", "musig-duplicate-record"], ["musig-same-point", "musig-same-point-reversed"],
["tree", "tree-swapped"], ["tree-repeated", "tree-duplicate-record"],
["tree-sugar", "tree-sugar-expanded"],
["sugar", "sugar-expanded"], ["l-zero", "u-zero", "or-zero"],
["numeric-spelling", "numeric-canonical"], ["hashlock", "hashlock-lower"],
["hardened-leaf-syntax", "hardened-leaf-h", "hardened-leaf-apostrophe"],

Comment thread bip-0395.mediawiki Outdated

An expression's ''resolved string'' is its serialization under these rules, with each <code>@i</code> replaced by the lowercase hexadecimal encoding of its record ''R<sub>i</sub>''. Resolved strings MUST be compared lexicographically by unsigned ASCII byte value.

Implementations MUST apply these steps in order:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found by Opus 5: before starting these steps, it's important that the template is rewritten following the serialization rules (integers using their shortest unsigned decimal representation, hex lowercase, syntactic sugars used, etc), otherwise there might be discrepancies in the sorting. This is implemented in the reference, and specified above ("The following ''serialization rules'' apply to the template and to every key expression, leaf, and subtree in it..."), but could be repeated here to make it even more clear.

Also, a test vector that catches this should be added:

diff --git a/bip-0395/gen_vectors.py b/bip-0395/gen_vectors.py
index 54ba2ae..ff46aef 100644
--- a/bip-0395/gen_vectors.py
+++ b/bip-0395/gen_vectors.py
@@ -88,6 +88,8 @@ def generate():
     add("tree-reshaped", "tr(_/**,{{pk(@0/**),pk(@1/**)},pk(@2/**)})", [A, B, C])
     add("tree-repeated", "tr(_/**,{pk(@0/**),pk(@0/**)})", [A])
     add("tree-duplicate-record", "tr(_/**,{pk(@0/**),pk(@1/**)})", [A, A])
+    add("tree-sugar", "tr(_/**,{pk(@0/**),pk(@1/**)})", [B, A])
+    add("tree-sugar-expanded", "tr(_/**,{c:pk_k(@0/**),pk(@1/**)})", [B, A])
     add("timelock", "tr(_/**,and_v(v:pk(@0/**),older(144)))", [A])
     add("timelock-changed", "tr(_/**,and_v(v:pk(@0/**),older(145)))", [A])
     add("sugar", "tr(_/**,and_n(pk(@0/**),tv:pkh(@1/**)))", [A, B])
@@ -117,6 +119,7 @@ def generate():
         ["sorted", "sorted-permuted"], ["musig", "musig-permuted"],
         ["musig-repeated", "musig-duplicate-record"], ["musig-same-point", "musig-same-point-reversed"],
         ["tree", "tree-swapped"], ["tree-repeated", "tree-duplicate-record"],
+        ["tree-sugar", "tree-sugar-expanded"],
         ["sugar", "sugar-expanded"], ["l-zero", "u-zero", "or-zero"],
         ["numeric-spelling", "numeric-canonical"], ["hashlock", "hashlock-lower"],
     ]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, made it explicit in the sorting step that all serialization rules apply before comparison.

# Work from leaves to root. Sort <code>musig(...)</code> participants by their records, compared lexicographically as unsigned bytes. Sort <code>sortedmulti_a</code> keys and each TapTree sibling pair by resolved string, with all serialization rules above applied before comparison. Preserve all other ordering and retain every occurrence.

Added your proposed tree-sugar and tree-sugar-expanded cases:

add("tree-sugar", "tr(_/**,{pk(@0/**),pk(@1/**)})", [B, A])
add("tree-sugar-expanded", "tr(_/**,{c:pk_k(@0/**),pk(@1/**)})", [B, A])

And their equivalence group:

["tree-sugar", "tree-sugar-expanded"],

I also verified that this pair detects an implementation that incorrectly sorts before normalizing syntactic sugar. All 25 offline tests pass.

@fametrano fametrano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 54321b4

My reproduction, written from the text, matches all 55 valid vectors on this head, the four new ones and the two new equivalent groups included, and rejects the 50 invalid vectors at their stated stage. Writing every hardened marker as h is the only rule it needed: the version that matched 68bdb20 fails exactly hardened-leaf-syntax, hardened-leaf-apostrophe and their group. The scripts, commands and outputs are in https://gist.github.com/fametrano/d8966a1925a4f8d1800c05f2422d365a/f67efbcfc2eed400f6050fced6fa02cfc21d7b49

@bigspider

Copy link
Copy Markdown
Contributor

Hello, thanks for bringing this proposal forward - I fully agree on the general principle.

I did not do an in-depth review, but I would recommend to simplify the specifications as much as possible, as that will increase the chance of adoption and independent implementation (as it is necessary, for example, in hardware signing devices).

The concern I would like to bring forward is that the entire Commitment normalization section adds a large amount of complexity, for virtually no benefit. The Rationale currently says:

The commitment covers the whole normalized policy because committing only to its keys would give every policy over the same keys the same internal key. Script-path spends would then reveal equal internal keys and link those policies. A coordinator could also reuse one wallet's internal keys in another. Binding thresholds, timelocks, roles, ranges, repetition, and tree structure prevents both.

This is problematic, as software wallets and hardware signers are already using descriptors and wallet policies that are not necessarily normalized. So instead of BIP395 being 'just a new feature', these specs require an invasive change to existing implementations.

If keys/xpubs are reused, it is generally to be expected that it will be possible to correlate independent UTXOs back to the same owner when they are spent. At that point, the fingerprinting vector via the NUMS keypath is a much lesser problem - privacy is already lost.
Vice-versa, if xpubs are not reused, then basing the commitment on just the keys is enough to also protect from fingerprinting, with radically simpler specifications.

Therefore, I recommend getting rid of the Script normalization requirements, and make the NUMS point only commit to keys. It is probably useful to add an explicit recommendation for wallets to strive to never reuse xpubs.

@fametrano

Copy link
Copy Markdown
Contributor

A keys-only commitment gives the same internal key to 11 of the 13 pairs that vectors.json lists as distinct. Four of them differ in key expressions, such as the same xpub at another path.

I measured this on 54321b4 to put numbers on @bigspider's point. The whole normalization is 20% of the reference code and 35% of the Specification's words.

I suggest committing to each key expression with its derivation path. Only policies with the same key expressions, which already share leaf keys, would share an internal key, and the 31 pairs vectors.json lists as equivalent stay together. It still needs MuSig participants sorted, equal records merged and one spelling per path, so part of normalization stays. The trade: the other 7 pairs (threshold, key order, tree shape, repetition, timelock and hashlock changes) would share one, and the Rationale's coordinator-reuse concern stays open. Scripts and outputs are at https://gist.github.com/fametrano/1a363003e55795b5d1a4e39e3c42c81e/2a76db0c3fb67863b9f5cbe7033ebc3cb83aab27.

@2099999997690000

2099999997690000 commented Nov 11, 2026 •

Copy link
Copy Markdown
Author

@bigspider thank you for raising this, and @fametrano thank you for the analysis and the numbers.

I am leaning towards the keys-only option and would like to check it with you before I rewrite the BIP.

What is committed. Each xpub in the key vector that the template references, taken as is: its public key and chain code, with no derivation. Duplicates are removed, the rest are sorted and hashed with the tagged hash. Nothing else from the template goes in: no derivation paths, no musig() grouping, no script structure. The _ placeholder, its path rules, the synthetic root and the export stay as they are.

The assumption. Wallets follow BIP 388's recommendation not to reuse keys across accounts. The BIP will state this and recommend a fresh account per policy.

What this costs. I want to state the downsides plainly, since they will go into the BIP:

  1. Reusing a whole xpub set links the wallets. Two policies over exactly the same xpubs share internal keys at the same index, and script-path spends reveal them. Partial overlap does not collide.
  2. Keyless policies are recognizable by anyone. They all share one root.
  3. The internal key no longer commits to the policy. Anyone who knows the xpub set can compute it without knowing the policy.

In all three the loss is privacy. The key path stays unspendable and funds are unaffected.

Why not paths as well. I considered committing each key expression with its derivation path, as @fametrano suggested. It would narrow the first downside: of the 13 distinct pairs in vectors.json, keys-only merges 11 and this would merge 7. The 4 it saves are the same xpub at different paths and a repeated MuSig participant, and those cases only arise when the recommendation is already broken. In exchange the signer has to walk the template, and the BIP has to define a path encoding. The versioned tag leaves room to add this later if practice shows the need.

Now the question is whether this is appropriate to be implemented on a signer and adopted by those already solving this issue in other ways, and do these costs look acceptable? Or are those costs dire enough to have the standard go its own way despite the possible adoption hardships.

@fametrano

Copy link
Copy Markdown
Contributor

Keys-only is acceptable to me. Whether it suits a signer is a question for @bigspider, who wrote BIP 388 and the Ledger Bitcoin app.

@pythcoiner

Copy link
Copy Markdown
Contributor

Strongly agree with @bigspider , I really dislike the overall complexity, if I had to pick a direction, I would advise to start from #1746 with the addition of _ and sorting only where it matters (musig and sortedmulti iirc)

@2099999997690000

Copy link
Copy Markdown
Author

So it seems we are converging to something like this:

records = sort(unique(compressed_pubkey || chain_code))
commitment_input = CompactSize(record_count) || concatenate(records)
synthetic_chain_code = tagged_hash(specified_tag, commitment_input)

Plain and simple global unique sort.

@pythcoiner in this approach there would be no need for sorting the contents of musig and sortedmulti I think.

Please let me know if we all agree on this or I'm missing anything, so that I move to changing the bip and the implementation.

Thank you all.

@pythcoiner

pythcoiner commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

sorry, I realized my previous message was not representing well what I had in mind, so I clauded smth: bitcoin/bitcoin@master...pythcoiner:bitcoin:bip395

@2099999997690000

Copy link
Copy Markdown
Author

@pythcoiner thanks for the clarification. The code shows the distinction. I had read your earlier comment as agreement on a globally sorted, deduplicated key set. Though your implementation preserves traversal order and repetitions, sorting only within musig() and sortedmulti_a() and using only the compressed public keys instead of pubky || chaincode.

If we are choosing a new construction, I still lean toward the globally sorted unique set of pubkey || chain_code records. That removes the need for special handling of MuSig, sortedmulti, or tree ordering.

If we could gather more input from those who were involved in the previous works on this topic, it would be great. So we can conclude and move forward.

@pythcoiner

Copy link
Copy Markdown
Contributor

on a globally sorted, deduplicated key set

I see several advantages of NOT doing this:

  • Actual implems (Liana and Nunchuk uses the same scheme) stays compatible
  • I can reuse a cosigning key in several similar policies w/o introducing privacy leaks
    or(musig(A,B),and(C,older(tl))) & or(musig(C,B),and(A,older(tl)))

@2099999997690000

Copy link
Copy Markdown
Author

@pythcoiner thank you for pointing out those issues.

So, I started with a maximalist approach. Assume key reuse happens and aim for the best normalization attainable short of canonicalization.

Then the point was raised by @bigspider that key reuse shall be avoided and the protection my first approach provided was no good should key reuse happen and the complexity was too much specially for signer devices and current implementation, which was a valid point. The simplest approach, given that there be no key reuse, was tagged_hash(sorted(unique(pubkey || chaincode).

Now what @pythcoiner raises here, in its second point of rationale contradicts the assumption we accepted to revert the maximalist approach. If reusing keys is acceptable and an option, why confine it to the limited cases Liana and Nunchuk happen to tolerate in their implementation of NUMS? I cannot see any reason for that.

I think we have 3 options here:

  1. Just use the simplest approach that is consistent in its assumptions, which is tagged_hash(sorted(unique(pubkey || chaincode) or even tagged_hash(sorted(unique(pubkey).
  2. Use versioning to cover all these approaches even the maximalist one.
  3. Somehow find another middle ground that has a consistent rationale and makes current implementations happy without imposing arbitrary design choices on those who are going to use this bip with a wide variety of requirements and environments.

I personally lean towards 1 and can accept 2 if it gains consensus and will be open for any 3.

Thank you for your feedbacks.

@2099999997690000

Copy link
Copy Markdown
Author

Hi all. I made the changes in bip file and implementation to adopt the simple tagged_hash(sorted(unique(pubkey || chaincode) approach as in the first option in my last comment here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants