-
Notifications
You must be signed in to change notification settings - Fork 366
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
Custom Feature Bits #2131
Comments
Also when we do this we need to allow deserializing a BOLT11 invoice with unknown required bits, as long as the user tells us they support it. |
Looks like we'll need to expose |
As you know I despise compiler magic, but I admit here it would read nice. I don't have a strong opinion, do what you think makes sense. |
Hmm... so it occurs to me that in Related: currently we can only set an unknown feature via |
Right, we'll have to call all the handlers and get all their features for that check. And, yes, we'll want a custom features setter, with docs clearly stating you should only set it to values in the experimental range (and probably fail if it's actually a known bit). |
So there is an experimental range for message types, but not for features, AFAICT. Also, I suppose it would be possible to set an unknown feature bit in one context even though it may be known in another, unless we check across all context. Not sure how particular we want to get about this, though. |
bLIP 2 mentions > 255 - https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits |
I think we just need to pass feature bits in all the places we check them - mostly invoice deserialization and init/peer connection? |
I meant when setting the bit. |
Ran into this lightning/blips#24 working on custom features for LND, might be useful here if you're allowing folks to set custom invoice feature bits. |
Yep, the above PR should do that for the low-level API, though we may want to do a followup which adds the same for the higher level invoice construction utilities. |
Now that we set feature bits based on a message handler call rather than a hard-coded thing, we need to support setting custom feature bits explicitly.
The text was updated successfully, but these errors were encountered: