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

584 Commits

Author SHA1 Message Date
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
Janus
9d48f3e52f correct feature flagged message fields syntax, update structured.py to support feature flagged fields, print to right output in extract-formats.py 2018-04-11 07:08:18 +00:00
Sebastian Geisler
e95fabca69 Fix test vector routing part
The routing tagged field of one test vector was extracted from the
invoice incorrectly. The route included in the invoice has as base
fee of 1 resp. 2 msat (as described in the explanation), but the
extracted bech32 part had a 0 msat base fee.
2018-04-11 03:43:33 +00:00
Li Xuanji
a495b3a74f Define P2WSH earlier 2018-04-11 03:42:05 +00:00
kurihei
ae7589b45c typo 2018-04-11 03:22:01 +00:00
Pierre-Marie Padiou
8f36ee9880
BOLT 2: typo "it need" -> "it needs" (#391) 2018-03-20 13:37:34 +01:00
pm47
2cb41db4a2 consistency: option-data-loss-protect->option_data_loss_protect 2018-03-05 19:20:37 +00:00
pm47
7da77f0687 define initial value for data-loss fields
Clarify that field `channel_reestablish`.`your_last_per_commitment_secret`
should be set to an all-zero array when no `per_commitment_secret` has
been received yet.
2018-03-05 19:20:37 +00:00
Jim Posen
c4e42bcfd6 BOLT 4: Rearrange sections, moving dependent concepts lower. 2018-03-05 20:11:32 +01:00
Jim Posen
3927ae3fd1 BOLT 4: Update onion construction reference code.
The description now suggests the use of an ephemeral private key, so
the reference code is simplified by using that concept. The reference
code is also updated to make fewer calls to undefined functions.
2018-03-05 20:11:32 +01:00
Jim Posen
5a3b5ce0bd BOLT 4: Clarify the onion construction section.
The new description introduces the concept of an ephemeral private key,
which I find easier to reason about and suggests a linear instead of
quadratic construction algorithm.
2018-03-05 20:11:32 +01:00
Jim Posen
745629d0f2 BOLT 4: Correct blinding factor calculation.
The instructions reference nodepk_k instead of epk_k.
2018-03-05 20:11:32 +01:00
Jim Posen
f7eb7e4d96 BOLT 4: Correct shared secret calculation.
Reference code and all implementations hash the ECDH output point with SHA256.
2018-03-05 20:11:32 +01:00
Rusty Russell
b476e630b0 BOLT 7: don't send an announce_signatures message if we're shutting down.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-05 09:04:33 +00:00
ueno
4ef035f8c2 fix #385 2018-02-22 00:15:22 +00:00
practicalswift
939ce285bc BOLT 8: Fix debate over whether [] ranges are inclusive or exclusive
The english is pretty clear for these simple cases anyway.
2018-02-22 00:12:13 +00:00
Landon Mutch
857c71a3c8 fix requests by @shannona 2018-02-20 01:30:18 +00:00
Landon Mutch
4a2e6229f6 BOLT 07: finish first pass copy edit to bring inline with stylesheet guidelines; 2018-02-20 01:30:18 +00:00
Landon Mutch
abb4b3ac3e BOLT 07: first pass copy edit to line 574; 2018-02-20 01:30:18 +00:00
Landon Mutch
124b1f8d84 BOLT 07: first pass copy edit to line 456
Impose 'origin/final node' terminology (replacing 'creating/receiving node') for sake of clarity and consistency with other BOLTs;
2018-02-20 01:30:18 +00:00
practicalswift
316882fcc5 Use a vs an consistently 2018-02-20 01:12:29 +00:00
practicalswift
5fe7fc3d62 Change from "Encrypting Messages"/"Decrypting Messages" to "Encrypting and Sending Messages"/"Receiving and Decrypting Messages"
In order to reflect what is actually documented.
2018-02-20 01:11:44 +00:00