Don't do this: (gdb) bt #0 0x00007f37ae667c40 in ?? () from /lib/x86_64-linux-gnu/libz.so.1 #1 0x00007f37ae668b38 in ?? () from /lib/x86_64-linux-gnu/libz.so.1 #2 0x00007f37ae669907 in deflate () from /lib/x86_64-linux-gnu/libz.so.1 #3 0x00007f37ae674c65 in compress2 () from /lib/x86_64-linux-gnu/libz.so.1 #4 0x000000000040cfe3 in zencode_scids (ctx=0xc1f118, scids=0x2599bc49 "\a\325{", len=176320) at gossipd/gossipd.c:218 #5 0x000000000040d0b3 in encode_short_channel_ids_end (encoded=0x7fff8f98d9f0, max_bytes=65490) at gossipd/gossipd.c:236 #6 0x000000000040dd28 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290511, number_of_blocks=8) at gossipd/gossipd.c:576 #7 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290511, number_of_blocks=16) at gossipd/gossipd.c:595 #8 0x000000000040ddee in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290495, number_of_blocks=32) at gossipd/gossipd.c:596 #9 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290495, number_of_blocks=64) at gossipd/gossipd.c:595 #10 0x000000000040ddee in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290431, number_of_blocks=128) at gossipd/gossipd.c:596 #11 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290431, number_of_blocks=256) at gossipd/gossipd.c:595 #12 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290431, number_of_blocks=512) at gossipd/gossipd.c:595 #13 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17290431, number_of_blocks=1024) at gossipd/gossipd.c:595 #14 0x000000000040ddee in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=2047) at gossipd/gossipd.c:596 #15 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=4095) at gossipd/gossipd.c:595 #16 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=8191) at gossipd/gossipd.c:595 #17 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=16382) at gossipd/gossipd.c:595 #18 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=32764) at gossipd/gossipd.c:595 #19 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=65528) at gossipd/gossipd.c:595 #20 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=131056) at gossipd/gossipd.c:595 #21 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=262112) at gossipd/gossipd.c:595 #22 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=524225) at gossipd/gossipd.c:595 #23 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=1048450) at gossipd/gossipd.c:595 #24 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=2096900) at gossipd/gossipd.c:595 #25 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=4193801) at gossipd/gossipd.c:595 #26 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=8387603) at gossipd/gossipd.c:595 #27 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=17289408, number_of_blocks=16775207) at gossipd/gossipd.c:595 #28 0x000000000040ddee in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=33550414) at gossipd/gossipd.c:596 #29 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=67100829) at gossipd/gossipd.c:595 #30 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=134201659) at gossipd/gossipd.c:595 #31 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=268403318) at gossipd/gossipd.c:595 #32 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=536806636) at gossipd/gossipd.c:595 #33 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=1073613273) at gossipd/gossipd.c:595 #34 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=2147226547) at gossipd/gossipd.c:595 #35 0x000000000040ddc6 in queue_channel_ranges (peer=0x3868fc8, first_blocknum=514201, number_of_blocks=4294453094) at gossipd/gossipd.c:595 #36 0x000000000040df26 in handle_query_channel_range (peer=0x3868fc8, msg=0x37e0678 "\001\ao\342\214\n\266\361\263r\301\246\242F\256c\367O\223\036\203e\341Z\b\234h\326\031") at gossipd/gossipd.c:625 The cause was that converting a block number to an scid truncates it at 24 bits. When we look through the index from (truncated number) to (real end number) we get every channel, which is too large to encode, so we iterate again. This fixes both that problem, and also the issue that we'd end up dividing into many empty sections until we get to the highest block number. Instead, we just tack the empty blocks on to then end of the final query. (My initial version requested 0xFFFFFFFE blocks, but the dev code which records what blocks were returned can't make a bitmap that big on 32 bit). Reported-by: George Vaccaro Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
Added
- plugins: fully enabled, and ready for you to write some!
- lightning-cli:
help <cmd>
finds man pages even ifmake install
not run. - JSON API:
waitsendpay
now has anerring_direction
field. - JSON API:
listpeers
now has adirection
field inchannels
. - JSON API:
listchannels
now takes asource
option to filter by node id.
Changed
- The
short_channel_id
separator has been changed to bex
to match the specification.
Deprecated
Note: You should always set allow-deprecated-apis=false
to test for
changes.
Removed
Fixed
- Protocol: handling
query_channel_range
for large numbers of blocks (eg. 4 billion) was slow due to a bug.
Security
0.6.3 - 2019-01-09: "The Smallblock Conspiracy"
This release named by @molxyz and @ctrlbreak.
Added
- JSON API: New command
check
checks the validity of a JSON API call without running it. - JSON API:
getinfo
now returnsnum_peers
num_pending_channels
,num_active_channels
andnum_inactive_channels
fields. - JSON API: use
\n\n
to terminate responses, for simplified parsing (pylightning now relies on this) - JSON API:
fundchannel
now includes anannounce
option, when false it will keep channel private. Defaults to true. - JSON API:
listpeers
'schannels
now includes aprivate
flag to indicate if channel is announced or not. - JSON API:
invoice
route hints may now include private channels if you have no public ones, unless new optionexposeprivatechannels
is false. - Plugins: experimental plugin support for
lightningd
, including option passthrough and JSON-RPC passthrough.
Changed
- JSON API:
pay
anddecodepay
accept and ignorelightning:
prefixes. - pylightning: Allow either keyword arguments or positional arguments.
- JSON-RPC: messages are now separated by 2 consecutive newlines.
- JSON-RPC:
jsonrpc
:2.0
now included in json-rpc command calls. complies with spec.
Deprecated
Note: You should always set allow-deprecated-apis=false
to test for
changes.
- pylightning: Support for pre-2-newline JSON-RPC (<= 0.6.2 lightningd) is deprecated.
Removed
- option_data_loss_protect is now only offered if EXPERIMENTAL_FEATURES is enabled, since it seems incompatible with lnd and has known bugs.
Fixed
- JSON API: uppercase invoices now parsed correctly (broken in 0.6.2).
- JSON API: commands are once again read even if one hasn't responded yet (broken in 0.6.2).
- Protocol: allow lnd to send
update_fee
beforefunding_locked
. - Protocol: fix limit on how much funder can send (fee was 1000x too small)
- Protocol: don't send invalid onion errors if peer says onion was bad.
- Protocol: don't crash when peer sends a 0-block-expiry HTLC.
- pylightning: handle multiple simultanous RPC replies reliably.
Security
0.6.2 - 2018-10-20: "The Consensus Loving Nasal Daemon"
This release named by practicalswift.
Added
- JSON API:
listpeers
has new fieldscratch_txid
: the latest tx in channel. - JSON API:
listpeers
has new arrayhtlcs
: the current live payments. - JSON API:
listchannels
has two new fields:message_flags
andchannel_flags
. This replacesflags
. - JSON API:
invoice
now adds route hint to invoices for incoming capacity (RouteBoost), and warns if insufficient capacity. - JSON API:
listforwards
lists all forwarded payments, their associated channels, and fees. - JSON API:
getinfo
shows forwarding fees earnt asmsatoshi_fees_collected
. - Bitcoind: more parallelism in requests, for very slow nodes.
- Testing: fixed logging, cleaner interception of bitcoind, minor fixes.
- Protocol: we set and handle the new
htlc_maximum_msat
channel_update field.
Changed
- Protocol:
channel_update
sent to disable channel only if we reject an HTLC. - Protocol: we don't send redundant
node_announcement
on every new channel. - Config: config file can override
lightning-dir
(makes sense with--conf
). - Config:
--conf
option is now relative to current directory, notlightning-dir
. - lightning-cli:
help <cmd>
prints basic information even if no man page found. - JSON API:
getinfo
now reports global statistics about forwarded payments, including total fees earned and amounts routed.
Deprecated
Note: You should always set allow-deprecated-apis=false
to test for
changes.
- JSON RPC:
listchannels
'flags
field. This has been split into two fields, see Added. - JSON RPC:
global_features
andlocal_features
fields: useglobalfeatures
andlocalfeatures
as per BOLT #1.
Removed
- JSON API: the optional 'seed' parameter to
getroute
was removed.
Fixed
- Startup: more coherent complaint if daemon already running.
- Lightningd: correctly save full HTLCs across restarts; fixup old databases.
- JSON RPC:
getinfo
now shows correct Tor port. - JSON RPC:
ping
now works even after one peer fails to respond. - JSON RPC:
getroute
fuzzpercent
andpay
maxfeepercent
can now be > 100. - JSON RPC:
riskfactor
inpay
andgetroute
no longer always treated as 1. - JSON-RPC:
listpeers
was always reporting 0 for all stats. - JSON RPC:
withdraw all
saysCannot afford transaction
if you have absolutely no funds, rather thanOutput 0 satoshis would be dust
. - Protocol: don't send gossip about closed channels.
- Protocol: fix occasional deadlock when both peers flood with gossip.
- Protocol: fix occasional long delay on sending
reply_short_channel_ids_end
. - Protocol: re-send
node_announcement
when address/alias/color etc change. - Protocol: multiple HTLCs with the same payment_hash are handled correctly.
- Options: 'autotor' defaults to port 9051 if not specified.
Security
0.6.1 - 2018-09-11: "Principled Opposition To Segwit"
This release named by ZmnSCPxj.
Added
- Protocol: gossipd now deliberately delays spamming with
channel_update
. - Protocol: liveness ping when we commit changes but peer is idle: speeds up failures and reduces forced closures.
- Protocol:
option_data_loss_protect
now supported to protect peers against being out-of-date. - JSON API: Added description to invoices and payments (#1740).
- JSON API:
getinfo
has new fieldsalias
andcolor
. - JSON API:
listpeers
has new fieldsglobal_features
andlocal_features
. - JSON API:
listnodes
has new fieldglobal_features
. - JSON API:
ping
command to send a ping to a connected peer. - JSON API:
feerates
command to retrieve current fee estimates. - JSON API:
withdraw
andfundchannel
can be given manual feerate. - Config:
--conf
option to set config file. - Documentation: Added CHANGELOG.md
- pylightning: RpcError now has
method
andpayload
fields. - Sending lightningd a SIGHUP will make it reopen its
log-file
, if any.
Changed
- Protocol: Fee estimates are now smoothed over time, to avoid sudden jumps.
- Config: You can only announce one address if each type (IPv4, IPv6, TORv2, TORv3).
- lightning-cli: the help command for a specific command now runs the
man
command. - HSM: The HSM daemon now maintains the per-peer secrets, rather than handing them out. It's still lax in what it signs though.
- connectd: A new daemon
lightning_connectd
handles connecting to/from peers, instead ofgossipd
doing that itself.lightning_openingd
now handles peers immediately, even if they never actually open a channel. - Test:
python-xdist
is now a dependency for tests. - Logging: JSON connections no longer spam debug logs.
- Routing: We no longer consider channels that are not usable either because of
their capacity or their
htlc_minimum_msat
parameter (#1777) - We now try to connect to all known addresses for a peer, not just the one given or the first one announced.
- Crash logs are now placed one-per file like
crash.log.20180822233752
- We will no longer allow withdrawing funds or funding channels if we
do not have a fee estimate (eg. bitcoind not synced); use new
feerate
arg.
Deprecated
Removed
- JSON API:
listpeers
results no long havealias
andcolor
fields; they're inlistnodes
(we used to internally merge the information). - JSON API:
listpeers
will never havestate
field (it accidentally used to exist and set toGOSSIPING
before we opened a channel).connected
will indicate if we're connected, and thechannels
array indicates individual channel states (if any). - Config:
default-fee-rate
is no longer available; use explicitfeerate
option if necessary. - Removed all Deprecated options from 0.6.
Fixed
- Protocol:
node_announcement
multiple addresses are correctly ordered and uniquified. - Protocol: if we can't estimate feerate, be almost infinitely tolerant of other side setting fees to avoid unilateral close.
- JSON API:
listnodes
: now displays node aliases and colors even if they don't advertise a network address - JSON API:
fundchannel all
: now restricts to 2^24-1 satoshis rather than failing. - JSON API:
listnodes
: now correctly printsaddresses
if more than one is advertised. - Config:
bind-addr
of a publicly accessible network address was announced. - When we reconnect and have to retransmit failing HTLCs, the errors weren't encrypted by us.
lightningd_config
man page is now installed bymake install
.- Fixed crash when shutting down during opening a channel (#1737)
- Don't lose track of our own output when applying penalty transaction (#1738)
- Protocol:
channel_update
inside error messages now refers to correct channel. - Stripping type prefix from
channel_update
s that are nested in an onion reply to be compatible with eclair and lnd (#1730). - Failing tests no longer delete the test directory, to allow easier debugging (Issue: #1599)
Security
0.6 - 2018-06-22: "I Accidentally The Smart Contract"
In the prehistory of c-lightning, no changelog was kept. But major JSON API changes are tracked.
This release named by Fabrice Drouin.
Deprecated
Note: You should always set allow-deprecated-apis=false
to test for
changes.
- Config:
port
. Useaddr=:<portnum>
. - Config:
ipaddr
. Useaddr
. - Config:
anchor-confirms
. Usefunding-confirms
. - Config:
locktime-blocks
. Usewatchtime-blocks
. - Protocol: on closing we allow out-of-range offers, prior to spec fix
2018-01-30 ("BOLT 2: order closing-signed negotiation by making
funder send first."
90241d9cf60a598eac8fd839ac81e4093a161272
) - JSON API:
listinvoice
command. Uselistinvoices
. - JSON API: invoice result fields
paid_timestamp
andexpiry_time
. Usepaid_at
andexpires_at
. - JSON API:
invoice
command fieldfallback
. Usefallbacks
. - JSON API:
decodepay
result fieldstimestamp
andfallback
. Usecreated_at
andfallbacks
. - JSON API: payment result fields
timestamp
. Usecreated_at
. - JSON API:
getinfo
result fieldport
. Usebinding
andaddress
arrays. - JSON API:
getlog
result fieldcreation_time
. Usecreated_at
. - JSON API:
getpeers
result fieldchannel_reserve_satoshis
. Usetheir_channel_reserve_satoshis
. - JSON API:
getpeers
result fieldto_self_delay
. Usetheir_to_self_delay
.
Older versions
There predate the BOLT specifications, and are only of vague historic interest:
- 0.1 - 2015-08-08: "MtGox's Cold Wallet" (named by Rusty Russell)
- 0.2 - 2016-01-22: "Butterfly Labs' Timely Delivery" (named by Anthony Towns)
- 0.3 - 2016-05-25: "Nakamoto's Genesis Coins" (named by Braydon Fuller)
- 0.4 - 2016-08-19: "Wright's Cryptographic Proof" (named by Chrstian Decker)
- 0.5 - 2016-10-19: "Bitcoin Savings & Trust Daily Interest" (named by Glenn Willen)
- 0.5.1 - 2016-10-21
- 0.5.2 - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II"