diff --git a/CHANGELOG.md b/CHANGELOG.md index 0be26d6763eb..0e35234c1341 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [0.6.1-rc1] - 2018-08-25: "Principled Opposition To Segwit" +## [0.6.1] - 2018-09-11: "Principled Opposition To Segwit" This release named by ZmnSCPxj. @@ -133,8 +133,8 @@ There predate the BOLT specifications, and are only of vague historic interest: 6. [0.5.1] - 2016-10-21 7. [0.5.2] - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II" -[Unreleased]: https://github.com/ElementsProject/lightning/compare/v0.6...HEAD -[0.6.1-rc1]: https://github.com/ElementsProject/lightning/releases/tag/v0.6.1-rc1 +[Unreleased]: https://github.com/ElementsProject/lightning/compare/v0.6.1...HEAD +[0.6.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.6.1 [0.6]: https://github.com/ElementsProject/lightning/releases/tag/v0.6 [0.5.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.5.2-2016-11-21 [0.5.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.5.1-2016-10-21 diff --git a/Makefile b/Makefile index 4ad9274a2e7e..f2324f8d2eb2 100644 --- a/Makefile +++ b/Makefile @@ -240,8 +240,10 @@ check-makefile: bolt-check/%: % bolt-precheck tools/check-bolt @[ ! -d .tmp.lightningrfc ] || tools/check-bolt .tmp.lightningrfc $< +LOCAL_BOLTDIR=.tmp.lightningrfc + bolt-precheck: - @rm -rf .tmp.lightningrfc; if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; exit 0; fi; set -e; if [ -n "$(BOLTVERSION)" ]; then git clone -q $(BOLTDIR) .tmp.lightningrfc && cd .tmp.lightningrfc && git checkout -q $(BOLTVERSION); else cp -a $(BOLTDIR) .tmp.lightningrfc; fi + @rm -rf $(LOCAL_BOLTDIR); if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLTs: BOLTDIR $(BOLTDIR) does not exist >&2; exit 0; fi; set -e; if [ -n "$(BOLTVERSION)" ]; then git clone -q $(BOLTDIR) $(LOCAL_BOLTDIR) && cd $(LOCAL_BOLTDIR) && git checkout -q $(BOLTVERSION); else cp -a $(BOLTDIR) $(LOCAL_BOLTDIR); fi check-source-bolt: $(ALL_TEST_PROGRAMS:%=bolt-check/%.c) diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 1a9a01eccc8e..f75de7001807 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -457,7 +457,7 @@ static void json_dev_query_scids(struct command *cmd, static const struct json_command dev_query_scids_command = { "dev-query-scids", json_dev_query_scids, - "Query {peerid} for [scids]" + "Query peer {id} for [scids]" }; AUTODATA(json_command, &dev_query_scids_command); @@ -487,7 +487,7 @@ static void json_dev_send_timestamp_filter(struct command *cmd, static const struct json_command dev_send_timestamp_filter = { "dev-send-timestamp-filter", json_dev_send_timestamp_filter, - "Send {peerid} the timestamp filter {first} {range}" + "Send peer {id} the timestamp filter {first} {range}" }; AUTODATA(json_command, &dev_send_timestamp_filter); @@ -554,7 +554,7 @@ static void json_dev_query_channel_range(struct command *cmd, static const struct json_command dev_query_channel_range_command = { "dev-query-channel-range", json_dev_query_channel_range, - "Query {peerid} for short_channel_ids for {first} block + {num} blocks" + "Query peer {id} for short_channel_ids for {first} block + {num} blocks" }; AUTODATA(json_command, &dev_query_channel_range_command); diff --git a/lightningd/ping.c b/lightningd/ping.c index 3b7168a9bcd7..c533e96b096b 100644 --- a/lightningd/ping.c +++ b/lightningd/ping.c @@ -86,6 +86,6 @@ static void json_ping(struct command *cmd, static const struct json_command ping_command = { "ping", json_ping, - "Send {peerid} a ping of length {len} (default 128) asking for {pongbytes} (default 128)" + "Send peer {id} a ping of length {len} (default 128) asking for {pongbytes} (default 128)" }; AUTODATA(json_command, &ping_command); diff --git a/wire/Makefile b/wire/Makefile index 35c7277e3020..ba939f64365a 100644 --- a/wire/Makefile +++ b/wire/Makefile @@ -4,7 +4,8 @@ wire-wrongdir: $(MAKE) -C .. wire-all -WIRE_HEADERS_NOGEN := wire/peer_wire.h \ +WIRE_HEADERS_NOGEN := wire/onion_defs.h \ + wire/peer_wire.h \ wire/wire.h \ wire/wire_sync.h \ wire/wire_io.h @@ -25,12 +26,15 @@ ALL_OBJS += $(WIRE_OBJS) $(WIRE_ONION_OBJS) ALL_GEN_HEADERS += $(WIRE_GEN_HEADERS) # They may not have the bolts. -BOLT_EXTRACT=$(BOLTDIR)/tools/extract-formats.py -wire/gen_peer_wire_csv: FORCE - @set -e; if [ -f $(BOLT_EXTRACT) ]; then for f in $(BOLTDIR)/0[127]*.md $(BOLT_EXTRACT); do if [ $$f -nt $@ -o ! -f $@ ]; then $(BOLT_EXTRACT) --message-fields --message-types $(BOLTDIR)/0[127]*.md > $@; break; fi; done; fi +BOLT_EXTRACT=$(LOCAL_BOLTDIR)/tools/extract-formats.py -wire/gen_onion_wire_csv: FORCE - @set -e; if [ -f $(BOLT_EXTRACT) ]; then for f in $(BOLTDIR)/04*.md $(BOLT_EXTRACT); do if [ $$f -nt $@ -o ! -f $@ ]; then echo '#include ' > $@ && $(BOLT_EXTRACT) --message-fields --message-types $(BOLTDIR)/04*.md >> $@; break; fi; done; fi +ifeq ($(DEVELOPER),1) +wire/gen_peer_wire_csv: bolt-precheck + @set -e; if [ -d $(LOCAL_BOLTDIR) ]; then for f in $(LOCAL_BOLTDIR)/0[127]*.md $(BOLT_EXTRACT); do if [ $$f -nt $@ -o ! -f $@ ]; then $(BOLT_EXTRACT) --message-fields --message-types $(LOCAL_BOLTDIR)/0[127]*.md > $@; break; fi; done; fi + +wire/gen_onion_wire_csv: bolt-precheck + @set -e; if [ -f $(BOLT_EXTRACT) ]; then for f in $(LOCAL_BOLTDIR)/04*.md $(BOLT_EXTRACT); do if [ $$f -nt $@ -o ! -f $@ ]; then echo '#include ' > $@ && $(BOLT_EXTRACT) --message-fields --message-types $(LOCAL_BOLTDIR)/04*.md >> $@; break; fi; done; fi +endif wire/gen_peer_wire.h: $(WIRE_GEN) wire/gen_peer_wire_csv $(WIRE_GEN) --bolt --header $@ wire_type < wire/gen_peer_wire_csv > $@ diff --git a/wire/gen_peer_wire_csv b/wire/gen_peer_wire_csv index 5c6e81450a2e..0e07d96131aa 100644 --- a/wire/gen_peer_wire_csv +++ b/wire/gen_peer_wire_csv @@ -34,6 +34,7 @@ open_channel,252,htlc_basepoint,33 open_channel,285,first_per_commitment_point,33 open_channel,318,channel_flags,1 open_channel,319,shutdown_len,2,option_upfront_shutdown_script +open_channel,321,shutdown_scriptpubkey,shutdown_len,option_upfront_shutdown_script accept_channel,33 accept_channel,0,temporary_channel_id,32 accept_channel,32,dust_limit_satoshis,8 @@ -50,6 +51,7 @@ accept_channel,171,delayed_payment_basepoint,33 accept_channel,204,htlc_basepoint,33 accept_channel,237,first_per_commitment_point,33 accept_channel,270,shutdown_len,2,option_upfront_shutdown_script +accept_channel,272,shutdown_scriptpubkey,shutdown_len,option_upfront_shutdown_script funding_created,34 funding_created,0,temporary_channel_id,32 funding_created,32,funding_txid,32 @@ -106,8 +108,8 @@ channel_reestablish,136 channel_reestablish,0,channel_id,32 channel_reestablish,32,next_local_commitment_number,8 channel_reestablish,40,next_remote_revocation_number,8 -channel_reestablish,48,your_last_per_commitment_secret,32,option-data-loss-protect -channel_reestablish,80,my_current_per_commitment_point,33,option-data-loss-protect +channel_reestablish,48,your_last_per_commitment_secret,32,option_data_loss_protect +channel_reestablish,80,my_current_per_commitment_point,33,option_data_loss_protect announcement_signatures,259 announcement_signatures,0,channel_id,32 announcement_signatures,32,short_channel_id,8 diff --git a/wire/onion_defs.h b/wire/onion_defs.h index 2902e8714983..3f1b9c614473 100644 --- a/wire/onion_defs.h +++ b/wire/onion_defs.h @@ -1,11 +1,12 @@ /* Macro definitions for constants used in BOLT #4 */ #ifndef LIGHTNING_WIRE_ONION_DEFS_H #define LIGHTNING_WIRE_ONION_DEFS_H +#include "config.h" /* BOLT #4: * - * The top byte of `failure-code` can be read as a set of flags: - * * 0x8000 (BADONION): unparsable onion, encrypted by previous node. + * The top byte of `failure_code` can be read as a set of flags: + * * 0x8000 (BADONION): unparsable onion encrypted by sending peer * * 0x4000 (PERM): permanent failure (otherwise transient) * * 0x2000 (NODE): node failure (otherwise channel) * * 0x1000 (UPDATE): new channel update enclosed