Skip to content

BOLT 12: first draft of payer proofs#1295

Open
rustyrussell wants to merge 9 commits into
lightning:masterfrom
rustyrussell:guilt/payer-proofs
Open

BOLT 12: first draft of payer proofs#1295
rustyrussell wants to merge 9 commits into
lightning:masterfrom
rustyrussell:guilt/payer-proofs

Conversation

@rustyrussell
Copy link
Copy Markdown
Collaborator

Needs:

  1. Implementation.
  2. Test vectors
  3. Review

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Copy link
Copy Markdown
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Some minor comments from a first pass. Should have more feedback once we attempt to implement this.

Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Jan 2, 2026
Implements the payer proof extension to BOLT 12 as specified in
lightning/bolts#1295. This allows proving
that a BOLT 12 invoice was paid by demonstrating possession of the
payment preimage, a valid invoice signature, and a payer signature.

Key additions:
- Extend merkle.rs with selective disclosure primitives for creating
  and reconstructing merkle trees with partial TLV disclosure
- Add payer_proof.rs with PayerProof, PayerProofBuilder, and
  UnsignedPayerProof types for building and verifying payer proofs
- Support bech32 encoding with "lnp" prefix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

Thanks for this spec! I am finishing to implement it in ldk and have some feedback from implementation experience:

  1. The nonce hash notation needs clarification (see inline comment)
  2. Test vectors would be extremely valuable for cross-implementation compatibility. Wondering if you already had some draft implementation where we can compare the tests vectors?

Happy to provide my implementation's test vectors once the ambiguities are resolved.

Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Jan 4, 2026
Implements the payer proof extension to BOLT 12 as specified in
lightning/bolts#1295. This allows proving
that a BOLT 12 invoice was paid by demonstrating possession of the
payment preimage, a valid invoice signature, and a payer signature.

Key additions:
- Extend merkle.rs with selective disclosure primitives for creating
  and reconstructing merkle trees with partial TLV disclosure
- Add payer_proof.rs with PayerProof, PayerProofBuilder, and
  UnsignedPayerProof types for building and verifying payer proofs
- Support bech32 encoding with "lnp" prefix
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Jan 4, 2026
Implements the payer proof extension to BOLT 12 as specified in
lightning/bolts#1295. This allows proving
that a BOLT 12 invoice was paid by demonstrating possession of the
payment preimage, a valid invoice signature, and a payer signature.

Key additions:
- Extend merkle.rs with selective disclosure primitives for creating
  and reconstructing merkle trees with partial TLV disclosure
- Add payer_proof.rs with PayerProof, PayerProofBuilder, and
  UnsignedPayerProof types for building and verifying payer proofs
- Support bech32 encoding with "lnp" prefix
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Jan 4, 2026
Implements the payer proof extension to BOLT 12 as specified in
lightning/bolts#1295. This allows proving
that a BOLT 12 invoice was paid by demonstrating possession of the
payment preimage, a valid invoice signature, and a payer signature.

Key additions:
- Extend merkle.rs with selective disclosure primitives for creating
  and reconstructing merkle trees with partial TLV disclosure
- Add payer_proof.rs with PayerProof, PayerProofBuilder, and
  UnsignedPayerProof types for building and verifying payer proofs
- Support bech32 encoding with "lnp" prefix
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Jan 5, 2026
Implements the payer proof extension to BOLT 12 as specified in
lightning/bolts#1295. This allows proving
that a BOLT 12 invoice was paid by demonstrating possession of the
payment preimage, a valid invoice signature, and a payer signature.

Key additions:
- Extend merkle.rs with selective disclosure primitives for creating
  and reconstructing merkle trees with partial TLV disclosure
- Add payer_proof.rs with PayerProof, PayerProofBuilder, and
  UnsignedPayerProof types for building and verifying payer proofs
- Support bech32 encoding with "lnp" prefix
Comment thread 12-offer-encoding.md Outdated
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Jan 20, 2026
Implements the payer proof extension to BOLT 12 as specified in
lightning/bolts#1295. This allows proving
that a BOLT 12 invoice was paid by demonstrating possession of the
payment preimage, a valid invoice signature, and a payer signature.

Key additions:
- Extend merkle.rs with selective disclosure primitives for creating
  and reconstructing merkle trees with partial TLV disclosure
- Add payer_proof.rs with PayerProof, PayerProofBuilder, and
  UnsignedPayerProof types for building and verifying payer proofs
- Support bech32 encoding with "lnp" prefix
vincenzopalazzo added a commit to vincenzopalazzo/payer-proof-test-vectors that referenced this pull request Jan 20, 2026
Add a Rust CLI tool that generates and verifies test vectors for BOLT 12
payer proofs as specified in lightning/bolts#1295. The tool uses the
rust-lightning implementation from lightningdevkit/rust-lightning#4297.

Features:
- Generate deterministic test vectors with configurable seed
- Verify test vectors from JSON files
- Support for basic proofs, proofs with notes, and invalid test cases
- Uses refund flow for explicit payer key control

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Feb 22, 2026
Implements payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295.

A PayerProof cryptographically proves that a BOLT 12 invoice was paid
by demonstrating possession of the payment preimage, a valid invoice
signature over a merkle root (via selective disclosure), and a payer
signature proving who authorized the payment.

Key components:
- `PayerProofBuilder`: constructs proofs with selective disclosure,
  supporting both direct signing and derived key signing from
  `ExpandedKey` + `Nonce`
- `PayerProof`: verifiable proof with bech32 encoding (lnp HRP)
- Selective disclosure via merkle tree: omitted TLV fields are
  represented by minimized markers and missing hashes, allowing
  verification of the invoice signature without revealing all fields
- `compute_selective_disclosure` / `reconstruct_merkle_root`: build
  and verify merkle proofs using n-node in-place tree traversal
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Feb 22, 2026
Implements payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Feb 22, 2026
Implements payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Feb 24, 2026
Implement payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.

The selective disclosure mechanism uses a merkle tree over the
invoice's TLV fields, allowing the payer to reveal only chosen
fields while proving the full invoice was signed by the issuer.
Privacy-preserving omitted markers hide the actual TLV type numbers
of undisclosed fields.

PayerProofBuilder provides two signing modes: an explicit signing
function for callers with direct key access, and automatic key
re-derivation from ExpandedKey + Nonce + PaymentId for the common
case where invoice requests used deriving_signing_pubkey.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Feb 24, 2026
Implement payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.

The selective disclosure mechanism uses a merkle tree over the
invoice's TLV fields, allowing the payer to reveal only chosen
fields while proving the full invoice was signed by the issuer.
Privacy-preserving omitted markers hide the actual TLV type numbers
of undisclosed fields.

PayerProofBuilder provides two signing modes: an explicit signing
function for callers with direct key access, and automatic key
re-derivation from ExpandedKey + Nonce + PaymentId for the common
case where invoice requests used deriving_signing_pubkey.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Feb 24, 2026
Implement payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.

The selective disclosure mechanism uses a merkle tree over the
invoice's TLV fields, allowing the payer to reveal only chosen
fields while proving the full invoice was signed by the issuer.
Privacy-preserving omitted markers hide the actual TLV type numbers
of undisclosed fields.

PayerProofBuilder provides two signing modes: an explicit signing
function for callers with direct key access, and automatic key
re-derivation from ExpandedKey + Nonce + PaymentId for the common
case where invoice requests used deriving_signing_pubkey.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vincenzopalazzo
Copy link
Copy Markdown
Contributor

vincenzopalazzo commented Mar 9, 2026

vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Mar 17, 2026
Implement payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.

The selective disclosure mechanism uses a merkle tree over the
invoice's TLV fields, allowing the payer to reveal only chosen
fields while proving the full invoice was signed by the issuer.
Privacy-preserving omitted markers hide the actual TLV type numbers
of undisclosed fields.

