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

705 Commits

Author SHA1 Message Date
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
Rusty Russell
a7e109a286 BOLT 2: dust limit is lower limit for non-dust.
So we need to be >= it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-16 23:26:34 +02:00
Rusty Russell
a676ae6a0b YA typo fix
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-16 23:26:34 +02:00
Rusty Russell
07ec50602d typo fix
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-16 23:26:34 +02:00
Rusty Russell
f5b28a9a24 BOLT 2: set lower limit on funds available on channel open.
Even with push_msat, we need to make sure that funder can pay the fees,
so require that.

Also require that there be some funds above reserve on one side, otherwise
the channel is useless, and we risk that all outputs are dust.

Note: a side *may* reject the channel if funding_satoshis is too small
already, but this sets a clear minimum bar.

Fixes: #393
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-16 23:26:34 +02:00
Rusty Russell
fbaa6f5287 Complete requirements.
Add requirements on accept_channel, so each side doesn't consider the
*other* reserve dust either.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-16 23:26:34 +02:00
Rusty Russell
a0214d3722 Fix missing set typo. 2018-04-16 23:26:34 +02:00
Rusty Russell
c256c4626b BOLT 2: avoid obvious all-dust cases
After more consideration, I believe that this is sufficient to ensure
one reserve is always non-dust.

The races which make us dig into the reserves can't currently take from
the fundee's reserve, so either the fundee has sufficient reserves, or
it can't add HTLCs which means no race.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-16 23:26:34 +02:00
ueno
f5f123c02c BOLT 0: fix ordering of chain_hash 2018-04-16 13:25:30 -07:00
Olaoluwa Osuntokun
71630b4766 BOLT 4: update sphinx packet test vector (#372)
* BOLT 4: update sphinx packet test vector

In this commit, we update the test vector for the final onion packet. In
commit 068b0bccf9, the per-hop payloads
were updated to use 8 byte amounts everywhere. However, the test vectors
were not updated. In 578573f92f the test
vectors were updated to use the proper version prefix. However, this
assumed that the state of the vectors as is was correct.

To remedy this, we've updated the test vectors to reflect the final
result using the current format for encoding the per-hop payloads. This
final test vector was generated using the original tool that we used to
confirm compatibility between the C and Go versions.
2018-04-16 16:41:04 +02:00