pull down to refresh

wen lightning? You said you'd add non-lnbits lightning if I implemented zap metadata notifications
It's sort of a long story. I'll tell it in bullet point format
  • There are several ways to add non-lnbits lightning
  • To me, the most promising ways are NWC and LNC
  • I looked at LNC first and misunderstood it, thought it can't do what I need
  • Then I looked at NWC and found out it definitely can't do what I need
  • But I know the NWC guys pretty well so I asked them to modify it
  • That modification is now in progress but not done yet (more info here)
  • After that I found out LNC can do what I need
  • But very inefficiently -- e.g. only one person at a time could use the checkout page
  • So LNC seems like a poor option and I'm just awaiting the NWC modifications
  • In the meantime, I already have instructions for hooking it up to your own lnbits
  • So self-hosting is already possible, the NWC stuff will just (hopefully) make it easier
reply
But very inefficiently -- e.g. only one person at a time could use the checkout page
What's the exact limitation here? You can only have one active lnc connection at a time?
reply
I haven't looked into the why so I can only guess a reason based on my experience.
My experience is this: I created an LNC connection string that only has permission to create invoices and read info from my node.
Then I published that LNC connection string on one of my test stores -- my "Alice" store.
Then I pretended to be a customer -- "Bob" -- and I used the LNC connection string to connect to Alice's node and load an invoice. It all worked as expected so far: I saw a nice, shiny invoice and I could display it as a qr code for Bob to pay.
Then, while Bob was still viewing that invoice, I pretended to be a second customer -- "Carol" -- and I tried to do the same thing Bob did: I tried to use the LNC connection string to connect to Alice's node and load an invoice. But it did not work. I got an error that said something like "the connection is already in use."
My guess is that the LNC devs were very motivated to ensure that each LNC connection string is only used for one service. I think they don't want two devices to both have access to the same node via the same connection string -- they want some sort of "separation of strings," so that you give a new string to every service.
My guess is this: to help ensure that users do not share a string between two devices, they handicapped the strings so that they cannot establish two simultaneous open connections. Consequently if Bob is using it, Carol cannot.
Therefore, if I used LNC, Bob could effectively bring down a store's lightning capability by using up its only available connection. He could just get an invoice and constantly keep a connection open to check its status, without ever intending to pay. I don't want that so I don't want to use LNC.
reply
Super, can you specify exactly what is happening? I tried to reproduce your issue but couldn't.
I have one node, and generated 3 LNC pairing phrases. I put one pairing phrase in Zeus on my android phone. I put a different one in Zeus on my graphene phone. And I put a different one in terminal web.
I generated an invoice on each service, 3000,4000,5000 and it all generated fine.
reply
He wants the same pairing phrase to be used by N devices simultaneously.
His use case is a website store owner allowing many customers to request invoices from the store owner's node using the same pairing phrase.
reply
Okay got it. Makes more sense now. I just tested it myself and I generated an invoice that expires in 5 minutes on my Zeus connected via LNC. Closed the app, then opened again and generated a different invoice with an expiry of 4 minutes with no issue.
reply
Just tested with alby and terminal web. I generated multiple invoices in quick succession using the same LNC pairing phrase with expires of 1 day.
reply
I believe you'd recreate the issue by creating multiple concurrent LNC connections with the same pairing phrase. You created multiple serially.
reply
I can't imagine a scenario where I would want to do that. Why can't Bob/Carol just pay Alice by triggering an invoice through Alice's store? There is no scenario where Bob or Carol would need to connect to Alice's store.