PayerProofBuilder provides two signing modes: an explicit signing
function for callers with direct key access, and automatic key
re-derivation from ExpandedKey + Nonce + PaymentId for the common
case where invoice requests used deriving_signing_pubkey.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Mar 17, 2026
Implement payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.

The selective disclosure mechanism uses a merkle tree over the
invoice's TLV fields, allowing the payer to reveal only chosen
fields while proving the full invoice was signed by the issuer.
Privacy-preserving omitted markers hide the actual TLV type numbers
of undisclosed fields.

PayerProofBuilder provides two signing modes: an explicit signing
function for callers with direct key access, and automatic key
re-derivation from ExpandedKey + Nonce + PaymentId for the common
case where invoice requests used deriving_signing_pubkey.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Mar 17, 2026
Implement payer proofs for BOLT 12 invoices as specified in
lightning/bolts#1295. A payer proof
cryptographically demonstrates that a BOLT 12 invoice was paid
using selective disclosure of invoice fields, the payment preimage,
and signatures from both the invoice issuer and the payer.

The selective disclosure mechanism uses a merkle tree over the
invoice's TLV fields, allowing the payer to reveal only chosen
fields while proving the full invoice was signed by the issuer.
Privacy-preserving omitted markers hide the actual TLV type numbers
of undisclosed fields.

PayerProofBuilder provides two signing modes: an explicit signing
function for callers with direct key access, and automatic key
re-derivation from ExpandedKey + Nonce + PaymentId for the common
case where invoice requests used deriving_signing_pubkey.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Using the described algorithm for creating and using `missing_hashes`,
they don't always end up in ascending order.  Interestingly, the rust
implementation bent over backwards to implement the spec, and is far
more complex because of it.

Also, the rust version didn't include `omitted_tlvs` when there were
no tlvs omitted: this seems reasonable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Claude review, slight clarifications.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Comment thread 12-offer-encoding.md
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Apr 21, 2026
Add the payer proof types, selective disclosure merkle support,
parsing, and tests for constructing and validating BOLT 12 payer
proofs from invoices. This implements the payer proof extension to
BOLT 12 as specified in lightning/bolts#1295.

Missing hashes in a proof are emitted in the DFS traversal order
defined by the spec. The BOLT 12 payer proof spec test vectors from
bolt12/payer-proof-test.json (full disclosure, minimal disclosure,
with payer note, and left-subtree omitted) validate the end-to-end
output.

The parser rejects unknown even TLVs in every sub-stream range
(offer, invoice request, invoice, payer-proof/signature, and the
three experimental ranges) via the `tlv_stream!` macro's unknown-even
fallback, and rejects types in the unused gap between the signature
range and the experimental ranges via the all-bytes-consumed check in
`ParsedMessage::try_from`.

Co-Authored-By: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Apr 23, 2026
Add the payer proof types, selective disclosure merkle support,
parsing, and tests for constructing and validating BOLT 12 payer
proofs from invoices. This implements the payer proof extension to
BOLT 12 as specified in lightning/bolts#1295.

Missing hashes in a proof are emitted in the DFS traversal order
defined by the spec. The BOLT 12 payer proof spec test vectors from
bolt12/payer-proof-test.json (full disclosure, minimal disclosure,
with payer note, and left-subtree omitted) validate the end-to-end
output.

The parser rejects unknown even TLVs in every sub-stream range
(offer, invoice request, invoice, payer-proof/signature, and the
three experimental ranges) via the `tlv_stream!` macro's unknown-even
fallback, and rejects types in the unused gap between the signature
range and the experimental ranges via the all-bytes-consumed check in
`ParsedMessage::try_from`.

Co-Authored-By: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread 12-offer-encoding.md Outdated
…to them.

Haven't fixed up my implementation or redone test vectors yet, but this moves the proof fields
out of the signature range.

Also combined the two separate (!) requirements sections.

Suggested-by: @t-bast
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Apr 30, 2026
Implement the BOLT 12 payer-proof authentication change discussed at:
  lightning/bolts#1295 (comment)

# What changes

The current spec (BOLT 12 PR 1295 line 1052) signs only

    SHA256(payer_signature.note || invoice_merkle_root)

with `invreq_payer_id`. Tamper-resistance for the remaining
payer-proof TLVs (`preimage`, `omitted_tlvs`, `missing_hashes`,
`leaf_hashes`) holds only transitively. Any future payer-side TLV
outside the "either part of the already-signed invoice or has an
out-of-band binding" set silently loses authentication. See module
docs for the concrete `payer_timestamp` example.

This commit implements t-bast's proposed alternative:

  1. The `payer_signature` is computed as a tagged signature over the
     merkle root of all payer-proof TLVs except the `payer_signature`
     TLV being signed (i.e. the standard BOLT 12 signing scheme,
     applied to the payer-proof TLV stream itself).
  2. `note` becomes its own TLV (`PAYER_PROOF_PAYER_NOTE_TYPE`,
     placeholder type 252) and is a regular merkle leaf instead of
     being bundled inside the `payer_signature` TLV.
  3. `payer_signature` becomes a plain `bip340sig` like every other
     signature TLV in BOLT 12.

# Code-level changes

`lightning/src/offers/merkle.rs`
  - Refactor `root_hash` into `root_hash_filtered(tlv_stream, include)`
    so callers can supply a custom inclusion predicate. The original
    `root_hash` keeps its semantics (excludes `SIGNATURE_TYPES`).
  - Add `TaggedHash::from_tlv_stream_bytes_filtered(tag, bytes,
    include)` for the payer-proof signing path.

`lightning/src/offers/payer_proof.rs`
  - Replace the `PayerSignatureWithNote { sig, note }` bundle with a
    plain `Signature` + a separate `payer_note: Option<String>` field
    on both `PayerProofContents` and `PayerProofTlvStream`.
  - Add `PAYER_PROOF_PAYER_NOTE_TYPE = 252` (placeholder, see TODO
    below).
  - Replace `payer_signature_hash(note, invoice_merkle_root)` with
    `payer_proof_signature_hash(bytes)`, which computes the tagged
    hash over the proof's own merkle root, excluding only the
    `payer_signature` TLV.
  - `serialize_payer_proof` now takes `Option<&Signature>`. The
    builder calls it twice: first with `None` to get the bytes used
    to compute the signing hash, then with `Some(sig)` to produce the
    final proof bytes. Both produce the same merkle root because the
    filter excludes type 250 in either case.
  - Verifier flow becomes the two signature checks promised by the
    spec proposal: payer signature against the payer-proof merkle
    root, then issuer signature against the reconstructed invoice
    merkle root. Preimage check is unchanged.
  - Update the manually-built `UnsignedPayerProof` test fixtures to
    follow the same two-pass build (placeholder hash, then real hash
    after `serialize_payer_proof(None)`).
  - Update `test_round_trip_..._signature_range_tlv` to assert the
    new (stricter) semantics: under full-tree signing, even unknown
    odd TLVs in the signature range break the payer signature.
  - Update `test_parsing_rejects_unknown_even_tlvs_in_every_range`
    to probe type 254 instead of 252 (252 is the new `payer_note`
    type and is therefore "known").
  - Mark `check_against_spec_vectors` as `#[ignore]`: the spec test
    vectors in `bolt12/payer-proof-test.json` are pinned to the
    previous signing scheme and need to be regenerated once the
    BOLT 12 spec change lands. Every other `payer_proof::*` test
    passes on the new scheme.

# What still depends on the spec

- **Final TLV layout.** Today the data-bearing payer-proof TLVs
  (`preimage` 242, `omitted_tlvs` 244, `missing_hashes` 246,
  `leaf_hashes` 248) and the proposed `payer_note` (252) all sit in
  the `SIGNATURE_TYPES` range (240..=1000). The standard BOLT 12
  merkle root excludes that whole range; this commit therefore uses a
  payer-proof-specific filter that excludes only TLV 250. If the spec
  reallocates these TLVs to a new dedicated range outside
  `SIGNATURE_TYPES`, swap `payer_proof_signature_hash` to use the
  standard `from_valid_tlv_stream_bytes` helper and drop the custom
  filter. The wire format stays the same; only the chosen TLV type
  numbers shift.

- **Final type number for `payer_note`.** Held at 252 here. Update
  `PAYER_PROOF_PAYER_NOTE_TYPE` and regenerate the spec test vectors
  when the spec assigns one.

# Verification

  - `cargo +1.75.0 check --tests -p lightning`: clean (no errors, no
    new warnings).
  - `cargo +1.75.0 fmt --all -- --check`: clean.
  - `cargo +1.75.0 test -p lightning --lib`: 1358 passed, 10 ignored,
    0 failed. The single ignored payer-proof test is
    `check_against_spec_vectors` (pinned to the old scheme).

Tracking issue for the spec discussion:
  lightning/bolts#1332

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request Apr 30, 2026
Add the payer proof types, selective disclosure merkle support,
parsing, and tests for constructing and validating BOLT 12 payer
proofs from invoices. This implements the payer proof extension to
BOLT 12 as specified in lightning/bolts#1295.

Missing hashes in a proof are emitted in the DFS traversal order
defined by the spec. The BOLT 12 payer proof spec test vectors from
bolt12/payer-proof-test.json (full disclosure, minimal disclosure,
with payer note, and left-subtree omitted) validate the end-to-end
output.

The parser rejects unknown even TLVs in every sub-stream range
(offer, invoice request, invoice, payer-proof/signature, and the
three experimental ranges) via the `tlv_stream!` macro's unknown-even
fallback, and rejects types in the unused gap between the signature
range and the experimental ranges via the all-bytes-consumed check in
`ParsedMessage::try_from`.

Co-Authored-By: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vincenzopalazzo

This comment was marked as off-topic.

Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
Comment thread 12-offer-encoding.md Outdated
t-bast added a commit to ACINQ/eclair that referenced this pull request May 4, 2026
Comment thread 12-offer-encoding.md
t-bast added a commit to ACINQ/eclair that referenced this pull request May 5, 2026
More feedback, improve example and clearly define post order, use empty TLV0 for payer_proof sig.
@rustyrussell rustyrussell force-pushed the guilt/payer-proofs branch from d6dbb9d to 1553230 Compare May 6, 2026 23:36
1. Use proof_ prefix on names of all the proof fields.
2. Make it clear that reader requires `proof_missing_hashes` and `proof_leaf_hashes` too.
3. Mention `proof_note` explicitly in writer, as an optional field.
Test vectors, fixed and expanded to cover more tests:

Successful cases:
      full_disclosure
      minimal_disclosure
      with_note
      left_subtree_omitted
      empty_proof_omitted_tlvs_explicit

Failing cases:
      missing_invreq_payer_id
      missing_invoice_payment_hash
      missing_invoice_node_id
      missing_signature
      missing_proof_preimage
      missing_proof_missing_hashes
      missing_proof_leaf_hashes
      missing_proof_signature
      wrong_proof_preimage
      proof_omitted_tlvs_not_ascending
      proof_omitted_tlvs_contains_zero
      proof_omitted_tlvs_contains_signature_field
      proof_omitted_tlvs_contains_proof_field
      proof_omitted_tlvs_contains_high_field
      proof_omitted_tlvs_contains_included_tlv_field
      proof_omitted_tlvs_not_sequential
      proof_leaf_hashes_too_few
      proof_leaf_hashes_too_many
      proof_missing_hashes_too_few
      proof_missing_hashes_too_many
      wrong_invoice_signature
      wrong_proof_signature
      contains_invreq_metadata
@rustyrussell rustyrussell force-pushed the guilt/payer-proofs branch from 1553230 to 93c7f98 Compare May 7, 2026 02:49
@rustyrussell
Copy link
Copy Markdown
Collaborator Author

FYI this is the new test vector diff generated with ldk based on 0f2b026

diff --git a/bolt12/payer-proof-test.json b/bolt12/payer-proof-test.json
index 25ddaa8..40d2567 100644
--- a/bolt12/payer-proof-test.json
+++ b/bolt12/payer-proof-test.json
@@ -113,7 +113,7 @@
         "invoice_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
         "invoice_sighash": "abd59127433ec1e075aaab3d6f1a30a7d05cb672c4469b4a3212e77a08215531",
         "invoice_signature": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88",
