Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clarify about the length of a r field in invoice #865

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joemphilips
Copy link

No description provided.

@joemphilips joemphilips force-pushed the clarify_r_field_in_invoice branch 2 times, most recently from c033771 to 73c7654 Compare May 7, 2021 03:27
* In current spec, route-hint can't express more than 3 hops.
 * From a reader's point of view, what can not be done in a spec is often
   more important than what can be done. Thus clarify about its limitation.
@joemphilips joemphilips force-pushed the clarify_r_field_in_invoice branch from 73c7654 to 79a1d03 Compare May 11, 2021 02:01
* `fee_base_msat` (32 bits, big-endian)
* `fee_proportional_millionths` (32 bits, big-endian)
* `cltv_expiry_delta` (16 bits, big-endian)
* Be aware that `data_length` can express `2^10` (=1024 bits) as the longest, and a single hop will be 51 bytes (= 408 bits). So currently there is no way to specify a hint with more than two hops.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Weirdly, data_length is expressed in 5-bit amounts, so there is 5120 bits. You can fit 12 hops in there.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants