You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in the v0.5.0 release notes, the ln.charge implementation of the wall.LNclient interface currently becomes slower when the amount of invoices in the Lightning Charge server increases.
The reason is that ln-paywall currently uses the payment hash (a.k.a. preimage hash) of an invoice as ID, which works fine with lnd (and would also work with eclair). But Lightning Charge uses its own randomly generated IDs, so instead of fetching the specific ID we need, we fetch all IDs and filter out the one we're looking for by comparing the preimage hashes.
The solution is to add the implementation specific ID as field to the wall.invoiceMetaData so it can be stored, and when a client sends the final request we can still use the preimage hash to fetch the metadata from the storage, but then use the ID within that data to make the lookup on Lightning Charge.
This leads to the ID and the preimage hash fields being the same when using lnd. We could omit one of the fields and just use one of them, but this could also lead to confusion later.
The text was updated successfully, but these errors were encountered:
As mentioned in the v0.5.0 release notes, the
ln.charge
implementation of thewall.LNclient
interface currently becomes slower when the amount of invoices in the Lightning Charge server increases.The reason is that ln-paywall currently uses the payment hash (a.k.a. preimage hash) of an invoice as ID, which works fine with lnd (and would also work with eclair). But Lightning Charge uses its own randomly generated IDs, so instead of fetching the specific ID we need, we fetch all IDs and filter out the one we're looking for by comparing the preimage hashes.
The solution is to add the implementation specific ID as field to the
wall.invoiceMetaData
so it can be stored, and when a client sends the final request we can still use the preimage hash to fetch the metadata from the storage, but then use the ID within that data to make the lookup on Lightning Charge.This leads to the ID and the preimage hash fields being the same when using lnd. We could omit one of the fields and just use one of them, but this could also lead to confusion later.
The text was updated successfully, but these errors were encountered: