This issue tracks two BOLT 12 payer-proof spec questions that came up while implementing lightningdevkit/rust-lightning#4297.
1. missing_hashes example appears to omit one hash
For the selective-disclosure example with TLVs:
0 omitted
10 included
20 omitted
30 omitted
40 included
50 omitted
60 omitted
The example in BOLT PR 1295 appears to imply 3 entries in missing_hashes, but tree reconstruction in rust-lightning requires 4:
- hash for TLV
0
- hash for the omitted branch covering TLVs
20 and 30
- hash for TLV
50
- hash for TLV
60
Question: is the spec example incomplete, or is the implementation's tree interpretation wrong?
Relevant rust-lightning review thread:
2. omitted_tlvs trailing-marker rule conflicts with the example
The normative text says omitted_tlvs MUST NOT contain more than one number larger than the largest included non-signature TLV.
However, the same example uses markers [11, 12, 41, 42], and both 41 and 42 are larger than the largest included TLV 40.
Question: should a minimized trailing run after the final included TLV be considered valid, with the text updated accordingly? Or should the example be changed?
Relevant rust-lightning review thread:
Desired outcome
- Confirm the intended interpretation for both cases.
- Update the example and/or normative text in BOLT PR 1295 so implementations converge on the same behavior.
This issue tracks two BOLT 12 payer-proof spec questions that came up while implementing
lightningdevkit/rust-lightning#4297.1.
missing_hashesexample appears to omit one hashFor the selective-disclosure example with TLVs:
0omitted10included20omitted30omitted40included50omitted60omittedThe example in BOLT PR 1295 appears to imply
3entries inmissing_hashes, but tree reconstruction inrust-lightningrequires4:020and305060Question: is the spec example incomplete, or is the implementation's tree interpretation wrong?
Relevant rust-lightning review thread:
2.
omitted_tlvstrailing-marker rule conflicts with the exampleThe normative text says
omitted_tlvsMUST NOT contain more than one number larger than the largest included non-signature TLV.However, the same example uses markers
[11, 12, 41, 42], and both41and42are larger than the largest included TLV40.Question: should a minimized trailing run after the final included TLV be considered valid, with the text updated accordingly? Or should the example be changed?
Relevant rust-lightning review thread:
Desired outcome