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

184 Commits

Author SHA1 Message Date
Rusty Russell
a57ff00e93 BOLT #2: order htlc_signatures by BIP69 + increasing CLTV.
We express it has how the outputs are ordered, but the only way you can
detect that is by the htlc_signatures order, which is the part which really
matters.

I finally reproduced this, BTW, which is why I'm digging it up!

Closes: #448
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-22 21:43:58 +01:00
Hiroki Gondo
f6df488373 BOLT 2: revocation number not revocation hash. 2019-01-15 22:56:42 +00:00
Hiroki Gondo
f85e75be65 BOLT 2: add a requirement for next_local_commitment_number. 2019-01-15 22:55:51 +00:00
Hiroki Gondo
655a8b3eae BOLT 2: fix a requirement mistake of next_remote_revocation_number. 2019-01-15 22:55:51 +00:00
Hiroki Gondo
74bf24be5f BOLT 2: complete the message names in the diagram of Normal Operation. 2019-01-07 20:17:58 +01:00
Hiroki Gondo
c423308886 BOLT 0,2,5: closing transaction not (mutual) close transaction.
Be consistent.
2019-01-07 20:17:45 +01:00
Hiroki Gondo
7f68780c20 BOLT 2: delete unnecessary space. 2019-01-07 20:17:31 +01:00
Hiroki Gondo
353721b65e BOLT 2: update not HTLC in Normal Operation.
In the description here, the target is not only `HTLC`
but also general `update`.
2019-01-07 20:17:31 +01:00
Rusty Russell
a07dc3df3b BOLT 2: add missing spellcheck words, change 'funding txo' to 'funding output'.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-12-10 02:46:07 +00:00
Matt Corallo
fa52e74eac Clarify temporary_channel_id's acceptable usages 2018-12-10 02:46:07 +00:00
Rusty Russell
20524d4109
BOLT 2: advise ping-before-commitment_signed on quiescent connections. (#508)
This seems to be a cause of stuck HTLCs on the network: c-lightning has
done this for a while now (since 0.6.1).

[ Minor wording clarification merged --RR ]
Decided-at: Adelaide Summit 2018
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-11-29 04:32:11 +00:00
Hiroki Gondo
ae8c78c8a8 BOLT 2: Hashed Time Locked Contracts not Hash TimeLocked Contracts.
Be consistent.
ref. 00-introduction.md#glossary-and-terminology-guide
2018-11-29 04:24:47 +00:00
lisa neigut
a307f3b282 peer-protocol: periods make meaning clearer. sometimes. 2018-11-29 04:12:06 +00:00
lisa neigut
d923df5e43 peer-protocol: fixup punctuation to clarify meaning
The punctuation in this case made it hard to understand.
2018-11-29 04:12:06 +00:00
lisa neigut
9b5c3df9ce peer-protocol: explain what a commitment number is, in situ
Although commitment numbers are explained in the
[glossary](00-introduction.md#glossary-and-terminology-guide),
it's helpful to re-iterate at the place that it's first used.
2018-11-29 04:12:06 +00:00
lisa neigut
1bbcd5552b peer-protocol: fix tense use -> used 2018-11-29 04:12:06 +00:00
lisa neigut
c572c1c42a peer-protocol: add missing word
Missing `to`
2018-11-29 04:12:06 +00:00
lisa neigut
0087a64244 peer-protocol: Add link to channel failure in 05
To 'fail a channel' is mentioned multiple places in this
BOLT without any mention or definition of what that means.

This adds a link to the relevant text in BOLT 05 in the
first place that we mention 'fail the channel'.
2018-11-29 04:12:06 +00:00
lisa neigut
2f72c225ea peer-protocol: Add short note about channel_id
Clarify association between temp_id and channel_id, and make
explicit why we have to wait for the funding transaction.
2018-11-29 04:12:06 +00:00
lisa neigut
05a4d18c1e peer-protocol: Add links to referenced BOLTs
Add links to make it clearer that these two actions:
'authentication' and 'initialization' are specified elsewhere.
2018-11-29 04:12:06 +00:00
lisa neigut
5727c3dff0 peer-protocol: Add chan_reestablish message name to TOC
Make it easier to tell at a glance what messages this BOLT
concerns.
2018-11-29 04:12:06 +00:00
ZmnSCPxj, ZmnSCPxj jxPCSmnZ
65753ff6fb 02-peer-protocol.md: Minor typo. (#505) 2018-11-12 16:47:57 +01:00
ueno
1ddc1a54d7 BOLT2: both nodes send update_add_htlc
issue #472
2018-10-29 00:07:56 +00:00
ueno
3f2c747955 fix typos 2018-08-07 00:07:42 +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
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
yuntai
f159d3f5a6 Fix typo 2018-05-14 19:48:20 +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
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
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
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
Rusty Russell
4c8cb512d0 BOLT 2,3,5: always refer to shared/pubkey/private key.
Make it clear what kind of key we're talking about.  We use the abbreviation
pubkey for public key (as it's quite common to use in field names), but
generally spell out 'private'.

(I generally prefer 'secret' to 'private' but we use private far more often
already, and we use 'secret' for things which don't directly derive keys).

Fixes: #368
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-20 01:10:38 +00:00
Christian Decker
3e2d275471 BOLT02: Add rationale for 2^24 satoshi per channel limit
Fixes #353
2018-02-09 14:50:52 +01:00
Rusty Russell
120003e553 BOLT #2: bad update_fee after shutdown when all HTLCs cleared.
I got an unexpected update_fee message after `shutdown` exchange,
which is currently legal:

A: shutdown (no htlcs)
                          B: receive shutdown
                          B: reply with shutdown & closing_signed

A: send update_fee & commitment_signed
A: receive shutdown

Simplest to ban any updates (currently, just update_fee) from adding a
new commitment tx while we're at the end of shutdown.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-05 23:47:12 +00:00
Rusty Russell
90241d9cf6 BOLT 2: order closing-signed negotiation by making funder send first.
Fixes: #365
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-05 23:38:51 +00:00
practicalswift
4e3074ea5f Fix markdownlint warnings
Fixed warnings:

.copy-edit-stylesheet-checklist.md: 49: MD030/list-marker-space Spaces after list markers [Expected: 1; Actual: 0]
.copy-edit-stylesheet-checklist.md: 1: MD041/first-line-h1 First line in file should be a top level header [Context: "Basic checklist/stylesheet use..."]
02-peer-protocol.md: 161: MD018/no-missing-space-atx No space after hash on atx style header [Context: "#7](07-routing-gossip.md#bolt-..."]
2018-02-05 09:01:00 +00:00
practicalswift
2c3466a2af Remove trailing whitespace 2018-01-30 04:54:31 +00:00
Pierre-Marie Padiou
46c454cb56 clarify that nodes may support early mutual close 2018-01-22 20:14:38 +01:00
MeshCollider
4b5379b2ac Fix formatting of BOLT links 2018-01-22 14:02:01 +01:00
Rusty Russell
7ab1665b2a BOLT 2: clarify that feerate is in *satoshi* per ksipa.
We don't actually say that!

Closes: #336
Reported-by: Matt Corallo
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-09 03:06:29 +00:00
practicalswift
d5b5284b3b Use Markdown numbered list syntax ("1." instead of "1)") 2018-01-08 02:30:34 +00:00
Landon Mutch
641c6ab7b1 stylesheet update and apply to BOLT 2,3 2017-12-21 04:08:33 +00:00