-        "proof_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
+        "proof_merkle_root": "336042441742628840fbf7c73b2a470ca99aa450578a000bfecfdf9d83039603",
         "leaf_hashes": [
           "8c9057ed88f3c5a6b6441dcac3b5e4cefb3615904d7362b86e78427fb695f461",
           "8dc54a97453dee6f207fa5216a30f1567442712ca98852bc789b73885029283c",
@@ -132,7 +132,7 @@
         ]
       },
       "result": {
-        "payer_sig": "46e059274ef56f7daf34acb4a8c25c94d9a0f1277258496fded75342470130e1c2d100f4e57ffe9d02efcec0a40d5f61fcbeebe4f3073b50f15e3b27d98c8c42",
+        "proof_signature": "5b53bc7068ecacaf787fc348607514b08fd86c3d6a3257b5cee67d77e8696951536259b79f0b0f1661bca4bf04eb0defda38dd4024fb11aa628af4602c4bec59",
         "proof_fields": [
           {
             "type": 22,
@@ -185,32 +185,32 @@
             "hex": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88"
           },
           {
-            "type": 242,
+            "type": 241,
+            "len": 64,
+            "hex": "5b53bc7068ecacaf787fc348607514b08fd86c3d6a3257b5cee67d77e8696951536259b79f0b0f1661bca4bf04eb0defda38dd4024fb11aa628af4602c4bec59"
+          },
+          {
+            "type": 1001,
             "len": 32,
             "hex": "0101010101010101010101010101010101010101010101010101010101010101"
           },
           {
-            "type": 246,
+            "type": 1003,
             "len": 32,
             "hex": "0b510ba4c6884d603159ced2f0ca21e772424b59e52a2191bbfbcf07377805a1"
           },
           {
-            "type": 248,
+            "type": 1004,
             "len": 320,
             "hex": "8c9057ed88f3c5a6b6441dcac3b5e4cefb3615904d7362b86e78427fb695f4618dc54a97453dee6f207fa5216a30f1567442712ca98852bc789b73885029283cf2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67f54f80c94a87383f2a8ef7c3e461c62b67a51da5bccf6cd96a7dbab29bea51fa7849b8b856e1d2a63d9ce7dc1a78e05cbb2def1f5d7709c48e8707e0a59fe51e19e7e4eee6bf56c6c589fe50035490c1a7c91b753cb8007c4b52838a6772f997f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1adc0b8de03f1a0b0531bff146982d7d613ef6e1ef8d3bdd9590971fc18d835ffb7e92b77b9e3843650f6cd7ee94b6753ea9df3533710b04dee686ad376515a5cbabaab91b367e30fea7026daf9f2590bb7e9cc31db8221f4013c67289e38f22c8"
           },
-          {
-            "type": 250,
-            "len": 64,
-            "hex": "46e059274ef56f7daf34acb4a8c25c94d9a0f1277258496fded75342470130e1c2d100f4e57ffe9d02efcec0a40d5f61fcbeebe4f3073b50f15e3b27d98c8c42"
-          },
           {
             "type": 3000000001,
             "len": 1,
             "hex": "42"
           }
         ],
-        "bech32": "lnp1zcssyj7z5vfx29flqlnsuzatppeyu6u9ugtl3ntz3n4k996zg7a5jvuz2gpq86zcyypjgef743p5fzqq9nqxh0ah7y87rzv3ud0eleps9kl2d5348hq2k89qwcp87v0tc4rzc87uuxmn0m8l2tfh6aw75s7wz8r56fd299ckt74zqpcr9s9he72nyjs86pfe3vjqzaxups47g3xedv2e4fk877c7v6rgpxgszqhd4w73ddqusdcmjthj7pxprpd57qakmn2jh2dh3kwhezwg7gs3g5qpqqqqqqqqqqqqqqqqqqqqqqqqqq9zrsqqqqqpqqqqqqsqqvqqqqqqqqqqqpqqqqqqqqqqqqzsqq9yq3n4y7vg4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0ya2qgp73vppqf9u9gcjv52n7pl8pc96kzrjfe4ctcshlrxk9r8tv2t5y3amfyec9uzqnrqfxq2lkcc057hwan4m0tuzdmwygujy6natt4f4l0cu5qy07zrted7kztcst59wat6hz8ps4usw3dpc6umv5nthft6vhhras4wglz8jyqqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqsra3qpdgshfxx3pxkqv2eemf0pj3puaeyyj6eu54zrydml08swdmcqksl3lgpgzxfq4ld3reutf4kgswu4sa4un80kds4jpxhxc4cdeuyylakjh6xrrw9f2t5200wdus8lffpdgc0z4n5gfcje2vg22783xmn3pgzj2pu7t027heshc7wmz0u0sjdgg5pn0cx4u8y3gc5ywaapcnrfu7rmenl2nuqe99gwwpl92800slyv8rzkea9rkjmenmvm948mw4jn049r7ncfxuts4hp62nrm888msd83czuhvk7786awuyufr58qls2t8l9rcv70e8wu6l4d3k938l9qq65jrq60jgmw57tsqrufdfg8zn8wtue0uqers6sqqj8249c6zsedzv2099l8h5fnqjhz9udjvd0ldj57rq6ms9cmcplrg9s2vdl79rfsttavyl0dc0035aam9vsju0urrvrtlahay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjat42u3kdn7xrl2wqnd470jty9m06wvx8dcyg05qy7xw2y78rezerayq3hqtyn5aat00khnft954rp9e9xe5rcjwujcf9haa46ngfrszv8pctgspa890llf6qh0emq2gr2lv87ta6ly7vrnk583tcaj0kvv33p0avkstcqszss"
+        "bech32": "lnp1zcssyj7z5vfx29flqlnsuzatppeyu6u9ugtl3ntz3n4k996zg7a5jvuz2gpq86zcyypjgef743p5fzqq9nqxh0ah7y87rzv3ud0eleps9kl2d5348hq2k89qwcp87v0tc4rzc87uuxmn0m8l2tfh6aw75s7wz8r56fd299ckt74zqpcr9s9he72nyjs86pfe3vjqzaxups47g3xedv2e4fk877c7v6rgpxgszqhd4w73ddqusdcmjthj7pxprpd57qakmn2jh2dh3kwhezwg7gs3g5qpqqqqqqqqqqqqqqqqqqqqqqqqqq9zrsqqqqqpqqqqqqsqqvqqqqqqqqqqqpqqqqqqqqqqqqzsqq9yq3n4y7vg4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0ya2qgp73vppqf9u9gcjv52n7pl8pc96kzrjfe4ctcshlrxk9r8tv2t5y3amfyec9uzqnrqfxq2lkcc057hwan4m0tuzdmwygujy6natt4f4l0cu5qy07zrted7kztcst59wat6hz8ps4usw3dpc6umv5nthft6vhhras4wglz83gpd480rsdrk2etmc0lp5scr4zjcglkrv844ry4a4emn86algd954z5mztxme7zc0zesmef9lqn4smm768rw5qf8mzx4x9zh5vqkyhmzel5p7jgqpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpq87s86eqpdgshfxx3pxkqv2eemf0pj3puaeyyj6eu54zrydml08swdmcqksl6qlvl5q5prys2lkc3u7956myg8w2cw67fnhmxc2eqntnv2uxu7zz07mftarp3hz549698hhx7grl55sk5v832e6yyufv4xy990rcndecs5pf9q709h40tuctu08d3878cfx5y2qehur27rjg5v2z8w7suf3570pauel4f7qvjj588qlj4rhhc0jxr33tv7j3mfdueakdj6nah2efh6j3lfuynw9c2msa9f3annnacxncupwtkt00rawhwzwy36rs0c99nlj3ux08unhwd06kcmzcnljsqd2fpsd8eydh209cqp7yk55r3fnh97vh7qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psddczuduql35zc9xxllz35c947kz0hku8hc6w7ajkgfw87p3kp4l7m7j2mhh83cgdjs7mxha62tvaf7480n2vm3pvzdae5x45mk29d9ew464wgmxelrpl48qfk6l8e9jzaha8xrrkuzy86qz0r89z0r3u3v3l4j6p0qzq2z"
       }
     },
     {
@@ -299,7 +299,7 @@
         "invoice_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
         "invoice_sighash": "abd59127433ec1e075aaab3d6f1a30a7d05cb672c4469b4a3212e77a08215531",
         "invoice_signature": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88",
-        "proof_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
+        "proof_merkle_root": "fab17a36f0462c3a8043e53c2c137da890b86354438cb6cfe39e8f6d6554ad94",
         "leaf_hashes": [
           "f2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67",
           "f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1a",
@@ -324,7 +324,7 @@
         ]
       },
       "result": {
-        "payer_sig": "46e059274ef56f7daf34acb4a8c25c94d9a0f1277258496fded75342470130e1c2d100f4e57ffe9d02efcec0a40d5f61fcbeebe4f3073b50f15e3b27d98c8c42",
+        "proof_signature": "23c0590179d6786a8b8dfa03cd90a769f1cb79e43cbabaa5dfc4925fe410d34847cb4798e97cdecaf63630dc54bbde06539fcca2fa6ebe44c6468f9b95a6e7d6",
         "proof_fields": [
           {
             "type": 88,
@@ -347,32 +347,32 @@
             "hex": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88"
           },
           {
-            "type": 242,
+            "type": 241,
+            "len": 64,
+            "hex": "23c0590179d6786a8b8dfa03cd90a769f1cb79e43cbabaa5dfc4925fe410d34847cb4798e97cdecaf63630dc54bbde06539fcca2fa6ebe44c6468f9b95a6e7d6"
+          },
+          {
+            "type": 1001,
             "len": 32,
             "hex": "0101010101010101010101010101010101010101010101010101010101010101"
           },
           {
-            "type": 244,
+            "type": 1002,
             "len": 7,
             "hex": "0102595a5ba9b1"
           },
           {
-            "type": 246,
+            "type": 1003,
             "len": 192,
             "hex": "bf8cb2b1d6fa9bcdcab501b59f82c65c506b7f43514737f7197f1fcfeaebad41b9406f4ce526a6a0d4e0b3a63ed89a832e31cb9939dfe1a7b5dd7232d32c02abcd9c44b53b31700c9ed0e3330ce425f7f18fac2fc1d566a34468439274f0e3169f9830f2c3070cfbad13fde30ee36cd7143591164ed12040a9cd595c96840ac9998ab7fa9c743fb9dbdb0d8d46fbe3ad333400bd07f328dcdb6008790bc9d2db3358d8be254efbc28a1f7f9caa8c21432ba93b512d07349764d61386f186471a"
           },
           {
-            "type": 248,
+            "type": 1004,
             "len": 96,
             "hex": "f2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1a7e92b77b9e3843650f6cd7ee94b6753ea9df3533710b04dee686ad376515a5cb"
-          },
-          {
-            "type": 250,
-            "len": 64,
-            "hex": "46e059274ef56f7daf34acb4a8c25c94d9a0f1277258496fded75342470130e1c2d100f4e57ffe9d02efcec0a40d5f61fcbeebe4f3073b50f15e3b27d98c8c42"
           }
         ],
-        "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+        "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
       }
     },
     {
@@ -461,7 +461,7 @@
         "invoice_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
         "invoice_sighash": "abd59127433ec1e075aaab3d6f1a30a7d05cb672c4469b4a3212e77a08215531",
         "invoice_signature": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88",
-        "proof_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
+        "proof_merkle_root": "9fd3c1591869baca0fcc2428514dae012a6b45149d565c6ea35119a0ca2d2205",
         "leaf_hashes": [
           "f2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67",
           "f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1a",
@@ -486,7 +486,7 @@
         ]
       },
       "result": {
-        "payer_sig": "c0dd0ba61181a5147fd864ad9c6af634fa70ad6ddfaa72ba4000115165dec7b275e33d56b0bad640746e0689ac85c67b0692fb084bc48a6027103bd1aecb506e",
+        "proof_signature": "bb83437cb621e71a08506836e6f34073921fa505081ea017b0baa9e723f139514e8d3621e2f75151067efb776bcd504a0e8d13c90a2cb441e94b27877a898089",
         "proof_fields": [
           {
             "type": 88,
@@ -509,32 +509,37 @@
             "hex": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88"
           },
           {
-            "type": 242,
+            "type": 241,
+            "len": 64,
+            "hex": "bb83437cb621e71a08506836e6f34073921fa505081ea017b0baa9e723f139514e8d3621e2f75151067efb776bcd504a0e8d13c90a2cb441e94b27877a898089"
+          },
+          {
+            "type": 1001,
             "len": 32,
             "hex": "0101010101010101010101010101010101010101010101010101010101010101"
           },
           {
-            "type": 244,
+            "type": 1002,
             "len": 7,
             "hex": "0102595a5ba9b1"
           },
           {
-            "type": 246,
+            "type": 1003,
             "len": 192,
             "hex": "bf8cb2b1d6fa9bcdcab501b59f82c65c506b7f43514737f7197f1fcfeaebad41b9406f4ce526a6a0d4e0b3a63ed89a832e31cb9939dfe1a7b5dd7232d32c02abcd9c44b53b31700c9ed0e3330ce425f7f18fac2fc1d566a34468439274f0e3169f9830f2c3070cfbad13fde30ee36cd7143591164ed12040a9cd595c96840ac9998ab7fa9c743fb9dbdb0d8d46fbe3ad333400bd07f328dcdb6008790bc9d2db3358d8be254efbc28a1f7f9caa8c21432ba93b512d07349764d61386f186471a"
           },
           {
-            "type": 248,
+            "type": 1004,
             "len": 96,
             "hex": "f2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1a7e92b77b9e3843650f6cd7ee94b6753ea9df3533710b04dee686ad376515a5cb"
           },
           {
-            "type": 250,
-            "len": 73,
-            "hex": "c0dd0ba61181a5147fd864ad9c6af634fa70ad6ddfaa72ba4000115165dec7b275e33d56b0bad640746e0689ac85c67b0692fb084bc48a6027103bd1aecb506e74657374206e6f7465"
+            "type": 1005,
+            "len": 9,
+            "hex": "74657374206e6f7465"
           }
         ],
-        "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfyuphgt5cgcrfg50lvxftvudtmrf7ns44kal2njhfqqqy23vh0v0vn4uv74dv966eq8gmsx3xkgt3nmq6f0kzztcj9xqfcs80g6aj6sde6x2um5yphx7ar9"
+        "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qthq6r0jmzrec6ppgxsdhx7dq88ysl55zss84qz7ct4208y0cnj52w35mzrchh29gsvlhmwa4u65z2p6x38jg29j6yr62ty7rh4zvq387s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjlaq0ksjar9wd6zqmn0w3js"
       }
     },
     {
@@ -623,7 +628,7 @@
         "invoice_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
         "invoice_sighash": "abd59127433ec1e075aaab3d6f1a30a7d05cb672c4469b4a3212e77a08215531",
         "invoice_signature": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88",
-        "proof_merkle_root": "d75cc1c4a81b39f841f8db4e8b3156f73d973f32fc982cdce884f2d396504db1",
+        "proof_merkle_root": "8f41d20b5edb11062ed4ecee0ded05f3eec9af8414a332fbf3dca7f80221cf52",
         "leaf_hashes": [
           "f2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67",
           "f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1a",
@@ -647,7 +652,7 @@
         ]
       },
       "result": {
-        "payer_sig": "46e059274ef56f7daf34acb4a8c25c94d9a0f1277258496fded75342470130e1c2d100f4e57ffe9d02efcec0a40d5f61fcbeebe4f3073b50f15e3b27d98c8c42",
+        "proof_signature": "f211c7a987b5ba36fbe745ff286985117563db41dd5fc15d6db6f11e33e734f934cf64a1325596e9bff7eaab6218c8b33c0b8fd846757081abd4a262c74b1fc6",
         "proof_fields": [
           {
             "type": 88,
@@ -675,99 +680,99 @@
             "hex": "98c093015fb630fa7aeeecebb7af826edc447244d4fab5d535fbf1ca008ff086bcb7d612f105d0aeeaf5711c30af20e8b438d736ca4d774af4cbdc7d855c8f88"
           },
           {
-            "type": 242,
+            "type": 241,
+            "len": 64,
+            "hex": "f211c7a987b5ba36fbe745ff286985117563db41dd5fc15d6db6f11e33e734f934cf64a1325596e9bff7eaab6218c8b33c0b8fd846757081abd4a262c74b1fc6"
+          },
+          {
+            "type": 1001,
             "len": 32,
             "hex": "0101010101010101010101010101010101010101010101010101010101010101"
           },
           {
-            "type": 244,
+            "type": 1002,
             "len": 6,
             "hex": "0102595a5bb1"
           },
           {
-            "type": 246,
+            "type": 1003,
             "len": 160,
             "hex": "bf8cb2b1d6fa9bcdcab501b59f82c65c506b7f43514737f7197f1fcfeaebad41b9406f4ce526a6a0d4e0b3a63ed89a832e31cb9939dfe1a7b5dd7232d32c02abcd9c44b53b31700c9ed0e3330ce425f7f18fac2fc1d566a34468439274f0e3169f9830f2c3070cfbad13fde30ee36cd7143591164ed12040a9cd595c96840ac93358d8be254efbc28a1f7f9caa8c21432ba93b512d07349764d61386f186471a"
           },
           {
-            "type": 248,
+            "type": 1004,
             "len": 128,
             "hex": "f2deaf5f30be3ced89fc7c24d422819bf06af0e48a31423bbd0e2634f3c3de67f0191c35000247554b8d0a196898a794bf3de89982571178d931affb654f0c1adc0b8de03f1a0b0531bff146982d7d613ef6e1ef8d3bdd9590971fc18d835ffb7e92b77b9e3843650f6cd7ee94b6753ea9df3533710b04dee686ad376515a5cb"
-          },
-          {
-            "type": 250,
-            "len": 64,
-            "hex": "46e059274ef56f7daf34acb4a8c25c94d9a0f1277258496fded75342470130e1c2d100f4e57ffe9d02efcec0a40d5f61fcbeebe4f3073b50f15e3b27d98c8c42"
           }
         ],
-        "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0ya2qgp73vppqf9u9gcjv52n7pl8pc96kzrjfe4ctcshlrxk9r8tv2t5y3amfyec9uzqnrqfxq2lkcc057hwan4m0tuzdmwygujy6natt4f4l0cu5qy07zrted7kztcst59wat6hz8ps4usw3dpc6umv5nthft6vhhras4wglz8jyqqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqsraqxqyp9jkjmk8m2p0uvk2cad75meh9t2qd4n7pvvhzsddl5x528xlm3jlclel4wht2ph9qx7n89y6n2p48qkwnraky6svhrrjue8807rfa4m4er95evq24um8zyk5anzuqvnmgwxvcvusjl0uv04shur4tx5dzxssujwncwx95lnqc09sc8pna66ylauv8wxmxhzs6ez9jw6ysyp2wdt9wfdpq2eye43k97y480hs52ralee25vy9pjh2fm2ykswdyhvntp8ph3ser347yq7t027heshc7wmz0u0sjdgg5pn0cx4u8y3gc5ywaapcnrfu7rmenlqxgux5qqy364fwxs5xtgnznef0eaazvcy4c30rvnrtlmv48scxkupwx7q0c6pvznr0l3g6vz6ltp8mmwrmud80wetyyhrlqcmq6lldlf9dmmncuyxeg0dnt7a99kw5l2nhe4xdcskpx7u6r26dm9zkjuh7jqgms9jf6w74hhmte54j623sjujnv6puf8wfvyjm776af5y3cpxrsu95gq7njhll5aqthuas9yp40krl97a0j0xpem2rc4uwe8mxxgcss"
+        "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0ya2qgp73vppqf9u9gcjv52n7pl8pc96kzrjfe4ctcshlrxk9r8tv2t5y3amfyec9uzqnrqfxq2lkcc057hwan4m0tuzdmwygujy6natt4f4l0cu5qy07zrted7kztcst59wat6hz8ps4usw3dpc6umv5nthft6vhhras4wglz83grepr3afs76m5dhmuazl72rfs5gh2c7mg8w4ls2adkm0z83nuu60jdx0vjsny4vkaxll064tvgvv3veupw8as3n4wzq6h49zvtr5k87xl5p7jgqpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpq87s86sxqyp9jkjmk87s86aqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vjv6cmzlz2nhmc29p7luu42xzzset4ya4ztg8xjtkf4snsmccv3c6l5p7eq8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp4hqt3hsr7xstq5cmlu2xnqkh6cf77ms7lrfmmk2ep9clcxxcxhlm06ftw7u78ppk2rmv6lhffdn4865a7dfnwy9sfhhxs6knweg45h9s"
       }
     }
   ],
   "invalid_vectors": [
     {
       "reason": "missing_invreq_payer_id",
-      "bech32": "lnp14qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "bech32": "lnp14qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     },
     {
       "reason": "missing_invoice_payment_hash",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cukqssyj7z5vfx29flqlnsuzatppeyu6u9ugtl3ntz3n4k996zg7a5jvuz7pqf3synq90mvv860thwe6ah47pxahzywfzdf744656lhuw2qz8lpp4ukltp9ug96zhw4at3rsc27g8gksudwdk2f4m54axtm37c2hy03rezqqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgp7srszqjetfd6nv0kczlcev436mafhnw2k5qmt8uzcew9q6mlgdg5wdlhr9l3lnl2awk5rw2qdaxw2f4x5r2wpvax8mvf4qewx89ejwwluxnmthtjxtfjcq4tekwyfdfmx9cqe8ksuveseep97lccltp0c82kdg6ydppeya8suvtflxps7tpswr8m45flmccwudkdw9p4jytya5fqgz5u6k2uj6zq4jve32ml48r587uahkcd34r0hcadxv6qp0g87v5dekmqppushjwjmve43k97y480hs52ralee25vy9pjh2fm2ykswdyhvntp8ph3ser347rq7t027heshc7wmz0u0sjdgg5pn0cx4u8y3gc5ywaapcnrfu7rmenlqxgux5qqy364fwxs5xtgnznef0eaazvcy4c30rvnrtlmv48scxn7j2mhh83cgdjs7mxha62tvaf7480n2vm3pvzdae5x45mk29d9e0ayq3hqtyn5aat00khnft954rp9e9xe5rcjwujcf9haa46ngfrszv8pctgspa890llf6qh0emq2gr2lv87ta6ly7vrnk583tcaj0kvv33pq"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cukqssyj7z5vfx29flqlnsuzatppeyu6u9ugtl3ntz3n4k996zg7a5jvuz7pqf3synq90mvv860thwe6ah47pxahzywfzdf744656lhuw2qz8lpp4ukltp9ug96zhw4at3rsc27g8gksudwdk2f4m54axtm37c2hy03rc5qg7qtyqhn4ncd29cm7srekg2w603edu7g096h2jal3yjtljpp56ggl950x8f0n0v4a3kxrw9fw77qefeln9zlfhtu3xxg68eh9dxult06qlfyqqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqsrlgragrszqjetfd6nv0aq04up0uvk2cad75meh9t2qd4n7pvvhzsddl5x528xlm3jlclel4wht2ph9qx7n89y6n2p48qkwnraky6svhrrjue8807rfa4m4er95evq24um8zyk5anzuqvnmgwxvcvusjl0uv04shur4tx5dzxssujwncwx95lnqc09sc8pna66ylauv8wxmxhzs6ez9jw6ysyp2wdt9wfdpq2exvc4dl6n36rlwwmmvxc63hmuwknxdqqh5rlx2xumdsqs7gte8fdkv6cmzlz2nhmc29p7luu42xzzset4ya4ztg8xjtkf4snsmccv3c6l5p7cc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwt"
     },
     {
       "reason": "missing_invoice_node_id",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0ylsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0ylsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     },
     {
       "reason": "missing_signature",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhjyqqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqsraq8qyp9jkjm4xclds9l3jetr4h6n0xu4dgpkk0c93ju2p4h7s63gumlwxtlrl8746adgxu5qm6vu5n2dgx5uze6v0kcn2pjuvwtnyualcd8khwhyvkn9sp2hnvugj6nkvtspj0dpcenpnjztal337kzlsw4v635g6zrjf60pcckn7vrpukrqux0htgnlh3sacmv6u2rtygkfmgjqs9fe4v4e95yptyenz4hl2w8g0aem0dsmr2xl0366ve5qz7s0uegmndkqzrep0ya9kentrvtuf2wl0pg58mlnj4gcg2r9w5nk5fdqu6fwexkzwr0rpj8rtuxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjl6gprwqkf8fm6k7ld0xjktf2xztj2dng83yae9sjt0mmt4xsj8qycwrsk3qr6w2ll7n5pwlnkq5sx47c0uhm47fuc88dg0zh3mylvcerzz"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qh3gq3uqkgp08t8s65t3haq8nvs5a5lrjmeus7t4w49mlzfyhlyzrf5s37tg7vwjlx7etmrvvxu2jaaupjnnlx297nwhezvv350nw26de7kl5p7jgqpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpq87s86s8qyp9jkjm4xcl6qltczlcev436mafhnw2k5qmt8uzcew9q6mlgdg5wdlhr9l3lnl2awk5rw2qdaxw2f4x5r2wpvax8mvf4qewx89ejwwluxnmthtjxtfjcq4tekwyfdfmx9cqe8ksuveseep97lccltp0c82kdg6ydppeya8suvtflxps7tpswr8m45flmccwudkdw9p4jytya5fqgz5u6k2uj6zq4jve32ml48r587uahkcd34r0hcadxv6qp0g87v5dekmqppushjwjmve43k97y480hs52ralee25vy9pjh2fm2ykswdyhvntp8ph3ser34lgra3s09h40tuctu08d3878cfx5y2qehur27rjg5v2z8w7suf3570pauelsrywr2qqzga25hrg2r95f3fu5hu773xvz2ugh3kf34lak2ncvrflf9dmmncuyxeg0dnt7a99kw5l2nhe4xdcskpx7u6r26dm9zkjuk"
     },
     {
-      "reason": "missing_payer_signature",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwt"
+      "reason": "missing_proof_signature",
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erugl5p7jgqpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpq87s86s8qyp9jkjm4xcl6qltczlcev436mafhnw2k5qmt8uzcew9q6mlgdg5wdlhr9l3lnl2awk5rw2qdaxw2f4x5r2wpvax8mvf4qewx89ejwwluxnmthtjxtfjcq4tekwyfdfmx9cqe8ksuveseep97lccltp0c82kdg6ydppeya8suvtflxps7tpswr8m45flmccwudkdw9p4jytya5fqgz5u6k2uj6zq4jve32ml48r587uahkcd34r0hcadxv6qp0g87v5dekmqppushjwjmve43k97y480hs52ralee25vy9pjh2fm2ykswdyhvntp8ph3ser34lgra3s09h40tuctu08d3878cfx5y2qehur27rjg5v2z8w7suf3570pauelsrywr2qqzga25hrg2r95f3fu5hu773xvz2ugh3kf34lak2ncvrflf9dmmncuyxeg0dnt7a99kw5l2nhe4xdcskpx7u6r26dm9zkjuk"
     },
     {
       "reason": "wrong_preimage",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq85quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq06ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     },
     {
       "reason": "omitted_tlvs_not_ascending",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26twc6nakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26twc6nlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     },
     {
       "reason": "omitted_tlvs_contains_zero",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05pqqqzqjetfd6nv0kczlcev436mafhnw2k5qmt8uzcew9q6mlgdg5wdlhr9l3lnl2awk5rw2qdaxw2f4x5r2wpvax8mvf4qewx89ejwwluxnmthtjxtfjcq4tekwyfdfmx9cqe8ksuveseep97lccltp0c82kdg6ydppeya8suvtflxps7tpswr8m45flmccwudkdw9p4jytya5fqgz5u6k2uj6zq4jve32ml48r587uahkcd34r0hcadxv6qp0g87v5dekmqppushjwjmve43k97y480hs52ralee25vy9pjh2fm2ykswdyhvntp8ph3ser347rq7t027heshc7wmz0u0sjdgg5pn0cx4u8y3gc5ywaapcnrfu7rmenlqxgux5qqy364fwxs5xtgnznef0eaazvcy4c30rvnrtlmv48scxn7j2mhh83cgdjs7mxha62tvaf7480n2vm3pvzdae5x45mk29d9e0ayq3hqtyn5aat00khnft954rp9e9xe5rcjwujcf9haa46ngfrszv8pctgspa890llf6qh0emq2gr2lv87ta6ly7vrnk583tcaj0kvv33pq"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2pqqqzqjetfd6nv0aq04up0uvk2cad75meh9t2qd4n7pvvhzsddl5x528xlm3jlclel4wht2ph9qx7n89y6n2p48qkwnraky6svhrrjue8807rfa4m4er95evq24um8zyk5anzuqvnmgwxvcvusjl0uv04shur4tx5dzxssujwncwx95lnqc09sc8pna66ylauv8wxmxhzs6ez9jw6ysyp2wdt9wfdpq2exvc4dl6n36rlwwmmvxc63hmuwknxdqqh5rlx2xumdsqs7gte8fdkv6cmzlz2nhmc29p7luu42xzzset4ya4ztg8xjtkf4snsmccv3c6l5p7cc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwt"
     },
     {
       "reason": "omitted_tlvs_contains_signature_field",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05pqqsyk26tw5mru0kczlcev436mafhnw2k5qmt8uzcew9q6mlgdg5wdlhr9l3lnl2awk5rw2qdaxw2f4x5r2wpvax8mvf4qewx89ejwwluxnmthtjxtfjcq4tekwyfdfmx9cqe8ksuveseep97lccltp0c82kdg6ydppeya8suvtflxps7tpswr8m45flmccwudkdw9p4jytya5fqgz5u6k2uj6zq4jve32ml48r587uahkcd34r0hcadxv6qp0g87v5dekmqppushjwjmve43k97y480hs52ralee25vy9pjh2fm2ykswdyhvntp8ph3ser347rq7t027heshc7wmz0u0sjdgg5pn0cx4u8y3gc5ywaapcnrfu7rmenlqxgux5qqy364fwxs5xtgnznef0eaazvcy4c30rvnrtlmv48scxn7j2mhh83cgdjs7mxha62tvaf7480n2vm3pvzdae5x45mk29d9e0ayq3hqtyn5aat00khnft954rp9e9xe5rcjwujcf9haa46ngfrszv8pctgspa890llf6qh0emq2gr2lv87ta6ly7vrnk583tcaj0kvv33pq"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2pqqsyk26tw5mru0aq04up0uvk2cad75meh9t2qd4n7pvvhzsddl5x528xlm3jlclel4wht2ph9qx7n89y6n2p48qkwnraky6svhrrjue8807rfa4m4er95evq24um8zyk5anzuqvnmgwxvcvusjl0uv04shur4tx5dzxssujwncwx95lnqc09sc8pna66ylauv8wxmxhzs6ez9jw6ysyp2wdt9wfdpq2exvc4dl6n36rlwwmmvxc63hmuwknxdqqh5rlx2xumdsqs7gte8fdkv6cmzlz2nhmc29p7luu42xzzset4ya4ztg8xjtkf4snsmccv3c6l5p7cc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwt"
     },
     {
       "reason": "omitted_tlvs_not_sequential",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26v3jkdakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26v3jkdlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     },
     {
       "reason": "leaf_hashes_too_few",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0ss8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp47jqgms9jf6w74hhmte54j623sjujnv6puf8wfvyjm776af5y3cpxrsu95gq7njhll5aqthuas9yp40krl97a0j0xpem2rc4uwe8mxxgcss"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kypuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psdq"
     },
     {
       "reason": "leaf_hashes_too_many",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud03q8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq05szxupvjwnh4da767d9vkj5vyhy5mxs0zfmjtpyklhkh2dpywqfsu8pdzq85u4lla8gzal8vpfqdtasle0htunesww6s790rkf7e3jxyy"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kgpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"
     },
     {
       "reason": "missing_hashes_too_few",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mra4qh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmlps09h40tuctu08d3878cfx5y2qehur27rjg5v2z8w7suf3570pauelsrywr2qqzga25hrg2r95f3fu5hu773xvz2ugh3kf34lak2ncvrflf9dmmncuyxeg0dnt7a99kw5l2nhe4xdcskpx7u6r26dm9zkjuh7jqgms9jf6w74hhmte54j623sjujnv6puf8wfvyjm776af5y3cpxrsu95gq7njhll5aqthuas9yp40krl97a0j0xpem2rc4uwe8mxxgcss"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgrawstlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdl6qlvvredat6lxzlremvfl37zf4pzsxdlq6hsuj9rzs3mh58zvd8nc00x0uqers6sqqj8249c6zsedzv2099l8h5fnqjhz9udjvd0ldj57rq606ftw7u78ppk2rmv6lhffdn4865a7dfnwy9sfhhxs6knweg45h9s"
     },
     {
       "reason": "missing_hashes_too_many",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrahqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgudqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq8cvredat6lxzlremvfl37zf4pzsxdlq6hsuj9rzs3mh58zvd8nc00x0uqers6sqqj8249c6zsedzv2099l8h5fnqjhz9udjvd0ldj57rq606ftw7u78ppk2rmv6lhffdn4865a7dfnwy9sfhhxs6knweg45h9l5szxupvjwnh4da767d9vkj5vyhy5mxs0zfmjtpyklhkh2dpywqfsu8pdzq85u4lla8gzal8vpfqdtasle0htunesww6s790rkf7e3jxyy"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0stlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr7s8mrq7t027heshc7wmz0u0sjdgg5pn0cx4u8y3gc5ywaapcnrfu7rmenlqxgux5qqy364fwxs5xtgnznef0eaazvcy4c30rvnrtlmv48scxn7j2mhh83cgdjs7mxha62tvaf7480n2vm3pvzdae5x45mk29d9ev"
     },
     {
       "reason": "wrong_invoice_signature",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvupycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqydczeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvupycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz8szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     },
     {
-      "reason": "wrong_payer_signature",
-      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug7gsqzqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszq05quqsyk26tw5mrakqh7xt9vwkl2dumj44qx6elqkxt3gxkl6r29rn0ace0u0ul6ht44qmjsr0fnjjdf4q6nst8f37mzdgxt33ewvnnhlp576a6u3j6vkq927dn3zt2we3wqxfa58rxvxwgf0h7x86ct7p64n2x3rggwf8fu8rz60esv8jcvrse7adz077xrhrdnt3gdv3ze8dzgzq48x4jhykss9vnxv2klafcaplh8dakrvdgma78tfnxsqt6pln9rwdkcqg0y9un5kmxdvd3039fmau9zsl07w24rppgv46jw6395rnf9my6cfcduvxgud0sc8jm6h47v978nkcnlruyn2z9qvm7p40pey2x9prh0gwyc608s77vlcpj8p4qqpyw42t359pj6yc572t700gnxp9wytcmyc6l7m9fuxp5l5jkaaeuwzrv58ke4lwjjm8204fmu6nxugtqn0wdp4dxaj3tfwtlfqy0czeya802mma4u62ed9gcfwffkdq7ynhykzfdl0dw56zguqnpcwz6yq0fetll6ws9m7wczjq6hmpljlwhe8nqua4pu278vnanryvgg"
+      "reason": "wrong_proof_signature",
+      "bech32": "lnp1tqssxfr986kyx3ygqqkvq6alklcslcvfj834l8lyxqkmafkjx57up2cu4qs89ntwss3vgplmd5ycdy83zv9hmmt7ctmltcwnp0va2g0sz5mr0yasyypyhs4rzfj320c8uu8qh2cgwf8xhp0zzluv6c5vad3fwsj8hdyn8qhsgzvvpycpt7mrp7n6amkwhda0sfhdc3rjgn204dw4xhalrjsq3lcgd09h6cf0zpws4m402uguxzhjp6958rtndjjdwa90fj7u0kz4erug79qz9szeq9uav7r23wxl5q7djznknuwt08jrew465h0ufyjlusgdxjz8edre36tumm90vd3sm32thhsx2w0uegh6d6lyf3jx37detfh86m7s86fqqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyql6ql2quqsyk26tw5mrlgra0qtlr9jk8t04x7de26srdvlstr9c5rt0ap4z3eh7uvh7870at466sdegph5eefx56sdfc9n5cld3x5r9ccuhxfemls60dwawgedxtqz40xec3948vchqry76r3nxr8yyhmlrrav9lqa2e4rg35y8yn57r33d8ucxrevxpcvlwk38l0rpm3ke4c5xkg3vnk3ypq2nn2etjtggzkfnx9t075uwslmnk7mpkx5d7lr45engq9aqlej3hxmvqy8jz7f6tdnxkxchcj5a77z3g0hl8923ss5x2af8dgj6pe5jajdvyux7xrywxhaq0kxpuk74a0np03uakylclpy6s3grxlsdtcwfz33ggam6r3xxneu8hn87qv3cdgqqfr42judpgvk3x98jjlnm6yesft3z7xexxhlke20psd8ay4h0w0rssm9pakd0m55ke6na2wlx5ehzzcymmngdtfhv526tjc"
     }
   ]
 }

