-
Notifications
You must be signed in to change notification settings - Fork 407
HRN: Emit new event type when Offer has been received and validated #3779
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
Comments
Hmm, is there a reason you need the |
Hmm, IIUC, |
I'd like to pick this up. |
Sure, go for it! |
that's easy to fix, though, and likely it should :).
Hmm? Like what? I'm not really sure there's much to fill in from an
That's one RTT, but I guess I'm not clear on the point of that? Like, DNS should move pretty quick, hopefully, and if an Offer request times out its probably already retried a few times and we've waited a while. Adding one RTT on top of the retry seems perfectly fine? |
The point is that we already retrieved the offer and still would have an entirely blank entry in the payment store even though we could provide the user additional metadata. |
Right, I guess I'm missing what that metadata is? Like, we can give the user an |
Well, in LDK it would be all the fields of
Honestly, I'm not quite following why this is controversial at all? LDK retrieves the offer from DNS, why can't we give the user a way to access what we retrieved? FWIW, pay_for_offer_from_human_readable_name currently returns |
its a question of what the API should look like so that there's a consistent view of what's going on - paying a BIP 353 isn't strictly just paying an offer, and to some extent I regret having a "pay for offer from BIP 353" method because a BIP 353 can also be on-chain but could also be silent payments or cashu or... Having an API where someone pastes in a human readable name and then expects to get back an OfferId or really any additional offer metadata seems really wrong to me - its just a payment, for an amount, with a fee. There may be some additional metadata, but tying it to offers specifically just feels totally wrong. I do kinda wonder if ldk-node shouldn't instead by using https://docs.rs/bitcoin-payment-instructions/ to parse these (which hopefully post-LDK-0.2 will support doing the DNS lookup over onion messages for privacy). |
Well, I'd argue it's the other way around: we def. need to track the concrete payment, including all metadata the kind of payment supports (including things like Txid, OfferId, payment hash, etc., depending on what we use). So yes, assuming an HRN always resolves to an offer is wrong, but in LDK Node we'd track the concrete payment and attach the HRN metadata if the payment happens to be the result of a HRN resolution.
Hmm, that might indeed make more sense, at least if we're then also committed to drop the |
can I take this ? |
Appreciate you looking into this! I've been monitoring this issue too, but I'm currently waiting for the maintainers to wrap up their discussion before starting any work. Happy to coordinate once they give the green light! |
Currently, when using the
ChannelManager::pay_for_offer_from_human_readable_name
API, the user gets no access to the offer data retrieved. It would be great to add a new event type that is emitted when the offer has been retrieved and validated, e.g. here:rust-lightning/lightning/src/ln/channelmanager.rs
Line 12790 in b543afe
The text was updated successfully, but these errors were encountered: