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

764 Commits

Author SHA1 Message Date
lisa neigut
80eed319ab gossip: add additional clarification for 'discard'
It's unclear what it means to `discard` a channel.
This add a clarification that it's related to route-finding.
2018-10-18 05:17:26 +00:00
Chris Stewart
25a9debcf3 Make unit explicit encoded in BOLT11 invoice
Rewording
2018-10-18 05:15:48 +00:00
Pierre-Marie Padiou
1fd1e76f9e clarify that error should target the unkown channel 2018-10-18 05:15:22 +00:00
Pierre-Marie Padiou
1de095a0b3 reply to unknown channels with an error 2018-10-18 05:15:22 +00:00
sstone
6e6c28dae5 BOLT4: fix description of incorrect_cltv_expiry error
The explanation in the requirements section is correct but the
error message description was probably copy-pasted from
`final_incorrect_cltv_expiry`
2018-10-01 13:22:58 -07:00
Matt Corallo
8516beb2c4 Remove padding within node_announcement address data
This optional padding makes it very difficulty to deserialize
node_announcements into internal structs for storage and then
reconstruct the original node_announcement, plus are unused on the
network today and no known implementations construct
node_announcement messages with them.
2018-09-17 19:44:11 +00:00
Matt Corallo
2b253f7a61 Correct fee calculation in BOLT 7
The fee calculation in BOLT 7 appears to imply that proprtional
fees must be paid on the incoming amount, not the to_forward amount

This is inconsistent with what is actually implemented in the
field (which uses amount_to_forward) and also would make
pathfinding more complicated as the fee would depend on itself,
making calculation no longer simple.
2018-09-04 00:38:40 +00:00
Rusty Russell
0bb2739133 BOLT 7: advise against spamming with channel_updates.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-24 23:42:56 +02:00
Rusty Russell
b6ae60d241 BOLT 7: add maximum capacity field.
This helps lite nodes a little, but also gives a way of advertising a
lesser capacity than implied onchain.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-24 23:42:56 +02:00
Rusty Russell
0891374d47 BOLT 7: split flags field in channel_update.
This is not a semantic change: only the lower two bits were defined.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-24 23:42:56 +02:00
landonmutch
76b1ce9ae5 BOLT 10 copy edit (#440)
[ Squashed several commits: -- RR ]
* bolt10 copy edit to line 54;

* bolt10: add dns seed queries requirements section;

* bolt10: finish copy edit;

* bolt10: add Overview, ToC, and Authors sections;

* fix @shannonas suggestions;

* change naming of additional section in DNS seed requirements
2018-08-07 00:10:11 +00:00
ueno
3f2c747955 fix typos 2018-08-07 00:07:42 +00:00
Hajime Yamaguchi
a9195a84d0 BOLT 3/BOLT 7: Fix broken links. 2018-08-07 00:07:26 +00:00
Rusty Russell
4b62d26af9 BOLT 2: fix placement of chain_hash requirement.
Reported-by: Matthias Grundmann @mattias-g
Fixes: #453
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-26 03:11:01 +00:00
Rusty Russell
f971e0dbf2 BOLT 11: delete confusing-causing rationale sentence.
I was trying to compactly indicate that the considered alternative to
multiplier postfixes was just express everything in millisatoshi, but
it's just confusing, and anyway there are other notations we didn't use
so it seems like a weird thing to explain.

Reported-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-25 02:38:02 +00:00
Rusty Russell
21e3688e84 BOLT 11: reword Human-Readable Part Requirements in modern form.
a.k.a. landonmutch style, where requirements are explicit and bullet-pointed.

This also tightens requirements:
1. New requirement (previously implied) that writer use correct prefix.
2. Reader MUST rather than SHOULD fail malformed `amount`.

It also makes it clear that writer can omit the multiplier.

Fixes: #442
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-25 02:38:02 +00:00
Rusty Russell
d99b936bc4 fixup! BOLT 0: Attempt shorter introduction as informal index. 2018-07-23 11:26:40 +00:00
Rusty Russell
cd02353282 BOLT 0: Attempt shorter introduction as informal index.
This was inspired by @shannona's
https://github.com/lightningnetwork/lightning-rfc/pull/415

Especially the title line :)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-23 11:26:40 +00:00
Rusty Russell
e0c436bd7a BOLT 8: remove extraneous ).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-29 02:23:15 +00:00
Rusty Russell
fd9da9b95e BOLT 7: Add compressed (zlib) encoding.
[ Note: in retrospect, adding this in the initial draft without its
  own feature bit was a mistake.  It was a premature optimization,
  adds complexity and removes the ability to disable it if a problem
  is found without disabling gossip_queries entirely.  However, it
  is already deployed as-is. --RR ]
  
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-28 00:21:23 +00:00
Rusty Russell
f6312d9a70 BOLT 7: query_messages option.
[ This was a joint effort by many people, with iterations not
  indicated in this final commit: thanks to all who reviewed and
  polished!  Particularly: @jimpo @cdecker @sstone @ZmnSCPxj ]

This enables three new functions:

1. query_short_channel_ids: they will send channel_announcement /
   channel_update / node_announcement followed by reply_short_channel_ids_done.
2. query_channel_range: they will send one or more reply_channel_range
   with the short_channel_ids in these blocks.
3. gossip_timestamp_filter: filters what gossip they send.

It also changes behavior: we no longer send a `channel_announcement`
until we have at least one `channel_update`.  The announcement is
fairly useless without an update already, but this in particular
enables reasonable timestamp filtering (channel_announcement does not
have an explicit timestamp).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-28 00:21:23 +00:00
Rusty Russell
b2d1204a9f tools/extract-formats.py: handle option labels on types.
We're about to introduce new messages which are gated by options (not
just single fields).  Ignore them for the purposes of parsing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-28 00:21:23 +00:00
Rusty Russell
aab92b15b7 BOLT #7: introduce term "gossip messages" to refer to channel_announcement/channel_update/node_announcement.
This makes discussing them simpler for the next patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-28 00:21:23 +00:00
Rusty Russell
a8207ec316 BOLT 1: options must be included if negotiated, not if understood.
Obviously you can't include fields you don't understand, but importantly
if the other side doesn't agree, you don't need to include them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-28 00:21:23 +00:00
Landon Mutch
310d9c3b10 BOLT09 copy edit for clarity and consistency with stylesheet guidelines 2018-06-26 20:44:20 +00:00
Janus Troelsen
4aabe60523 Break lines in route example 2018-06-26 20:42:09 +00:00
Janus Troelsen
5c11b6a402 Fix TOC indentation and links 2018-06-25 10:58:03 +00:00
Rusty Russell
9265349d2e BOLT 8: clarify rotation frequency.
1 message = 2 encryptions.

Fixes: #403
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-11 11:18:30 +00:00
Carsten Otto
acfd90e009 fix fee calculation numbers 2018-06-11 11:18:16 +00:00
Rusty Russell
42a2963a3d BOLT 2: use cross-reference to BOLT3 when we refer to to_local and to_remote
Closes: #421
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-24 04:25:13 +00:00
Rusty Russell
6ea6418a92 BOLT 1: dont close channels with other nodes.
Seems obvious, but the spec should spell it out!

Closes: #418
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-24 04:21:49 +00:00
Rusty Russell
e76ed893d9 tools: remove --check-alignment option.
Alignment requirements were dropped before 1.0 of the spec.

Closes: #407
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-24 04:21:31 +00:00
Shannon Appelcline
fb16dd0f5d Formatting fixes. 2018-05-24 04:09:54 +00:00
Christian Decker
ed62389520 BOLT0: Add route and invoice to glossay
Co-authored-by: Shannon Appelcline <shannon.appelcline@gmail.com>
Co-authored-by: Christian Decker <decker.christian@gmail.com>
2018-05-24 04:09:54 +00:00
Shannon Appelcline
31fdef56b3 Fixes per Rusty's comments
Some embarssing typos there! Anywho, here are you fixes.

I am out of town next week, but after I get back I will have some definite time on my schedule, and can draft an intro for the spec, if we're comfortable with all the terms here.
2018-05-24 04:09:54 +00:00
Shannon Appelcline
88ed1ac10c Massive Changes to Glossary
This is a big change to the glossary in BOLT-0.

The overarcing changes are:

1.) Reorganized glossary to be alphabetical
2.) Add copious "See also:" lines to cross-reference containers, contents, and other related entries.

*Changed Definitions:* Peer and node were revised based in on discussions with Rusty; commitment revocation secret key was changed to be commitment revocation private key based on #377.

*New Definitions:* New words added based on their usage in the bolts were: announcement, closing transaction, final node, hop, origin node, processing,  node, receiving node, receiving peer, revoked commitment transaction, sending node, sending peer.

(I suspect the reorg will make the diffs almost useless, so this is the list of stuff to look at.)
2018-05-24 04:09:54 +00:00
yuntai
f159d3f5a6 Fix typo 2018-05-14 19:48:20 +00:00
Fabrice Drouin
33698608da Add changes requested by @cdecker 2018-05-14 01:03:44 +00:00
Fabrice Drouin
cac009cf7b BOLT4: channel_update is mandatory in UPDATE error messages 2018-05-14 01:03:44 +00:00
Carsten Otto
c2ced54fa6 BOLT2: Rephrase channel establishment introduction
A channel may be established, but this is not mandatory. Furthermore, the connection initialization has to happen first.
2018-04-30 20:40:26 +00:00
DanielWeigl
48bbee8d55 add the word 'regtest' to the spellchecker 2018-04-30 20:23:38 +00:00
DanielWeigl
e39d3d2ff3 Add clarification for Bolt11 prefix for regtest
The document (and also BIP-0173) does not clarify which prefix bitcoin regtest should use, but bitcoin-core seems to have settled on `bcrt`, thus the most concise way for bolt11 would be to use `lnbcrt...`

currently c-lightning and lnd are not compatible if you want to pay invoices in regtest mode, see:
- https://github.com/ElementsProject/lightning/issues/1241
- https://github.com/lightningnetwork/lnd/issues/882
2018-04-30 20:23:38 +00:00
practicalswift
0b75f25112 Add missing space in command-line example 2018-04-30 10:37:08 +00:00
Landon Mutch
f608c33fd9 make changes requested by cdecker 2018-04-18 12:43:16 +02:00
Landon Mutch
7dd1983479 BOLT 8: finish copy edit to bring in line with stylesheet; 2018-04-18 12:43:16 +02:00
Landon Mutch
99da0d638a BOLT 08: copy edit to line 188, impliment standard spacings between sections; 2018-04-18 12:43:16 +02:00
Christian Decker
2c472da0f9 bolt11: Rephrase the amount requirement 2018-04-16 23:28:17 +02:00
johnta0
b3269207b5 Change "if" to "so that" to make sense 2018-04-16 23:28:17 +02:00
ueno
d52e54e1a4 the amount paid is less than the amount expected 2018-04-16 23:28:03 +02:00
Thomas M Steenholdt
a8d1e0062d Clarify query semantics in BOLT #10
Clarify the query semantics in BOLT #10 by briefly exemplifying how to pass the conditions to the DNS seed server.
Establish some rules for how a DNS seed is expected to parse conditions and handle possible conflicts (in case a key is repeated in multiple condition key-value pairs).
2018-04-16 23:26:49 +02:00