Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLT12: CLN 24.05 can't fetch invoice from offer generated by LDK (recipient node id hiding) #7401

Closed
urza opened this issue Jun 16, 2024 · 2 comments
Assignees
Milestone

Comments

@urza
Copy link
Contributor

urza commented Jun 16, 2024

This is @TheBlueMatt public bolt12 offer (generated by LDK):

lno1qsgqmqvgm96frzdg8m0gc6nzeqffvzsqzrxqy32afmr3jn9ggkwg3egfwch2hy0l6jut6vfd8vpsc3h89l6u3dm4q2d6nuamav3w27xvdmv3lpgklhg7l5teypqz9l53hj7zvuaenh34xqsz2sa967yzqkylfu9xtcd5ymcmfp32h083e805y7jfd236w9afhavqqvl8uyma7x77yun4ehe9pnhu2gekjguexmxpqjcr2j822xr7q34p078gzslf9wpwz5y57alxu99s0z2ql0kfqvwhzycqq45ehh58xnfpuek80hw6spvwrvttjrrq9pphh0dpydh06qqspp5uq4gpyt6n9mwexde44qv7lstzzq60nr40ff38u27un6y53aypmx0p4qruk2tf9mjwqlhxak4znvna5y

my CLN 24.05 can decode it as:

{
   "type": "bolt12 offer",
   "offer_id": "3886557814d09f89514b881433ad4dec732890ee0834164ce08a16b2156b7460",
   "offer_metadata": "0d8188d9749189a83ede8c6a62c81296",
   "offer_description": "",
   "offer_paths": [
      {
         "first_node_id": "02455d4ec7194ca8459c88e509762eab91ffd4b8bd312d3b030c46e72ff5c8b775",
         "blinding": "029ba9f3bbeb22e578cc6ed91f8516fdd1efd179204022fe91bcbc2673b99de353",
         "path": [
            {
               "blinded_node_id": "02543a5d78820589f4f0a65e1b426f1b4862abbcf1c9df427a496aa3a717a9bf58",
               "encrypted_recipient_data": "e7e137df1bde27275cdf250cefc523369239936cc104b03548ea5187e046a17f8e8143e92b82e15094f77e6e14b078940fbec9"
            },
            {
               "blinded_node_id": "031d71130005699bde8734d21e66c77ddda8058e1b16b90c6028437bbda1236efd",
               "encrypted_recipient_data": "0869c0550122f532edd933735a819efc"
            }
         ]
      }
   ],
   "offer_node_id": "034f98eaf4a627e2bdc9e8948f481d99e1a807cb29692ee4e07ee6edaa29b27da1",
   "valid": true
}

But when I try to fetch the invoice, it ends with error:

{
   "code": 1003,
   "message": "Failed: could not route, could not connect: {\"code\":400,\"message\":\"Unable to connect, no address known for peer\"}"
}

Also I really like how the offer hides the recipient node id:
"offer_node_id": "034f98eaf4a627e2bdc9e8948f481d99e1a807cb29692ee4e07ee6edaa29b27da1",
This is not public node according to my node.

How does that work? Is that private channel?
Even if this might not be perfect privacy, not having the node id explicitly in the offer directly would be very nice small privacy gain.

cc @rustyrussell @vincenzopalazzo

@rustyrussell rustyrussell added this to the v24.08 milestone Jun 17, 2024
@rustyrussell rustyrussell self-assigned this Jun 17, 2024
@TheBlueMatt
Copy link

That one is a bit old and was generated with a prior LDK which may or may not be up to date with the spec. This one should be, though, and apparently also has issues? bitcoin:?lno=lno1qsgr30k45jhvkfqxjqheaetacu4guyxvqttftvqu0f5sneckep3lkwdut7mmhhpcyjmlmnjn4hze8ed7pq88xqkxt2dcw5mlxhz644fms82f7k4ymfxs2ehhpjtxwxly0w5k8xdtlvpqyd8xzdq4tq8lgupnueshgydr330lc3j5kdcqh54gt7jdg9n68j4eqqeu7ts8uh0qxamee6ndj37tc6mzgejthvvjqj96p8dz2hrsh5z5n27qfk6svjz5pmkh0smq26k0j2j4q36xgq3r5qzet9kuhq4lydpen5mskxgjdvs5faqgv8pmj7cfd7ny84djksqpqk9ky6juc7fpezecxvg7sjx05dckyypnv9tmvfp6tkpehmtaqmvuupetxuzqf4t0azddjdcpasgw6hxuz9g

@vincenzopalazzo
Copy link
Collaborator

I was able to pay both invoices of @TheBlueMatt with the cln commit bf54913

Closing this as completed!

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

No branches or pull requests

5 participants