Skip to content

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

Open
joemphilips wants to merge 1 commit into
lightning:masterfrom
joemphilips:clarify_r_field_in_invoice
Open

Clarify about the length of a r field in invoice#865
joemphilips wants to merge 1 commit into
lightning:masterfrom
joemphilips:clarify_r_field_in_invoice

Conversation

@joemphilips
Copy link
Copy Markdown

No description provided.

Comment thread 11-payment-encoding.md Outdated
@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
Comment thread 11-payment-encoding.md
* `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
Copy Markdown
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.

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