-
Notifications
You must be signed in to change notification settings - Fork 902
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
invoice description hash support #5121
invoice description hash support #5121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No thorough review, these are just some doc errors that stuck out.
As stated before, I'd prefer if there was an option for hash-only storage.
clightning should be unintrusive, efficient base layer tech. Forcing invoice creators to store descriptions and then deleting them in a separate command is inconvenient and slow.
Concept ACK, going to test this with https://github.com/jb55/lnurl-commando |
If we now have a |
ah I see #4892 implements it this way already 🤔 |
Then... don't delete them? If you're regularly issuing invoices you should be deleting expired ones, and if you have thousands of successful payments you can afford a few GB of storage. |
Signed-off-by: Rusty Russell <[email protected]>
LNURL wants this so they can include images etc in descriptions. Replaces: ElementsProject#4892 Changelog-Added: JSON-RPC: `invoice` has a new parameter `deschashonly` to put hash of description in bolt11. Signed-off-by: Rusty Russell <[email protected]>
Means that field is now optional in JSON output. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: JSON-RPC: `delinvoice` has a new parameter `desconly` to remove description.
bcd1da4
to
60dea0f
Compare
To be clear: I really want to see what invoices I have issued by my node. I suspect that the ability to mint invoices with only a description hash will get abused by plugins pretty badly, and disk space is cheap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the only comment that I have is that some of these procedure parameters may be declared constant!
struct invoices *invoices, | ||
struct invoice invoice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct invoices *invoices, | |
struct invoice invoice) | |
const struct invoices *invoices, | |
const struct invoice invoice) |
@rustyrussell can you outline what abuse you have in mind here?
They make invoices smaller... |
I have to say that I agree with having the description be part of the invoice data is the correct thing to do here:
I think ultimately, the fact that the description string can be used as an escape hatch by just including a URL and a hash should serve the use-cases where the description is managed externally. |
all good justifications and I see that the description is stored even when |
No description provided.