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

73 Commits

Author SHA1 Message Date
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