1
0
mirror of https://github.com/lightning/bolts.git synced 2024-11-19 10:00:04 +01:00
Commit Graph

430 Commits

Author SHA1 Message Date
Landon Mutch
93afa0db9a BOLT 2: first pass copy edit;
Done first pass copy edit, up to line 279 of BOLT 2, according to .copy-edit-stylesheet-checklist.md guidelines;
2017-11-10 00:56:38 -08:00
Landon Mutch
b5d2d8b7a8 add copy editing stylesheet temporarily while drafting, for reference; 2017-11-09 23:26:09 -08:00
Landon Mutch
e885a631e8 BOLT 1: change HTML tags to markdown 2017-11-09 23:23:53 -08:00
Landon Mutch
20fca8b90c fix 01-messaging missed unordered list spacing 2017-11-09 19:03:08 -08:00
Landon Mutch
919df997a3 fix 01-messaging unordered list spacing so formats correctly in githubs markdown 2017-11-09 18:55:40 -08:00
Landon Mutch
c3ef4cabe5 fix 00-introduction, 01-messaging section spacings for format consistency 2017-11-09 18:32:52 -08:00
Landon Mutch
076ec8ab48 Merge amended branch 'master' of https://github.com/toadlyBroodle/lightning-rfc 2017-11-09 15:29:20 -08:00
Landon Mutch
2d829756e1 Amend: Make pull request changes; re-structure requirements; correct 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;
2017-11-09 15:26:26 -08:00
Landon Mutch
cc86516411 Make pull request changes; re-structure requirements; correct 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;
2017-11-09 13:30:53 -08:00
Landon Mutch
2f6a629a03 minor grammar, punctuation, and capitalization fixes; 2017-11-09 13:30:31 -08:00
Landon Mutch
531317b3b4 Further clarify 01-messaging requirement structures by deepening branches. 2017-11-04 18:53:46 -07:00
Landon Mutch
5450ec193a Organize 01-messaging requirements into unordered lists
Requirements were difficult to follow in existing sentence form, so I reordered them into hopefully more intuitive groups of unordered lists.
2017-11-04 14:43:56 -07:00
Landon Mutch
34878c0d96 copy-edit 01-messaging for appropriate grammer, punctuation, and style
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.)
2017-11-04 09:32:50 -07:00
Landon Mutch
7e4611af2b copy-edit 00-introduction for appropriate grammer, punctuation, and style
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.)
2017-11-04 09:32:16 -07:00
Rusty Russell
c93cd75d88
BOLT 2,4: allow an error for HTLCs which expire too far away. (#265)
Fixes: #261

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-31 00:21:58 +00:00
Rusty Russell
58d4d9bca3 BOLT 2: Details of HTLC Timeouts, ie. cltv_expiry_delta.
Complete rewrite, including a routing example and the new
min_final_cltv expirt.  I hope this makes it clear.

(Thanks to everyone who reviewed and gave feedback; you rock!)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-19 12:44:53 -07:00
Pierre-Marie Padiou
d1fbfd30f8 BOLT 7,11: Added an optional min_final_cltv_expiry field in BOLT 11 (#258)
Added an optional `c` field in the payment request specifying the
minimum `cltv_expiry` to use for the last htlc in the route. If
not provided, default value is 9.

This commit also clarifies how `channel_update` messages are only
to be used in the context of relaying payments, and how both htlc
amounts and expiries are to be calculated backwards from the values
provided in the payment request.

Not needing the `channel_update` for the first channel in a route also
means that it is possible to make a payment through a channel which 
hasn't had any announcements yet.
2017-10-18 15:31:31 +02:00
Rusty Russell
1066c31c4b aspell: clean up and remove unused words.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-17 10:33:12 +00:00
Rusty Russell
ca713c8c6b Remove BOLT #6 from index, spelling list.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-17 10:33:12 +00:00
ueno
6d43b28258 fix some links 2017-10-17 07:25:48 +00:00
Salome
bec82b494e Fix f tags in test vectors 2017-10-17 06:45:40 +00:00
Salome
604746b3da Fix signatures and chekcsums in test vectors for payment encodings 2017-10-17 06:45:40 +00:00
Christian Decker
d7791b6d4d BOLT04: Clarify that nodes should continue to unwrap the error onion
This is a partial response to #250. Reordering the HMAC and Encrypt
steps do not give us much, but we might want to hide the route
length. So we suggest that the node should continue unwrapping until
the maximum route length of 20 is reached.
2017-10-17 00:14:08 +02:00
Roman Zeyde
f91df05d19 Remove unused 06-irc-announcements.md file 2017-10-16 21:34:51 +02:00
Pierre-Marie Padiou
2aa9f971af fixed typo htlc->HTLC (#262) 2017-10-12 11:40:05 +02:00
Rusty Russell
b09e119c57 BOLT 11: depending in -> depending on.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-11 23:21:12 +00:00
Rusty Russell
fcc8830cc9 Typo fix: CTLV -> CLTV.
Locktime, not timelock.  Found this in my code, too, so pretty sure
it's my fault!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-07 14:57:20 +10:30
Rusty Russell
fc9900c101 BOLT 5: require to fail incoming HTLCs if HTLCs time out on chain.
We talked about this below in the Rationale:

    The fulfillment of an on-chain HTLC delivers the `payment_preimage`
    required to fulfill the incoming HTLC...
    Otherwise, it needs to send the `update_fail_htlc` (presumably with
    reason `permanent_channel_failure`) as detailed in [BOLT
    02](https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#forwarding-htlcs).

But we didn't actually *say* you MUST fail incoming HTLCs after reasonable
depth!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-03 11:30:18 +10:30
Pierre-Marie Padiou
465a4cddaf Only cross-signed htlcs can be fulfilled/failed 2017-10-03 11:30:10 +10:30
Jim Posen
9073a5f3de multi: Fix a few typos and grammatical errors. 2017-09-25 12:34:30 +09:30
Jim Posen
31ae0035c0 BOLT 03: Correct txid of funding transaction in test vector.
The txid has the wrong endianness since Bitcoin reverses the byte
order of double-SHA256 hashes.
2017-09-25 12:28:40 +09:30
Jim Posen
fc31c379e2 BOLT 03: Remove extra 0x01 byte from private keys in test vectors.
An 0x01 byte is appended to the end of private keys in the test
vectors to mark them as using compressed serialization to derive the
pubkeys. Two of the private keys have two 0x01 bytes appended,
presumably by accident.
2017-09-25 12:28:40 +09:30
Jim Posen
22dfcbabcc BOLT 03: Fix appendix numbers and TOC links. 2017-09-25 12:28:40 +09:30
Jim Posen
a01f4c55d3 BOLT 03: Fix pseudcode for shachain algorithm.
When deriving a secret from a seed and index, the bits of the index
must be iterated in reverse order.
2017-09-25 12:28:40 +09:30
Rusty Russell
fae35903ae BOLT 5: "MUST spending" -> "MUST spend"
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-22 14:41:29 +09:30
Rusty Russell
149cf020d6 BOLT 5: requirement to fail HTLCs which don't have outputs in the commit tx.
BOLT 5 only talks in terms out HTLC outputs, but not all HTLCs have outputs.

HTLCs which are dust for both sides are easy, but others require the
commit tx to be buried before we can consider the HTLC failed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-20 10:22:49 +09:30
Rusty Russell
36c099e0d4 BOLT 5: don't fulfill offered HTLCs if peer not committed to it.
Nasty corner case which I got wrong; we can fulfill but then we risk
a reorg removing it.  And anyway, fulfilling reveals that we are
the endpoint in practice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-19 10:44:36 +09:30
Christian Decker
578573f92f Update 04-onion-routing.md
Fixed test vector of full package
2017-09-18 22:47:28 +02:00
Christian Decker
0310e40eda BOLT04: Correct the sphinx packet version in the implementation 2017-09-18 22:47:28 +02:00
Christian Decker
024f695bd1 Shutting the spellchecker up 2017-09-13 13:03:21 +02:00
Christian Decker
813ce3e91f BOLT00: Fix the chain_hash description
This was changed in #237 so fix it here as well.
2017-09-13 13:03:21 +02:00
Fabrice Drouin
700b5e7a5d update test vectors
maximum error payload size is now 128 bytes, see #227
2017-09-13 13:02:46 +02:00
Johan T. Halseth
5a60b03174 Bolt11: specify that bech32 should allow addresses > 90 characters 2017-09-05 14:49:13 +09:30
Conner Fromknecht
e1652819a0 BOLT 5: clarifies penalty txn weight calculation
Attempts to clarify the weight calculation of penalty
  transactions, and makes sweeping the `to_remote` output
  optional without breaking any existing constraints. Assuming
  these figures are correct, the decision to sweep the
  `to_remote` _does not_ change the current unidirectional
  limit of 483 HTLCs.  Thus, the option to do so can be made
  independently by either party/implemenation.

  The previous equation used to calculate `max_num_htlcs`
  slightly underestimated the theoretical maximum weight,
  since non-witness data was treated as 1:1 with witness
  data.  Ultimately, this had no effect on the computed
  results, but figured we should be more specific here for
  the purpose of properly estimating transaction fees.

  This commit also modifies the `to_local_script` to use the
  latest construction; the derived weights have been updated
  accordingly.
2017-09-05 14:47:58 +09:30
Rusty Russell
6204374dff BOLT 11: p is payment hash, not preimage (in annotated examples).
Reported-by: Andy Schroder <info@AndySchroder.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-04 21:23:20 +09:30
Janus Troelsen
49edc5417f Fix link to localkey-remotekey-local_delayedkey-and-remote_delayedkey-derivation 2017-08-26 16:42:32 +09:30
Rusty Russell
955e874acc BOLT 11: recommend URI schemes.
This is unofficial, since we don't have IANA tag, but it doesn't
clash with any existing one.  We'll see if this turns out to be something
people want.

Closes: #206
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-22 10:05:09 +09:30
Rusty Russell
4bcf9dde7e BOLT 2: clarify HTLC handling, esp w/ on-chain.
1. We say you can't fail an HTLC until it's removed outgoing; make it clear
   that this could also be on-chain.
2. Insist that you fail an expired HTLC (we never actually said this!)
3. You MUST fulfill an incoming HTLC for which the output was fulfilled
   (otherwise you'll lose money), and of course, even if fulfilled on-chain.

Add an explanation paragraph to BOLT 5 as well, where it discusses on-chain
HTLC output cases (though the requirements about what to do about incoming
HTLCs is actually in BOLT 2).

[ Extra wording clarification thanks to roasbeef ]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-22 09:59:47 +09:30
Rusty Russell
b3b7a96872 BOLT 5: clarify exactly when to use HTLC transactions.
TL;DR: we only need to do it if it's our commitment tx.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-22 09:59:47 +09:30
Rusty Russell
68d53822bd Spelling: expand wildcard to cover all []() patterns. (#228)
Otherwise it complains about "[BOLT #10](10-dns-bootstrap.md)".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-22 09:53:34 +09:30