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

43 Commits

Author SHA1 Message Date
Dimitris Apostolou
3476c9b25a Fix typos 2019-09-26 06:12:41 +00:00
Rusty Russell
03fd18e5bc fixup! BOLT 11: Add test vectors for feature bitfield. 2019-09-03 01:00:47 +00:00
Rusty Russell
2eea93e133 BOLT 11: Add test vectors for feature bitfield.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-09-03 01:00:47 +00:00
Rusty Russell
b93b3bf518 BOLT 11: Add feature bits.
Most obviously, we want this for BASE AMP, but it's useful in future.

Even though even bits won't cause existing implementations to know
they can't pay the invoice, it will allow it in future once everyone
has upgraded.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-09-03 01:00:47 +00:00
Jorge Timón
8bdfc16156 BOLT11: Clarification on n field (#613) 2019-07-17 09:45:35 +02:00
Otto Suess
53343c99a5 BOLT 11: fix link (#626)
Update link to reference Bolt04's overpayment ("if the amount paid is more than twice the amount expected [the final node] SHOULD fail the HTLC.")
2019-07-09 09:38:34 +02:00
landonMutch
90faaeda89 resolve @rustyrussell requests 2019-01-07 19:34:58 +00:00
Landon Mutch
63b1b46043 finish second pass copy edit to EOF, to bring in line with stylesheet 2019-01-07 19:34:58 +00:00
Landon Mutch
4839cd8e5f second pass copy edit to line 191; 2019-01-07 19:34:58 +00:00
Landon Mutch
2039e977ed second pass edit to line 100; 2019-01-07 19:34:58 +00:00
Landon Mutch
a2ca6c0dbb first pass edit to bring inline with stylesheet 2019-01-07 19:34:58 +00:00
Chris Stewart
25a9debcf3 Make unit explicit encoded in BOLT11 invoice
Rewording
2018-10-18 05:15:48 +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
Janus Troelsen
4aabe60523 Break lines in route example 2018-06-26 20:42:09 +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
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
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
Conner Fromknecht
e86ac9a3b2 BOLT 11: notes payment desc injection vulnerabilities 2018-02-05 23:38:01 +00:00
practicalswift
2c3466a2af Remove trailing whitespace 2018-01-30 04:54:31 +00:00
practicalswift
a820356da8 Redundancy. Drop redundant use of "very". 2018-01-30 03:34:22 +00:00
practicalswift
b9d784a5a0 Redundancy. Drop redundant use of "advance" in "advance warning". 2018-01-30 03:34:22 +00:00
practicalswift
8c84de67f7 Standardization. Use "extendable" instead of "extensible". 2018-01-30 03:34:22 +00:00
Rusty Russell
7a7db363bb BOLT 11: make example separate, not re-use existing.
@roasbeef wanted to avoid breaking existing tests, so simply replicate it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-22 20:10:53 +01:00
Rusty Russell
f360cff9d8 BOLT 11: spell out byte limit on d field, and note vagueness of h.
Our 10-bit length means up to 1023 5-bit words, or 639 bytes.  But `h`
is horribly underspecified since we don't have a general solution: using
a URL is a privacy problem, for example.  It might make sense for a future
transport standard (eg. lightning over HTML, or lightning-over-NFC), but
it's fairly unusable at the moment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-22 20:10:53 +01:00
Rusty Russell
b547854073 BOLT 11: require valid UTF-8, provide example.
I'm clearly showing my age, suggesting ASCII; obviously UTF-8 makes
more sense.  We also didn't have a *requirement* that it be a valid
encoding, so add that.

We already have an example ASCII description ('Please consider
supporting this project'), so just modify the other one to UTF-8
as provided by Jonathan.

Reported-by: Jonathan Underwood <junderwood@bitcoinbank.co.jp>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-22 20:10:53 +01:00
Shannon Appelcline
ff2d8727fc Adjustments per reviews
Including some large-scale changes of punctuation in examples.
2017-12-20 02:55:43 +00:00
Shannon Appelcline
a630180d19 BOLT-11 Edits
More line editing and clarifications, also includes typo-fix from @dimitris-t in #306 and table of contents from @bcongdon in #310.
2017-12-20 02:55:43 +00:00
Jonathan Underwood
faee5ab6e7 Add signature related data in examples
This would have saved me a lot of time and pain. Sure, I should have realized that the document says something paradoxical (signature of the data part.... but the data part includes the signature..... so I should have guessed it meant "excluding the signature"...)

Explicit mention of the signature part might help people. Might not. But helps to be explicit.
2017-12-12 00:17:17 +00:00
Rusty Russell
ef053c0943 BOLT 11: change route to base + millionths.
Doesn't take any more space (we could actually reduce millionths to 24 bits,
but that starts to look silly), but it's simpler and allows for cases where
there's no payment amount.

Closes: #296
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-11 23:00:45 +00:00
Pierre-Marie Padiou
d1fbfd30f8 BOLT 7,11: Added an optional min_final_cltv_expiry field in BOLT 11 (#258)
Added an optional `c` field in the payment request specifying the
minimum `cltv_expiry` to use for the last htlc in the route. If
not provided, default value is 9.

This commit also clarifies how `channel_update` messages are only
to be used in the context of relaying payments, and how both htlc
amounts and expiries are to be calculated backwards from the values
provided in the payment request.

Not needing the `channel_update` for the first channel in a route also
means that it is possible to make a payment through a channel which 
hasn't had any announcements yet.
2017-10-18 15:31:31 +02:00
Salome
bec82b494e Fix f tags in test vectors 2017-10-17 06:45:40 +00:00
Salome
604746b3da Fix signatures and chekcsums in test vectors for payment encodings 2017-10-17 06:45:40 +00:00
Rusty Russell
b09e119c57 BOLT 11: depending in -> depending on.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-11 23:21:12 +00:00
Johan T. Halseth
5a60b03174 Bolt11: specify that bech32 should allow addresses > 90 characters 2017-09-05 14:49:13 +09:30
Rusty Russell
6204374dff BOLT 11: p is payment hash, not preimage (in annotated examples).
Reported-by: Andy Schroder <info@AndySchroder.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-04 21:23:20 +09:30
Rusty Russell
955e874acc BOLT 11: recommend URI schemes.
This is unofficial, since we don't have IANA tag, but it doesn't
clash with any existing one.  We'll see if this turns out to be something
people want.

Closes: #206
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-22 10:05:09 +09:30
Rusty Russell
a42b31797e BOLT 11: signature is of single SHA256, not double.
Closes: #223
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-22 09:28:27 +09:30
Rusty Russell
a49543e8ea BOLT 11: change r to hold multiple entries.
Allows us to put multiple routes in; there was previous confusion.

Closes: #215
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-08-08 09:55:19 +09:30
Pierre-Marie Padiou
df66a4e85a BOLT 11: fix formatting typo, r length value, and channel_id->short_channel_id (#212)
* BOLT 11: fix formatting typo, and `r` length value.

The r field is 408 bytes long, which is 82 characters encoded;
this should have been updated when the fee and cltv sizes were
updated (prior to merge into repo).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

* BOLT 11: `channel_id`->`short_channel_id`
2017-07-24 10:26:49 +02:00
Pierre-Marie Padiou
80688d7900 BOLT 11: Clarify that providing a payment description or description hash is mandatory (#200)
Added a `d` or `h` field to test vectors
2017-07-15 10:30:26 +09:30
Rusty Russell
01571c1e58 Bolt 11: Invoice Protocol for Lightning Payments (#183)
This specifies a draft invoice protocol for lightning payments.

Particular thanks for detailed feedback from:
* ZmnSCPxj <ZmnSCPxj@protonmail.com>
* @Saicere  
* @kallewoof
* @halseth 
* @cdecker 

Signed-off-by: Rusty Russell <rusty@blockstream.com>
2017-06-27 20:08:13 +09:30