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

32 Commits

Author SHA1 Message Date
Johan T. Halseth
a00418f5f9
bolt-09: reserve feature bits for option_anchors_zero_fee_htlc_tx (#828) 2021-01-04 20:40:57 +01:00
Joost Jager
1739746afa
Anchor outputs
This commit extends the specification with a new commitment format that
adds two anchor outputs to the commitment transaction. Anchor outputs
are a safety feature that allows a channel party to unilaterally increase
the fee of the commitment transaction using CPFP and ensure timely
confirmation on the chain. There is no cooperation required from the
remote party.
2020-08-19 15:27:21 +02:00
Rusty Russell
3a8911dc7a BOLT 9: don't advertize option_support_large_channel in channel_announcement.
Turns out Eclair doesn't, and as c-lightning 0.8.2 implemented and Matt
noticed in https://github.com/lightningnetwork/lightning-rfc/pull/770, it
should have been ODD anyway!

See also: https://github.com/ElementsProject/lightning/issues/3703

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-05-11 22:20:29 +02:00
araspitzu
38479359a1
Single-option large channel proposal (#596)
Add option to open large channels (wumbo).
2020-02-18 09:21:22 +01:00
Conner Fromknecht
4c638b7353 09+11: require transitive feature dependencies
This commit:
 - Adds a new Dependencies column to the BOLT 9 feature table
   populated with existing feature dependencies.
 - Requires that all valid feature vectors set transitive dependencies.
 - Requires checking transitive dependencies when validating init
   messages and payment request.
 - Removes transitive feature requiremetns from the BOLT 11 writer, now
   that they are implicit by needing to comply with the BOLT 9 origin
   requirements.
2020-01-21 13:26:49 +01:00
Conner Fromknecht
b62c8782ed BOLT09: fix incorrect hyperlink text for option_mpp (#725) 2020-01-10 11:45:13 +01:00
Matt Corallo
5abee4d362 Do not allow routing to a node with unkown feature bits set.
This appears to have been an oversight in the flat features spec,
and is somewhat implicitly relied on for several new feature bits -
if var_onion_optin is set on a node_announcement (its not allowed
on a channel_announcement), then trying to route through that node
using the pre-tlv formt is somewhat nonsensical, and should be
forbidden.
2020-01-06 14:34:37 -05:00
Matt Corallo
44c5fa1c7a Resolve conflict between BOLT 4&9 re: var_onion_optin context
BOLT 4 explicitly indicates var_onion_optin may appear in a BOLT 11
invoice, however, BOLT 9 only indicates it is available in init and
node_announcement contextx. Resolve this conflict in favor of BOLT 4
as there doesn't seem to be much reason to *not* allow it in BOLT
11 invoices.
2019-12-24 13:29:37 -05:00
Rusty Russell
b2a3c2fb07 BOLT 9: Add feature bits for payment_secret and basic_mpp.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-13 03:48:57 +00:00
Rusty Russell
8e69306e0a BOLT 11: use the same features for BOLT11 invoices as for others.
A bit less dense, but avoids a separate feature space.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-25 19:34:23 +00:00
Rusty Russell
206084c939 BOLT 9: flatten feature fields.
We simply specify, in each case, where they will appear ("Context").

Because `globalfeatures` is already in use, we fold that into the
renamed `localfeatures` field to unify them (now called `features`),
but dissuade further use.

Note also: we REQUIRE minimal `features` field in
channel_announcement, since otherwise both sides of channel will not
agree and not be able to create their signatures!

Consider these theoretical future features:

`opt_dlog_chan`: a new channel type which uses a new discrete log HTLC
type, but can't support traditional HTLC:

* `init`: presents as odd (optional) or even (if traditional channels
  not supported)
* `node_announcement`: the same as above, so you can seek suitable peers.
* `channel_announcement`: presents as even (compulsory), since users need
  to use the new HTLCs.

`opt_wumbochan`: a node which allows channels > 2^24 satoshis:

* `init`: presents as odd (optional), or maybe even (if you only want
  giant channels)
* `node_announcement`: the same as above, so you can seek suitable peers.
* `channel_announcement`: not present, since size of channel indicates
  capacity.

`opt_wumbohtlc`: a channel which allows HTLCs > 2^32 millisatoshis:

* `init`: presents as odd (optional), or even (compulsory)
* `node_announcement`: the same as above, so you can seek suitable peers.
* `channel_announcement`: odd (optional) since you can use the channel
  without understanding what this option means.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: Bastien Teinturier <31281497+t-bast@users.noreply.github.com>
2019-11-25 19:34:23 +00:00
Rusty Russell
2afe3559e8 option_static_remotekey: final draft.
This separates out the static remotekey changes from the more ambitious
option_simplified_commitment (which also included pushme outputs and
bring-your-own-fee for HTLC outputs).

As per http://www.erisian.com.au/meetbot/lightning-dev/2019/lightning-dev.2019-09-02-20.06.html

Thanks to everyone for feedback: @araspitzu @roasbeef @bitconner

Suggested-by: @roasbeef
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-09-26 06:19:58 +00:00
sstone
30485af1df Define a feature bit for extended gossip queries 2019-09-16 22:36:59 +02:00
Bastien Teinturier
8b2cf00546
Bolt 04: fix a few left-over spelling / clean-up nits (#653)
* Fix a few left-over spelling / clean-up nits
* Bolt 09: fix spec links
2019-07-31 07:21:38 +00:00
Christian Decker
15299bd57a bolt09: Cleanup the feature bits tables and extract URLs into footer
The tables were a bit unreadable in the source view, and the globalfeatures
table was not rendering correctly. This is just a minor cleanup pass.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
Suggested-by: Janus Troelsen <@ysangkok>
2019-07-26 11:38:33 +02:00
Christian Decker
6120510dd3 bolt07: Add feature bits for multi-frame support 2019-07-26 11:38:33 +02:00
Jorge Timón
38bd57be76
BOLT9: Format table 2019-05-25 01:46:35 +02: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
Landon Mutch
310d9c3b10 BOLT09 copy edit for clarity and consistency with stylesheet guidelines 2018-06-26 20:44:20 +00:00
pm47
2cb41db4a2 consistency: option-data-loss-protect->option_data_loss_protect 2018-03-05 19:20:37 +00:00
practicalswift
2c3466a2af Remove trailing whitespace 2018-01-30 04:54:31 +00:00
Shannon Appelcline
c7c8691d30 BOLT-09 Edits (#321)
I regularized the descriptions in the localfeatures table, so keep a careful eye on the accuracy of those. Otherwise, fairly standard editing in this very short section.

Added text for lack of globalfeatures flags.
2017-12-14 02:08:43 +00:00
Rusty Russell
0c92bda566 BOLT 9: Adding missing option bits for option-dataloss-protect.
Somehow this got lost in merging; pre-approved at meeting 2017-11-27.

Reported-by: Pierre-Marie Padiou
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-28 23:03:12 +00:00
Rusty Russell
963b103113 BOLT 2: add precommitment to scriptpubkey for mutual close.
This is Fabrice's #243 "BOLT2, BOLT3: reduce attack surface", split
out with minor polishing:

- Made it an optional feature (we can insist on it if we choose even bit).
- Rename from "final_scriptpubkey" to "shutdown_scriptpubkey".
- Make requirements the same as shutdown's scriptpubkey, or zero-len.
- Leave shutdown's scriptpubkey, just make sure it's the same or fail.
- Add to accept_channel as well as open_channel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-28 00:09:57 +00:00
ueno
6d43b28258 fix some links 2017-10-17 07:25:48 +00:00
Olaoluwa Osuntokun
5e666b6c99 BOLT 9: remove feature bit for channels_public
This commit removes the feature bit for channels_public as they have
been deprecated by the addition of the `announce_channel` field in the
`open_channel` message.
2017-05-27 10:30:42 +09:30
Rusty Russell
1e228bcf8f Clarify init-message description
This is based on a series of patches from @EmelyanenkoK which makes the treatment of feature bits clearer and adds rationale so that future extensions can be made wisely.

Thanks to all involved!

Closes: #156 
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-25 09:43:31 +09:30
Rusty Russell
128966e3c0 BOLT 9: Add CC-BY license tag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
pm47
6e8fe9dd2f BOLT 9: make it clear that 'channel_public' apply to all channels in the same connection 2017-02-21 14:41:27 +10:30
Christian Decker
6dda9560a6 BOLT 7: Added flag for optional initial routing sync dump
Opening a lot of connections results in getting this information a
whole lot of times, so let's add an opt-in flag for the initial dump.
2017-02-09 10:11:03 +01:00
Rusty Russell
fba22970c6 BOLT 9: assign feature bits in pairs, give them names, clarify position.
Christian assumed first bit was 1, I assumed 0.  And we should generally
assign in pairs (so an optional understanding can later become compulsory),
though for the initial draft it's unnecessary.

By giving names we avoid smearing values over the spec, containing them in
BOLT 9.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-08 14:16:50 -08:00
Christian Decker
4e3ad54a90 BOLT 2&7: Cleaner separation of concerns wrt announcement signatures (#97)
* BOLT 2&7: Cleaner separation of concerns wrt announcement signatures

So far we did not have any indication on what to do if a node does not
allow announcing the channel and we had a mix of concerns in the
`funding_locked` message, which would also transfer the signatures
needed for the announcement. This is a proposal about splitting the
signatures into their own message, so that simple omission is an
opt-out of announcements, and it does not mix announcement/gossip
stuff into the peer-protocol.

(It also ended up adding a localfeatures flag to opt-into the channel-announcement, and thus creating BOLT 9)
2017-02-07 11:23:39 +10:30