Skip to content

BOLT-11 Edits#329

Merged
rustyrussell merged 2 commits intolightning:masterfrom
shannona:bolt11
Dec 20, 2017
Merged

BOLT-11 Edits#329
rustyrussell merged 2 commits intolightning:masterfrom
shannona:bolt11

Conversation

@shannona
Copy link
Collaborator

More line editing and clarifications, also includes typo-fix from @dimitris-t in #306 and table of contents from @bcongdon in #310.

More line editing and clarifications, also includes typo-fix from @dimitris-t in #306 and table of contents from @bcongdon in #310.
* `f` (9): `data_length` variable, depending on version. Fallback on-chain address: for bitcoin, this starts with a 5 bit `version`; a witness program or P2PKH or P2SH address.
* `r` (3): `data_length` variable. One or more entries containing extra routing information for a private route; there may be more than one `r` field, too.
* `f` (9): `data_length` variable, depending on version. Fallback on-chain address: for bitcoin, this starts with a 5-bit `version` and contains a witness program or P2PKH or P2SH address.
* `r` (3): `data_length` variable. one or more entries containing extra routing information for a private route; there may be more than one `r` field
Copy link
Collaborator

Choose a reason for hiding this comment

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

lower-casing after the period seems weird; is that a thing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, probably not.

@rustyrussell
Copy link
Collaborator

You will also need to add "bitcoins" to the wordlist in .aspell.en.pws. It's case-sensitive.

Copy link
Collaborator

@toadlyBroodle toadlyBroodle left a comment

Choose a reason for hiding this comment

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

I think that changing the '.' separators to ':' or ';' in the equation examples within parenthesis would make them clearer. But I can do this when I do my edit also.

1. `timestamp`: seconds-since-1970 (35 bits, big-endian)
1. Zero or more tagged parts.
1. `signature`: bitcoin-style signature of above. (520 bits)
1. Zero or more tagged parts
Copy link
Collaborator

Choose a reason for hiding this comment

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

zero...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

* [Requirements](#requirements)
* [Human-Readable Part](#human-readable-part)
* [Requirements](#requirements-1)
* [Rationale](#rationale)
Copy link
Collaborator

Choose a reason for hiding this comment

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

ToC sections for other BOLTs do not include 'Requirements' and 'Rationale' sections

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks.

standard actually supports hashing in bit boundaries, it's not widely
implemented. The recovery ID allows public key recovery, so the
`signature` covers an exact number of bytes even though the SHA-2
standard actually supports hashing in bit boundaries because it's not widely
Copy link
Collaborator

Choose a reason for hiding this comment

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

...boundaries, because...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

* `h` (23): `data_length` 52. 256-bit description of purpose of payment (SHA256). This is used to commit to an associated description which is too long to fit, such as may be contained in a web page.
* `x` (6): `data_length` variable. `expiry` time in seconds (big-endian). Default is 3600 (1 hour) if not specified.
* `p` (1): `data_length` 52. 256-bit SHA256 payment_hash. Preimage of this provides proof of payment
* `d` (13): `data_length` variable. short description of purpose of payment (ASCII), e.g. '1 cup of coffee'
Copy link
Collaborator

Choose a reason for hiding this comment

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

...variable. Short...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

field to identify the channel, `fee_base_msat`, `fee_proportional_millionths` and `cltv_expiry_delta` are as specified in [BOLT #7](07-routing-gossip.md#the-channel_update-message). A writer MAY include more than one `r` field to
public node to the final destination. For each entry, the `pubkey` is the
node ID of the start of the channel; `short_channel_id` is the short channel ID
field to identify the channel; and `fee_base_msat`, `fee_proportional_millionths` and `cltv_expiry_delta` are as specified in [BOLT #7](07-routing-gossip.md#the-channel_update-message). A writer MAY include more than one `r` field to
Copy link
Collaborator

Choose a reason for hiding this comment

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

...fee_proportional_millionths, and...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

* `x`: expiry time
* `qz`: `data_length` (`q` = 0, `z` = 2. 0 * 32 + 2 == 2)
* `pu`: 60 seconds (`p` = 1, `u` = 28. 1 * 32 + 28 == 60)
* `pu`: 60 seconds (`p` = 1, `u` = 28. 1 * 32 + 28 == 60)
Copy link
Collaborator

Choose a reason for hiding this comment

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

...28; 1... use semicolon or colon instead of period?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

think you're right; that's more readable. Changing throughout.

* `r`: tagged field: route information
* `9y`: `data_length` (`9` = 5, `y` = 4. 5 * 32 + 4 = 164)
`q20q82gphp2nflc7jtzrcazrra7wwgzxqc8u7754cdlpfrmccae92qgzqvzq2ps8pqqqqqqqqqqqq9qqqvpeuqafqxu92d8lr6fvg0r5gv0heeeqgcrqlnm6jhphu9y00rrhy4grqszsvpcgpy9qqqqqqqqqqqq7qqzq`: pubkey `029e03a901b85534ff1e92c43c74431f7ce72046060fcf7a95c37e148f78c77255`, `short_channel_id` 0102030405060708, `fee_base_msat` 1 millisatoshi, `fee_proportional_millionths` 20, `cltv_expiry_delta` 3. pubkey `039e03a901b85534ff1e92c43c74431f7ce72046060fcf7a95c37e148f78c77255`, `short_channel_id` 030405060708090a, `fee_base_msat` 2 millisatoshi, `fee_proportional_millionths` 30, `cltv_expiry_delta` 4.
* `9y`: `data_length` (`9` = 5, `y` = 4. 5 * 32 + 4 = 164)
Copy link
Collaborator

Choose a reason for hiding this comment

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

use semicolon or colon seperator instead of period?

Including some large-scale changes of punctuation in examples.
@shannona
Copy link
Collaborator Author

Review fixes should now all be in place now. @toadlyBroodle I went ahead and adjusted all the equations, as you suggested.

Copy link
Collaborator

@toadlyBroodle toadlyBroodle left a comment

Choose a reason for hiding this comment

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

Nice one! I've already added 'bitcoins' to spell check list in one of my latest pull requests, so no need to do it again here.

@rustyrussell rustyrussell merged commit ff2d872 into lightning:master Dec 20, 2017
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