I've buffed up the test vectors more, updated with latest names etc. How do they look?

Comment on lines +219 to +223
{
"type": 1005,
"len": 0,
"hex": ""
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All valid test vectors include an empty note (but with the TLV field provided, which means it should be taken into account in the merkle tree covered by the proof_signature). Is that expected? It may be worth having one of those test vectors completely omit this TLV for completeness?

"invoice_merkle_root": "cb9e0c81bb39fc244f9f523c748ab4de0e09f1a5fef74359c2e1f7cc7cdc7447",
"invoice_sighash": "538aab18f82285032db132cecf7275ba2cbb462ef1f4d151588f836d0ce47aae",
"invoice_signature": "fbb932e6a9d5b4d88ca0ddc9cf9f8cc880ef41e3ec9574da89f624db898ab3e9d3ed6caa8744633b855167da009119d9834ae71f7b06f02732dc4c1debab0577",
"proof_merkle_root": "cb9e0c81bb39fc244f9f523c748ab4de0e09f1a5fef74359c2e1f7cc7cdc7447",
Copy link
Copy Markdown
Collaborator

@t-bast t-bast May 11, 2026

Choose a reason for hiding this comment

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

I'm unable to reproduce the test vectors in eclair, and I suspect that this is the culprit: in all test vectors, you have proof_merkle_root == invoice_merkle_root. I thought that proof_merkle_root would contain the merkle root of the tree created from the proof TLVs (result.proof_fields with proof_signature filtered out), which is different from the tree created from the invoice TLVs. I then expected that this would be signed using the payer_id as detailed in the "Signature calculation" section. Is my understanding incorrect? Or is there an unrelated issue (maybe with the way I create the merkle tree of the proof TLVs), in which case it would be helpful for debugging if the test vector could contain the merkle root of the proof TLV tree?

Another related question: when building the merkle tree of the proof fields, should the leftmost leaf be a 0x0000 empty invreq_metadata, or is it omitted from the tree entirely (which IMO would be the preferred option since it isn't in the proof_fields)?

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.

I think I had the same consideration in #1295 (comment), posting in there to avoid missing inside the github interface

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.

So what exactly does proof_signature sign? A) invoice root only; B) proof TLV root only; C) some combined tree/root containing both invoice reconstruction and proof fields?

The rationale says it should be B but the vectors currently look like A.

t-bast added a commit to ACINQ/eclair that referenced this pull request May 11, 2026
Comment thread 12-offer-encoding.md
7. All-zero offer_id == gratuitous payment.
8. Streaming invoices?
9. Re-add recurrence.
10. Re-add `invreq_refund_for` to support proofs.
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.

Q: should this line be dropped?

Comment thread 12-offer-encoding.md
- Otherwise, if `proof_omitted_tlvs` is empty:
- The *marker number* is 1.
- Otherwise:
- The *marker number* is one greater than the last `proof_omitted_tlvs` entry.
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.

should we mention marker number needs to be in the range? Based on the requirements here we can generate a marker number that's 240, which will be rejected by the reader.

"invoice_merkle_root": "cb9e0c81bb39fc244f9f523c748ab4de0e09f1a5fef74359c2e1f7cc7cdc7447",
"invoice_sighash": "538aab18f82285032db132cecf7275ba2cbb462ef1f4d151588f836d0ce47aae",
"invoice_signature": "fbb932e6a9d5b4d88ca0ddc9cf9f8cc880ef41e3ec9574da89f624db898ab3e9d3ed6caa8744633b855167da009119d9834ae71f7b06f02732dc4c1debab0577",
"proof_merkle_root": "cb9e0c81bb39fc244f9f523c748ab4de0e09f1a5fef74359c2e1f7cc7cdc7447",
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.

