-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] grs use wally sha256 and warp to v.0.7.1 #16
Commits on May 26, 2019
-
lightningd: suppress IO_OUT logging for getlog command
Before this, the response of `getlog io` blew up quickly when called multiple times.
Configuration menu - View commit details
-
Copy full SHA for db57d9c - Browse repository at this point
Copy the full SHA db57d9cView commit details
Commits on May 27, 2019
-
chaintopology: add REORG to logline when tx watch is fired after reorg
This makes clear that txwatch_fire was called with depth=0 when chain tip got removed after a reorg. And now we can test for that.
Configuration menu - View commit details
-
Copy full SHA for b261c5b - Browse repository at this point
Copy the full SHA b261c5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for eb3495c - Browse repository at this point
Copy the full SHA eb3495cView commit details -
pytest: tighten a log test
Owning output...
with address type and c……onfirmation Because the call (wallet_extract_owned outputs) that prints that line can happen _before_ or _after_ confirmation in block, adding `CONFIRMED` in the later.
Configuration menu - View commit details
-
Copy full SHA for 245807a - Browse repository at this point
Copy the full SHA 245807aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24f43e5 - Browse repository at this point
Copy the full SHA 24f43e5View commit details -
pytest: added BitcoinD.simple_reorg() method, which can change tx hei…
…ght and/or txindex Now without bitcoind restart. bitcoin-cli `prioritisetransaction` came to the rescue! Its argument `fee_delta` (apparently) lowers the txs _effective_ feerate soo low that bitcoind wont mine it ... untill we raise it when we want it to be mined.
Configuration menu - View commit details
-
Copy full SHA for 7726681 - Browse repository at this point
Copy the full SHA 7726681View commit details -
lightningd: funding_lockin_cb, handle reorgs that change short_channe…
…l_id Keep watching and updating scid until ANNOUNCE_MIN_DEPTH, even when channel is private. When scid changes, we fail channeld so it will restart and initialize with updated scid and add it to rtable. Reorgs can change funding tx's height/index after lockin, which could happen with small minimum_depth=1.
Configuration menu - View commit details
-
Copy full SHA for 8c1bbf3 - Browse repository at this point
Copy the full SHA 8c1bbf3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54a67c2 - Browse repository at this point
Copy the full SHA 54a67c2View commit details -
pytest: add test_funding_reorg_private, reorg changes funding height
Reorg changes short_channel_id after lockin of private channel, while one node restarts. test that: - peer->depth_togo in billboard decrements - reorg and scid change is detected by running node and restarting node - both `old` and `new` scids are in rtable Also added a comment to test_blockchaintrack to clarify.
Configuration menu - View commit details
-
Copy full SHA for 5b0c174 - Browse repository at this point
Copy the full SHA 5b0c174View commit details -
pytest: add test_funding_reorg_remote_lags
Nodes may disagree about short_channel_id before channel announcement.
Configuration menu - View commit details
-
Copy full SHA for 52c84b2 - Browse repository at this point
Copy the full SHA 52c84b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22600fa - Browse repository at this point
Copy the full SHA 22600faView commit details
Commits on May 29, 2019
-
DB: Store the remote channel announcement signatures into DB
1. Add the fields of remote channel announcement signatures into TABLE channels 2. Add the related function
Configuration menu - View commit details
-
Copy full SHA for b41d529 - Browse repository at this point
Copy the full SHA b41d529View commit details -
Configuration menu - View commit details
-
Copy full SHA for a645fbd - Browse repository at this point
Copy the full SHA a645fbdView commit details -
Channeld: Add new wire type:channel_got_announcement
Channeld sends announcement signatures to Master by this message. When Channeld receive a new channel announcement msg, (After channel locking)it will sends announcement signatures to Master by this message.
Configuration menu - View commit details
-
Copy full SHA for d93f614 - Browse repository at this point
Copy the full SHA d93f614View commit details -
Channeld: init channel with remote announcement info when restart
1. Add remote_ann_node_sigs and remote_bitcoin_sigs fields in channel_init message; 2. Master add announcement signatures into channel_init message, and send this message to Channeld. Channeld will initial the channel with this signatures when it reenables the channel.
Configuration menu - View commit details
-
Copy full SHA for 1141243 - Browse repository at this point
Copy the full SHA 1141243View commit details
Commits on May 31, 2019
-
lightningd/subd.c: Return NULL from subd_shutdown.
And set pointers to shut down daemons as NULL in lightningd.
Configuration menu - View commit details
-
Copy full SHA for 37440e9 - Browse repository at this point
Copy the full SHA 37440e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3466261 - Browse repository at this point
Copy the full SHA 3466261View commit details -
pytest: Add a test that reproduces ElementsProject#2687
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 883d4b4 - Browse repository at this point
Copy the full SHA 883d4b4View commit details -
lightningd/io_loop_with_timers.c: Move mainloop to its own source fil…
…e, have chaintopology use it. Fixes: ElementsProject#2687
Configuration menu - View commit details
-
Copy full SHA for 48df6c8 - Browse repository at this point
Copy the full SHA 48df6c8View commit details -
I was trying to trace a problem with a plugin, and needed this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 8f9c482 - Browse repository at this point
Copy the full SHA 8f9c482View commit details -
plugin: fix printing of bad plugin responses.
Before: Plugin for invoice_payment returned non-result response "subscriptions": [], "hooks": ["invoice_payment"]}} �V After: Plugin for invoice_payment returned non-result response {"jsonrpc": "2.0", "id": 6, "error": "Error while processing invoice_payment: ValueError(\"invalid literal for int() with base 10: '5.0'\")"} Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 695bec5 - Browse repository at this point
Copy the full SHA 695bec5View commit details -
devtools/decode-iolog: tool to decode hexstrings from io logging.
Slow, but useful. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0c189fe - Browse repository at this point
Copy the full SHA 0c189feView commit details
Commits on Jun 3, 2019
-
jsonrpc: Add a category field to commands.
A new string field is added to the command structure and is specified at the creation of each native command, and in the JSON created by 'json_add_help_command()'.
Configuration menu - View commit details
-
Copy full SHA for 323adb4 - Browse repository at this point
Copy the full SHA 323adb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b0bf0b - Browse repository at this point
Copy the full SHA 5b0bf0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d34121 - Browse repository at this point
Copy the full SHA 9d34121View commit details -
cli: Sort human_readable output by categories
A new field is available in the command json object : 'category' (corresponding to whether "bitcoin", "channel", "network", "payment", "plugin", "utility", "developer"). We use it to printf commands ordered by categories. credits @rustyrussel
Configuration menu - View commit details
-
Copy full SHA for b1bbafb - Browse repository at this point
Copy the full SHA b1bbafbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78326a8 - Browse repository at this point
Copy the full SHA 78326a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for fba050e - Browse repository at this point
Copy the full SHA fba050eView commit details -
Plugins: accept options of different types
A new struct containing the plugin options value as different types is created and appended to the plugin_option structure
Configuration menu - View commit details
-
Copy full SHA for a6753fd - Browse repository at this point
Copy the full SHA a6753fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3775a32 - Browse repository at this point
Copy the full SHA 3775a32View commit details -
Plugins: allow to specify plugin option type in libplugin.c, then spe…
…cify it to autoclean options
Configuration menu - View commit details
-
Copy full SHA for 4640d18 - Browse repository at this point
Copy the full SHA 4640d18View commit details -
gossipd: fix uninitialized free on short_route in goto path
Fix a path where tal_free is called on an uninitialized variable If the first `goto bad_total` executes, then that path has uninitialized `short_route` but bad_total passes through to `out` whose first call is tal_free(short_route). This was noticed by a maybe-uninitialized heuristic on gcc 7.4.0: gossipd/routing.c: In function ‘find_shorter_route’: gossipd/routing.c:1096:2: error: ‘short_route’ may be used uninitialized in this function [-Werror=maybe-uninitialized] tal_free(short_route); Reported-by: @ZmnSCPxj <ElementsProject#2674 (comment)> Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 3f035cb - Browse repository at this point
Copy the full SHA 3f035cbView commit details -
gossipstore: fix uninitialized input fd
Initialize infd to STDIN_FILENO if the input file argument is missing. Caught with gcc version: 7.4.0 devtools/create-gossipstore.c: In function ‘main’: devtools/create-gossipstore.c:130:9: error: ‘infd’ may be used uninitialized in this function [-Werror=maybe-uninitialized] while (read_all(infd, &be_inlen, sizeof(be_inlen))) { Suggested-by: @ZmnSCPxj <ElementsProject#2674 (comment)> Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6f635b4 - Browse repository at this point
Copy the full SHA 6f635b4View commit details -
lightningd: fix uninitialized variable in DEVELOPER path
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for fae593c - Browse repository at this point
Copy the full SHA fae593cView commit details -
gossipd: fix spurious gcc warning.
It turns out that we don't look at type when we return 0, but gcc isn't quite smart enough for that. Initializing to -1 is good practice anyway for the failure path. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c091a4e - Browse repository at this point
Copy the full SHA c091a4eView commit details -
connectd: handle IPv6 correctly.
Untested, but the current code is clearly wrong (caught by gcc-4.8 -O3). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 9820d06 - Browse repository at this point
Copy the full SHA 9820d06View commit details -
gossipd: fix spurious unused error with gcc-9 -O3.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c233fc5 - Browse repository at this point
Copy the full SHA c233fc5View commit details -
wire/test: remove unused padding code.
Turns out the peer part of the spec no longer uses padding (it's used only in the onion), and GCC-9 with -O3 warns we're padding NULL to memcpy. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5b7776c - Browse repository at this point
Copy the full SHA 5b7776cView commit details -
configure: handle --reconfigure better.
`./configure CC=newcc --reconfigure` didn't set CC, because reconfigure simply replaced all values: only make it replace undefined values. Also, it didn't change COPTFLAGS or CWARNFLAGS, even if they were previously the defaults (eg. --reconfigure --enable-developer). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ed08ca6 - Browse repository at this point
Copy the full SHA ed08ca6View commit details -
configure: detect modern gcc, and only suppress necessary errors.
Drive-by fix of CONFIGURATOR_CC setting when CC is overridden on cmdline (not via env var). Note that clang defines __GNUC__ (to 4) :( Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 7092d21 - Browse repository at this point
Copy the full SHA 7092d21View commit details -
travis: add compilation to SOURCE_CHECK_ONLY.
Our "-O3" CI check wasn't doing what I thought. But building with -flto is hard with older gccs, so remove that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 7961a81 - Browse repository at this point
Copy the full SHA 7961a81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 107381a - Browse repository at this point
Copy the full SHA 107381aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45645e3 - Browse repository at this point
Copy the full SHA 45645e3View commit details -
pytest: catch more gossip-related errors.
Basically, any "Bad" message from gossipd is something we should look at. This covers failures loading the gossip_store, too! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for a40fe40 - Browse repository at this point
Copy the full SHA a40fe40View commit details -
pytest: make test_gossip_notices_close more reliable.
It's possible that it hasn't got the node_announcement messages; it will still list the nodes, however (the channel_announcement tells it the nodes exist). Check for the alias field instead. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 1147e65 - Browse repository at this point
Copy the full SHA 1147e65View commit details -
pytest: more comprehensive tests for test_gossip_store_compact.
First, we should have a channel_update so we actually do some compaction! (Reported-by @SimonVrouwe). But we should also handle the cases where: 1. A channel_announcement is *not* directly followed by a channel_update (happens when the channel_update is replaced). 2. A node_announcement predates a channel_update for the peer (again, can happen once a channel_update is replaced). 3. A local/private channel_creation is not directly followed by an update. In addition, we might as well check that we can *load* such a store, before compaction. This checks the corner cases which occur in real gossip stores. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 048a650 - Browse repository at this point
Copy the full SHA 048a650View commit details -
gossip_store: fix 'bad node_announcement' by allowing node_announceme…
…nt on un-updated channel. When we first receive a channel_update, we write both the channel_announcement and that channel_update to the store: we need that first update so we can set the channel_announcement timestamp. However, the channel_update can be replaced later. This means we can have a channel_announcement, a node_update which relies on it, then the channel_update later. So move the "this applies to a pending announcement" check lower, where gossip_store can use it too. Has a nice side-effect of avoiding one lookup of the node id. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 21fe518 - Browse repository at this point
Copy the full SHA 21fe518View commit details -
gossipd: fix gossip_store calling delete.
Now we handle node_announcements properly, we have a failure case where we try to move them when a channel is deleted while loading the store. We're going to remove this soon, in favor of in-place delete, so workaround this for now to avoid an assert() when we try to write to the store while loading. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 763697e - Browse repository at this point
Copy the full SHA 763697eView commit details
Commits on Jun 4, 2019
-
json: Add some more methods to add integers of various size to json
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 80b3d8a - Browse repository at this point
Copy the full SHA 80b3d8aView commit details -
pytest: Mark test_option_upfront_shutdown_script as flaky
Signed-off-by: Christian Decker <@cdecker>
Configuration menu - View commit details
-
Copy full SHA for 9a4cf7d - Browse repository at this point
Copy the full SHA 9a4cf7dView commit details -
plugin: Add the htlc_accepted hook
This is a rather simple hook that allows a plugin to take control over HTLCs that were accepted, but weren't resolved as part of an invoice or forwarded to the next hop yet. The goal is to allow plugins to terminate a route early, perform intermediate checks before the payment is accepted (check inventory or service delivery before accepting in order to avoid a refund for example) or handle an onion differently if it has a different realm (cross-chain atomic swaps). This doesn't implement serializing the payload or deserializing it, instead just passes the full context along. The details for serializing and deserializing will be implemented in a future commit. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7499f7d - Browse repository at this point
Copy the full SHA 7499f7dView commit details -
pytest: Add a simple test for the hooks
This uses the `htlc_accepted` hook to delay payment acceptance. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b545770 - Browse repository at this point
Copy the full SHA b545770View commit details -
plugin: Populate the request for the htlc_accepted hook
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bf53821 - Browse repository at this point
Copy the full SHA bf53821View commit details -
plugin: Parse response for htlc_accepted hook
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2b81e02 - Browse repository at this point
Copy the full SHA 2b81e02View commit details -
pytest: Add tests for htlc_accepted_hook
Two tests: one for failures and one for in-path resolution. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9fd8be6 - Browse repository at this point
Copy the full SHA 9fd8be6View commit details -
hooks: Add cltv_expiry_delta to the htlc_accepted hook
Signed-off-by: Christian Decker <decker.christian@gmail.com> Suggested-by: Corné Plooy <@bitonic-cjp>
Configuration menu - View commit details
-
Copy full SHA for 1561ffa - Browse repository at this point
Copy the full SHA 1561ffaView commit details -
hooks: Add the raw payload to the htlc_accepted call
Since we might soon be changing the payload it is a good idea to not just expose the v0 payload, but also the raw payload for the plugin to interpret. This might also include payloads that `lightningd` itself cannot understand, but the plugin might. Signed-off-by: Christian Decker <decker.christian@gmail.com> Suggested-by: Corné Plooy <@bitonic-cjp>
Configuration menu - View commit details
-
Copy full SHA for adb984d - Browse repository at this point
Copy the full SHA adb984dView commit details -
startup: Reorder HTLC wiring on startup after the topology init
Since the hook needs to pass information about the current blockheight to the plugin we need to first initialize the topology.
Configuration menu - View commit details
-
Copy full SHA for f7bfe16 - Browse repository at this point
Copy the full SHA f7bfe16View commit details -
Configuration menu - View commit details
-
Copy full SHA for 909913c - Browse repository at this point
Copy the full SHA 909913cView commit details -
startup: Tell peer_accepted_htlc whether we are replaying
It disables the error when attempting to do a state transition from `RCVD_ADD_ACK_REVOCATION` to `RCVD_ADD_ACK_REVOCATION` which was done before getting to this point. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6db1e76 - Browse repository at this point
Copy the full SHA 6db1e76View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd26a01 - Browse repository at this point
Copy the full SHA dd26a01View commit details -
plugin: Cleanup the htlc_accepted_hook_deserialize interface
Since we have more or less given up on the separation between response callback and deserialization we can also just have the individual parts returned. Signed-off-by: Christian Decker <decker.christian@gmail.com> Suggested-by: Rusty Russell <@rustyrussell>
Configuration menu - View commit details
-
Copy full SHA for 2db4f19 - Browse repository at this point
Copy the full SHA 2db4f19View commit details -
plugin: Added CHANGELOG entry and docs for the htlc_accepted hook
Signed-off-by: Christian Decker <@cdecker>
Configuration menu - View commit details
-
Copy full SHA for a57fdf2 - Browse repository at this point
Copy the full SHA a57fdf2View commit details -
gossip_store: mark private updates separately from normal ones.
They're really gossipd-internal, and we don't want per-peer daemons to confuse them with normal updates. I don't bump the gossip_store version; that's coming with another update anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 180a552 - Browse repository at this point
Copy the full SHA 180a552View commit details -
devtools/dump-gossipstore: print offsets.
More useful if something is wrong. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0fc97ed - Browse repository at this point
Copy the full SHA 0fc97edView commit details -
gossipd: track gossip_store locations of local channels.
We currently don't care, but the next patch means we have to find them again. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 43f2cbd - Browse repository at this point
Copy the full SHA 43f2cbdView commit details -
gossipd: disable gossip_store upgrade.
We're about to bump version again, and the code to upgrade it was quite hairy (and buggy!). It's not worthwhile for such a poorly-tested path: I will just add code to limit how much incoming gossip we get to avoid flooding when we upgrade, however. I also use a modern gossip_store version in our test_gossip_store_load test, instead of relying on the upgrade path. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 696dc6b - Browse repository at this point
Copy the full SHA 696dc6bView commit details -
gossipd: erase old entries from the store, don't just append.
We use the high bit of the length field: this way we can still check that the checksums are valid on deleted fields. Once this is done, serially reading the gossip_store file will result in a complete, ordered, minimal gossip broadcast. Also, the horrible corner case where we might try to delete things from the store during load time is completely gone: we only load non-deleted things. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for df00f20 - Browse repository at this point
Copy the full SHA df00f20View commit details -
channeld: don't queue gossip msgs while waiting for foreign_channel_u…
…pdate. We ask gossipd for the channel_update for the outgoing channel; any other messages it sends us get queued for later processing. But this is overzealous: we can shunt those msgs to the peer while we're waiting. This fixes a nasty case where we have to handle WIRE_GOSSIPD_NEW_STORE_FD messages by queuing the fd for later. This then means that WIRE_GOSSIPD_NEW_STORE_FD can be handled internally inside handle_gossip_msg(), since it's always dealt with the same, simplifying all callers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f1b4b14 - Browse repository at this point
Copy the full SHA f1b4b14View commit details -
common/per_per_state: generalize lightningd/peer_comm Part 1
Encapsulating the peer state was a win for lightningd; not surprisingly, it's even more of a win for the other daemons, especially as we want to add a little gossip information. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 38d2899 - Browse repository at this point
Copy the full SHA 38d2899View commit details -
gossipd: don't wrap messages when we send them to the peer.
They already send *us* gossip messages, so they have to be distinct anyway. Why make us both do extra work? Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for a5f6ef3 - Browse repository at this point
Copy the full SHA a5f6ef3View commit details -
gossipd: make writes to gossip_store atomic.
There's a corner case where otherwise a reader could see the header and not the body of a message. It could handle that in various ways, but simplest (and most efficient) is to avoid it happening. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 4399faf - Browse repository at this point
Copy the full SHA 4399fafView commit details -
connectd: generate message for lightningd inside peer_connected().
We used to generate this in the caller, then save it in case we needed to retry. We're about to change the message we send to lightningd, so we'll need to regenerate it every time; just hand all the extra args into peer_connected() and we can generate the `connect_peer_connected` msg there. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> 1diff --git a/connectd/connectd.c b/connectd/connectd.c index 94fe50b56..459c9ac63 100644
Configuration menu - View commit details
-
Copy full SHA for a40f45a - Browse repository at this point
Copy the full SHA a40f45aView commit details -
gossipd: don't send gossip stream, let per-peer daemons read it thems…
…elves. Keeping the uintmap ordering all the broadcastable messages is expensive: 130MB for the million-channels project. But now we delete obsolete entries from the store, we can have the per-peer daemons simply read that sequentially and stream the gossip itself. This is the most primitive version, where all gossip is streamed; successive patches will bring back proper handling of timestamp filtering and initial_routing_sync. We add a gossip_state field to track what's happening with our gossip streaming: it's initialized in gossipd, and currently always set, but once we handle timestamps the per-peer daemon may do it when the first filter is sent. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5591c0b - Browse repository at this point
Copy the full SHA 5591c0bView commit details -
gossip_store: remove redundant copy_message.
The single caller can easily use transfer_store_msg instead. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for bad9734 - Browse repository at this point
Copy the full SHA bad9734View commit details -
gossipd: add timestamp in gossip store header.
(We don't increment the gossip_store version, since there are only a few commits since the last time we did this). This lets the reader simply filter messages; this is especially nice since the channel_announcement timestamp is *derived*, not in the actual message. This also creates a 'struct gossip_hdr' which makes the code a bit clearer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 948490e - Browse repository at this point
Copy the full SHA 948490eView commit details -
devtools/create-gossipstore: write timestamps to the gossip_store.
We need the timestamp for channel_announcement, but this is simplified because MCP always follows the channel_announcement by a channel_update. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 2abae05 - Browse repository at this point
Copy the full SHA 2abae05View commit details -
common/gossip_store: handle timestamp filtering.
This means we intercept the peer's gossip_timestamp_filter request in the per-peer subdaemon itself. The rest of the semantics are fairly simple however. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 728bb4e - Browse repository at this point
Copy the full SHA 728bb4eView commit details -
gossipd/gossip_store: keep count of deleted entries, don't use bs->co…
…unt. We didn't count some records before, so we could compare the two counters. This is much simpler, and avoids reliance on bs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5161b79 - Browse repository at this point
Copy the full SHA 5161b79View commit details -
gossipd/gossip_store: fix compacting, don't use broadcast ordering.
We have a problem: if we get halfway through writing the compacted store and run out of disk space, we've already changed half the indexes. This changes it so we do nothing until writing is finished: then we iterate through and update indexes. It also weans us off broadcast ordering, which we can now eliminated. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for dd83453 - Browse repository at this point
Copy the full SHA dd83453View commit details -
gossipd: remove broadcast map altogether.
This clarifies things a fair bit: we simply add and remove from the gossip_store directly. Before this series: (--disable-developer, -Og) store_load_msec:20669-20902(20822.2+/-82) vsz_kb:439704-439712(439706+/-3.2) listnodes_sec:0.890000-1.000000(0.92+/-0.04) listchannels_sec:11.960000-13.380000(12.576+/-0.49) routing_sec:3.070000-5.970000(4.814+/-1.2) peer_write_all_sec:28.490000-30.580000(29.532+/-0.78) After: (--disable-developer, -Og) store_load_msec:19722-20124(19921.6+/-1.4e+02) vsz_kb:288320 listnodes_sec:0.860000-0.980000(0.912+/-0.056) listchannels_sec:10.790000-12.260000(11.65+/-0.5) routing_sec:2.540000-4.950000(4.262+/-0.88) peer_write_all_sec:17.570000-19.500000(18.048+/-0.73) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 3e733af - Browse repository at this point
Copy the full SHA 3e733afView commit details -
gossipd: trivial clean up of routing_add_channel_update.
For some reason I was reluctant to use the hc local variable; I even re-declared it! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 34c113a - Browse repository at this point
Copy the full SHA 34c113aView commit details -
gossipd: Don't abort() on duplicate entries in gossip_store.
Triggered by a previous variant of this PR, but a goo1d idea to simply discard the store in general when we get a duplicate entry. We crash trying to delete old ones, which means writing to the store. But they should have already been deleted. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f8b98e0 - Browse repository at this point
Copy the full SHA f8b98e0View commit details -
gossip_store: don't leave dangling channel_announce if we truncate.
(Or, if we crashed before we got to write out the channel_update). It's a corner case, but one reported by @darosior and reproduced on my test node (both with bad gossip_store due to previous iterations of this patchset!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 628b65f - Browse repository at this point
Copy the full SHA 628b65fView commit details -
cli/lightning-cli: free eveything on exit.
It's not required, but it means valgrind won't complain about leaks. Suggested-by: @m-schmoock Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for e902d9a - Browse repository at this point
Copy the full SHA e902d9aView commit details
Commits on Jun 5, 2019
-
newaddr: fix return value for deprecated "address" field.
It would always return bech32; fix that, and don't bother printing it if they use the (new) 'all' parameter. This API was introduced in 3e67c09, which means it wasn't in a release so no CHANGELOG entry necessary. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ba036b7 - Browse repository at this point
Copy the full SHA ba036b7View commit details
Commits on Jun 6, 2019
-
Configuration menu - View commit details
-
Copy full SHA for dd87024 - Browse repository at this point
Copy the full SHA dd87024View commit details -
Configuration menu - View commit details
-
Copy full SHA for c40250a - Browse repository at this point
Copy the full SHA c40250aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4a1938 - Browse repository at this point
Copy the full SHA a4a1938View commit details -
bitcoin/tx: script arg should be const.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 09d9abf - Browse repository at this point
Copy the full SHA 09d9abfView commit details -
common/withdraw_tx: tell caller where we put the change output.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 92da5ef - Browse repository at this point
Copy the full SHA 92da5efView commit details -
bip32_pubkey: use more widely, don't open-code.
As a side-effect, we now only add txfilters for addresses we actually expose, rather than always filtering for both p2sh and native segwit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for aa21eea - Browse repository at this point
Copy the full SHA aa21eeaView commit details -
lightningd: add json_add_tx helper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 7e02fbe - Browse repository at this point
Copy the full SHA 7e02fbeView commit details -
wallet: make withdraw parsing more strict.
We generally want to do as much validation as possible inside parameter parsing, as that means the 'check' command detects more erroneous uses. In this case, we can try to interpret the destination address as soon as we encounter it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 663315c - Browse repository at this point
Copy the full SHA 663315cView commit details -
wtx_select_utxos: use wallet_tx as our allocation context for utxos.
We currently allocate utxos off cmd, but the next commit will persist a wtx beyond the command which created it, breaking that assumption. In general, a struct member should be owned by the struct itself, and a tal context should be an explicit arg, not implicit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 3b91a6f - Browse repository at this point
Copy the full SHA 3b91a6fView commit details -
pytest: move wallet tests into new file tests/test_wallet.py
We're going to add some more. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0543149 - Browse repository at this point
Copy the full SHA 0543149View commit details -
common/utxo: don't memleak script.
We currently always free the tx, so we didn't notice, but the coming changes uncovered this leak. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ffa8463 - Browse repository at this point
Copy the full SHA ffa8463View commit details -
wallet: keep a list of unreleased transactions.
We're going to use this in the next patch. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 1a3886c - Browse repository at this point
Copy the full SHA 1a3886cView commit details -
wallet: new commands 'txprepare', 'txsend' and 'txdiscard'.
This allows you to prepare a tx, then release or discard it later. Shares almost all the code with json_withdraw (which is now technically superfluous). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 985048e - Browse repository at this point
Copy the full SHA 985048eView commit details -
pylightning: interfaces for txprepare/txsend/txdiscard.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 403b861 - Browse repository at this point
Copy the full SHA 403b861View commit details -
pytest: test txprepare/txdiscard/txsend.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for cdab75e - Browse repository at this point
Copy the full SHA cdab75eView commit details -
pytest: test that we unreserve txprepare inputs across shutdown/crash.
We fail this at the moment, since we rely on shutdown to do the cleanups for us. (Also had to fix the unclean shutdown path: the caller checks the rc unless mayfail is set, and of course it's not zero since we just SIGTERM'd it). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 65505ad - Browse repository at this point
Copy the full SHA 65505adView commit details -
wallet: clean reserved inputs on startup.
We reserve inputs when we're going to send a transaction, but we don't unreserve them if we crash. This is most graphically demonstrated by the txprepare case, which makes it easier to trigger. Instead, we should query bitcoind to see whether the tx made it out or not, as we would do manually with dev-rescan-outputs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for e1dbc0b - Browse repository at this point
Copy the full SHA e1dbc0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for bbedd38 - Browse repository at this point
Copy the full SHA bbedd38View commit details -
Travis: set all vars inside build.sh, and increase parallelism for DE…
…VELOPER=0 We currently set TIMEOUT and PYTEST_PAR in our Travis instance directly, which is a bit unhelpful. In particular, parallelism should be increased when DEVELOPER isn't set since we spend 60 seconds waiting for gossip in many cases. If this doesn't stop timeouts, I'll have to mark more tests SLOW_MACHINE :( 331.24s call tests/test_connection.py::test_opening_tiny_channel 245.45s call tests/test_gossip.py::test_gossip_store_load_complex 215.35s call tests/test_invoices.py::test_invoice_routeboost 194.04s call tests/test_plugin.py::test_htlc_accepted_hook_forward_restart 182.62s call tests/test_plugin.py::test_htlc_accepted_hook_fail 182.02s call tests/test_plugin.py::test_htlc_accepted_hook_resolve 182.01s call tests/test_pay.py::test_pay_limits 159.10s call tests/test_gossip.py::test_gossip_notices_close 153.94s call tests/test_connection.py::test_peerinfo 121.62s call tests/test_invoices.py::test_invoice_preimage 121.46s call tests/test_gossip.py::test_gossipwith 120.76s call tests/test_pay.py::test_setchannelfee_all 120.61s call tests/test_connection.py::test_second_channel 120.42s call tests/test_closing.py::test_closing_id 120.39s call tests/test_gossip.py::test_gossip_addresses 120.39s call tests/test_gossip.py::test_gossip_weirdalias Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for aaf41ad - Browse repository at this point
Copy the full SHA aaf41adView commit details
Commits on Jun 7, 2019
-
plugin: Add new notification type: warning
This notification bases on `LOG_BROKEN` and `LOG_UNUSUAL` level log. --Introduction A notification for topic `warning` is sent every time a new `BROKEN`/ `UNUSUAL` level(in plugins, we use `error`/`warn`) log generated, which means an unusual/borken thing happens, such as channel failed, message resolving failed... ```json { "warning": { "level": "warn", "time": "1559743608.565342521", "source": "lightningd(17652): 0821f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c chan #7854:", "log": "Peer permanent failure in CHANNELD_NORMAL: lightning_channeld: sent ERROR bad reestablish dataloss msg" } } ``` 1. `level` is `warn` or `error`: `warn` means something seems bad happened and it's under control, but we'd better check it; `error` means something extremely bad is out of control, and it may lead to crash; 2. `time` is the second since epoch; 3. `source`, in fact, is the `prefix` of the log_entry. It means where the event happened, it may have the following forms: `<node_id> chan #<db_id_of_channel>:`, `lightningd(<lightningd_pid>):`, `plugin-<plugin_name>:`, `<daemon_name>(<daemon_pid>):`, `jsonrpc:`, `jcon fd <error_fd_to_jsonrpc>:`, `plugin-manager`; 4. `log` is the context of the original log entry. --Note: 1. The main code uses `UNUSUAL`/`BROKEN`, and plugin module uses `warn` /`error`, considering the consistency with plugin, warning choose `warn` /`error`. But users who use c-lightning with plugins may want to `getlog` with specified level when receive warning. It's the duty for plugin dev to turn `warn`/`error` into `UNUSUAL`/`BROKEN` and present it to the users, or pass it directly to `getlog`; 2. About time, `json_log()` in `log` module uses the Relative Time, from the time when `log_book` inited to the time when this event happend. But I consider the `UNUSUAL`/`BROKEN` event is rare, and it is very likely to happen after running for a long time, so for users, they will pay more attention to Absolute Time. -- Related Change 1. Remove the definitions of `log`, `log_book`, `log_entry` from `log.c` to `log.h`, then they can be used in warning declaration and definition. 2. Remove `void json_add_time(struct json_stream *result, const char *fieldname, struct timespec ts)` from `log.c` to `json.c`, and add related declaration in `json.h`. Now the notification function in `notification.c` can call it. 2. Add a pointer to `struct lightningd` in `struct log_book`. This may affect the independence of the `log` module, but storing a pointer to `ld` is more direct;
Configuration menu - View commit details
-
Copy full SHA for 231703c - Browse repository at this point
Copy the full SHA 231703cView commit details -
log: add 'warning' notification when log
- Related Changes for `warning` notification Add a `bool` type parameter in `log_()` and `lov()`, this `bool` flag indicates if we should call `warning` notifier. 1) The process of copying `log_book` of every peer to the `log_book` of `ld` is usually included in `log_()` and `lov()`, and it may lead to repeated `warning` notification. So a `bool`, which explicitly indicates if the `warning` notification is disabled during this call, is necessary . 2) The `LOG_INFO` and `LOG_DEBUG` level don't need to call warning, so set that `bool` paramater as `FALSE` for these log level and only set it as `TRUE` for `LOG_UNUAUSL`/`LOG_BROKEN`. As for `LOG_IO`, it use `log_io()` to log, so we needn't think about notifier for it.
Configuration menu - View commit details
-
Copy full SHA for 96135da - Browse repository at this point
Copy the full SHA 96135daView commit details -
pytest: Add a test for the 'warning' subscription and notification
1. Create a plugin: ./lightning/tests/plugins/pretend_badlog.py This plugin subscribes 'warning' notification and log the payload of 'warning'; 2. Add a new test: tests/test_plugin.py::test_warning_notification This test runs the plugin-pretend_badlog.py and check if 'warning' notification can be normal triggered and subscribed.
Configuration menu - View commit details
-
Copy full SHA for 4d08ed2 - Browse repository at this point
Copy the full SHA 4d08ed2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ca0eef - Browse repository at this point
Copy the full SHA 1ca0eefView commit details -
pytest: fix test_hlcs_cltv_only_difference
Broken by 909913c, but since Travis skips this test ("temporarily", according to the commit msg in January!) it wasn't caught. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for a3b646b - Browse repository at this point
Copy the full SHA a3b646bView commit details -
lightningd/channel_control: fix reached_announce_depth counting in pe…
…er_start_channeld Fixes a corner case when reconnecting (which restarts channeld) at depth=6 where we didn't correctly send/respond with announce_signatures. NOTE: A complete restart of node may initialize channeld with unupdated height because of an unfinished rescan. But when rescan is finished, funding tx_watch is fired (at least once), which then tells channeld the latest depth.
Configuration menu - View commit details
-
Copy full SHA for a9dd690 - Browse repository at this point
Copy the full SHA a9dd690View commit details -
pytest: add test_reconnect_remote_sends_no_sigs, which tests PR2619
Remote node may (incorrectly) not send announcement_signatures when reconnecting, so we we use a copy and can still re-announce. Also checks that we still send our announcement_signatures when reconnecting.
Configuration menu - View commit details
-
Copy full SHA for b1058df - Browse repository at this point
Copy the full SHA b1058dfView commit details -
pytest: cleanup test_funding_reorg_remote_lags
- mock_rpc function now returns full JSON-RPC response, is much cleaner - Since reached_announce_depth counting is fixed when starting channeld, we don't need the 7th block to tell depth anymore.
Configuration menu - View commit details
-
Copy full SHA for ea8a508 - Browse repository at this point
Copy the full SHA ea8a508View commit details -
lightningd/channel_control logline fixup
channeld/channel_wire.csv add missing newline
Configuration menu - View commit details
-
Copy full SHA for 44d64c1 - Browse repository at this point
Copy the full SHA 44d64c1View commit details -
configure: fix --reconfigure, improve style, set defaults in one place.
I noticed that DEVELOPER was being reset to 0 by ./configure --reconfigure; that's because we set the defaults first, then --reconfigure would only override *unset* vars. We now set up defaults last. We unify all our "find the default" functions, to neaten them; in particular find_pytest and our open-coded valgrind testing function. We can figure out whether valgrind works using /bin/true instead of waiting until configurator is built. We're also more careful with ${FOO-default} vs ${FOO:-default}; the former does not replace if FOO is set to the empty string, which is possible for some of our settings (COPTFLAGS, CDEBUGFLAGS in particular). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 54b66f0 - Browse repository at this point
Copy the full SHA 54b66f0View commit details -
CHANGELOG: Fix typo in @cdecker's name.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for d65946a - Browse repository at this point
Copy the full SHA d65946aView commit details -
devtools/credit: script to highlight contributions for this commit.
And update MAKING-RELEASES.md to refer to it Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0e7b26d - Browse repository at this point
Copy the full SHA 0e7b26dView commit details -
txfilter: Migrate the list of owned scriptPubKeys into a hashset
I was bumping against some blocksync performance issues with 12k+ keys, 24k+ scriptpubkeys being checked against, and migrating that list to a hashset is an easy fix to shave off 99% of the time to process a block. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ec2ced1 - Browse repository at this point
Copy the full SHA ec2ced1View commit details
Commits on Jun 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 9e98d01 - Browse repository at this point
Copy the full SHA 9e98d01View commit details -
db: Add channel_id and type to the transactions table
Mainly used to differentiate channel-related transactions from on-chain wallet transactions. Will be used to filter `listtransaction` results and bundle transactions that belong to the same channel. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1e2291c - Browse repository at this point
Copy the full SHA 1e2291cView commit details -
wallet: Add function to annotate transactions aposteriori
Since we add the transactions while processing the blockchain, and before we have enough context to annotate them correctly, i.e., in the txwatches, we add them first and then annotate them aposteriori. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ad4b920 - Browse repository at this point
Copy the full SHA ad4b920View commit details -
channel: Along with the last_tx also remember its type
This takes the guesswork out of `drop_to_chain` and allows us to annotate the last_tx consistently. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4c57d44 - Browse repository at this point
Copy the full SHA 4c57d44View commit details -
chaintopology: Annotate transactions as deposits if we owned outputs
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 771ff1f - Browse repository at this point
Copy the full SHA 771ff1fView commit details -
wallet: Store and annotate withdrawals in the DB
We weren't storing them so far, which is sub-optimal :-) Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 04c255f - Browse repository at this point
Copy the full SHA 04c255fView commit details -
wallet: Annotate funding transaction in the database
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7f898aa - Browse repository at this point
Copy the full SHA 7f898aaView commit details -
onchaind: Store and annotate close transaction when we drop to chain
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 05dbf1a - Browse repository at this point
Copy the full SHA 05dbf1aView commit details -
onchaind: Store and annotate transactions we broadcast ourselves
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ae0bc4a - Browse repository at this point
Copy the full SHA ae0bc4aView commit details -
onchaind: Allow onchaind to annotate transactions we watch
This is important for things we automatically watched because it spends a watch txo, but only onchaind knows the details about what the TX really is and how it should be handled. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a54b7da - Browse repository at this point
Copy the full SHA a54b7daView commit details -
onchaind: Have onchaind annotate htlc-{succes,failure} and penalties
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 94e024a - Browse repository at this point
Copy the full SHA 94e024aView commit details -
onchaind: Annotate their sweep transactions
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 49a0de7 - Browse repository at this point
Copy the full SHA 49a0de7View commit details -
openingd: Annotate our own funding transaction
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 61a28cc - Browse repository at this point
Copy the full SHA 61a28ccView commit details -
onchaind: Have onchaind annotate unilateral, cheat and mutual closes
onchaind knows best, no need to guess outside. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 605358f - Browse repository at this point
Copy the full SHA 605358fView commit details -
wallet: Add function to retrieve transactions from the wallet
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6efb1c0 - Browse repository at this point
Copy the full SHA 6efb1c0View commit details -
json-rpc: Add
listtransactions
RPC methodSigned-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3c777fa - Browse repository at this point
Copy the full SHA 3c777faView commit details -
wallet: Rip out the txtypes type in favor of enum wallet_tx_type
Suggested-by: Rusty Russell <@rustyrussell> Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b6b548a - Browse repository at this point
Copy the full SHA b6b548aView commit details
Commits on Jun 9, 2019
-
pytest: test for duplicate update_fee spam.
Reported-by: @pm47 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for d344f9d - Browse repository at this point
Copy the full SHA d344f9dView commit details -
channeld: don't send feerate spam if we can't set it as high as we want.
@pm47 gave a great bug report showing c-lightning sending the same UPDATE_FEE over and over, with the final surprise result being that we blamed the peer for sending us multiple empty commits! The spam is caused by us checking "are we at the desired feerate?" but then if we can't afford the desired feerate, setting the feerate we can afford, even though it's a duplicate. Doing the feerate cap before we test if it's what we have already eliminates this. But the empty commits was harder to find: it's caused by a heuristic in channel_rcvd_revoke_and_ack: ``` /* For funder, ack also means time to apply new feerate locally. */ if (channel->funder == LOCAL && (channel->view[LOCAL].feerate_per_kw != channel->view[REMOTE].feerate_per_kw)) { status_trace("Applying feerate %u to LOCAL (was %u)", channel->view[REMOTE].feerate_per_kw, channel->view[LOCAL].feerate_per_kw); channel->view[LOCAL].feerate_per_kw = channel->view[REMOTE].feerate_per_kw; channel->changes_pending[LOCAL] = true; } ``` We assume we never send duplicates, so we detect an otherwise-empty change using the difference in feerates. If we don't set this flag, we will get upset if we receive a commitment_signed since we consider there to be no changes to commit. This is actually hard to test: the previous commit adds a test which spams update_fee and doesn't trigger this bug, because both sides use the same "there's nothing outstanding" logic. Fixes: ElementsProject#2701 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 6f015b6 - Browse repository at this point
Copy the full SHA 6f015b6View commit details -
json: Add wrapper to add a secret to a JSON result
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c91483f - Browse repository at this point
Copy the full SHA c91483fView commit details -
plugin: Use the json_add_secret wrapper to add the shared_secret
This was incorrectly handled before, hence the wrapper which checks correctness of the arguments. Signed-off-by: Christian Decker <decker.christian@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9e511cb - Browse repository at this point
Copy the full SHA 9e511cbView commit details
Commits on Jun 10, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 42d6bf5 - Browse repository at this point
Copy the full SHA 42d6bf5View commit details -
gossip: bump version to remove lingering issues with master.
There were several gossip breakages in master; bumping version means upgrades get a clean store (not just those upgrading from stable version). Fixes: ElementsProject#2719 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for db0a285 - Browse repository at this point
Copy the full SHA db0a285View commit details
Commits on Jun 11, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 4a242ed - Browse repository at this point
Copy the full SHA 4a242edView commit details -
listchannels: add
htlc_minimum_msat
andhtlc_maximum_msat
fields.Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for b48c644 - Browse repository at this point
Copy the full SHA b48c644View commit details -
tests: add plugin for simple invoice delay.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 380c044 - Browse repository at this point
Copy the full SHA 380c044View commit details -
pytest: move test_channel_drainage to test_pay.py
This is where payment tests should go. Also mark it xfail for the moment, and remove developer-only tag (propagating gossip is only 60 seconds, which is OK). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 409368e - Browse repository at this point
Copy the full SHA 409368eView commit details -
pytest: extract separate tests that spendable_msat is accurate.
Turns out we needed more comprehensive testing; we ended up with three separate tests. To avoid changing test_channel_drainage as we fix spendable_msat, I substituted raw numbers there. The first is a variation of the existing tests, testing we can't exceed spendable_msat, and we can pay it, both ways. The second is with a larger amount, which triggers a different problem. The final is with a giant channel, which tests our 2^32-1 msat cap. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 7b7d46c - Browse repository at this point
Copy the full SHA 7b7d46cView commit details -
channeld: extract HTLC trim logic into common.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for e7778a0 - Browse repository at this point
Copy the full SHA e7778a0View commit details -
lightningd: make 'spendable_msatoshi' more realistic.
Take into account the fee we'd have to pay if we're the funder, and also drop to 0 if the amount is less than the smallest HTLC the peer will accept. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ad24d94 - Browse repository at this point
Copy the full SHA ad24d94View commit details -
gossipd: don't charge ourselves fees when calculating route.
This means there's now a semantic difference between the default `fromid` and setting `fromid` explicitly to our own node_id. In the default case, it means we don't charge ourselves fees on the route. This means we can spend the full channel balance. We still want to consider the pricing of local channels, however: there's a *reason* to discount one over another, and that is to bias things. So we add the first-hop fee to the *risk* value instead. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ab31f40 - Browse repository at this point
Copy the full SHA ab31f40View commit details -
lightningd: take into account outstanding HTLCs for 'spendable_msat'
The current calculation ignores them, which is unrealistic. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for bb6c34f - Browse repository at this point
Copy the full SHA bb6c34fView commit details -
lightningd: don't let spendable_msat go wumbo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0448608 - Browse repository at this point
Copy the full SHA 0448608View commit details -
channeld: don't subtract both reserves from advertized htlc_max.
Subtracting both arbitrarily reduces our capacity, even for ourselves since the routing logic uses this maximum. I also changed 'advertise' to 'advertize', since we use american spelling. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 431401a - Browse repository at this point
Copy the full SHA 431401aView commit details -
channeld: don't add HTLCs if that would drive us negative.
We track whether each change is affordable as we go; test_channel_drainage got us so close that the difference mattered; we hit an assert when we tried to commit the tx and realized we couldn't afford it. We should not be trying to add an HTLC if it will result in the funder being unable to afford it on either the local *or remote* commitments. Note the test still "fails" because it refuses to send the final payment. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 1275928 - Browse repository at this point
Copy the full SHA 1275928View commit details -
pytest: simplify and annotate test_channel_drainage.
Remove gratuitous prints, add explanations of what's going on, and demonstrate that we can add a final trimmed HTLC but not a non-trimmed one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for db22d2b - Browse repository at this point
Copy the full SHA db22d2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca4b07c - Browse repository at this point
Copy the full SHA ca4b07cView commit details -
fundchannel: Add a new 'utxo' parameter
This new parameter takes a list of outpoints (as txid:vout) and fund a channel from the corresponding utxos. Example : fundchannel <id> 10000 normal 1 [10767f0db0e568127fffd7f70a154d4599f42d62babf63230a7c3378bfce3cb0:0, c9e040e0b5fc8c59d5e7834108fbc5583001f414dd83faf0a05cff9d1a92d32c:0]
Configuration menu - View commit details
-
Copy full SHA for ac038b3 - Browse repository at this point
Copy the full SHA ac038b3View commit details -
fundchannel: Update the manpage and Pylightning's method
Add the new 'utxo' parameter to both
Configuration menu - View commit details
-
Copy full SHA for 1b29b06 - Browse repository at this point
Copy the full SHA 1b29b06View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2436214 - Browse repository at this point
Copy the full SHA 2436214View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ce4fcd - Browse repository at this point
Copy the full SHA 7ce4fcdView commit details -
ccan: update to faster and correct crc32c implementation.
I decided to try a faster implementation, only to find our crc32c was not correct! Ouch. I removed the crc32c functions from ccan/crc, and added a new crc32c module which has the Mark Adler x86-64-optimized variants. We bump gossip_store version again, since csums have changed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0d2a483 - Browse repository at this point
Copy the full SHA 0d2a483View commit details
Commits on Jun 12, 2019
-
gossipd: note if loaded store seems reasonably up-to-date.
If not, we can ask peers for full gossip (for now we just set a flag). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 21c920a - Browse repository at this point
Copy the full SHA 21c920aView commit details -
gossipd: prepare for internally-generated short-channel-id queries.
Up until now we only generated these in dev mode for testing. Hoist into common code, turn counter into a flag (we're only allowed one!) and note if query is internal or not. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5ef7aa7 - Browse repository at this point
Copy the full SHA 5ef7aa7View commit details -
gossipd: APIs return more information about routing message handling.
In particular, we'll need to know the short_channel_id if a channel_update is unknown (implies we're missing a channel), and whether processing a pending channel_announcement was successful (implies that the channel was real). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 18069ab - Browse repository at this point
Copy the full SHA 18069abView commit details -
gossipd: query unknown short_channel_ids, note if they were really mi…
…ssing. The first sign that we're missing gossip is that we get a channel_update for an unknown channel. The peer might be wrong (or lying), but if it turns out to be a real channel, we were definitely missing something. This patch does two things: queries when we get an unknown channel_update, and then notes that a channel_announcement was from such an update when it's finally processed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for b905376 - Browse repository at this point
Copy the full SHA b905376View commit details -
gossipd: reset gossip_missing if no reports for 10 minutes.
An arbitrary timeout. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f5ea57d - Browse repository at this point
Copy the full SHA f5ea57dView commit details -
gossipd: control gossip level so we don't get flooded by peers.
We seek a certain number of peers at each level of gossip; 3 "flood" if we're missing gossip, 2 at 24 hours past to catch recent gossip, and 8 with current gossip. The rest are given a filter which causes them not to gossip to us at all. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 6830233 - Browse repository at this point
Copy the full SHA 6830233View commit details -
gossipd: adjust gossip filters if we discover we're missing gossip.
We pick up to three random peers and ask them to gossip more. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 1e32b4a - Browse repository at this point
Copy the full SHA 1e32b4aView commit details -
plugins/pay: fix attempt counter on failure message.
An "attempt" is when we actually try to send, not every route lookup we do. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 260febd - Browse repository at this point
Copy the full SHA 260febdView commit details -
plugins/pay: don't retry routehint if it contains already-eliminated …
…channel. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 26cdf9d - Browse repository at this point
Copy the full SHA 26cdf9dView commit details -
ccan: import ccan/json_out and ccan/json_escape.
These are generalized from our internal implementations. The main difference is that 'struct json_escaped' is now 'struct json_escape', so we replace that immediately. The difference between lightningd's json-writing ringbuffer and the more generic ccan/json_out is that the latter has a better API and handles escaping transparently if something slips through (though it does offer direct accessors so you can mess things up yourself!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 220449e - Browse repository at this point
Copy the full SHA 220449eView commit details -
libplugin: use json_out internally.
Since this handles escaping for us, this automatically fixes our previous escaping issued. Fixes: ElementsProject#2612 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c77e29c - Browse repository at this point
Copy the full SHA c77e29cView commit details -
libplugin: update API to use json_out.
We now hand around struct json_out members, rather than using formatted strings, so plugins need to construct them properly. There's no automatic conversion between ' and " any more, so those are eliminated too. pay still uses some manual construction of elements. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c585f22 - Browse repository at this point
Copy the full SHA c585f22View commit details -
plugins/pay: use proper JSON construction for failure paths.
The string cut & paste hack was nasty; make ->failure a json_out object so we can splice it in properly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 0e336ac - Browse repository at this point
Copy the full SHA 0e336acView commit details -
lightningd: have json_stream_success start the "result" object.
"result" should always be an object (so that we can add new fields), so make that implicit in json_stream_success. This makes our primitives well-formed: we previously used NULL as our fieldname when calling the first json_object_start, which is a hack since we're actually in an object and the fieldname is 'result' (which was already written by json_object_start). There were only two cases which didn't do this: 1. dev-memdump returned an array. No API guarantees on this. 2. shutdown returned a string. I temporarily made shutdown return an empty object, which shouldn't break anything, but I want to fix that later anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for bb7bbd0 - Browse repository at this point
Copy the full SHA bb7bbd0View commit details -
pylightning: remove 0.6.2 JSON compat wedge.
The next commit breaks it: `if b' }\n' not in buff:` is always true since we're about to clean up our JSON so there won't be a space. I could have hacked the space in our JSON, but 6 months is long enough anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for adc4bf1 - Browse repository at this point
Copy the full SHA adc4bf1View commit details -
lightningd: tighten interal json_stream API.
Move it closer to ccan/json_out, in preparation for using that as a replacement. In particular: 1. Add a 'quote' field in json_add_member. 2. json_add_member now always escapes if 'quote' is true. 3. json_member_direct is exposed to allow avoiding of escaping. 4. json_add_hex can use this, so no longer needs to be in json_stream.c. 5. We don't make JSON manually, but always use helpers. 6. We now flush the stream (wake reader) only when we close it, or mark command as pending. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 7f75043 - Browse repository at this point
Copy the full SHA 7f75043View commit details -
lightningd: use ccan/json_out.
This is now a fairly simple transition, which only effects the internals of json_stream. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for d817735 - Browse repository at this point
Copy the full SHA d817735View commit details -
jsonrpc: don't return "stop" until we actually have freed resources.
This is a painpoint with testing, that there's a noticable delay between "Shutting down" from lightning-cli and being able to restart lightningd. This fixes that by creating a canned response for this case, which is simply written out immediately before exit. At this point, the pidfile has been deleted, the sockets have been closed, and the database has been closed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c6ec944 - Browse repository at this point
Copy the full SHA c6ec944View commit details -
plugin: don't call notification after free.
This is an old bug, where a plugin can get called while we're shutting down (and have freed plugins), but it's triggered more reliably by the new warning notification hook. For good measure, we also make freeing a plugin self-delete. Valgrind error file: valgrind-errors.16763 ==16886== Invalid read of size 8 ==16886== at 0x422919: plugins_notify (plugin.c:1096) ==16886== by 0x413919: notify_warning (notification.c:61) ==16886== by 0x412BDE: logv (log.c:251) ==16886== by 0x412A98: log_ (log.c:311) ==16886== by 0x4044BE: bcli_finished (bitcoind.c:178) ==16886== by 0x459480: destroy_conn (poll.c:244) ==16886== by 0x459499: destroy_conn_close_fd (poll.c:250) ==16886== by 0x4619E1: notify (tal.c:235) ==16886== by 0x461A7E: del_tree (tal.c:397) ==16886== by 0x461AB5: del_tree (tal.c:407) ==16886== by 0x461AB5: del_tree (tal.c:407) ==16886== by 0x461AB5: del_tree (tal.c:407) ==16886== Address 0x634a578 is 40 bytes inside a block of size 352 free'd ==16886== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16886== by 0x461AFD: del_tree (tal.c:416) ==16886== by 0x461FB7: tal_free (tal.c:481) ==16886== by 0x411E0A: main (lightningd.c:841) ==16886== Block was alloc'd at ==16886== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16886== by 0x4617CE: allocate (tal.c:245) ==16886== by 0x461E4C: tal_alloc_ (tal.c:423) ==16886== by 0x42255E: plugins_new (plugin.c:106) ==16886== by 0x41133D: new_lightningd (lightningd.c:218) ==16886== by 0x411AD4: main (lightningd.c:649) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5a520f4 - Browse repository at this point
Copy the full SHA 5a520f4View commit details -
common: pull out scriptPubkey address method
We're going to need this for P2WSH scripts. pull it out into a common file plus adopt the sanity checks so that it will allow for either P2WSH or P2WPKH (previously only encoded P2WPKH scripts)
Configuration menu - View commit details
-
Copy full SHA for a9d0550 - Browse repository at this point
Copy the full SHA a9d0550View commit details -
json: correct error message for param parser
Looks like copy-paste from another commit didn't update the field for this
Configuration menu - View commit details
-
Copy full SHA for eb0b3d7 - Browse repository at this point
Copy the full SHA eb0b3d7View commit details -
tests: default all addresses to bech32
Needed for composing a transaction externally to c-lightning, using bitcoind util.
Configuration menu - View commit details
-
Copy full SHA for 1b2a593 - Browse repository at this point
Copy the full SHA 1b2a593View commit details -
openingd: allow funding_failed to complete successfully
For the `fundchannel_cancel` we're going to want to 'successfully' fail a funding channel operation. This allows us to report it a failure back as an RPC success, instead of automatically failing the RPC request.
Configuration menu - View commit details
-
Copy full SHA for 846bc9c - Browse repository at this point
Copy the full SHA 846bc9cView commit details -
opening: add entry point for `funding_start rpc command
Beginnings of wiring up the funding_start rpc command. missing the part that actually starts the funding channel dance.
Configuration menu - View commit details
-
Copy full SHA for 8103acd - Browse repository at this point
Copy the full SHA 8103acdView commit details -
openingd: pull out setup funder checks into separate method
Useful for adding the funder_start stuff
Configuration menu - View commit details
-
Copy full SHA for 685aa47 - Browse repository at this point
Copy the full SHA 685aa47View commit details -
opening: wire up walking through open channel up thru accept
Fill in details to make fundchannel_start work.
Configuration menu - View commit details
-
Copy full SHA for 5920e65 - Browse repository at this point
Copy the full SHA 5920e65View commit details -
pylightning: add fundchannel_start
Add method to rpc handler
Configuration menu - View commit details
-
Copy full SHA for 23e7846 - Browse repository at this point
Copy the full SHA 23e7846View commit details -
openingd: update billboard with funding info
Make it easier for a user to know what's going on with a channel in `listpeers`.
Configuration menu - View commit details
-
Copy full SHA for 6e5928a - Browse repository at this point
Copy the full SHA 6e5928aView commit details -
opening: stash amount outside of the wtx
Some channels won't be opened with a wtx struct, so keep the total funding amount separate from it so we can show some stats for listpeers. Note that we're going to need to update/confirm this once the transaction gets confirmed.
Configuration menu - View commit details
-
Copy full SHA for 52042bd - Browse repository at this point
Copy the full SHA 52042bdView commit details -
lightningd: add start for fundchannel_continue
Add an RPC method (not working at the moment) called `fundchannel_continue` that takes as its parameters a node_id and a txid for a transaction (that ostensibly has an output for a channel)
Configuration menu - View commit details
-
Copy full SHA for dd11d3b - Browse repository at this point
Copy the full SHA dd11d3bView commit details -
test: add initial tests for starting an external fundchannel
Test for getting through the address generation portion.
Configuration menu - View commit details
-
Copy full SHA for b0b813a - Browse repository at this point
Copy the full SHA b0b813aView commit details -
fundchannel: add txout field to RPC/API
We'll need the outpoint for the funding output.
Configuration menu - View commit details
-
Copy full SHA for 7ea21c3 - Browse repository at this point
Copy the full SHA 7ea21c3View commit details -
funding: add a 'inflight' marker
We need a way to gate allowing continue to proceed or not
Configuration menu - View commit details
-
Copy full SHA for 8a60caa - Browse repository at this point
Copy the full SHA 8a60caaView commit details -
funding: wire up funding_continue
Big wiring re-org for funding-continue In openingd, we move the 'persistent' state (their basepoints, pubkey, and the minimum_depth requirement for the opening tx) into the state object. We also look to keep code-reuse between 'continue' and normal 'fundchannel' as high as possible. Both of these call the same 'fundchannel_reply' at the end. In opening_control.c, we remap fundchannel_reply such that it is now aware of the difference between an external/internally funded channel open. It's the same return path, with the difference that one finishes making and broadcasting the funding transaction; the other is skips this.
Configuration menu - View commit details
-
Copy full SHA for 478762d - Browse repository at this point
Copy the full SHA 478762dView commit details -
opening: add fundchannel_cancel command
Provide the option to cancel a funding-opening with a peer. Must either call `fundchannel_cancel` or `fundchannel_continue`
Configuration menu - View commit details
-
Copy full SHA for 5aad642 - Browse repository at this point
Copy the full SHA 5aad642View commit details -
tests: finish up test for external funding flow
Add to test for fundchannel with composing and broadcasting an external transaction.
Configuration menu - View commit details
-
Copy full SHA for 3ae78a6 - Browse repository at this point
Copy the full SHA 3ae78a6View commit details -
funding: rename fundchannel_continue -> _complete
Renaming. "complete" more accurately describes what we're doing here.
Configuration menu - View commit details
-
Copy full SHA for c00e0d2 - Browse repository at this point
Copy the full SHA c00e0d2View commit details -
funding: update CHANGELOG with new RPC calls
Let people know what's changed
Configuration menu - View commit details
-
Copy full SHA for 388f31a - Browse repository at this point
Copy the full SHA 388f31aView commit details -
doc: add manpages for fundchannel_[start,complete,cancel]
Manpages for the manpage-god!!
Configuration menu - View commit details
-
Copy full SHA for c0475d0 - Browse repository at this point
Copy the full SHA c0475d0View commit details -
openingd: fix compile error caused by merge.
Compile broke because we were using low-level JSON primitives here (which, incidentally, would produce bad JSON now, since we can't just put a raw string inside an object!). Use json_add_string, which also has the benefit of escaping JSON for us. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 4c118bc - Browse repository at this point
Copy the full SHA 4c118bcView commit details -
openingd_control: fix merge error with json_stream_success.
That was changed to start the response object, which broke the openingd code once we merged. Of course, I should have *renamed it* when I changed the semantic! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for e9ff8e4 - Browse repository at this point
Copy the full SHA e9ff8e4View commit details
Commits on Jun 13, 2019
-
lightningd: fix bogus channel iteration on setchannelfee
Setting channel to NULL then iterating doesn't work! Fixes: ElementsProject#2733 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 67eb26c - Browse repository at this point
Copy the full SHA 67eb26cView commit details -
gossipd: don't catch pending node_announcements more than once.
We catch node_announcements for nodes where we haven't finished analyzing the channel_announcement yet (either because we're still checking UTXO, or in this case, because we're waiting for a channel_update). But we reference count the pending_node_announce, so if we have multiple channels pending, we might try to insert it twice. Clear it so this doesn't happen. There's a second bug where we continue to catch node_announcements until *all* the channel_announcements are no longer pending; this is fixed by removing it from the map. Fixes: ElementsProject#2735 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 745634d - Browse repository at this point
Copy the full SHA 745634dView commit details -
CHANGELOG.md: reorder with most impactful changes at top.
And reword a few for consistency. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for bbbe2f5 - Browse repository at this point
Copy the full SHA bbbe2f5View commit details -
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for ea1c52f - Browse repository at this point
Copy the full SHA ea1c52fView commit details
Commits on Jun 14, 2019
-
pytest: add (xfail) test for store load miscount.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 12a523f - Browse repository at this point
Copy the full SHA 12a523fView commit details -
gossipd: count deleted records correctly when loading gossip_store.
The result of an incorrect count was that we failed on next compaction. Fixes: ElementsProject#2743 Fixes: ElementsProject#2742 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for eb5cc47 - Browse repository at this point
Copy the full SHA eb5cc47View commit details -
gossipd: gossip_store errors after rewrite are fatal.
We can't continue, since we've moved the indexes. We'll just crash anyway, as seen from bugs ElementsProject#2742 and ElementsProject#2743. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 24cc371 - Browse repository at this point
Copy the full SHA 24cc371View commit details -
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 57405d7 - Browse repository at this point
Copy the full SHA 57405d7View commit details
Commits on Jun 15, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 8edf55b - Browse repository at this point
Copy the full SHA 8edf55bView commit details -
pytest: gossip_store test for node_announcement before update.
We pass, but this test should have been added a while ago with the fix. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 909f22f - Browse repository at this point
Copy the full SHA 909f22fView commit details -
pytest: gossip_store test for channel_amount truncated.
We pass, but this test should have been added a while ago with the original code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for a35ab51 - Browse repository at this point
Copy the full SHA a35ab51View commit details -
pytest: add test for dangling channel_announcement/node_announcement …
…after gossip_store. This can happen if the store was truncated. Reported-by: @jb55 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for adc52b6 - Browse repository at this point
Copy the full SHA adc52b6View commit details -
gossip_store: clean up a truncated store.
We might have channel_announcements which have no channel_update: normally these don't get written into the store until there is one, but if the store was truncated it can happen. We then get upset on compaction, since we don't have an in-memory representation of the channel_announcement. Similarly, we leave the node_announcement pending until after that channel_announcement, leading to a similar case. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 10c503b - Browse repository at this point
Copy the full SHA 10c503bView commit details -
gossipd: delete channel_amount from the store when we delete channel_…
…announcement. Otherwise we slowly build up cruft: compaction simply moves them since they're not deleted. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 5e3690b - Browse repository at this point
Copy the full SHA 5e3690bView commit details
Commits on Jun 17, 2019
-
plugins doc: remove the 'only string options' warning
int and bool are now also accepted ! :)
Configuration menu - View commit details
-
Copy full SHA for da676ba - Browse repository at this point
Copy the full SHA da676baView commit details -
lightningd: restore ' ' before '}' for older pylightning.
It needs this in compat mode to detect old (pre-0.6.3) end of JSON. But it always does the first command in compat mode. This was never really reliable, since the first command could be to a plugin for which we simply pass through the JSON (though, carefully appending the expected '\n\n' if not already there). Reported-by: @laanwj Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 841fba7 - Browse repository at this point
Copy the full SHA 841fba7View commit details
Commits on Jun 18, 2019
-
CHANGELOG.md: note the db_write hook and listtransactions command.
Reported-by: @cdecker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 77018e6 - Browse repository at this point
Copy the full SHA 77018e6View commit details -
connect test: use wait_for_log in test_funding_external_wallet
test_funding_external_wallet is flakey because we don't wait for the channel state to update before asserting that it's changed.
Configuration menu - View commit details
-
Copy full SHA for 92bd3a3 - Browse repository at this point
Copy the full SHA 92bd3a3View commit details
Commits on Jun 20, 2019
-
gossipd: truncate gossip_store.tmp for compaction.
If something went wrong and there was an old one, we were appending to it! Reported-by: @SimonVrouwe Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 47b5f2e - Browse repository at this point
Copy the full SHA 47b5f2eView commit details
Commits on Jun 21, 2019
-
bitcoin/tx: separate assertions.
This might help diagnose what's happening with ElementsProject#2759 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 711762e - Browse repository at this point
Copy the full SHA 711762eView commit details -
bitcoin/tx: use fromwire_fail in pull_bitcoin_tx.
This is the correct way to mark failure: it also sets *max to 0. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f1b5706 - Browse repository at this point
Copy the full SHA f1b5706View commit details -
common/gossip_store: handle short reads.
This happened on Travis, and the gossip_store was a suspicious 4096 bytes long. This implies they're using some non-atomic filesystem (gossipd always does atomic writes to gossip_store), but if they are, others surely are too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for adcb664 - Browse repository at this point
Copy the full SHA adcb664View commit details -
pytest: fix test_gossip_store_load_no_channel_update
It wasn't invalid due to a missing channel_update, but in fact was a bad checksum due to a cut & paste bug. Fix that, and assert it's not actually truncating. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 9bf0467 - Browse repository at this point
Copy the full SHA 9bf0467View commit details -
gossipd: be more verbose and less assert()ive on bad node_announcement.
We hit the timestamp assert on ElementsProject#2750; it shouldn't happen, but crashing doesn't leave much information. Reported-by: @m-schmook Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for fc27250 - Browse repository at this point
Copy the full SHA fc27250View commit details -
gossipd: tighter correctness checks during gossip_store load.
We shouldn't be loading old timestamps, either. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 8ce3b86 - Browse repository at this point
Copy the full SHA 8ce3b86View commit details -
gossipd: remove gossip entirely if we hit a problem on load.
The crashes in ElementsProject#2750 are mostly caused by us trying to partially truncate the store. The simplest fix for release is to discard the whole thing if we detect a problem. This is a workaround: it'd be far nicer to try to recover. Fixes: ElementsProject#2750 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 8928f0b - Browse repository at this point
Copy the full SHA 8928f0bView commit details -
gossip_store: make copy of corrupt gossip_store on failure.
This should help debugging vastly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c15d9ed - Browse repository at this point
Copy the full SHA c15d9edView commit details
Commits on Jun 22, 2019
-
gossipd: only do (automatic) store compaction at startup.
Rewriting the gossip_store is much more trivial when we don't have any pointers into it, so add some simple offline compaction code and disable the automatic compaction code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c303d7d - Browse repository at this point
Copy the full SHA c303d7dView commit details -
bugfix: Proper json for listtransactions' response
[ Fixup for uninitialized var -- RR ]
Configuration menu - View commit details
-
Copy full SHA for 86b5b84 - Browse repository at this point
Copy the full SHA 86b5b84View commit details -
pylightning: Add new listtransactions command
[ FIXUP: Uninitialized var response used as context, changed to cmd --RR ]
Configuration menu - View commit details
-
Copy full SHA for 83f2ccd - Browse repository at this point
Copy the full SHA 83f2ccdView commit details
Commits on Jun 23, 2019
-
json-rpc: Disable
listtransactions
for the 0.7.1 releaseDue to API instability we are disabling the RPC method for this release, but will re-enable it after the release again. Signed-off-by: Christian Decker <@cdecker>
Configuration menu - View commit details
-
Copy full SHA for ee587af - Browse repository at this point
Copy the full SHA ee587afView commit details -
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for c1328b3 - Browse repository at this point
Copy the full SHA c1328b3View commit details
Commits on Jun 27, 2019
-
lightningd: don't crash on old zero-output commitment_txs.
We used to produce these, but they're invalid. When we switched to libwally it (correctly) refuses to get a txid for them. Fixes: ElementsProject#2772 Fixes: ElementsProject#2759 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 960bfb8 - Browse repository at this point
Copy the full SHA 960bfb8View commit details -
channeld/lightningd/hsmd: strengthen our checks against 0-output txs.
If we ever do this, we'd end up with an unspendable commitment tx anyway. It might be able to happen if we have htlcs added from the non-fee-paying party while the fees are increased, though. But better to close the channel and get a report about it if that happens. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for a450962 - Browse repository at this point
Copy the full SHA a450962View commit details -
Configuration menu - View commit details
-
Copy full SHA for 707ce4c - Browse repository at this point
Copy the full SHA 707ce4cView commit details
Commits on Jun 28, 2019
-
lightningd: fix occasional missing txid detection.
I was working on rewriting our (somewhat chaotic) tx watching code for 0.7.2, when I found this bug: we don't always notice the funding tx in corner cases where more than one block is detected at once. This is just the one commit needed to fix the problem: it has some unnecessary changes, but I'd prefer not to diverge too far from my cleanup-txwatch branch. Fixes: ElementsProject#2352 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f1bea55 - Browse repository at this point
Copy the full SHA f1bea55View commit details -
This has definitely reinforced that we need shorter release cycles! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for fc6de94 - Browse repository at this point
Copy the full SHA fc6de94View commit details
Commits on Jun 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 43d5492 - Browse repository at this point
Copy the full SHA 43d5492View commit details
Commits on Jul 13, 2019
-
Merge branch 'master' of https://github.com/dflatemaster/lightning
# Conflicts: # .gitignore # bitcoin/base58.c # bitcoin/base58.h # bitcoin/chainparams.c # channeld/test/run-full_channel.c # common/test/run-bolt11.c # contrib/init/lightningd.service # contrib/pylightning/lightning/lightning.py # doc/lightningd-config.5.txt # external/libwally-core # lightningd/chaintopology.c # lightningd/jsonrpc.c # tests/test_connection.py # tests/test_misc.py # wallet/walletrpc.c Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 13, 2019 Configuration menu - View commit details
-
Copy full SHA for 32e0c2c - Browse repository at this point
Copy the full SHA 32e0c2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ef7580 - Browse repository at this point
Copy the full SHA 9ef7580View commit details -
Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 13, 2019 Configuration menu - View commit details
-
Copy full SHA for 904cce2 - Browse repository at this point
Copy the full SHA 904cce2View commit details -
change double to single sha256 for tx Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 13, 2019 Configuration menu - View commit details
-
Copy full SHA for 56f4146 - Browse repository at this point
Copy the full SHA 56f4146View commit details -
Configuration menu - View commit details
-
Copy full SHA for 412f9e8 - Browse repository at this point
Copy the full SHA 412f9e8View commit details -
allow static tor address to bind to unannounced hidden local address
i.e.if service is setup in torrc Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 13, 2019 Configuration menu - View commit details
-
Copy full SHA for bc06214 - Browse repository at this point
Copy the full SHA bc06214View commit details
Commits on Jul 14, 2019
-
fixup after merge to grs values for base58 addr prefix
Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 14, 2019 Configuration menu - View commit details
-
Copy full SHA for b8a9973 - Browse repository at this point
Copy the full SHA b8a9973View commit details -
use in base58 to grs prefix 28
Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 18978eb - Browse repository at this point
Copy the full SHA 18978ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for cf9aec8 - Browse repository at this point
Copy the full SHA cf9aec8View commit details
Commits on Jul 16, 2019
-
eclair <--> grs-c-lightning compat-mode
use Groestl hash only for blocks and tx Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 16, 2019 Configuration menu - View commit details
-
Copy full SHA for caa65d6 - Browse repository at this point
Copy the full SHA caa65d6View commit details
Commits on Jul 17, 2019
-
use pure groestlhash for double_sha256
Signed-off-by: dflate <dflate@noreply.com>
dflate committedJul 17, 2019 Configuration menu - View commit details
-
Copy full SHA for 222e84f - Browse repository at this point
Copy the full SHA 222e84fView commit details