-
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
0.8.0 #19
Commits on Nov 12, 2019
-
pyln: Default to DEVELOPER=0 when running outside of tree
`DEVELOPER=1` assumes that the binary has been compiled with developer set to true, which might not be the case for plugin developers. Setting this to 0 by default has no effect in c-lightning since we always at least set it in `config.vars` but may prevent some issues outside.
Configuration menu - View commit details
-
Copy full SHA for 53a2789 - Browse repository at this point
Copy the full SHA 53a2789View commit details -
pyln: Move RPC and daemon instantiation into the LightningNode
We were relying heavily on NodeFactory to do some magic before instantiating the Node with rpc and daemon initialized, that meant that we'd have to replace all 3 classes when customizing the node to our needs. Moving that initialization into the node itself means that the LightningNode class now can be swapped out and customized, without having to wire everything else through.
Configuration menu - View commit details
-
Copy full SHA for bc9b1c4 - Browse repository at this point
Copy the full SHA bc9b1c4View commit details -
pyln: Allow users to override the LightningNode class
Quite a few of the things in the LightningNode class are tailored to their use in the c-lightning tests, so I decided to split those customizations out into a sub-class, and adding one more fixture that just serves the class. This allows us to override the LightningNode implementation in our own tests, while still having sane defaults for other users.
Configuration menu - View commit details
-
Copy full SHA for 9378be7 - Browse repository at this point
Copy the full SHA 9378be7View commit details
Commits on Nov 13, 2019
-
Needs to initialize global now. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7679f25 - Browse repository at this point
Copy the full SHA 7679f25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f215a7 - Browse repository at this point
Copy the full SHA 6f215a7View commit details -
addr: handle P2SH/P2PKH in scriptpubkey encoding
Previously, returned null if a scriptpubkey was not Segwit; now handles encoding to Base58 for other types.
Configuration menu - View commit details
-
Copy full SHA for 963a1da - Browse repository at this point
Copy the full SHA 963a1daView commit details -
listpeers: show close_to address
If a 'upfront_shutdown_script' was specified, show the address + scriptpubky in `listpeers` Changelog-added: JSON API: `listpeers` channels now include `close_to` and `close_to_addr` iff a `close_to` address was specified at channel open
Configuration menu - View commit details
-
Copy full SHA for a333df4 - Browse repository at this point
Copy the full SHA a333df4View commit details -
dev: add option flag for specifying temporary channel id
--dev-force-tmp-channel-id flag takes a 64-character hex string to use as the temporary channel id. Useful for spec tests [ Fixed crash in non-DEVELOPER mode --RR ] Changelog-None
Configuration menu - View commit details
-
Copy full SHA for 28cdccf - Browse repository at this point
Copy the full SHA 28cdccfView commit details -
Travis adds the correct PYTHONPATH, but "make check" doesn't. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eaa72ed - Browse repository at this point
Copy the full SHA eaa72edView commit details
Commits on Nov 14, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d4c0746 - Browse repository at this point
Copy the full SHA d4c0746View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dbb32a - Browse repository at this point
Copy the full SHA 8dbb32aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c6ac95 - Browse repository at this point
Copy the full SHA 1c6ac95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2821187 - Browse repository at this point
Copy the full SHA 2821187View commit details -
common/sphinx: rename hop_data to hop_data_legacy.
This highlights the various places we need to change. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a76518a - Browse repository at this point
Copy the full SHA a76518aView commit details -
common/sphinx: handle decoding of TLV payload.
We add routines to decode the expected fields from both legacy and tlv hop formats. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b7bbccd - Browse repository at this point
Copy the full SHA b7bbccdView commit details -
lightningd: handle tlv-style payloads.
Signed-off-by: Rusty Russell <[email protected]> Changelog-changed: JSON API: `htlc_accepted` hook has `type` (currently `legacy` or `tlv`) and other fields directly inside `onion`. Changelog-deprecated: JSON API: `htlc_accepted` hook `per_hop_v0` object deprecated, as is `short_channel_id` for the final hop.
Configuration menu - View commit details
-
Copy full SHA for 2a22590 - Browse repository at this point
Copy the full SHA 2a22590View commit details -
gossipd: add hop-style to nodes to mark whether they speak TLV onion.
We keep the feature bitmap on disk, so we cache this in the struct explicitly. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a25e9b - Browse repository at this point
Copy the full SHA 3a25e9bView commit details -
lightningd: move json_add_route into gossip_control.c and make static.
There's only one caller. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 997e3f7 - Browse repository at this point
Copy the full SHA 997e3f7View commit details -
lightningd: expose/accept "style" parameter in routes.
Default is legacy. If we have future styles, new strings can be defined, but for now it's "tlv" or "legacy". Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c83834c - Browse repository at this point
Copy the full SHA c83834cView commit details -
sphinx: separate nonfinal from final interface, add tlv option.
For legacy, they were the same, but for TLV we care whether it's the final hop or not. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0211712 - Browse repository at this point
Copy the full SHA 0211712View commit details -
devtools/onion: use raw sphinx helper or new style, allow TLV.
This means we can make sphinx_add_v0_hop static, too. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9dc8cff - Browse repository at this point
Copy the full SHA 9dc8cffView commit details -
features: set OPT_VAR_ONION (bit 9) iff EXPERIMENTAL_FEATURES
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb06bec - Browse repository at this point
Copy the full SHA bb06becView commit details -
tests: test that we only use tlv onion when advertized.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 21555b2 - Browse repository at this point
Copy the full SHA 21555b2View commit details -
dev: add option to prevent HTLC timeouts.
This is required for the protocol tests, which can be slow. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 323e4f6 - Browse repository at this point
Copy the full SHA 323e4f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39fa486 - Browse repository at this point
Copy the full SHA 39fa486View commit details -
Revert "docker: Use system libraries, don't bring your own"
This reverts commit 48728d3.
Configuration menu - View commit details
-
Copy full SHA for 0d55dca - Browse repository at this point
Copy the full SHA 0d55dcaView commit details
Commits on Nov 15, 2019
-
Configuration menu - View commit details
-
Copy full SHA for ed23875 - Browse repository at this point
Copy the full SHA ed23875View commit details -
wallet: fix skipping tx dups memory corruption
Changelog-Fixed: ElementsProject#3231 listtransactions crash
Configuration menu - View commit details
-
Copy full SHA for fe4a25a - Browse repository at this point
Copy the full SHA fe4a25aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7609e6 - Browse repository at this point
Copy the full SHA d7609e6View commit details -
gossipd: don't discard node_announcements with old timestamps.
It really, really doesn't matter. But we were dramatically reducing our view of the network: In my gossip_store (mainnet): channel_announcement: 30349 channel_update: 55119 node_announcment: 1783 Changelog-Fixed: No longer discard most node_announcements (fixes ElementsProject#3194) Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fdd69af - Browse repository at this point
Copy the full SHA fdd69afView commit details -
bitcoind: remove the chainparams member
We now have a global constant, prefer to use it instead of having two variables with the same utility.
Configuration menu - View commit details
-
Copy full SHA for f075b87 - Browse repository at this point
Copy the full SHA f075b87View commit details
Commits on Nov 17, 2019
-
lightningd: fix uninitialized variable
==1310== Conditional jump or move depends on uninitialised value(s) ==1310== at 0x127C7F: io_loop_with_timers (io_loop_with_timers.c:30) ==1310== by 0x14F0E1: plugins_init (plugin.c:1019) ==1310== by 0x12E4B1: main (lightningd.c:694) ==1310== Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f0a366 - Browse repository at this point
Copy the full SHA 7f0a366View commit details
Commits on Nov 18, 2019
-
doc/lightningd-config.5.txt: remove
Replaced by doc/lightningd-config.5.md. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b0a72a6 - Browse repository at this point
Copy the full SHA b0a72a6View commit details -
lightningd: have optional node_id associated with subdaemons.
We'll use this for logging it. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4fa7b30 - Browse repository at this point
Copy the full SHA 4fa7b30View commit details -
lightningd: have logging include an optional node_id for each entry.
A log can have a default node_id, which can be overridden on a per-entry basis. This changes the format of logging, so some tests need rework. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e433d4d - Browse repository at this point
Copy the full SHA e433d4dView commit details -
common: allow subdaemons to specify the node_id in status messages.
This is ignored in subdaemons which are per-peer, but very useful for multi-peer daemons like connectd and gossipd. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 00cb5ad - Browse repository at this point
Copy the full SHA 00cb5adView commit details -
connectd, gossipd: use per-peer logging.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eed654f - Browse repository at this point
Copy the full SHA eed654fView commit details -
lightningd: move log structs into log.c.
Simply better encapsulation. We still need to expose log_entry, since the notification hook uses it though. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3270e5c - Browse repository at this point
Copy the full SHA 3270e5cView commit details -
lightningd: remove per-peer log book.
We had a separate logbook for each peer, and copy log entries above the printable log level into the master logbook. This didn't always work well, since we didn't dump it on crash for example. Keep a single global logbook instead, and remove this infrastructure. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 86fb54a - Browse repository at this point
Copy the full SHA 86fb54aView commit details -
log: make formatting more consistent.
1. Printed form is always "[<nodeid>-]<prefix>: <string>" 2. "jcon fd %i" becomes "jsonrpc #%i". 3. "jsonrpc" log is only used once, and is removed. 4. "database" log prefix is use for db accesses. 5. "lightningd(%i)" becomes simply "lightningd" without the pid. 6. The "lightningd_" prefix is stripped from subd log prefixes, and pid removed. Signed-off-by: Rusty Russell <[email protected]> Changelog-changed: Logging: formatting made uniform: [NODEID-]SUBSYSTEM: MESSAGE Changelog-removed: `lightning_` prefixes removed from subdaemon names, including in listpeers `owner` field.
Configuration menu - View commit details
-
Copy full SHA for ef7a820 - Browse repository at this point
Copy the full SHA ef7a820View commit details -
options: allow --log-level <level>:<prefix> for finegrained log control.
This allows finegrained logging control of particular subdaemons or subsystems. To do this, we defer setting the logging levels for each log object until after early argument parsing (since e.g. "bitcoind" log object is created early). Signed-off-by: Rusty Russell <[email protected]> Changelog-changed: Options: log-level can now specify different levels for different subsystems.
Configuration menu - View commit details
-
Copy full SHA for 0607f99 - Browse repository at this point
Copy the full SHA 0607f99View commit details -
lightningd: enable io logging on subdaemons iff we're going to print it.
This simplifies our tests, too, since we don't need a magic option to enable io logging in subdaemons. Note that test_bad_onion still takes too long, due to a separate minor bug, so that's marked and left dev-only for now. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4fc498f - Browse repository at this point
Copy the full SHA 4fc498fView commit details -
lightningd: avoid keeping multiple copies of nodeid.
Simple refcount FTW. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0c6d899 - Browse repository at this point
Copy the full SHA 0c6d899View commit details -
lightningd: perform better log pruning.
1. Don't prune the last 10%. 2. Be more aggressive on pruning IO and DEBUG. 3. Account for skipped entries correctly across multiple prunes. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a83fd16 - Browse repository at this point
Copy the full SHA a83fd16View commit details -
lightningd: remove log_add functions.
They added complexity, and were only used in a few places. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 39d537b - Browse repository at this point
Copy the full SHA 39d537bView commit details -
lightningd: use a simple array for less memory usage.
The tal overhead of 5 pointers, the linked list node is 2; and we also tal'd the string. That's 96 bytes per entry. Use a simple array instead, though it means more work on deletion since each log_entry is no longer a tal object. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b210c9d - Browse repository at this point
Copy the full SHA b210c9dView commit details -
pytest: deflake test_htlc_send_timeout
We can definitely get a pong from l1 (should test be slow enough): it's l3 we are concerned about. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f91ff99 - Browse repository at this point
Copy the full SHA f91ff99View commit details -
lightningd: kill per-peer daemons if they claim a different peer id.
Suggested-by: @cdecker Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 24f708e - Browse repository at this point
Copy the full SHA 24f708eView commit details -
logging: add examples for logging.
As suggested by @cdecker, but also did a bit of minor reformatting. I don't like the excessive indenting in our man pages though, but that's a separate problem. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0aad532 - Browse repository at this point
Copy the full SHA 0aad532View commit details -
logging: remove spaces from subsystem names.
Spaces just make life a little harder for everyone. (Plus, fix documentation: it's 'jsonrpc' not 'json' subsystem). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 709c98f - Browse repository at this point
Copy the full SHA 709c98fView commit details -
devtools/gossipwith: change timeout to seconds.
I always get this wrong, then wonder why it's dying! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3437f7e - Browse repository at this point
Copy the full SHA 3437f7eView commit details -
devtools/gossipwith: option to print out messages in hex.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2e9b8f4 - Browse repository at this point
Copy the full SHA 2e9b8f4View commit details -
devtools/gossipwith: allow setting features on cmdline.
Particularly important when talking with modern lnd, which will hang up on you if you don't offer feature bit 1! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 14a5584 - Browse repository at this point
Copy the full SHA 14a5584View commit details -
gossipd: work around LND reply_channel_range.
We've been sending them errors for invalid replies; instead, this works around it. Changelog-Added: Workaround LND's reply_channel_range issues instead of sending error. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6e433e0 - Browse repository at this point
Copy the full SHA 6e433e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68b9ded - Browse repository at this point
Copy the full SHA 68b9dedView commit details -
plugin: Pass the full raw_payload including realm to htlc_accepted
So far we've only handled legacy payloads, which meant we could drop the realm byte since it was always 0x00. Once we start handling TLV payloads the first byte, i.e., the former realm byte, is important since it gives us the length of the payload. This is a breaking change, however I don't think there's anyone using the `raw_payload` as of yet. Changelog-Changed: JSON-RPC: the `raw_payload` now includes the first byte, i.e., the realm byte, of the payload as well. This allows correct decoding of a TLV payload in the plugins.
Configuration menu - View commit details
-
Copy full SHA for dda792c - Browse repository at this point
Copy the full SHA dda792cView commit details
Commits on Nov 19, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 69040e5 - Browse repository at this point
Copy the full SHA 69040e5View commit details
Commits on Nov 20, 2019
-
onion fixup: use enum for type, not length of packet
We should be using the enum here, not the length of the payload
Configuration menu - View commit details
-
Copy full SHA for ea9faf6 - Browse repository at this point
Copy the full SHA ea9faf6View commit details -
Add cross-compilation options only when requested (ElementsProject#3275)
Requesting them is done by setting BUILD=<target_arch> Otherwise autotools (used by external dependencies like libsodium) is not happy with setting cross-compilation variables and may possibly lead to unexpected results.
Configuration menu - View commit details
-
Copy full SHA for 170918f - Browse repository at this point
Copy the full SHA 170918fView commit details -
gossipd: remove chainparams local var.
We have a global, let's use it. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5a95e9f - Browse repository at this point
Copy the full SHA 5a95e9fView commit details -
channeld: remove chainparams local parameter.
Use global everywhere. This leaks into openingd a little, too. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce10491 - Browse repository at this point
Copy the full SHA ce10491View commit details -
lightningd: remove chainparams local parameter from wallet.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for edbcb6f - Browse repository at this point
Copy the full SHA edbcb6fView commit details
Commits on Nov 21, 2019
-
dump_tx: fixup compiliation errs
When we refactored bitcoin_tx to use wally_tx, this (uncompiled) debug statement rotted. This unrots it.
Configuration menu - View commit details
-
Copy full SHA for 861b12b - Browse repository at this point
Copy the full SHA 861b12bView commit details -
devtools: add privkey+hash printing to mkcommit/mkgossip
We updated the protocol spec tests to verify a sig from a hash and a private key; this updates mkcommit + mkgossip utilities to print out the procotol compatible SIG() notation for all signatures. --verbose will print a computed signature and more data as well. Also adds --verbose flag to mkgossip. Changelog-None
Configuration menu - View commit details
-
Copy full SHA for 3705b5f - Browse repository at this point
Copy the full SHA 3705b5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c5e7943 - Browse repository at this point
Copy the full SHA c5e7943View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3ef71b - Browse repository at this point
Copy the full SHA a3ef71bView commit details -
gossipd: don't crash if we have > 7000 stale short_channel_ids.
Fixes: ElementsProject#3269 Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: gossipd crash on huge number of unknown channels.
Configuration menu - View commit details
-
Copy full SHA for d119758 - Browse repository at this point
Copy the full SHA d119758View commit details -
pytest: test that we refuse to follow bitcoind backwards.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4b48a6 - Browse repository at this point
Copy the full SHA d4b48a6View commit details -
lightningd: don't start if bitcoind is behind.
This leads to all sorts of problems; in particular it's incredibly slow (days, weeks!) if bitcoind is a long way back. This also changes the behaviour of a rescan argument referring to a future block: we will also refuse to start in that case, which I think is the correct behavior. We already ignore bitcoind if it goes backwards while we're running. Also cover a false positive memleak. Changelog-Fixed: If bitcoind goes backwards (e.g. reindex) refuse to start (unless forced with --rescan). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 654faa6 - Browse repository at this point
Copy the full SHA 654faa6View commit details
Commits on Nov 22, 2019
-
openchannel hook: add new
close_to
fieldRounds out the application of `upfront_shutdown_script`, allowing an accepting node to specify a close_to address. Prior to this, only the opening node could specify one. Changelog-Added: Plugins: Allow the 'accepter' to specify an upfront_shutdown_script for a channel via a `close_to` field in the openchannel hook result
Configuration menu - View commit details
-
Copy full SHA for de16d0f - Browse repository at this point
Copy the full SHA de16d0fView commit details -
pytest: Skip mem-leak test when not running in developer mode
We were skipping it when running under valgrind, but not if not in developer, which is required to have access to `dev-*` methods.
Configuration menu - View commit details
-
Copy full SHA for 1e89937 - Browse repository at this point
Copy the full SHA 1e89937View commit details -
pytest: Fix a test assuming a specific DB order
Postgresql does not guarantee insertion order when querying, so we need to actually go and look for the correct transaction. Signed-off-by: Christian Decker <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3482d25 - Browse repository at this point
Copy the full SHA 3482d25View commit details -
pytest: Fix TLV hook tests in experimental mode
I missed this test breaking with `EXPERIMENTAL_FEATURES` in ElementsProject#3261
Configuration menu - View commit details
-
Copy full SHA for 5a233a1 - Browse repository at this point
Copy the full SHA 5a233a1View commit details -
github: Mark derived doc files as generated
This should prevent Github from showing the diffs by default, they'd be duplicates of the changes in the .md files anyway.
Configuration menu - View commit details
-
Copy full SHA for 162cea2 - Browse repository at this point
Copy the full SHA 162cea2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2255024 - Browse repository at this point
Copy the full SHA 2255024View commit details -
tlv: Add typesafe fromwire codegen for TLV namespaces
We were weaving in and out of generic code through `fromwire_tlvs` with custom parameters defining the types in that namespace. This hard-wires the parser with the namespace's types. Slowly trying to deprecate `fromwire_tlvs` in favor of this typesafe variant.
Configuration menu - View commit details
-
Copy full SHA for 5794c83 - Browse repository at this point
Copy the full SHA 5794c83View commit details -
tlv: Add validity check codegen for the tlv namespaces
Since the parser itself just parses and doesn't include validation anymore we need to put that functionality somewhere. The validation consists of enforcing that the types are in monotonically increasing order without duplicates and that for the even types we know how to handle it.
Configuration menu - View commit details
-
Copy full SHA for 2519f93 - Browse repository at this point
Copy the full SHA 2519f93View commit details -
sphinx: Use the new
fromwire_tlv_payload
functionWe wire in the code-generated function, which removes the upfront validation and add the validation back after the `htlc_accepted` hook returns. If a plugin wanted to handle the onion in a special way it'll not have told us to just continue.
Configuration menu - View commit details
-
Copy full SHA for d69a437 - Browse repository at this point
Copy the full SHA d69a437View commit details -
sphinx: Decode payload and place shortcuts in the route-step
We'll need to pass them around anyway, so just make them easier to access by doing a bit more to `process_onionpacket`.
Configuration menu - View commit details
-
Copy full SHA for baffa84 - Browse repository at this point
Copy the full SHA baffa84View commit details -
htlcs: Make necessary payload fields optional and derfer validation
We make the fields in `htlc_accepted_payload` optional (NULL if not present in the payload) and defer validation till after the hook call.
Configuration menu - View commit details
-
Copy full SHA for fc14e5e - Browse repository at this point
Copy the full SHA fc14e5eView commit details -
htlc: Consolidate validation after the htlc_accepted hook returns
This now enforces all rules for validity, both for the TLV format and checking that the required fields have been provided.
Configuration menu - View commit details
-
Copy full SHA for d7b28ac - Browse repository at this point
Copy the full SHA d7b28acView commit details -
sphinx: Cleanup route_step_decode_* functions
We have consolidated the two functions into a single `route_step_decode` function, and made it static since we call it in the `process_onionpacket` function. We remove the two exposed functions since they're no longer useful.
Configuration menu - View commit details
-
Copy full SHA for e46f423 - Browse repository at this point
Copy the full SHA e46f423View commit details -
htlc: Add a checker function tellung us whether we can continue
Configuration menu - View commit details
-
Copy full SHA for d1df4d6 - Browse repository at this point
Copy the full SHA d1df4d6View commit details -
channeld: allow transient negative balance.
Travis randomly picked up an error in test_feerate_stress: **BROKEN** 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-channeld-chan#1: Cannot add htlc #0 10000msat to LOCAL (version a2541b9-modded) This is because it hit an unlikely corner case involving applying multiple HTLCs (similar to the previous c96cee9). In this case, the test sends a 500,000,000 "balancing" setup payment L1->L2. It waits for L2 to get the preimage (which is the when pay() helper returns), but crucially, it starts spamming with HTLCs before that HTLC is completely removed. From L2's point of view, the setup HTLC is in state RCVD_REMOVE_REVOCATION; gone from L1's commitment tx, but still waiting for the commitment_signed from L1 to remove it from L2's. Note that each side keeps a local and remove view of both sides' current balances: at this point, L2's view is REMOTE: "500,000,000 to L1, 499,900,000 to L2", LOCAL: "500,000,000 to L1, 0 to L2". L2 sends a 10,000 msat HTLC to L1: legal, since L1 will allow it, then the commitment_signed. L1 sends the revoke-and-ack for this, *then* belatedly follows with the commitment_signed which both completes the removal of the setup HTLC and adds the new one. But L2 processes the HTLCs in hashtable (i.e. random) order: so if it tries to apply its own HTLC first, it freaks out because it doesn't have funds in its local view. Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: Unlikely corner case is simultanous HTLCs near balance limits fixed.
Configuration menu - View commit details
-
Copy full SHA for 6defc69 - Browse repository at this point
Copy the full SHA 6defc69View commit details
Commits on Nov 23, 2019
-
config: Add include directive support.
Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Config: configuration files now support `include`.
Configuration menu - View commit details
-
Copy full SHA for 34c89cb - Browse repository at this point
Copy the full SHA 34c89cbView commit details -
lightningd: don't use chainparams before param() call in json_fund_ch…
…annel_start With coming changes, this will segfault if we access it when param code is trying to get usage from functions. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5673607 - Browse repository at this point
Copy the full SHA 5673607View commit details -
lightningd: move basic parameter parsing into common/configdir
lightning-cli is going to need to know what network we're on, so it will need to parse the config files. Move the code which does the initial bootstrap parsing into common, as well as the config file parsing core. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8b1aa3e - Browse repository at this point
Copy the full SHA 8b1aa3eView commit details -
config: Read both top-level and network-subdir config files.
This lets you have a default, but also a network-specific config. Signed-off-by: Rusty Russell <[email protected]> Changelog-changed: Options: `config` and <network>/`config` read by default.
Configuration menu - View commit details
-
Copy full SHA for dc23c30 - Browse repository at this point
Copy the full SHA dc23c30View commit details -
lightningd: change config-dir from plugin / wallet / hsm POV into <ne…
…twork> subdir Changelog-changed: .lightningd plugins and files moved into <network>/ subdir Changelog-changed: WARNING: If you don't have a config file, you now may need to specify the network to lightning-cli Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aab83e7 - Browse repository at this point
Copy the full SHA aab83e7View commit details -
lightningd: automatically move files for existing deployments.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d512bcb - Browse repository at this point
Copy the full SHA d512bcbView commit details -
common: parse --allow-deprecated-apis extremely early.
We're going to want this for changing the default network. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a56f2b2 - Browse repository at this point
Copy the full SHA a56f2b2View commit details -
common: change default network from testnet to mainnet for new installs.
Changelog-changed: Default network (new installs) is now bitcoin, not testnet. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36c517b - Browse repository at this point
Copy the full SHA 36c517bView commit details -
config: explicitly disallow nonsensical options.
1. "conf" can't be specified in a configuration file. 2. "lightning-dir" can't be specified in a configuration file unless the file was explicitly set with --conf=. 3. "network" options can't be set in a per-network configuration file. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e3dbd78 - Browse repository at this point
Copy the full SHA e3dbd78View commit details -
lightningd: keep pid files in top-level config dir.
They're already qualified with network name, and there's little point moving them; it might even be dangerous if multiple are running. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 747bb99 - Browse repository at this point
Copy the full SHA 747bb99View commit details -
pytest: test for config parsing errors.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 57a32ee - Browse repository at this point
Copy the full SHA 57a32eeView commit details -
log: print UNUSUAL messages before log initialization too.
Otherwise we don't print out the upgrading messages when we move things! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a06fa7f - Browse repository at this point
Copy the full SHA a06fa7fView commit details -
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for badeaf1 - Browse repository at this point
Copy the full SHA badeaf1View commit details -
config: limit depth on includes.
Don't spend too much effort on it, but this is better than running out of memory and crashing. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f5831e5 - Browse repository at this point
Copy the full SHA f5831e5View commit details -
lightningd: fix handling of truncated config options.
Do the same thing '--help' does with them; append `...`. Valgrind noticed that we weren't NUL-terminarting if answer was over 78 characters. Changelog-Fixed: JSONRPC: listconfigs appends '...' to truncated config options.
Configuration menu - View commit details
-
Copy full SHA for 14997f6 - Browse repository at this point
Copy the full SHA 14997f6View commit details
Commits on Nov 24, 2019
-
Spec: trivial update to latest.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fb040bc - Browse repository at this point
Copy the full SHA fb040bcView commit details -
lightningd: remove redundant htlc_accepted_hook_payload fields
Now we cache them in the route_step, don't need to copy them here. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 50d6941 - Browse repository at this point
Copy the full SHA 50d6941View commit details -
spec: update to experimental BOLTs with secret/total_amount.
Also pulls in a new onion error (mpp_timeout). We change our route_step_decode_end() to always return the total_msat and optional secret. We check total_amount (to prohibit mpp), but we do nothing with secret for now other than hand it to the htlc_accepted hook. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ebac3d2 - Browse repository at this point
Copy the full SHA ebac3d2View commit details -
common: make BOLT11 use the normal feature array.
This was decided at a recent spec meeting: in particular, mpp and var_onion_optin options will be used here. We enhanced "features_supported" into "features_unsupported" so it can return the first un-handlable bit number. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 09cdbb7 - Browse repository at this point
Copy the full SHA 09cdbb7View commit details -
wallet: add invoice features into db.
In a future version, we will use features to insist that payers provide the secret. In transition, we may have old invoices which didn't insist on that, so we need to know this on a per-invoice basis. Not sure if I got the right syntax for adding an empty blob though! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 81c89aa - Browse repository at this point
Copy the full SHA 81c89aaView commit details -
common/bolt11: add secret support.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 854c64f - Browse repository at this point
Copy the full SHA 854c64fView commit details -
JSON: add
payment_secret
parameter to sendpay.This is not documented yet, since it's ignored unless EXPERIMENTAL_FEATURES is set. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dfb1f6a - Browse repository at this point
Copy the full SHA dfb1f6aView commit details -
plugins/pay: hand payment_secret from bolt11 through to sendpay.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 18e9144 - Browse repository at this point
Copy the full SHA 18e9144View commit details -
lightningd: add secrets (and associated feature) to invoices.
We don't need a new db column, since we can just derive the secret from the preimage as required. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c2e8531 - Browse repository at this point
Copy the full SHA c2e8531View commit details -
lightningd: check payment secret on htlc receipt.
We don't set the secret to compulsory (yet!) but put code in for the future. Meanwhile, if there is a secret, check it is correct. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e5247a6 - Browse repository at this point
Copy the full SHA e5247a6View commit details -
lightningd: use final_tlv if the payment_secret is supplied.
This implies the final node understands TLV onion. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9765642 - Browse repository at this point
Copy the full SHA 9765642View commit details -
common/features: clean up feature handling for different cases.
The spec is (RSN!) going to explicitly denote where each feature should be presented, so create that infrastructure. Incorporate the new proposed bolt11 features, which need this. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3b37c9d - Browse repository at this point
Copy the full SHA 3b37c9dView commit details -
common/features: add
payment_secret
feature if EXPERIMENTAL.Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8393d21 - Browse repository at this point
Copy the full SHA 8393d21View commit details
Commits on Nov 25, 2019
-
feat: restructure plugin and options in listconfigs
This will change the command `listconfigs` output in several ways: - Deprecated the duplicated "plugin" JSON output by replacing it with - a "plugins" array with substructures for each plugin with: - path, name and their options Changelog-Changed: JSON-RPC: `listconfigs` now structures plugins and include their options Changelog-Deprecated: JSON-RPC: `listconfigs` duplicated "plugin" paths
Configuration menu - View commit details
-
Copy full SHA for 6ed3201 - Browse repository at this point
Copy the full SHA 6ed3201View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17bb862 - Browse repository at this point
Copy the full SHA 17bb862View commit details
Commits on Nov 26, 2019
-
Configuration menu - View commit details
-
Copy full SHA for e8ce9d0 - Browse repository at this point
Copy the full SHA e8ce9d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5a6072 - Browse repository at this point
Copy the full SHA d5a6072View commit details -
Configuration menu - View commit details
-
Copy full SHA for a3961c4 - Browse repository at this point
Copy the full SHA a3961c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fb8e0a - Browse repository at this point
Copy the full SHA 5fb8e0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 670f920 - Browse repository at this point
Copy the full SHA 670f920View commit details
Commits on Nov 28, 2019
-
openingd: clean up and fix minor leak.
test_openchannel_hook_1: MEMLEAK: 0x557593c164e8' label=wire/fromwire.c:320:char[]' backtrace:' ccan/ccan/tal/tal.c:437 (tal_alloc_)' ccan/ccan/tal/tal.c:466 (tal_alloc_arr_)' wire/fromwire.c:320 (fromwire_wirestring)' openingd/gen_opening_wire.c:205 (fromwire_opening_got_offer_reply)' openingd/openingd.c:1067 (fundee_channel)' openingd/openingd.c:1279 (handle_peer_in)' openingd/openingd.c:1535 (main)' parents: fromwire_opening_got_offer_reply() allocates two fields off NULL: err_reason and our_upfront_shutdown_script. err_reason is used immediately afterwards (and was the leak detected here), so fixing that is easy. To fix the leak of our_upfront_shutdown_script, it makes sense to simply make it a member of 'state'. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 493c2ab - Browse repository at this point
Copy the full SHA 493c2abView commit details -
wallet/Makefile: fix dependency line.
The .o files need regen, not the .c files! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b9a03a0 - Browse repository at this point
Copy the full SHA b9a03a0View commit details
Commits on Nov 29, 2019
-
pyln: Add psycopg2-binary as a dependency
Using the psycopg2-binary package means that the apropriate compiled binary for the user platform will be shipped alongside the python binaries. Otherwise the python bindings and the C shims would be shipped which would then require the postgres development packages as well. This just makes things easier, since we don't require the build dependencies.
Configuration menu - View commit details
-
Copy full SHA for 3c5ed15 - Browse repository at this point
Copy the full SHA 3c5ed15View commit details -
pyln-testing: Do not require a conftest.py to annotate tests
In the c-lightning tests we have `tests/conftest.py` which annotates test function with the outcome. If we use pyln-testing outside of the c-lightning tree we cannot rely on that annotation being there, so we assume it passed.
Configuration menu - View commit details
-
Copy full SHA for 9e59740 - Browse repository at this point
Copy the full SHA 9e59740View commit details -
hsm: Stabilize the hsm encryption and decryption tests
We were using sleeps to hope we catch the password prompt. This makes the test flaky. So I added a help text followed by a `fflush` to make sure we catcht he right moment, instead of guessing. The `fflush` is also useful for debugging if a user ever pipes the output to a file it'd get buffered and the user would wait forever. The same applies for automated systems such as `expect` or `pexpect` based scripts that enter the password on prompt.
Configuration menu - View commit details
-
Copy full SHA for c84473f - Browse repository at this point
Copy the full SHA c84473fView commit details -
We are going to signal the genesis block hash in the init message.
Configuration menu - View commit details
-
Copy full SHA for e6b8a02 - Browse repository at this point
Copy the full SHA e6b8a02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b13b88 - Browse repository at this point
Copy the full SHA 4b13b88View commit details -
connectd: add network to init message
Changelog-Added: protocol: We now signal the network we are running on at init.
Configuration menu - View commit details
-
Copy full SHA for 3322048 - Browse repository at this point
Copy the full SHA 3322048View commit details -
devtools/gossipwith: add a "network" option
If specified, this will add the corresponding chain_hash to the init message.
Configuration menu - View commit details
-
Copy full SHA for cd11c20 - Browse repository at this point
Copy the full SHA cd11c20View commit details -
tool/hsmtool: add a 'guesstoremote' command
This, in the case of data loss on a channel with `option_static_remotekey` negotiated, allows to likely (if the dbid is not unreasonable) recover the funds from a remote unilateral close just with the hsm_secret. Changelog-added: A new command, 'guesstoremote', is added to the hsmtool. It is meant to be used to recover funds after an unilateral close of a channel with `option_static_remotekey` enabled.
Configuration menu - View commit details
-
Copy full SHA for e5e4958 - Browse repository at this point
Copy the full SHA e5e4958View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36e8d83 - Browse repository at this point
Copy the full SHA 36e8d83View commit details -
doc: adds pyln deps to command for running blackbox tests
This one got missing when introducting `pyln` packages as test dependencies.
Configuration menu - View commit details
-
Copy full SHA for 895e061 - Browse repository at this point
Copy the full SHA 895e061View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc1f27c - Browse repository at this point
Copy the full SHA dc1f27cView commit details -
pylightning - allow unicode symbols in the description to be passed a…
…s-is to the daemon addresses issue ElementsProject#2753. Formatting the JSON with the default parameters will escape the unicode symbols in a way that c-lightning won't allow, leading to an exception. Changelog-Fixed: `pylightning` now handles unicode characters in JSON-RPC requests and responses correctly.
Configuration menu - View commit details
-
Copy full SHA for d712f73 - Browse repository at this point
Copy the full SHA d712f73View commit details
Commits on Dec 1, 2019
-
json: Add two param parsers for secrets and hex-encoded binary data
These are useful for the `createonion` JSON-RPC we're going to build next. The secret is used for the optional `session_key` while the hex-encoded binary is used for the `assocdata` field to which the onion commits. The latter does not have a constant size, hence the raw binary conversion.
Configuration menu - View commit details
-
Copy full SHA for de6bf3e - Browse repository at this point
Copy the full SHA de6bf3eView commit details -
sphinx: Promote TLV payloads to be non-experimental
This is what provides us with the ability to add custom fields in the payload when using `createonion` so make sure we actually have access to it. Changelog-Changed: The TLV payloads for the onion packets are no longer considered an experimental feature and generally available. Changelog-Added: Plugins may now handle modern TLV-style payloads via the `htlc_accepted` hook Signed-off-by: Christian Decker <@cdecker>
Configuration menu - View commit details
-
Copy full SHA for 714b572 - Browse repository at this point
Copy the full SHA 714b572View commit details -
json-rpc: Add
createonion
command similar to thedevtools/onion
toolThis allows us to create an onion in the JSON-RPC that we can then later inject with the `sendonion` command that we're about to implement.
Configuration menu - View commit details
-
Copy full SHA for 6ecdc3f - Browse repository at this point
Copy the full SHA 6ecdc3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8daf9b2 - Browse repository at this point
Copy the full SHA 8daf9b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e13ee29 - Browse repository at this point
Copy the full SHA e13ee29View commit details -
pay: Make wallet_payment->destination optional
If we use `sendonion` we don't actually know the destination, so we make the destination a pointer which is NULL if we don't know.
Configuration menu - View commit details
-
Copy full SHA for 41221b6 - Browse repository at this point
Copy the full SHA 41221b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57f13af - Browse repository at this point
Copy the full SHA 57f13afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42277a7 - Browse repository at this point
Copy the full SHA 42277a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb912c9 - Browse repository at this point
Copy the full SHA cb912c9View commit details -
pay: Handle payment failures resulting from sendonion correctly
We are breaking with a couple of assumptions, namely that we have the `path_secrets` to decode the error onion. If this happens we just want it to error out.
Configuration menu - View commit details
-
Copy full SHA for b8ce175 - Browse repository at this point
Copy the full SHA b8ce175View commit details -
Configuration menu - View commit details
-
Copy full SHA for 43fb2a6 - Browse repository at this point
Copy the full SHA 43fb2a6View commit details -
pay: Make
erring_node
optional instruct routing_failure
When using `sendonion` with `shared_secrets` we may be able to decode the onioned error message but we cannot infer which node reported the failure since we don't know which nodes where involved.
Configuration menu - View commit details
-
Copy full SHA for 88961aa - Browse repository at this point
Copy the full SHA 88961aaView commit details -
pay: Make
erring_channel
optional instruct routing_failure
Same rationale as the previous commit: we may not have the channels in the path so we don't try to infer the failing channel from the error.
Configuration menu - View commit details
-
Copy full SHA for 7e41d6c - Browse repository at this point
Copy the full SHA 7e41d6cView commit details -
pay: Allow
sendonion
callers to provideshared_secrets
This means that c-lightning can now internally decrypt an eventual error message, and not force the caller to implement the decryption. The main difficulty was that we now have a new state (channels and nodes not specified, while shared_secrets are specified) which needed to be handled.
Configuration menu - View commit details
-
Copy full SHA for 27547ce - Browse repository at this point
Copy the full SHA 27547ceView commit details -
cleanup: The failchannel is not tal-allocated when first assigned
This makes the copy on write redundant.
Configuration menu - View commit details
-
Copy full SHA for 1cf3c12 - Browse repository at this point
Copy the full SHA 1cf3c12View commit details -
json-rpc: Add the error onion if we stored it in the DB
If we can't decode the onion, because the onion got corrupted or we used `sendonion` without specifying the `shared_secrets` used, the best we can do is tell the caller instead.
Configuration menu - View commit details
-
Copy full SHA for 16b6c31 - Browse repository at this point
Copy the full SHA 16b6c31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 705e189 - Browse repository at this point
Copy the full SHA 705e189View commit details -
doc: Add manpages for
createonion
andsendonion
Changelog-Added: Added `createonion` and `sendonion` JSON-RPC methods allowing the implementation of custom protocol extensions that are not directly implemented in c-lightning itself.
Configuration menu - View commit details
-
Copy full SHA for 2080416 - Browse repository at this point
Copy the full SHA 2080416View commit details -
sphinx: Make the sphinx_hop struct public
We're about to create a param helper for sphinx hops and this struct seems like the correct place to store the result.
Configuration menu - View commit details
-
Copy full SHA for f569b52 - Browse repository at this point
Copy the full SHA f569b52View commit details -
param: Encapsulate hops parsing in a param_hops_array helper
Suggested-by: Rusty Russell <@rustyrussell> Signed-off-by: Christian Decker <@cdecker>
Configuration menu - View commit details
-
Copy full SHA for 55d8dcc - Browse repository at this point
Copy the full SHA 55d8dccView commit details -
json-rpc: Rename onion payload type to style
Suggested-by: Rusty Russell <@rustyrussell>
Configuration menu - View commit details
-
Copy full SHA for 21b5b59 - Browse repository at this point
Copy the full SHA 21b5b59View commit details -
json-rpc: Add helper for an array of secrets
Suggested-by: Rusty Russell <@rustyrussell>
Configuration menu - View commit details
-
Copy full SHA for 82255e2 - Browse repository at this point
Copy the full SHA 82255e2View commit details -
json-rpc: Only show the amount_msat field if we know it in payments
If we initiated the payment using an externally generated onion we don't know what the final hop gets, or even who it is, so we don't display the amount in these cases. I chose to show `null` instead in order not to break dependees that rely on the value being there.
Configuration menu - View commit details
-
Copy full SHA for 0b61781 - Browse repository at this point
Copy the full SHA 0b61781View commit details
Commits on Dec 2, 2019
-
lightningd: fix reference to out-of-scope var.
cppcheck found this: [lightningd/options.c:1137] -> [lightningd/options.c:1120] -> [lightningd/options.c:1193]: (error) Using pointer to local variable 'buf' that is out of scope. Indeed, answer can point into buf, which is no longer in scope at the end. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f36a4e - Browse repository at this point
Copy the full SHA 7f36a4eView commit details -
cheroot release(/"changes"?) notes: ElementsProject#218 via PR ElementsProject#219: Fix HTTP parser to return 400 on invalid major-only HTTP version in Request-Line. ElementsProject#198 via 9f7affe: Fix race condition when toggling stats counting in the middle of request processing. Improve post Python 3.9 compatibility checks. Fix support of abstract namespace sockets. ElementsProject#222 via 621f4ee: Fix socket.SO_PEERCRED constant fallback value under PowerPC Revisit PR ElementsProject#85 under PR ElementsProject#221. Now backports.functools_lru_cache is only required on Python 3.2 and earlier. CherryPy ElementsProject#1206 via PR ElementsProject#204: Fix race condition in threadpool shrink code. PR ElementsProject#224: Refactored “open URL” behavior in webtest to rely on retry_call. Callers can no longer pass raise_subcls or ssl_context positionally, but must pass them as keyword arguments. ElementsProject#231 via PR ElementsProject#232: Remove custom setup.cfg parser handling, allowing the project (including sdist) to build/run on setuptools 41.4. Now building cheroot requires setuptools 30.3 or later (for declarative config support) and preferably 34.4 or later (as indicated in pyproject.toml). Workers are now request-based, addressing the long-standing issue with keep-alive connections (ElementsProject#91 via PR ElementsProject#199). Deprecated use of negative timeouts as alias for infinite timeouts in ThreadPool.stop. CherryPy ElementsProject#1662 via PR ElementsProject#74: For OPTION requests, bypass URI as path if it does not appear absolute. CherryPy ElementsProject#1818: Restore support for None default argument to WebCase.getPage(). https://github.com/cherrypy/cheroot/blob/master/CHANGES.rst flaky changes: Bugfixes - Reraise KeyboardInterrupt when running tests under pytest. https://github.com/box/flaky/blob/v3.6.1/HISTORY.rst#361-2019-08-06 python-bitcoinlib: New RPC `generatetoaddress(self,numblocks,addr)`. Fixed Python 2.7 incompatibility. Various OpenSSL fixes, including a memory leak. https://github.com/petertodd/python-bitcoinlib/blob/python-bitcoinlib-v0.10.2/release-notes.md#v0102 pytest release notes: A lot of misc fixes, see https://docs.pytest.org/en/latest/changelog.html.
Configuration menu - View commit details
-
Copy full SHA for 4661dfa - Browse repository at this point
Copy the full SHA 4661dfaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9aeeb4 - Browse repository at this point
Copy the full SHA d9aeeb4View commit details
Commits on Dec 3, 2019
-
wire: Let the TLV _is_valid function actually return validity
I got this one wrong myself, since the function name implied a boolean result. So I changed it to take the optional err_index as argument.
Configuration menu - View commit details
-
Copy full SHA for 69c17d2 - Browse repository at this point
Copy the full SHA 69c17d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 838001a - Browse repository at this point
Copy the full SHA 838001aView commit details -
wire: Remove unused fromwire_tlvs
We are now using the typesafe variant everywhere.
Configuration menu - View commit details
-
Copy full SHA for 5a78671 - Browse repository at this point
Copy the full SHA 5a78671View commit details -
tlv: Add a typesafe serialization function for tlv namespaces
This is the counterpart to the typesafe deserialization function implemented in an earlier commit.
Configuration menu - View commit details
-
Copy full SHA for e12b5c3 - Browse repository at this point
Copy the full SHA e12b5c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 626675c - Browse repository at this point
Copy the full SHA 626675cView commit details -
Configuration menu - View commit details
-
Copy full SHA for db92c2a - Browse repository at this point
Copy the full SHA db92c2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7707896 - Browse repository at this point
Copy the full SHA 7707896View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0368a7 - Browse repository at this point
Copy the full SHA c0368a7View commit details -
update docs with
payment_preimage
.Changelog-Added: JSON-RPC: `listinvoices` now displays the payment preimage if the invoice was paid.
Configuration menu - View commit details
-
Copy full SHA for 99ff86f - Browse repository at this point
Copy the full SHA 99ff86fView commit details -
Init commit to be able to create a tor static service on the fly.
We want to have a static Tor service created from a blob bound to our node on cmdline Changelog-added: persistent Tor address support Changelog-added: allow the Tor inbound service port differ from 9735 Signed-off-by: Saibato <[email protected]> Add base64 encode/decode to common We need this to encode the blob for the tor service Signed-off-by: Saibato <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f6006f4 - Browse repository at this point
Copy the full SHA f6006f4View commit details -
Reflect the changes in documentation
Signed-off-by: Saibato <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b18510a - Browse repository at this point
Copy the full SHA b18510aView commit details -
Signed-off-by: Saibato <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2c16b41 - Browse repository at this point
Copy the full SHA 2c16b41View commit details
Commits on Dec 4, 2019
-
doc: feerate is not obvious, refer to fundchannel documentation:
It has a whole *two paragraphs* on it: *feerate* is an optional feerate used for the opening transaction and as initial feerate for commitment and HTLC transactions. It can be one of the strings *urgent* (aim for next block), *normal* (next 4 blocks or so) or *slow* (next 100 blocks or so) to use lightningd’s internal estimates: *normal* is the default. Otherwise, *feerate* is a number, with an optional suffix: *perkw* means the number is interpreted as satoshi-per-kilosipa (weight), and *perkb* means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting the suffix is equivalent to *perkb*. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4683d09 - Browse repository at this point
Copy the full SHA 4683d09View commit details -
plugins/fundchannel: try to connect to peer before funding
Changelog-Added: RPC: The 'fundchannel' command now tries to connect to the peer before funding the channel, no need to 'connect' before 'fundchannel' anymore !
Configuration menu - View commit details
-
Copy full SHA for ff412a6 - Browse repository at this point
Copy the full SHA ff412a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6ff5e5 - Browse repository at this point
Copy the full SHA f6ff5e5View commit details -
fundchannel: attempt to connect before funding channel
Attempts to connect to peer before funding the channel
Configuration menu - View commit details
-
Copy full SHA for a30ee2b - Browse repository at this point
Copy the full SHA a30ee2bView commit details
Commits on Dec 6, 2019
-
pytest: test rpc_command hook when it handles command to stop itself.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d8fc533 - Browse repository at this point
Copy the full SHA d8fc533View commit details -
plugin: handle corner case where rpc_command is to stop the plugin.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f6ed7f2 - Browse repository at this point
Copy the full SHA f6ed7f2View commit details
Commits on Dec 7, 2019
-
pytest: demonstrate failing rpc_command hook rewrite to plugin.
lightningd: lightningd/plugin.c:648: plugin_rpcmethod_dispatch: Assertion `idtok != NULL' failed. lightningd: FATAL SIGNAL 6 (version v0.7.3-234-gf3aeb51-modded) 0x557652363eb1 send_backtrace common/daemon.c:41 0x557652363f5b crashdump common/daemon.c:54 0x7f5b065a346f ??? ???:0 0x7f5b065a33eb ??? ???:0 0x7f5b06582898 ??? ???:0 0x7f5b06582768 ??? ???:0 0x7f5b06594005 ??? ???:0 0x557652355901 plugin_rpcmethod_dispatch lightningd/plugin.c:648 0x557652331836 command_exec lightningd/jsonrpc.c:588 0x557652331bad rpc_command_hook_callback lightningd/jsonrpc.c:655 0x557652358745 plugin_hook_callback lightningd/plugin_hook.c:90 0x55765235486a plugin_response_handle lightningd/plugin.c:258 0x557652354a16 plugin_read_json_one lightningd/plugin.c:356 0x557652354b6d plugin_read_json lightningd/plugin.c:388 0x5576523b5e6c next_plan ccan/ccan/io/io.c:59 0x5576523b6a51 do_plan ccan/ccan/io/io.c:407 0x5576523b6a93 io_ready ccan/ccan/io/io.c:417 0x5576523b8d2b io_loop ccan/ccan/io/poll.c:445 0x55765232dc6f io_loop_with_timers lightningd/io_loop_with_timers.c:24 0x557652334a6e main lightningd/lightningd.c:848 0x7f5b065841e2 ??? ???:0 0x5576523193ed ??? ???:0 0xffffffffffffffff ??? ???:0 Log dumped in crash.log.20191206093336 Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e572b48 - Browse repository at this point
Copy the full SHA e572b48View commit details -
lightningd: make sure rpc_command replacement is well-formed.
In particular: 1. It must redirect to an existing command. 2. It must contain method, params and id. And update the docs to show the id, which is vital. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 30c8db1 - Browse repository at this point
Copy the full SHA 30c8db1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44c23ed - Browse repository at this point
Copy the full SHA 44c23edView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd369ed - Browse repository at this point
Copy the full SHA bd369edView commit details
Commits on Dec 8, 2019
-
It's required, so at least hint about its presence! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f8d8348 - Browse repository at this point
Copy the full SHA f8d8348View commit details
Commits on Dec 9, 2019
-
common: don't crash on bad sphinx payload.
It's cleanest to eliminate the SPHINX_INVALID_PAYLOAD altogether. lightning_channeld: FATAL SIGNAL (version v0.7.3-242-gb1583bb-modded) 0x55a8169eed08 send_backtrace common/daemon.c:41 0x55a8169fc3eb status_failed common/status.c:206 0x55a8169fc657 status_backtrace_exit common/subdaemon.c:25 0x55a8169eedbb crashdump common/daemon.c:57 0x7f0eaff8446f ??? ???:0 0x7f0eaff843eb ??? ???:0 0x7f0eaff63898 ??? ???:0 0x55a8169fb29f route_step_decode common/sphinx.c:759 0x55a8169fb60a process_onionpacket common/sphinx.c:834 0x55a8169d9b34 get_shared_secret channeld/channeld.c:605 0x55a8169d9d35 handle_peer_add_htlc channeld/channeld.c:649 0x55a8169dd88d peer_in channeld/channeld.c:1838 0x55a8169e11a8 main channeld/channeld.c:3233 0x7f0eaff651e2 ??? Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb538a1 - Browse repository at this point
Copy the full SHA bb538a1View commit details -
common: make sphinx code ignorant of payload format.
Now "raw_payload" is always the complete string (including realm or length bytes at the front). This has several effects: 1. We can receive an decrypt an onion which is grossly malformed. 2. We can still hand this to the htlc_accepted hook. 3. We then fail it unless the htlc_accepted accepts it manually. 4. The createonion API now takes the raw payload, and does not know anything about "style". The only caveat is that the sphinx code needs to know the payload length: we have a call for that, which simply tells it to copy the entire onion (and treat us as the final node) if it's invalid. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f7ebbb2 - Browse repository at this point
Copy the full SHA f7ebbb2View commit details -
plugins/libplugin: notifications support
Changelog-Added: plugins: libplugin now supports writing plugin which registers to notifications
Configuration menu - View commit details
-
Copy full SHA for 3371f0c - Browse repository at this point
Copy the full SHA 3371f0cView commit details -
plugins/libplugin: hook support
Changelog-Added: plugins: libplugin now supports writing plugins which register to hooks
Configuration menu - View commit details
-
Copy full SHA for fcbd11f - Browse repository at this point
Copy the full SHA fcbd11fView commit details
Commits on Dec 10, 2019
-
build: fix ./configure options' descriptions
The description of --enable/disable-experimental-features was a bogus "Developer mode, good for testing" and --enable/disable-valgrind was "Valgrind binary to use for tests" which gave the false impression that it should be set to something like /usr/local/bin/valgrind whereas it is a boolean option.
Configuration menu - View commit details
-
Copy full SHA for cd30f76 - Browse repository at this point
Copy the full SHA cd30f76View commit details
Commits on Dec 11, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 518c43a - Browse repository at this point
Copy the full SHA 518c43aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 15f04d5 - Browse repository at this point
Copy the full SHA 15f04d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1b1f47 - Browse repository at this point
Copy the full SHA e1b1f47View commit details -
sphinx: Return the error in parse_onionpacket
As suggested by @niftynei here: ElementsProject#3260 (comment) Suggested-by: Lisa Neigut <@niftynei> Suggested-by: Rusty Russell <@rustyrussell> Signed-off-by: Christian Decker <@cdecker>
Configuration menu - View commit details
-
Copy full SHA for ff5f7b1 - Browse repository at this point
Copy the full SHA ff5f7b1View commit details -
pytest: Parametrize test_gossip_query_channel_range for elements
We were hardcoding the chainparams->chain_hash which caused the query to return an empty result. By parametrizing the test we can make it work on elements.
Configuration menu - View commit details
-
Copy full SHA for fc93787 - Browse repository at this point
Copy the full SHA fc93787View commit details -
pytest: Parametrize test_query_short_channel_id for elements
Same as the previous commit.
Configuration menu - View commit details
-
Copy full SHA for d6a5b87 - Browse repository at this point
Copy the full SHA d6a5b87View commit details -
pytest: Parametrize test_config_in_subdir for elements
Same as previous
Configuration menu - View commit details
-
Copy full SHA for 843846f - Browse repository at this point
Copy the full SHA 843846fView commit details -
pytest: Skip some tests in elements if paratrization is convoluted
These mainly use hard-coded addresses
Configuration menu - View commit details
-
Copy full SHA for 301b634 - Browse repository at this point
Copy the full SHA 301b634View commit details -
pytest: Stabilize and parameterize closing_specified_destination
This test was doing a few contortions, so I disentangled it a bit and parametrized it
Configuration menu - View commit details
-
Copy full SHA for 43dfb4d - Browse repository at this point
Copy the full SHA 43dfb4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cc60f5 - Browse repository at this point
Copy the full SHA 6cc60f5View commit details -
pytest: Stabilize the hsm_encryption test
Tailing the log when we expect the process to exit can be racy (in this case we were waiting for the last line that'd be printed).
Configuration menu - View commit details
-
Copy full SHA for 3def539 - Browse repository at this point
Copy the full SHA 3def539View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2986854 - Browse repository at this point
Copy the full SHA 2986854View commit details -
doc/lightningd-config: precise alias are 32 __bytes__ long.
And not 32 characters long, as a character (for example 🐨) can be 4 bytes long. Reported-By: Vasil Dimov <@vasild>
Configuration menu - View commit details
-
Copy full SHA for b4c18a1 - Browse repository at this point
Copy the full SHA b4c18a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38d88f1 - Browse repository at this point
Copy the full SHA 38d88f1View commit details -
lightningd: don't always defer commitment_signed if we're not synced.
Because my node runs under valgrind, it can take quite a while to sync; nodes tend to disconnect and reconnect if you block too long. This is particularly problematic since we often update fees: when the other side sends its commitment_signed we block. In particular, this triggers the corner case we have where we update_fee twice, disconnecting each time, and our state machine gets confused (which is why we never saw this exact corner case before this change in 0.7.3!). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d565133 - Browse repository at this point
Copy the full SHA d565133View commit details -
hsmtool: fixup miscount on params
assuming argv is zero indexed, we should check that the argc count is at least as big as the desired args
Configuration menu - View commit details
-
Copy full SHA for dd34ccc - Browse repository at this point
Copy the full SHA dd34cccView commit details -
Configuration menu - View commit details
-
Copy full SHA for d449423 - Browse repository at this point
Copy the full SHA d449423View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ca9380 - Browse repository at this point
Copy the full SHA 5ca9380View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9660549 - Browse repository at this point
Copy the full SHA 9660549View commit details
Commits on Dec 12, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 727d6a0 - Browse repository at this point
Copy the full SHA 727d6a0View commit details -
db: add partid, total_msat fields to payment entries.
This is in preparation for partial payments. For existing payments, partid is 0 (arbitrarity) and total_msat is msatoshi. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2d18c3a - Browse repository at this point
Copy the full SHA 2d18c3aView commit details -
db: add partid field to htlc_out.
This is in preparation for partial payments. For existing payments, partid is 0 (to match the corresponding payment). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 345ca9b - Browse repository at this point
Copy the full SHA 345ca9bView commit details -
htlcs: remove origin_htlc_id from htlc_out.
This is a transient field, so rework things so we don't leave it in struct htlc_out. Instead, load htlc_in first and connect htlc_out to them as we go. This also changes one place where we use it instead of the am_origin flag. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1298533 - Browse repository at this point
Copy the full SHA 1298533View commit details -
lightningd: share more code between sendpay and sendonion.
In particular, we're about to do surgery on the detection-of-previous-payments logic, and we should not do this in two places. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 618c390 - Browse repository at this point
Copy the full SHA 618c390View commit details -
lightningd: change amount-in-flight check to be more nuanced.
We currently refuse a payment if one is already in flight. For parallel payments, it's a bit more subtle: we want to refuse if it we already have the total-amount-of-invoice in flight. So we get all the current payments, and sum the pending ones. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce4403d - Browse repository at this point
Copy the full SHA ce4403dView commit details -
sendpay/sendonion: add optional partid arg, finesse msatoshi argument.
msatoshi was used to indicate the amount the invoice asked for, but for parallel sendpay it's required, as it allows our sanity check of limiting the total payments in flight, ie. it becomes 'total_msat'. There's a special case for sendonion, which always tells us the value is 0. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cd35835 - Browse repository at this point
Copy the full SHA cd35835View commit details -
configure: make partid payments only available with EXPERIMENTAL_FEAT…
…URES and payment_secret Explicit #if EXPERIMENTAL_FEATURES check in case we enable them at different times, but it requires a payment_secret since we put them in the same field. This incidently stops it working on legacy nodes. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 63fffd4 - Browse repository at this point
Copy the full SHA 63fffd4View commit details -
We need to be able to wait for a unique payment, now payment_hash is not always unique. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b670b51 - Browse repository at this point
Copy the full SHA b670b51View commit details -
pytest: Add tests to make sure received onion is as expected.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 280523e - Browse repository at this point
Copy the full SHA 280523eView commit details -
doc: update experimental bolt version quotes.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0e4a30c - Browse repository at this point
Copy the full SHA 0e4a30cView commit details -
lightningd: cleanup redundant args from handle_localpay
The cltv_expiry and payment_hash are in hin, so no need to hand them in here. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8b129b4 - Browse repository at this point
Copy the full SHA 8b129b4View commit details -
lightningd: split invoice check into separate function.
We now return the same error for various "does not match this invoice", so it makes sense to encapsulate these checks. We'll also want to expose this for multi-part payments. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f629e5 - Browse repository at this point
Copy the full SHA 7f629e5View commit details -
lightningd: implement htlc sets.
This isn't plumbed in yet, but the idea is that every htlc gets put into a "set" and then we process them once the set is satisfied. For the !EXPERIMENTAL_FEATURES, the set is simply always size 1. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36b1e88 - Browse repository at this point
Copy the full SHA 36b1e88View commit details -
lightningd: wrap htlc replay in a database transaction.
AFAICT this only "worked" previously because replay htlc simply failed them all (no peers are currently connected). With upcoming changes (foreshadowed by the comment) this is no longer true: Attempting to prepare a db_stmt outside of a transaction: wallet/invoices.c:373 lightningd: FATAL SIGNAL 6 (version v0.7.3-188-g45b0af4-modded) 0x55b475590a73 send_backtrace common/daemon.c:41 0x55b475590b1d crashdump common/daemon.c:54 0x7f16c557b46f ??? ???:0 0x7f16c557b3eb ??? ???:0 0x7f16c555a898 ??? ???:0 0x55b475564c8f fatal lightningd/log.c:814 0x55b4755c3ed5 db_prepare_v2_ wallet/db.c:605 0x55b4755c76b5 invoices_find_unpaid wallet/invoices.c:373 0x55b4755ce91c wallet_invoice_find_unpaid wallet/wallet.c:1990 0x55b47555861f invoice_check_payment lightningd/invoice.c:257 0x55b475557a7c htlc_add_set lightningd/htlc_set.c:112 0x55b47557b294 handle_localpay lightningd/peer_htlcs.c:332 0x55b47557c63c htlc_accepted_hook_callback lightningd/peer_htlcs.c:857 0x55b475585573 plugin_hook_call_ lightningd/plugin_hook.c:118 0x55b47557c747 plugin_hook_call_htlc_accepted lightningd/peer_htlcs.c:882 0x55b47557ca3e peer_accepted_htlc lightningd/peer_htlcs.c:991 0x55b47557ffb9 htlcs_resubmit lightningd/peer_htlcs.c:2131 0x55b4755620f7 main lightningd/lightningd.c:801 Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c2b357b - Browse repository at this point
Copy the full SHA c2b357bView commit details -
The invoice_try_pay code now takes a set, rather than a single htlc, but it's basically the same thing. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8e3234e - Browse repository at this point
Copy the full SHA 8e3234eView commit details -
plugins: listpays ignores pre-0.7.0 or manual sendpay payments w/ no …
…bolt11. The pay plugin has been supplying the bolt11 string since 0.7.0, so only ancient "pay" commands would be omitted by this change. You can create a no-bolt11 "sendpay" manually, but then you'll find it in 'listsendpays'. Changelog-Removed: JSON: `listpays` won't shown payments made via sendpay without a bolt11 string, or before 0.7.0. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f1bc0b2 - Browse repository at this point
Copy the full SHA f1bc0b2View commit details -
plugins: listpays will now consolidate multi-part payments.
This won't usually be visible to the end-user, since the pay plugin doesn't do multi-part yet (and mpp requires EXPERIMENTAL_FEATURES), but we're ready once it does. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 207689c - Browse repository at this point
Copy the full SHA 207689cView commit details -
common: offer option_basic_mpp for EXPERIMENTAL_FEATURES.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5d413e0 - Browse repository at this point
Copy the full SHA 5d413e0View commit details -
pytest: add more multi-part-payment tests.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 326ceab - Browse repository at this point
Copy the full SHA 326ceabView commit details -
lightningd: require payment_secret for MPP.
It makes sense, and it's been proposed for addition to the spec to broad agreement: lightning/bolts#712 Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7fb4efd - Browse repository at this point
Copy the full SHA 7fb4efdView commit details -
lightningd: fix spurious "more than twice final" error.
Bastien TEINTURIER <[email protected]> writes: > It looks like the split on c-lightning side is quite limited at the moment: > the only option is to split a payment in exactly its two halves, > otherwise I get rejected because of the rule of overpaying more than > twice the amount? We only tested exactly two equal-size payments; indeed, our finalhop test was backwards. We only complain if the final hop pays more than twice msat (technically, this test is still too loose for mpp: the spec says we should sum to the exact amount). Reported-by: @t-bast Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for edab0df - Browse repository at this point
Copy the full SHA edab0dfView commit details -
lightningd: fix failure message in waitsendpay with multi-part payments.
Bastien TEINTURIER <[email protected]> writes: > One thing I noticed but didn't investigate much: after sending the two > payments, I tried using `waitsendpay` and it reported an error *208* > (*"Never attempted payment for > '98ee736d29d860948e436546a88b0cc84f267de8818531b0fdbe6ce3d080f22a'"*). > > I was expecting the result to be something like: "payment succeeded for > that payment hash" (the HTLCs were correctly settled). Indeed, if you waitsendpay without specifying a partid, you are waiting for 0, which may not exist. Clarify the error msg. Reported-by: @t-bast Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ec15051 - Browse repository at this point
Copy the full SHA ec15051View commit details -
common: add fee_states state machine for update_fee.
This uses the same state machine as HTLCs, but they're only ever added, not removed. Since we can only have one in each state, we use a simple array; mostly NULL. We could make this more space-efficient by folding everything into the first 5 states, but that would be more complex than just using the identical state machine. One subtlety: we don't send uncommitted fee_states over the wire. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b9d6e8b - Browse repository at this point
Copy the full SHA b9d6e8bView commit details -
channeld: cleanup: use the channel_feerate() accessor everywhere.
And also move it to initial_channel, so we can use it there. This saves churn in the next patch. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8ffd9d5 - Browse repository at this point
Copy the full SHA 8ffd9d5View commit details -
channeld: generate revoke_and_ack before telling lightningd about com…
…mitment. The `channel_got_commitsig` we send the lightningd also implies we sent the revoke_and_ack, as an optimization. It doesn't currently matter, since channel_sending_revoke_and_ack doesn't do anything important to the state, but that changes once we start uploading the entire fee_states. So now we move our state machine *before* sending to lightningd, in preparation for sending fee_states too. Unfortunately, we need to marshall the info to send before we increment the state, as lightningd expects that. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for acb89de - Browse repository at this point
Copy the full SHA acb89deView commit details -
channeld: use fee_states internally.
This is an intermediary step: we still don't save it to the database, but we do use the fee_states struct to track it internally. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 24d54f9 - Browse repository at this point
Copy the full SHA 24d54f9View commit details -
channeld: remove changes_pending flags.
These used to be necessary as we could have feerate changes which we couldn't track: now we do, we don't need these flags. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2673a4 - Browse repository at this point
Copy the full SHA d2673a4View commit details -
wallet: add per-channel feerate_state to the database.
The upgrade here is a bit tricky: we map the two values into the feerate_state. This is trivial if they're both the same, but if they're different we don't know exactly what state they're in (this being the source of the bug!). So, we assume that the have received the update and not acked it, as that would be the normal case. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4270031 - Browse repository at this point
Copy the full SHA 4270031View commit details -
lightningd: save the fee_states into the database.
This is the final step: we pass the complete fee_states to and from channeld. Changelog-Fixed: "Bad commitment signature" closing channels when we sent back-to-back update_fee messages across multiple reconnects. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 72aa315 - Browse repository at this point
Copy the full SHA 72aa315View commit details -
devtools: fix example at top of mkcommit.
The norm for channels is a 1% reserve. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e521aae - Browse repository at this point
Copy the full SHA e521aaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb7c678 - Browse repository at this point
Copy the full SHA fb7c678View commit details -
lightningd: remove htlc_set destruction timer once we head to invoice.
Otherwise tests for hold_invoice fail on Travis (they use 180 / 2 as the timeout, and we free it after 70 seconds). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2e97afd - Browse repository at this point
Copy the full SHA 2e97afdView commit details -
Protocol: make var_onion, payment_secret and basic_mpp non-EXPERIMENTAL.
Thanks to @t-bast, who made this possible by interop testing with Eclair! Changelog-Added: Protocol: can now send and receive TLV-style onion messages. Changelog-Added: Protocol: can now send and receive BOLT11 payment_secrets. Changelog-Added: Protocol: can now receive basic multi-part payments. Changelog-Added: RPC: low-level commands sendpay and waitsendpay can now be used to manually send multi-part payments. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 839909d - Browse repository at this point
Copy the full SHA 839909dView commit details
Commits on Dec 13, 2019
-
channeld: treat all incoming errors as "soft", so we retry.
We still close the channel if we *send* an error, but we seem to have hit another case where LND sends an error which seems transient, so this will make a best-effort attempt to preserve our channel in that case. Some test have to be modified, since they don't terminate as they did previously :( Changelog-Changed: quirks: We'll now reconnect and retry if we get an error on an established channel. This works around lnd sending error messages that may be non-fatal. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1d0c433 - Browse repository at this point
Copy the full SHA 1d0c433View commit details -
tools: don't use bytelength as array length for arrays in TLVs.
This matters now we have an array in tlv_init_tlvs! We were overallocating in fromwire by 32x! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eb6a768 - Browse repository at this point
Copy the full SHA eb6a768View commit details -
wire: perform corruption test on init_msg.
Fixes: ElementsProject#3301 Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b315a29 - Browse repository at this point
Copy the full SHA b315a29View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb2b225 - Browse repository at this point
Copy the full SHA eb2b225View commit details
Commits on Dec 16, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 250fc79 - Browse repository at this point
Copy the full SHA 250fc79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fe8cd8 - Browse repository at this point
Copy the full SHA 1fe8cd8View commit details -
doc: fix the path to the sqlite database file
The sqlite database location has been changed in aab83e7. Changelog-None
Configuration menu - View commit details
-
Copy full SHA for bf1f768 - Browse repository at this point
Copy the full SHA bf1f768View commit details -
Configuration menu - View commit details
-
Copy full SHA for c15169b - Browse repository at this point
Copy the full SHA c15169bView commit details
Commits on Dec 17, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 7b15419 - Browse repository at this point
Copy the full SHA 7b15419View commit details -
Configuration menu - View commit details
-
Copy full SHA for 830dbb1 - Browse repository at this point
Copy the full SHA 830dbb1View commit details