So what exactly does proof_signature sign? A) invoice root only; B) proof TLV root only; C) some combined tree/root containing both invoice reconstruction and proof fields?

The rationale says it should be B but the vectors currently look like A.

Comment thread 12-offer-encoding.md
- `proof_omitted_tlvs` is not one greater than:
- an included TLV number, or
- the previous `proof_omitted_tlvs` or 0 if it is the first number.
- `proof_leaf_hashes` does not contain exactly one hash for each non-signature TLV field.
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.

IIUC, i think this should be,

Suggested change
- `proof_leaf_hashes` does not contain exactly one hash for each non-signature TLV field.
- `proof_leaf_hashes` does not contain exactly one nonce hash for each included invoice TLV field, excluding signature TLV fields and proof-only TLV fields.

or maybe this,

- the number of nonce hashes in `proof_leaf_hashes` is not equal to the number of included invoice TLV fields:
    - excluding signature TLV fields,
    - excluding proof-only TLV fields,
    - excluding omitted invoice TLV fields, which are covered by `proof_missing_hashes`.

vincenzopalazzo added a commit to vincenzopalazzo/rust-lightning that referenced this pull request May 14, 2026
Add the payer proof types, selective disclosure merkle support,
parsing, and tests for constructing and validating BOLT 12 payer
proofs from invoices. This implements the payer proof extension to
BOLT 12 as specified in lightning/bolts#1295.

Missing hashes in a proof are emitted in the DFS traversal order
defined by the spec. The BOLT 12 payer proof spec test vectors from
bolt12/payer-proof-test.json (full disclosure, minimal disclosure,
with payer note, and left-subtree omitted) validate the end-to-end
output.

The parser rejects unknown even TLVs in every sub-stream range
(offer, invoice request, invoice, payer-proof/signature, and the
three experimental ranges) via the `tlv_stream!` macro's unknown-even
fallback, and rejects types in the unused gap between the signature
range and the experimental ranges via the all-bytes-consumed check in
`ParsedMessage::try_from`.

Co-Authored-By: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants