Copy Edit and Requirements Restructuring#267
Conversation
…tyle Edit 00-introduction copy for clarity (minor rephrasing, punctuation), correctness (grammar, capitalization, punctuation), consision (minimizing wordiness, redundancy), and consistency (document style, e.g. 1 space between sentences, capitalization of headers, etc.)
Edit 01-messaging copy for clarity (minor rephrasing, punctuation),
correctness (grammar, capitalization, punctuation),
consision (minimizing wordiness, redundancy),
and consistency (document style, e.g. 1 space between sentences,
capitalization of headers, etc.)
Requirements were difficult to follow in existing sentence form, so I reordered them into hopefully more intuitive groups of unordered lists.
rustyrussell
left a comment
There was a problem hiding this comment.
Minor comments, I think the last one is the only significant change.
Thanks, though, this is great!
| This semantic allows future incompatible changes, or backward | ||
| compatible changes. Bits should generally be assigned in pairs, so | ||
| This semantic allows future incompatible changes and/or backward | ||
| compatible changes. Bits should generally be assigned in pairs, so |
There was a problem hiding this comment.
How about:
This semantic allows both future incompatible changes and future backward compatible changes.
ie. odd bits->cool if you don't understand, even bits->error if you don't understand.
| - MUST ignore the received message. | ||
| - otherwise type is even | ||
| - MUST fail the channels. | ||
|
|
There was a problem hiding this comment.
I prefer to separate sending and receiving requirements. As an implementer, you implement one of them at a time.
So, when implementing "receive_foo" you look through the "A node receiving foo..." (and, for c-lightning, we include and check quotes from the spec, making it especially powerful).
There was a problem hiding this comment.
Alright, I can go through and group requirements according to sender/receiver for sure.
Implement changes requested by @rustyrussell: wording change, structure requirements according to whether nodes are sending or receiving; Correct grammar, punctuation, capitalization, and style for correctness, concision, clarity, comprehension, and consistency;
…grammar Implement changes requested by @rustyrussell: wording change, structure requirements according to whether nodes are sending or receiving; Correct grammar, punctuation, capitalization, and style for correctness, concision, clarity, comprehension, and consistency;
|
Ok, I should be pretty much done going over BOLT 0 and BOLT 1 now. I've included a temporary stylesheet/checklist that I've been using for copy editing. Thought others may find it useful for reference. |
Done first pass copy edit, up to line 279 of BOLT 2, according to .copy-edit-stylesheet-checklist.md guidelines;
Done first pass copy edit, up to line 576 of BOLT 2, according to .copy-edit-stylesheet-checklist.md guidelines;
fix stylesheet formatting; add passive voice item to stylesheet checklist; apply passive voice change to BOLT 1;
add stylesheet item: prefer typed, not written numbers; updated BOLT 0, 1 to reflect change; copy edit BOLT 2 up to line 674;
BOLT 1: minor list formatting fix; BOLT 2: copy edit up to line 955;
complete first pass copy edit, following .copy-edit-stylesheed-checklist guidelines;
rustyrussell
left a comment
There was a problem hiding this comment.
Wow. This is so awesome.
Your cleanups made me realize a couple of flawed requirements (ie. "MUST check", but I'm happy to patch those myself after this is merged) so that this is a pure "reformat and tidy" patchset.
That leaves only a couple of minor things I found. If you want to resolve those, I can rebase and apply!
| - SHOULD do this. | ||
| - otherwise: | ||
| - MUST do this, | ||
| - and MUST NOT do this. |
There was a problem hiding this comment.
Shouldn't "- and MUST NOT do this" be indented less, to line up with the above? I think you only want more indent after a "if" or "otherwise".
There was a problem hiding this comment.
I see you used this with a "but MUST NOT" in BOLT 1. See comments there.
There was a problem hiding this comment.
ok I've simplified the structure to reflect this.
| - consistent use of _emphasis_, **strong**, `code`, CAPS, 'quotes' | ||
| - single line separators between paragraphs and page elements | ||
| - type numbers (e.g. '1', '1s') rather than write them (e.g. 'one', 'ones') | ||
| - exception: 'non-zero' |
There was a problem hiding this comment.
Interesting, I was taught small numbers are as words, large or enumerated as digits. So I would say "between two peers" but "version 0". But this is simpler, I guess.
There was a problem hiding this comment.
Yes, exactly right, generally small numbers are written out, however, it's largely a stylistic choice depending upon the publication. My thought was due to the many instances of written mathematical statements, this would help to avoid any potential confusion (e.g. "the old one must be equal to 1"). But this does look funny in a non-mathematical sentence.
So how about this: type references to actual digits (e.g. "the number 1"), otherwise write out small amounts (e.g. "there is one instance of the number 2", "there are two number 1s").
| - MUST truncate `len` to the remainder of the packet (if it's larger). | ||
| - if the string is composed solely of printable ASCII characters (For reference: the printable character set includes byte values 32 through 127, inclusive): | ||
| - SHOULD only print out `data` verbatim. | ||
|
|
There was a problem hiding this comment.
This final case has been inverted (though the original was confusing):
- if
datais not composed solely of printable ASCII characters (For reference: the printable character set includes byte values 32 through 127, inclusive):- SHOULD NOT print out
dataverbatim.
- SHOULD NOT print out
| - SHOULD include the raw, hex-encoded transaction in reply to a `funding_created`, `funding_signed`, `closing_signed`, or `commitment_signed` message. | ||
| - when `channel_id` is 0: | ||
| - MUST fail all channels, | ||
| - and MUST close the connection. |
There was a problem hiding this comment.
Could unindent and remove the "and "?
| - SHOULD set `ignored` to 0s, | ||
| - but MUST NOT set `ignored` to sensitive data such as secrets or portions of initialized | ||
| memory. | ||
|
|
There was a problem hiding this comment.
Ah, I see how you used an extra indent level here to join them. This could go either way; treat them as independent requirements, or, as here, structurally note that the second is a specialization of the first.
There was a problem hiding this comment.
I think you're right, it's simpler to remove the extra indent altogether, except for true sub-items.
| A receiving node: | ||
| - MUST check that `id` corresponds to an HTLC in its current commitment transaction, | ||
| - and MUST fail the channel if it does not. | ||
| - MUST check that the `payment_preimage` value in `update_fulfill_htlc` |
There was a problem hiding this comment.
Again, that's my bad "MUST CHECK" pattern :(
- if the
iddoes not correspond to an HTLC in its current commitment transaction:- MUST fail the channel
| - and MUST fail the channel if it does not. | ||
| - MUST check that the `payment_preimage` value in `update_fulfill_htlc` | ||
| SHA256 hashes to the corresponding HTLC `payment_hash`, | ||
| - and MUST fail the channel if it does not. |
There was a problem hiding this comment.
Again with the MUST check... checking isn't actionable.
| - MUST fail the channel. | ||
| - MAY check the `sha256_of_onion` in `update_fail_malformed_htlc`, | ||
| - and if it does not match the onion it sent: | ||
| - MAY retry or choose an alternate error response. |
There was a problem hiding this comment.
Again, me with the "must check" nonsense :(
| A node which sends `update_fulfill_htlc` before the sender is also | ||
| committed to the HTLC risks losing funds. | ||
| A node which sends `update_fulfill_htlc`, before the sender, is also | ||
| committed to the HTLC and risks losing funds. |
There was a problem hiding this comment.
"A node that" perhaps here too?
| previous commitment transaction, MUST set `next_per_commitment_point` to the values for its next commitment transaction. | ||
| A receiving node: | ||
| - MUST check that `per_commitment_secret` generates the previous `per_commitment_point`, | ||
| - and MUST fail the channel if it does not. |
There was a problem hiding this comment.
Again with the MUST check...
update stylesheet to reflect appropriate structure of Requirement sub-items and format of digits, numerations, and quantities; copy edit BOLTs 0,1,2 to adhere to these changes;
|
FWIW, in future, merges are best done right at the end (in fact, I prefer rebasing). I'm going to merge this now, simply because it's going to keep getting harder, and I'm going to do so without cleaning up the commits, because otherwise it'd really become almost one big commit. |
|
Ok, duly noted. Thanks for merging :D |
While reading through first few sections, I noticed a number of grammar, punctuation, and style issues. Also, I found it rather difficult to comprehend the requirements sections due to their lack of structure. So thought I'd take a stab at fixing these things. So far, I've gone through sections 00, 01, and 02 copy-editing for correctness, clarity, conciseness, and consistency.
If this is desirable, I can continue on with the remaining sections?
Thanks,
Landon