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
{{ message }}
Repository navigation
Drop user-provided payer_id from InvoiceRequestBuilder #3198
Wouldn't this prevent anyone from using the offers module in a standalone way? They'd be required to use ExpandedKey and PaymentId, which are more ChannelManager-specific.
You could use ExpandedKey and PaymentId without a ChannelManager? PaymentId still retains its meaning here - we use it to derive the per-payment metadata, which users still need to make constant per payment. Similar for ExpandedKey, even if a bit less so - its just some key material, which users still need to deal with but there's just some extra key material there that's not used.
I understand that allowing to override payer_id is a potentially dangerous API, but wonder if we should/need to keep payer_id exposed for inbound payments, e.g., if other implementations choose to use it differently than us?
Honestly we should probably kill off payer_id entirely, but mostly I think we want to very, very strongly discourage anyone from using payer_id for the purpose of identifying payers. Its really dangerous to use that way and causes social costs if people do. IMO we should remove it if only so that people who want it come ask us and we can tell them to stop breaking lightning.
Was just looking at LNDK's usage. It no longer uses a fixed key to sign in order to fix the caching issue -- the spec was changed to cache based on payer_metadata instead of payer_id, so that should no longer be an issue anyway. However, LNDK does use derived keys from LND for signing. I'm not sure if this is a hard requirement though (cc: @orbitalturtle). Just want to raise that before going forward with this change.
@jkczyz Yeah I'm pretty sure it's not a hard requirement for LNDK so moving in that direction should be fine for us! So if I'm understanding right, in the future we'd want to use request_invoice_deriving_payer_id and let LDK derive the payer_id instead of using request_invoice_deriving_metadata?
Activity
jkczyz commentedon Jul 22, 2024
Wouldn't this prevent anyone from using the
offersmodule in a standalone way? They'd be required to useExpandedKeyandPaymentId, which are moreChannelManager-specific.TheBlueMatt commentedon Jul 22, 2024
You could use
ExpandedKeyandPaymentIdwithout aChannelManager?PaymentIdstill retains its meaning here - we use it to derive the per-payment metadata, which users still need to make constant per payment. Similar forExpandedKey, even if a bit less so - its just some key material, which users still need to deal with but there's just some extra key material there that's not used.tnull commentedon Jul 22, 2024
I understand that allowing to override
payer_idis a potentially dangerous API, but wonder if we should/need to keeppayer_idexposed for inbound payments, e.g., if other implementations choose to use it differently than us?TheBlueMatt commentedon Jul 22, 2024
Honestly we should probably kill off
payer_identirely, but mostly I think we want to very, very strongly discourage anyone from usingpayer_idfor the purpose of identifying payers. Its really dangerous to use that way and causes social costs if people do. IMO we should remove it if only so that people who want it come ask us and we can tell them to stop breaking lightning.TheBlueMatt commentedon Aug 8, 2024
Slipping. We should still do this so users don't rely on this API, but there's no super strong reason to do it now.
jkczyz commentedon Aug 16, 2024
Was just looking at LNDK's usage. It no longer uses a fixed key to sign in order to fix the caching issue -- the spec was changed to cache based on
payer_metadatainstead ofpayer_id, so that should no longer be an issue anyway. However, LNDK does use derived keys from LND for signing. I'm not sure if this is a hard requirement though (cc: @orbitalturtle). Just want to raise that before going forward with this change.See lndk-org/lndk#133.
orbitalturtle commentedon Aug 17, 2024
@jkczyz Yeah I'm pretty sure it's not a hard requirement for LNDK so moving in that direction should be fine for us! So if I'm understanding right, in the future we'd want to use
request_invoice_deriving_payer_idand let LDK derive the payer_id instead of usingrequest_invoice_deriving_metadata?jkczyz commentedon Aug 17, 2024
Yes, and doing so means you would call
build_and_signinstead ofbuildand thensignas attempting to use the latter methods will fail to compile.