Skip to content
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

blip2: add advisory for invoice feature bit maximum #24

Merged
merged 1 commit into from
May 2, 2023

Conversation

carlaKC
Copy link
Contributor

@carlaKC carlaKC commented Apr 25, 2023

Tagged fields in bolt11 invoices are limited to 10 bits to express the length of the field, which means we have 1023 * 5 ( = 5115) bits for features. Including a 0 position feature, this means that invoice feature bits must be <= 5114. In practice we hope and pray to never see 639 byte feature vectors, this is worth accounting for when implementing custom features.

This limitation does not apply in other contexts, because feature vectors are encoded with (u16) variable length.

@dunxen
Copy link

dunxen commented Apr 27, 2023

Concept ACK

Copy link
Contributor

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is a small clarification on an existing blip, merging this now.

@t-bast t-bast merged commit de30d99 into lightning:master May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants