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

1073 Commits

Author SHA1 Message Date
Rusty Russell
f0da3978e9 Underscores for all terms, not just fields.
Plus a few more missing ones, and some consistency fixes in names
as pointed out by Roasbeed and Fabrice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
5f06896403 BOLT 3: instead of ripemd-of-X, use RIPEMD160(X).
This is more specific and clearer.

Reported-by: Olaoluwa Osuntokun <laolu32@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
63edd2e869 BOLT 3: use correct field name for HTLC timeout value.
It's called cltv_expiry in BOLT 2's update_add_htlc.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
407b9927bf BOLT 3: Replace many hyphens with underscores in descriptions.
Not sure how I missed these:
1. funding-pubkey -> funding_pubkey
2. to-self-delay -> to_self_delay
3. per-commitment-point -> per_commitment_point
4. per-commitment-secret -> per_commitment_secret
5. revocation-basepoint -> revocation_basepoint
6. delayed-payment-basepoint -> delayed_payment_basepoint
7. payment-basepoint -> payment_basepoint

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
260e7776ac BOLT 7: more trivial hyphen to underscore updates.
1. ipv4-addr -> ipv4_addr
2. ipv6-addr -> ipv6_addr
3. fee-base-msat -> fee_base_msat
4. htlc-amount-msat -> amount_msat
5. fee-proportional-millionths -> fee_proportional_millionths

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
43b0b1c284 BOLT 2: sha256-of-onion -> sha256_of_onion in descriptions.
Missed this replacement.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-15 12:54:53 -07:00
Rusty Russell
8ee57b9773 tools: update for new format.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +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
Rusty Russell
d3cda9bef2 BOLT 8: Add CC-BY icon image (to match other BOLTs)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
2800f12025 BOLT 8: fix trivial typo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
c0fa965036 BOLT 3: Add URL for BIP69.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
67efbd0872 BOLT 5: Add TOC, Authors section, add BOLT URL references.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
6340cf0db5 BOLT 7: underscores and backticks everywhere.
Also:
1. feature -> features
2. rgb -> rgb_color
3. node-id -> node_id
4. node_update -> node_announcement

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
ab530266e4 BOLT 5: underscores and backticks everywhere.
One minor change to refer to field name:
	preserves `to_self` delay
to:
	preserves `to_self_delay` requirement.

Typo fixes:
1. revocation -> revoke_and_ack
2. ctlv_expiry -> cltv_expiry.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
bbe3c1979e BOLT 4: underscores and backticks everywhere.
This also converts data structures to the same format used elsewhere.

One other minor change, from:
	In addition, every _(address, HMAC)_-pair is incrementally obfuscated at each hop.
to:
	In addition, `hops_data` is incrementally obfuscated at each hop.

The old wording was left over from the previous format.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
8c0e55ac37 BOLT 4: underscores and backticks everywhere.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
44fe02edbf BOLT 2: underscores and backticks everywhere.
Many old fieldnames fixed up:
1. funding_amount -> funding_satoshis
2. max_htlc_value_in_flight -> max_htlc_value_in_flight_msat
3. update_commit -> commitment_signed
4. route -> onion_routing_packet

Typo fixes:
1. fee_rate -> feerate_per_kw
2. amount_sat -> amount_msat
3. script_pubkey -> scriptpubkey

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
Rusty Russell
4f585fe2d0 BOLT 1: underscores and backticks everywhere.
Typo fix: bytelen -> byteslen

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-11 11:20:36 +09:30
ZmnSCPxj
d140405a6f 07-routing-gossip.md: channel_update: Update text about end indication.
The channel end is now indicated via a single bit
     in `flags`, not an entire byte.
2017-05-09 16:27:36 +09:30
ZmnSCPxj
eb928390b9 07-routing-gossip.md: Move some text about ipv6 and port from channel_update to node_announcement.
`channel_update` does not make sense as it does not have fields
    with either addresses or ports.
  Moved it to `node_announcement` on the assumption that the text
    was just inserted in the wrong place, since `node_announcement`
    is described before `channel_update` and does have addresses
    and ports.
2017-05-09 16:27:36 +09:30
ZmnSCPxj
77c9272ed6 02-peer-protocol.md: Minor typo: update_htlc_add, verb should come first 2017-05-09 16:27:36 +09:30
Rusty Russell
8bc2304705 BOLT 2: remove requirement for missing field.
minimum-depth is no longer in the opening message.

Closes: #157
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-09 16:26:52 +09:30
Pierre-Marie Padiou
f22119b51a fixed typo in BOLT 7 2017-05-07 12:01:12 +09:30
Fabrice Drouin
06de1a586e BOLT4: fix onion reply test vectors (see #158) 2017-05-05 12:01:51 +09:30
EmelyanenkoK
85f4365c47 Fix typo
max-htlc-value-in-flight-msat had two different designations
2017-05-03 13:10:27 +09:30
Rusty Russell
8a35f1f134 tools/spellcheck: add modern words to our dict (Travis is old)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
c7092de08b tools/spellcheck.sh: add --check option, add tests to travis.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
7ee9619c0c BOLT 8: typo fixes
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
4c11d0b058 BOLT 7: typo fix
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
a9c1f06cd4 BOLT 5: typo fixes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
0b2e091da8 BOLT 4: typo fixes
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
925b39a619 BOLT 3: typo fixes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
c3b078bad2 BOLT 2: typo fixes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
6849b2bbc6 BOLT 1: misc typo fixes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
91056401c5 tools/spellcheck.sh: prefer HTLCs over alternatives.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
Rusty Russell
c38aec71e0 tools/spellcheck: US English.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-03 13:08:07 +09:30
ZmnSCPxj via Lightning-dev
7d3083e79a Add spellcheck tool (requires aspell), also spellcheck.
This is a multi-part message in MIME format.

This patch should apply to http://github.com/lightningnetwork/lightning-rfc

Nonidealities:

Aspell triggers spelling errors on the hexadecimal strings in
the test vectors. I don't have enough aspell-fu to figure
out how to make Aspell ignore these.

There are 2 possible pluralizations of `HTLC`: `HTLCs` and
`HTLC's`. I'd prefer the latter, but for now I support both.
We should standardize pluralization; we can edit the
`.aspell.en.pws` file to remove the pluralization we won't
choose.
2017-05-03 13:08:07 +09:30
Pierre-Marie Padiou
440c2de107 specify when the temporary_channel_id->channel_id switch occurs 2017-05-01 13:45:34 +09:30
Christian Decker
4a2146b1ed BOLT04: Update the go reference implementation 2017-04-26 09:59:30 +09:30
Christian Decker
a8bf53bba5 BOLT04: Updated test vectors
These test vectors should match BOLT04 after the change to merge
per-hop payloads and routing info into a single `hop_data` field. They
were generated by the golang version and crosschecked with the
`lightningd` version.

The per-hop `hop_data` were changed to be initialized by byte-filling
the `short_channel_id` matching their position in the route, and by
setting the `amt_to_forward` and `outgoing_cltv` fields to the same
value, i.e., for hop 3 the values are:

  short_channel_id = 0x0303030303030303
  amt_to_forward = 0x0000003
  outgoing_cltv = 0x0000003
2017-04-26 09:59:30 +09:30
Rusty Russell
8b29062f78 BOLT 4: Simplify onion format.
1. Only one per-hop thing, called `per-hop`, or `hops_data` when in aggregate.
2. Move HMAC to the end of stuff it covers, both of the packet itself, and the per-hop.
3. Use `channel-id` instead of RIPEMD(nodepubkey).
4. Use 4 byte amounts.
5. This is all for realm "0", we can have future realms.  We also have 16
   bytes of unused padding.
6. No longer need the `gamma` key, but document the `_um_` key used for
   errors.
7. Use normal 32-byte HMAC, not truncated 20-bytes, which more than eats
   up the room we saved.

The result is that the onion is now 1366 not 1254 bytes, but simpler.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-26 09:59:30 +09:30
Christian Decker
48df730d42 bolt04: Specify that temporary channel failure also includes a channel_update 2017-04-26 06:05:22 +09:30
Takaya Imai
f6186dba00 Fix brackets 2017-04-26 06:02:24 +09:30
Rusty Russell
9dc3c5bf4a BOLT 4: clarify record keeping requirements. (#148)
We didn't note the actual requirements: we MUST reject replays we have forwarded
or paid to avoid replay attacks.  The details are difficult however; we have
to clean them out at some stage, and restrict the size somehow.  Suggest some
ways we could do that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-24 05:19:54 +00:00
Fabrice Drouin
9cb9eef0de use 0x2002 (temporary node failure) as error message 2017-04-13 22:41:50 -07:00
Fabrice Drouin
52b7c2ddbf use correct cipher stream to obfuscate packets 2017-04-13 22:41:50 -07:00
Fabrice Drouin
2df1b0aecf BOLT 4: add test vectors for reply messages 2017-04-13 22:41:50 -07:00
Rusty Russell
9c050b91d7 BOLT 1: max requested pong length is 65531, not 65533, add rationale.
Forgot the type field.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-10 18:26:15 -07:00
Rusty Russell
e82b729a3a BOLT 4: error on last step if incorrect HTLC value.
This is particularly important if people start overpaying: a hop
may try to deduct 1 extra millisatoshi, which would be rejected by the
next unless the next is the final hop, enabling detection.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-10 17:57:17 -07:00
Rusty Russell
1a496d1941 BOLT 4: error if the final outgoing_ctlv_value is unexpected.
Not doing this check means an inconsistency in behaviour, which could
theoretically allow a hop to probe: if the next hop is the last, it might
not care, but if it's not it will return an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-04-10 17:57:17 -07:00