-
Notifications
You must be signed in to change notification settings - Fork 0
List channel peers rpc #2
List channel peers rpc #2
Commits on Mar 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for be8ed8c - Browse repository at this point
Copy the full SHA be8ed8cView commit details
Commits on Mar 14, 2023
-
plugins/pay: revert removal of paying invoice without description.
It's still deprecated: we need the description since 1. This information is useful for any validation we want to do, such as the HSM, or runes. 2. We want this information in listpays so we can tell what we actually paid. 3. In general, we should never sign commitments to things we don't have! I expect to have this information about payments *whatever the frontend* is, which is why we deprecated (and then removed) this unintended use. The spec is pretty clear on this: BOLT ElementsProject#11: ``` A reader: ... - MUST check that the SHA2 256-bit hash in the `h` field exactly matches the hashed description. ``` However, neither BTCPayServer nor lnbits updated despite the long deprecation period, so revert 2afe7a1. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cdf803c - Browse repository at this point
Copy the full SHA cdf803cView commit details -
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bfc6fed - Browse repository at this point
Copy the full SHA bfc6fedView commit details
Commits on Mar 17, 2023
-
Added clarification for sums signing, file ownership, and pyln publishing as well as a reminder to update pyln version for the release. Changelog-None
Configuration menu - View commit details
-
Copy full SHA for dcc66d5 - Browse repository at this point
Copy the full SHA dcc66d5View commit details
Commits on Mar 18, 2023
-
fix: partial fix lnprototest runner
This reintroduce lnprototest after 2 releases, there was a lot of breaking around it and this will patch them (most of them)! However, there are some issue related to channel opening and closing that need some additional love and are disabled for now, but I think it is good to introduce lnprototest now again in the CI, to be able to stress the fix for now and see if there are other problem around. I will take care of it! Changelog-None Signed-off-by: Vincenzo Palazzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4f3f3de - Browse repository at this point
Copy the full SHA 4f3f3deView commit details -
common/hsm_version: list sha256 for every known version.
Makes it easier when we remove support for a version. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fd04f46 - Browse repository at this point
Copy the full SHA fd04f46View commit details -
We promised two versions after v0.12, and here we are. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1c4f6ab - Browse repository at this point
Copy the full SHA 1c4f6abView commit details -
lightningd: remove deprecated behavior where checkmessage would fail …
…quietly. Signed-off-by: Rusty Russell <[email protected]> Changelog-Removed: JSON-RPC: `checkmessage` now always returns an error when the pubkey is not specified and it is unknown in the network graph (deprecated v0.12.0)
Configuration menu - View commit details
-
Copy full SHA for 06b9009 - Browse repository at this point
Copy the full SHA 06b9009View commit details -
lightningd: remove deprecated local_msat, remote_msat from listpeers.
Changelog-Removed: JSON-RPC: `listpeers`.`local_msat` and `listpeers`.`remote_msat` (deprecated v0.12.0) Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 67f23c1 - Browse repository at this point
Copy the full SHA 67f23c1View commit details -
global: remove deprecated non-msat-named msat fields.
Signed-off-by: Rusty Russell <[email protected]> Changelog-Removed: JSON-RPC: all the non-msat-named millisatoshi fields deprecated in v0.12.0.
Configuration menu - View commit details
-
Copy full SHA for 780f32d - Browse repository at this point
Copy the full SHA 780f32dView commit details -
global: remove deprecated "msat" suffix on msat fields.
Signed-off-by: Rusty Russell <[email protected]> Changelog-Removed: JSON-RPC: the "msat" suffix on millisatoshi fields, as deprecated in v0.12.0.
Configuration menu - View commit details
-
Copy full SHA for 983542f - Browse repository at this point
Copy the full SHA 983542fView commit details -
cleanup: rename json_add_amount_msat_only to json_add_amount_msat
Now there's no compat variant, we can rename this function. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9366e6b - Browse repository at this point
Copy the full SHA 9366e6bView commit details -
lightningd: require "jsonrpc": "2.0" as per JSONRPC spec.
Signed-off-by: Rusty Russell <[email protected]> Changelog-Removed: JSON-RPC: require the `"jsonrpc": "2.0"` property (requests without this deprecated in v0.10.2).
Configuration menu - View commit details
-
Copy full SHA for 658bae3 - Browse repository at this point
Copy the full SHA 658bae3View commit details -
pytest: don't run test_backfill_scriptpubkeys under valgrind in CI.
It seems that bitcoind frequently dies on this test. I assume running the multiple nodes under valgrind with the extra 214 blocks is too memory-hungry? Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for acf01f4 - Browse repository at this point
Copy the full SHA acf01f4View commit details -
cln_plugin: add
shutdown()
method toPlugin
When plugins receive a "shutdown" notification, then can call this method which will shutdown `cln_plugin`. Then they can await `plugin.join()` and do any remaining cleanup there. This helps avoid a pain-point where plugin authors need to handle 2 separate plugin shutdown mechanisms ElementsProject#6040
Configuration menu - View commit details
-
Copy full SHA for 57d2120 - Browse repository at this point
Copy the full SHA 57d2120View commit details
Commits on Mar 20, 2023
-
ci: add timeout field to 2h for each task
Signed-off-by: Vincenzo Palazzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ba4f0c8 - Browse repository at this point
Copy the full SHA ba4f0c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c641bd - Browse repository at this point
Copy the full SHA 6c641bdView commit details -
plugin: fetchinvoice: set the quantity in invreq
While the user trying to fetch an invoice by specifing the quantity we do not work as expected. Running the command ``` lightning-cli fetchinvoice -k offer='lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqffqszsk2p6hycmgv9ek2grpyphxjcm9ypmkjer8v46pyzmhd9jxwet5wvhxxmmdzsqs593pq0ylsvakdua5h976f4g3eautgjt3udvtyga47eaw7339sjrhpwpwz' quantity=2 ``` and we answer back with ```json { "code": -32602, "message": "quantity parameter required" } ``` This is caused because we forget to bind the `quanity` field from the RPC into the `invrequest`. Reported-by: @aaronbarnardsound Link: ElementsProject#6089 Signed-off-by: Vincenzo Palazzo <[email protected]> Changelog-EXPERIMENTAL: fetchinvoice: fix: do not ignore the `quantity` field into the invreq field.
Configuration menu - View commit details
-
Copy full SHA for fca6211 - Browse repository at this point
Copy the full SHA fca6211View commit details
Commits on Mar 21, 2023
-
Output channel_id in listfunds
Changelog-Added: JSON-RPC: `listfunds` now has a `channel_id` field.
Configuration menu - View commit details
-
Copy full SHA for 906279a - Browse repository at this point
Copy the full SHA 906279aView commit details -
connectd: log status_failed on TOR problems
This changes connectd to use `status_fail()` on TOR problems during statup instead of `err()`. Using `err()` did not write to the logfile. To find out TOR problems during startup, the user needed to stop the system daemon and call `lightningd` manually in console to see the error. `status_fail()` logs and exits, but also prints a whole stacktrace, which is a bit too much imho on config errors. But currently there is no `status_SOMETHING` method that logs, prints and exists on an error without stacktrace. Changelog-None
Configuration menu - View commit details
-
Copy full SHA for 9a3f69a - Browse repository at this point
Copy the full SHA 9a3f69aView commit details
Commits on Mar 22, 2023
-
pytest: add timeout to test_feerate_stress.
This seems to be getting stuck in CI, so make sure we time out if it happens. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f18862 - Browse repository at this point
Copy the full SHA 2f18862View commit details -
channeld: don't spin trying to send commitment while waiting.
We would sleep for 10msec (default) and try again, spamming the logs every second. But we're waiting for revoke_and_ack, and that handler already sets off the timer, so there's no need to spin at all! Fixes: ElementsProject#6077 Changelog-Fixed: `channeld`: no longer spin and spam logs when waiting for revoke_and_ack. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 03c153a - Browse repository at this point
Copy the full SHA 03c153aView commit details -
build(deps): bump werkzeug from 2.2.2 to 2.2.3
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/pallets/werkzeug/releases) - [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst) - [Commits](pallets/werkzeug@2.2.2...2.2.3) --- updated-dependencies: - dependency-name: werkzeug dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 48c334d - Browse repository at this point
Copy the full SHA 48c334dView commit details -
common: update HSM_MIN_VERSION to reflect reality.
We were handing 3 to hsmd (and Ken added that in 7b2c561, so I guess he's OK with that being the minimum supported version!). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 21a1b4e - Browse repository at this point
Copy the full SHA 21a1b4eView commit details -
hsmd: new version, which tells us the HSM version, and capabilities.
Importantly, adds the version number at the *front* to help future parsing. Signed-off-by: Rusty Russell <[email protected]> Header from folded patch 'fix-hsm-check-pubkey.patch': fixup! hsmd: capability addition: ability to check pubkeys.
Configuration menu - View commit details
-
Copy full SHA for e02f5f5 - Browse repository at this point
Copy the full SHA e02f5f5View commit details -
hsmd: capability addition: ability to check pubkeys.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 91a9cf3 - Browse repository at this point
Copy the full SHA 91a9cf3View commit details -
lightningd: move bip32_base pointer into struct lightningd.
It's needed as the db and wallet is being set up (db migrations), so it's simpler this way to always use ld->bip32_base for the next patch. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3f02797 - Browse repository at this point
Copy the full SHA 3f02797View commit details -
lightningd: move bip32_pubkey here from common/, add hsm check.
At the moment only lightingd needs it, and this avoids missing any places where we do bip32 derivation. This uses a hsm capability to mean we're backwards compatible with older hsmds. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: we now always double-check bitcoin addresses are correct (no memory errors!) before issuing them.
Configuration menu - View commit details
-
Copy full SHA for 3db3dc9 - Browse repository at this point
Copy the full SHA 3db3dc9View commit details -
wallet/db: don't use migration_context.
`struct lightningd` is not completely initialized, so we added a "migration_context" which only had some of the fields. But we ended up handing in `struct lightningd` anyway, so I don't think this complexity is worthwhile. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for df085a8 - Browse repository at this point
Copy the full SHA df085a8View commit details
Commits on Mar 23, 2023
-
fuzz: avoid buffer overflow in bech32 target
If the fuzzer passes an empty data buffer, the fuzz target currently attempts to read from it. We should short-circuit instead.
Configuration menu - View commit details
-
Copy full SHA for 07527d9 - Browse repository at this point
Copy the full SHA 07527d9View commit details -
fuzz: fix UBSan nullability error
The issue is that common_setup() wasn't called by the fuzz target, leaving secp256k1_ctx as NULL. UBSan error: $ UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1" \ ./fuzz-channel_id crash-1575b41ef09e62e4c09c165e6dc037a110b113f2 INFO: Running with entropic power schedule (0xFF, 100). INFO: Seed: 1153355603 INFO: Loaded 1 modules (25915 inline 8-bit counters): 25915 [0x563bae7ac3a8, 0x563bae7b28e3), INFO: Loaded 1 PC tables (25915 PCs): 25915 [0x563bae7b28e8,0x563bae817c98), ./fuzz-channel_id: Running 1 inputs 1 time(s) each. Running: crash-1575b41ef09e62e4c09c165e6dc037a110b113f2 bitcoin/pubkey.c:22:33: runtime error: null pointer passed as argument 1, which is declared to never be null external/libwally-core/src/secp256k1/include/secp256k1.h:373:3: note: nonnull attribute specified here #0 0x563bae41e3db in pubkey_from_der bitcoin/pubkey.c:19:7 ElementsProject#1 0x563bae4205e0 in fromwire_pubkey bitcoin/pubkey.c:111:7 ElementsProject#2 0x563bae46437c in run tests/fuzz/fuzz-channel_id.c:42:3 ElementsProject#3 0x563bae2f6016 in LLVMFuzzerTestOneInput tests/fuzz/libfuzz.c:23:2 ElementsProject#4 0x563bae20a450 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) ElementsProject#5 0x563bae1f4c3f in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) ElementsProject#6 0x563bae1fa6e6 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) ElementsProject#7 0x563bae223052 in main (tests/fuzz/fuzz-channel_id+0x181052) (BuildId: f7f56e14ffc06df54ab732d79ea922e773de1f25) ElementsProject#8 0x7fa7fa113082 in __libc_start_main ElementsProject#9 0x563bae1efbdd in _start SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior bitcoin/pubkey.c:22:33 in
Configuration menu - View commit details
-
Copy full SHA for 3192be5 - Browse repository at this point
Copy the full SHA 3192be5View commit details -
test: add PSBT field that doesn't collide with PSBTv2 fields
Which gets libwally upset post-update to 0.8.8
Configuration menu - View commit details
-
Copy full SHA for 5eddf3c - Browse repository at this point
Copy the full SHA 5eddf3cView commit details -
Update libwally to 0.8.8, support PSBTv2
Libwally update breaks compatibility, so we do this in one large step. Changelog-Changed: JSON-RPC: elements network PSET now only supports PSETv2. Changelog-Added: JSON-RPC: PSBTv2 supported for fundchannel_complete, openchannel_update, reserveinputs, sendpsbt, signpsbt, withdraw and unreserveinputs parameter psbt, openchannel_init and openchannel_bump parameter initialpsbt, openchannel_signed parameter signed_psbt and utxopsbt parameter utxopsbt
Configuration menu - View commit details
-
Copy full SHA for 908f834 - Browse repository at this point
Copy the full SHA 908f834View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb7caa3 - Browse repository at this point
Copy the full SHA cb7caa3View commit details -
Add PSBT version setting RPC to aid with debugging and compatibility
PSBTv2 support is quite low in the ecosystem, so having a call to convert log messages and the like should be useful since they'll often be in v2. Changelog-Added: Added setpsbtversion RPC to aid debugging and compatibility
Configuration menu - View commit details
-
Copy full SHA for 887c6f7 - Browse repository at this point
Copy the full SHA 887c6f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf662e5 - Browse repository at this point
Copy the full SHA cf662e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7bf529 - Browse repository at this point
Copy the full SHA e7bf529View commit details -
Configuration menu - View commit details
-
Copy full SHA for c85bce9 - Browse repository at this point
Copy the full SHA c85bce9View commit details -
Docker: run directory for post-start if present.
Also, fix the case where we didn't use --network with EXPOSE_TCP, as reported by @theborakompanioni: ``` I get Wrong network! Our Bitcoin backend is running on 'regtest', but we expect 'main'. with LIGHTNINGD_NETWORK := regtest when param --network is not provided. ``` Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aa1a0e3 - Browse repository at this point
Copy the full SHA aa1a0e3View commit details -
plugin: autoclean: cleanup the forwards with localfailed
While we are cleaning up the list forwards with the autoclean plugin we are not taking into count the forward's payments with the status set to `local_failed`. In this case, the forwards have no resolved time because it was not resolved by us due to some local error. So, this commit is fixing the auto clean plugin by allowing to delete of the forwards with status set to local_failed by taking into count the received_time, with the assumption that the received_time, in this case, is equal to the resolved time (?) Reported-by: @denis2342 Link: ElementsProject#6058 Signed-off-by: Vincenzo Palazzo <[email protected]> Changelog-Fixed: plugin: autoclean: considerer the forwards with status set to `local_failed`.
Configuration menu - View commit details
-
Copy full SHA for 3424f70 - Browse repository at this point
Copy the full SHA 3424f70View commit details
Commits on Mar 24, 2023
-
grpc: make the mTLS private keys user-readable only
Fixes ElementsProject#6064 Reported-by: denis2342 <@denis2342> Changelog-Changed: grpc: The mTLS private keys are no longer group-readable
Configuration menu - View commit details
-
Copy full SHA for 97de4f8 - Browse repository at this point
Copy the full SHA 97de4f8View commit details -
msggen: Allow using deprecated fields in the rpc -> grpc conversion
We should rather hand the annotation through to the user code, and warn there.
Configuration menu - View commit details
-
Copy full SHA for 7d7b2ab - Browse repository at this point
Copy the full SHA 7d7b2abView commit details
Commits on Mar 25, 2023
-
wallet: add comment on db noting that
ON DELETE CASCADE
is never used.We actually have an assertion that there are no channels remaining when we delete peers, so this is confusing! Actually removing the constraint is db-specific and deeply non-trivial. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 98d425f - Browse repository at this point
Copy the full SHA 98d425fView commit details -
wallet: only delete peer from db if it's unused.
This relaxes the assertion that it won't be used, and renames the function to be clear. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0901117 - Browse repository at this point
Copy the full SHA 0901117View commit details -
wallet: don't clear reference from channel to peers table when we clo…
…se channel. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ae861d1 - Browse repository at this point
Copy the full SHA ae861d1View commit details -
db_bind_scid: rename to db_bind_short_channel_id
We used to have a text version, so this was named 'scid'. Fix it now. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d9e274c - Browse repository at this point
Copy the full SHA d9e274cView commit details -
db_col_optional: wrapper for case where a field is allowed to be NULL.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aae7780 - Browse repository at this point
Copy the full SHA aae7780View commit details -
We don't cover three common patterns: 1. Optional integers (db_col_u64 has different form from structs) 2. Optional strings. 3. Optional array fields. But it does neaten and reduce the scope for cut&paste errors in the common "if not-NULL, tal and assign". Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f720e0f - Browse repository at this point
Copy the full SHA f720e0fView commit details -
wallet: make it clear that
enum state_change
is in db.Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6e1eafb - Browse repository at this point
Copy the full SHA 6e1eafbView commit details -
wallet: add accessor for closed channels.
This doesn't restore every bit of information we have, but it does contain the important ones. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4b6e964 - Browse repository at this point
Copy the full SHA 4b6e964View commit details -
common: expose routine to map channel_type to feature names.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4549002 - Browse repository at this point
Copy the full SHA 4549002View commit details -
plugins/sql: handle case of subobject with sub-arrays.
i.e. recurse properly in SQL generation. This is about to happen. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c9ddf9d - Browse repository at this point
Copy the full SHA c9ddf9dView commit details -
plugins/sql: recurse correctly into complex objects during processing.
We didn't handle the case of an array inside a subobject. But that happens when we add the next commit! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d818614 - Browse repository at this point
Copy the full SHA d818614View commit details -
listpeerchannels: add channel_type, both in hex and as array of names.
Changelog-Added: JSON-RPC: `listpeerchannels` now has `channel_type` field. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e75cf2e - Browse repository at this point
Copy the full SHA e75cf2eView commit details -
lightningd: add listclosedchannels command.
Changelog-Added: JSON-RPC: `listclosedchannels` to show old, dead channels we previously had with peers. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 89f91b9 - Browse repository at this point
Copy the full SHA 89f91b9View commit details -
plugins/sql: add listclosedchannels
Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: JSON-RPC: `sql` now includes `listclosedchannels`.
Configuration menu - View commit details
-
Copy full SHA for b8519a6 - Browse repository at this point
Copy the full SHA b8519a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a80c1ae - Browse repository at this point
Copy the full SHA a80c1aeView commit details -
docs: Structure the files in mkdocs
We have 3 personas: - Users - Developers - Maintainers The first one basically cover the installation documentation. The latter two are sorted into the "Developer" category, and the reference category serves as a quick lookup for facts on anything CLN related.
Configuration menu - View commit details
-
Copy full SHA for 178e0b6 - Browse repository at this point
Copy the full SHA 178e0b6View commit details -
docs: Fix a number of broken links in the generated docs
Changelog-None
Configuration menu - View commit details
-
Copy full SHA for 458195c - Browse repository at this point
Copy the full SHA 458195cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1293ed - Browse repository at this point
Copy the full SHA f1293edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67a39b5 - Browse repository at this point
Copy the full SHA 67a39b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f19792c - Browse repository at this point
Copy the full SHA f19792cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 826c746 - Browse repository at this point
Copy the full SHA 826c746View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7153bef - Browse repository at this point
Copy the full SHA 7153befView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4efe6c - Browse repository at this point
Copy the full SHA f4efe6cView commit details
Commits on Mar 26, 2023
-
docs: update autogenerate file
Signed-off-by: Vincenzo Palazzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4c6966d - Browse repository at this point
Copy the full SHA 4c6966dView commit details
Commits on Mar 30, 2023
-
wallet/psbt_fixup: routine to fix invalid PBSTs which modern libwally…
… won't load. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7174d06 - Browse repository at this point
Copy the full SHA 7174d06View commit details -
wallet/test/run-psbt_fixup.c: test for psbt fixups.
Should do nothing to normal ones, but fix up old invalids ones. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f1fa75f - Browse repository at this point
Copy the full SHA f1fa75fView commit details -
wallet: fix up PSBTs as a migration.
In the now-misnamed "last_tx" field. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5bb0270 - Browse repository at this point
Copy the full SHA 5bb0270View commit details -
wallet: don't silently load invalid last_tx psbts.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2cb96a8 - Browse repository at this point
Copy the full SHA 2cb96a8View commit details
Commits on Apr 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 415b7d5 - Browse repository at this point
Copy the full SHA 415b7d5View commit details -
commando: save runes as we generate them
In preparation for the listrunes command.
Configuration menu - View commit details
-
Copy full SHA for 080a4dd - Browse repository at this point
Copy the full SHA 080a4ddView commit details -
Changelog-Added: Plugins: `commando-listrunes` command to show issued runes.
Configuration menu - View commit details
-
Copy full SHA for 183fbb4 - Browse repository at this point
Copy the full SHA 183fbb4View commit details -
Does not yet persist the blacklist. Changelog-Added: Plugins: `commando-blacklist` command to disable select runes.
Configuration menu - View commit details
-
Copy full SHA for fb86529 - Browse repository at this point
Copy the full SHA fb86529View commit details -
commando: make blacklist effective.
Actually check them when we're going to use a rune.
Configuration menu - View commit details
-
Copy full SHA for a4ed3ae - Browse repository at this point
Copy the full SHA a4ed3aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ad04a9 - Browse repository at this point
Copy the full SHA 7ad04a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecb1737 - Browse repository at this point
Copy the full SHA ecb1737View commit details -
Configuration menu - View commit details
-
Copy full SHA for af2c1f1 - Browse repository at this point
Copy the full SHA af2c1f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e310a3 - Browse repository at this point
Copy the full SHA 3e310a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d7afba - Browse repository at this point
Copy the full SHA 9d7afbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61b0634 - Browse repository at this point
Copy the full SHA 61b0634View commit details
Commits on Apr 3, 2023
-
fuzz: fix invalid pubkey error
pubkey_from_hexstr() was failing, which we didn't notice because we weren't checking the return value. The problem was that we were passing it a strlen that was half the actual length. Relevant error: [libsecp256k1] illegal argument: !secp256k1_fe_is_zero(&ge->x) ==417723== ERROR: libFuzzer: deadly signal ElementsProject#7 0x7f5deaacc7fb in abort ElementsProject#8 0x51b0b0 in secp256k1_default_illegal_callback_fn secp256k1.c ElementsProject#9 0x51bd8e in secp256k1_ec_pubkey_serialize ElementsProject#10 0x4e235b in pubkey_to_der bitcoin/pubkey.c:29:7 ElementsProject#11 0x4e2941 in pubkey_cmp bitcoin/pubkey.c:89:2 ElementsProject#12 0x4e333d in bitcoin_redeem_2of2 bitcoin/script.c:144:6 ElementsProject#13 0x4f1396 in run tests/fuzz/fuzz-close_tx.c:78:19
Configuration menu - View commit details
-
Copy full SHA for 5ea1fad - Browse repository at this point
Copy the full SHA 5ea1fadView commit details
Commits on Apr 4, 2023
-
ccan: update to include versions which pass -fsanitize=address and -f…
…sanitize=undefined Most importantly, configurator used to use bitshifts on signed integers which -fsanitize=undefined caught. But also, tal played fast and loose with typing and aliases, which was a signficant amount of rework. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 801c678 - Browse repository at this point
Copy the full SHA 801c678View commit details -
configure: support sanitizers properly.
For example, if we use -fsanitize=undefined, we can't do unaligned integer access, but since we didn't test with the sanitizer flags, we didn't know this, and set `HAVE_UNALIGNED_ACCESS=1`. Also, add -fno-sanitize-recover= in developer mode, so we actually fail binaries if something is detected. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3be36a6 - Browse repository at this point
Copy the full SHA 3be36a6View commit details -
common/gossmap: don't memcpy NULL, 0, and don't add 0 to NULL pointer.
Of course, NULL and length 0 are natural partners, but We Can't Have Nice Things. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2005ca4 - Browse repository at this point
Copy the full SHA 2005ca4View commit details -
bitcoin/script: don't memcmp NULL.
Stupid, stupid C committee. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f8a4be - Browse repository at this point
Copy the full SHA 1f8a4beView commit details -
plugins/pay: fix capacity bias.
With the warning that we were trying to put "inf" into a u64, we can see that this calculation was wrong to use integers! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 37971fb - Browse repository at this point
Copy the full SHA 37971fbView commit details -
It's defined to be nonull: ``` channeld/channeld.c:2381:2: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/stdlib.h:856:3: note: nonnull attribute specified here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior channeld/channeld.c:2381:2 in ``` Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b6a3f93 - Browse repository at this point
Copy the full SHA b6a3f93View commit details -
fuzz: fix check-src/includes when fuzzing enabled.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5787e18 - Browse repository at this point
Copy the full SHA 5787e18View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4b8a40 - Browse repository at this point
Copy the full SHA f4b8a40View commit details -
pyln-testing: remove deprecated fund_channel
This method is no longer used in cln nor in the plugins repo. Changelog-None
Configuration menu - View commit details
-
Copy full SHA for 407d4d2 - Browse repository at this point
Copy the full SHA 407d4d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb0027e - Browse repository at this point
Copy the full SHA fb0027eView commit details -
pytest: adds skipped test_create_gossip_mesh
This can be adapted and used to create test gossip stores. The test is just skipped by design as it would fail on intention.
Configuration menu - View commit details
-
Copy full SHA for 882cafd - Browse repository at this point
Copy the full SHA 882cafdView commit details -
pygossmap: cleanups and optimizations
- moves offset into GossipHeader hdr which is passed to all constuctors - reads .flags as u16 instead of extracting it from the .length, see 0274d88 - adds zombie and ratelimit flag to GossipHeader - bytes_read start at 0 instead of 1 which is more correct, the one byte is then corrected for when setting the offset of new header. - bytes_read is increased in pull_bytes as this is the only place where something is read - use new style for various format-strings
Configuration menu - View commit details
-
Copy full SHA for 3f651b0 - Browse repository at this point
Copy the full SHA 3f651b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for be60f2a - Browse repository at this point
Copy the full SHA be60f2aView commit details -
pygossmap: adds missing __str__, __eq__ and __hash__
Also caches certain __hash__ and __str__ operations, This way graph operations can be done quicker.
Configuration menu - View commit details
-
Copy full SHA for eb9cb5e - Browse repository at this point
Copy the full SHA eb9cb5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d50722d - Browse repository at this point
Copy the full SHA d50722dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a9a3d8 - Browse repository at this point
Copy the full SHA 5a9a3d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9409f2f - Browse repository at this point
Copy the full SHA 9409f2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a16a31 - Browse repository at this point
Copy the full SHA 6a16a31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3130f4e - Browse repository at this point
Copy the full SHA 3130f4eView commit details -
pygossmap: store features for nodes and channels
also makes them acessible using bitmask functions
Configuration menu - View commit details
-
Copy full SHA for f1b6047 - Browse repository at this point
Copy the full SHA f1b6047View commit details -
pygossmap: adds statistic and filter module
Includes a lot of useful filters and statistical methods. To see a gossip_store summary: ``` s = GossmapStats(g) s.print_stats() ```
Configuration menu - View commit details
-
Copy full SHA for 6e46a63 - Browse repository at this point
Copy the full SHA 6e46a63View commit details -
pygossmap: rename GossipStoreHeader to GossipStoreMsgHeader
Changelog-Added: pyln-client: Improvements on the gossmap implementation
Configuration menu - View commit details
-
Copy full SHA for 04ea37d - Browse repository at this point
Copy the full SHA 04ea37dView commit details -
delpay: delete the payment by status from the db
There are cases (difficult to reproduce with a test) where a payment will fail one time and succeed later. As far I understand in this case the groupid field of the payment is the same, and the only thing that change is the status, so our logic inside the delpay is ambiguous where it is not possible to delete a payment as described in ElementsProject#6114 A sequence of commands that explain the problem is ``` $ lc -k listpays payment_hash=H { "pays": [ { "bolt11": "I", "destination": "redacted", "payment_hash": "H", "status": "complete", "created_at": redacted, "completed_at": redacted, "preimage": "P", "amount_msat": "redacted", "amount_sent_msat": "redacted" } ] } $ lc delpay H complete { "code": 211, "message": "Payment with hash H has failed status but it should be complete" } ``` In this case, the delpay is not able to delete a payment because the listpays is returning only the succeeded one, so by running the listsendpays we may see the following result where our delpay logic will be stuck because it works to ensure that all the payments stored in the database has the status specified by the user ``` ➜ VincentSSD clightning --testnet listsendpays -k payment_hash=7fc74bedbb78f2f3330155d919a54e730cf19c11bc73e96c027f5cd4a34e53f4 { "payments": [ { "id": 322, "payment_hash": "7fc74bedbb78f2f3330155d919a54e730cf19c11bc73e96c027f5cd4a34e53f4", "groupid": 1, "partid": 1, "destination": "030b686a163aa2bba03cebb8bab7778fac251536498141df0a436d688352d426f6", "amount_msat": 300, "amount_sent_msat": 1664, "created_at": 1679510203, "completed_at": 1679510205, "status": "failed", "bolt11": "lntb1pjpkj4xsp52trda39rfpe7qtqahx8jjplhnj3tatxy8rh6sc6afgvmdz7n0llspp50lr5hmdm0re0xvcp2hv3nf2wwvx0r8q3h3e7jmqz0awdfg6w206qdp0w3jhxarfdenjqargv5sxgetvwpshjgrzw4njqun9wphhyaqxqyjw5qcqp2rzjqtp28uqy77te96ylt7ek703h4ayldljsf8rnlztgf3p8mg7pd0qzwf8a3yqqpdqqqyqqqqt2qqqqqqgqqc9qxpqysgqgeya2lguaj6sflc4hx2d89jvah8mw9uax4j77d8rzkut3rkm0554x37fc7gy92ws9l76yprdva2lalrs7fqjp9lcx40zuty8gca0g5spme3dup" }, { "id": 323, "payment_hash": "7fc74bedbb78f2f3330155d919a54e730cf19c11bc73e96c027f5cd4a34e53f4", "groupid": 1, "partid": 2, "destination": "030b686a163aa2bba03cebb8bab7778fac251536498141df0a436d688352d426f6", "amount_msat": 300, "amount_sent_msat": 3663, "created_at": 1679510205, "completed_at": 1679510207, "status": "failed" }, { "id": 324, "payment_hash": "7fc74bedbb78f2f3330155d919a54e730cf19c11bc73e96c027f5cd4a34e53f4", "groupid": 1, "partid": 3, "destination": "030b686a163aa2bba03cebb8bab7778fac251536498141df0a436d688352d426f6", "amount_msat": 300, "amount_sent_msat": 3663, "created_at": 1679510207, "completed_at": 1679510209, "status": "failed" }, { "id": 325, "payment_hash": "7fc74bedbb78f2f3330155d919a54e730cf19c11bc73e96c027f5cd4a34e53f4", "groupid": 1, "partid": 4, "destination": "030b686a163aa2bba03cebb8bab7778fac251536498141df0a436d688352d426f6", "amount_msat": 300, "amount_sent_msat": 4663, "created_at": 1679510209, "completed_at": 1679510221, "status": "complete", "payment_preimage": "43f746f2d28d4902489cbde9b3b8f3d04db5db7e973f8a55b7229ce774bf33a7" } ] } ``` This commit solves the problem by forcing the delete query in the database to specify status too, and work around this kind of ambiguous case. Fixes: f52ff07 (lightningd: allow delpay to delete a specific payment.) Reported-by: Antoine Poinsot <[email protected]> Link: ElementsProject#6114 Signed-off-by: Vincenzo Palazzo <[email protected]> Co-Developed-by: Rusty Russell <[email protected]> Changelog-Fixed: delpay be more pedantic about delete logic by allowing delete payments by status directly on the database.
Configuration menu - View commit details
-
Copy full SHA for b92b9f0 - Browse repository at this point
Copy the full SHA b92b9f0View commit details
Commits on Apr 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1507e87 - Browse repository at this point
Copy the full SHA 1507e87View commit details -
doc: fix commando-listrunes SHA256SUM line.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3c83aed - Browse repository at this point
Copy the full SHA 3c83aedView commit details -
pytest: add connection test for gratuitous transient failure message.
[Cleaned up a little to avoid the case where both sides race to reconnect --RR ]
Configuration menu - View commit details
-
Copy full SHA for 0043177 - Browse repository at this point
Copy the full SHA 0043177View commit details -
channel: don't log scary disconnect message on unowned channels.
We always call channel_fail_transient() on all channels when a peer connects, to clean up any previous connections. However, when we startup, this channel doesn't have an owner yet, resulting in a fairly weird INFO level message. Reported-by: Michael Schmook @mschmook Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: `lightningd`: don't log gratuitous "Peer transient failure" message on first connection after restart.
Configuration menu - View commit details
-
Copy full SHA for 64d3f3b - Browse repository at this point
Copy the full SHA 64d3f3bView commit details -
chaintopology: rename broadcast_tx callback name.
It was once only called on failure, now it's always called (if set). It was called different things in different places, so unify it. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aef5b1b - Browse repository at this point
Copy the full SHA aef5b1bView commit details -
bitcoin: helpers to clone a bitcoin_tx, and format one.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 528f44c - Browse repository at this point
Copy the full SHA 528f44cView commit details -
lightningd: rebroadcast code save actual tx, not just hex encoding.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0b7c2bf - Browse repository at this point
Copy the full SHA 0b7c2bfView commit details -
lightningd: provide callback in broadcast_tx() for refreshing tx.
We'll use this to do RBF. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fc54c19 - Browse repository at this point
Copy the full SHA fc54c19View commit details -
lightningd: don't use notleak in chaintopology.c
We can add the htable to the memleak detection, and we already do this for the watches. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4757c96 - Browse repository at this point
Copy the full SHA 4757c96View commit details -
chaintopology: allow minblock for broadcast_tx.
Fun story. We're changing onchaind to hand txs to us, and we will construct them and do the broadcast for it. lightningd tells onchaind the witness it used (with flags to indicate which fields were signatures so should be ignored) so onchaind can recognize the tx when/if it is mined. And when onchaind was waiting for a CLTV delay, it wouldn't tell lightningd yet, but wait until the parent was sufficiently deep But this caused bugs! In particular, on replay, onchaind would see transactions which it hasn't sent yet. This was not a problem before, as onchaind had created the tx, even if it hadn't told lightningd to broadcast it, so recognized the variant when it came in. When we're relying on lightningd to tell us what the tx will look like, this doesn't work any more. The cause of this is that we fire off txowatches ("this output was spent!") while we process blocks, and only fire off txwatches ("this tx increased depth") once all the current blocks are processed. Often this didn't matter, since we replay messages to onchaind from the database, *but* we trim the last few blocks on restart (or, if there's a small reorg while we're stopped), and we can hit this misordering. Changing our topology code to only ever process one block at a time would be a solution, but slows down catchup (and tests, where we often mine a run of blocks). So, this seems like a premature optimization, but it's really required! And in future, lightningd can use this knowledge of pending transactions to combine them in more clever ways. Note that if a tx is valid at block N, we broadcast it once we see block N-1, to get it in the mempool for block N. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f2f02f9 - Browse repository at this point
Copy the full SHA f2f02f9View commit details -
bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 538854f - Browse repository at this point
Copy the full SHA 538854fView commit details -
lightningd: use tx_feerate() for calculating fallback feerate for onc…
…haind. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eff513a - Browse repository at this point
Copy the full SHA eff513aView commit details -
onchaind: simplify lightningd message handling into a switch statement.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7e592f2 - Browse repository at this point
Copy the full SHA 7e592f2View commit details -
bitcoind: fix clone_bitcoin_tx() when tx is take().
We need to actually steal it onto requested context in this case! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e51f629 - Browse repository at this point
Copy the full SHA e51f629View commit details -
onchaind: helper to read and queue unwanted messages.
We only do this in one place now, but we're going to add another. Also, make queued messages const. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a61f3a - Browse repository at this point
Copy the full SHA 3a61f3aView commit details -
Firstly, amount should not be `static`, so use a separate line to declare those (fee is static, as it's cached across calls). Secondly, new_tracked_output doesn't take(), it copies. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 38bc049 - Browse repository at this point
Copy the full SHA 38bc049View commit details -
plugins/bcli: use getmempoolinfo to determine minimum possible fee.
Fixes: ElementsProject#4473 Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: wallet: we no longer make txs below minrelaytxfee or mempoolminfee.
Configuration menu - View commit details
-
Copy full SHA for e6db0ea - Browse repository at this point
Copy the full SHA e6db0eaView commit details -
Makefile: fix check-gen-update to diff *all* files.
This would have caught the missing man page change! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1e24d4a - Browse repository at this point
Copy the full SHA 1e24d4aView commit details -
pyln.testing: remove Throttler.
CI seems to block; Christian suggests the throttler may be to blame somehow? Since trying to fix it made it worse, let's just remove it. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 13ae1a5 - Browse repository at this point
Copy the full SHA 13ae1a5View commit details
Commits on Apr 6, 2023
-
postgres: add missing 'update_count' to stmt
Reported-By: @rustyrussell Changelog-Fixed: Plugins: `bookkeeper` onchain fees calculation was incorrect with PostgresQL.
Configuration menu - View commit details
-
Copy full SHA for d2176e3 - Browse repository at this point
Copy the full SHA d2176e3View commit details -
db: catch SQL errors unless we're expecting them.
I couldn't figure out why my new SQL query was returning 0 rows, and it was because we were ignoring errors. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9bcf28a - Browse repository at this point
Copy the full SHA 9bcf28aView commit details -
db: make db_exec_prepared_v2 return void.
It calls db_fatal() if it fails anyway, so don't expect anyone to check. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for df9552b - Browse repository at this point
Copy the full SHA df9552bView commit details -
db: db_set_intvar/db_get_var should take a const char *.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eee3965 - Browse repository at this point
Copy the full SHA eee3965View commit details -
msggen: Add patching system, add
added
anddeprecated
to FieldThe patching system allows us to enrich the raw schema with some additional information. In this specific case we want to backfill the `added` and `deprecated` fields for the multiversion support.
Configuration menu - View commit details
-
Copy full SHA for 5df469c - Browse repository at this point
Copy the full SHA 5df469cView commit details -
This patch annotates the fields with a new `optional` attribute which determines whether the field should be considered an inferred optional due to being added or deprecated.
Configuration menu - View commit details
-
Copy full SHA for 392caca - Browse repository at this point
Copy the full SHA 392cacaView commit details -
msggen: Use the inferred optional field
Changelog-Changed: msggen: The generated interfaces `cln-rpc` anc `cln-grpc` can now work with a range of versions rather than having to match the CLN version
Configuration menu - View commit details
-
Copy full SHA for 60b12ec - Browse repository at this point
Copy the full SHA 60b12ecView commit details -
This is a visitor that ensures every new field has at least an `added` field, and that we don't change the `added` or `deprecated` annotation after the fact.
Configuration menu - View commit details
-
Copy full SHA for 168bc54 - Browse repository at this point
Copy the full SHA 168bc54View commit details -
common: fix build of run-channel_type.c
Broken in master, perhaps due to rebase? Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for efeb030 - Browse repository at this point
Copy the full SHA efeb030View commit details -
tests: test for stopping node while it's starting.
In CI we see crashes in this case: ``` lightningd: lightningd/connect_control.c:734: void connectd_activate(struct lightningd *): Assertion `ret == ld->connectd' failed. ``` Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 30335e1 - Browse repository at this point
Copy the full SHA 30335e1View commit details -
lightningd: add initializing state.
Importantly, the code in jsonrpc.c which actually does the io_break: ``` /* Once the stop_conn conn is drained, we can shut down. */ if (jcon->ld->stop_conn == conn && jcon->ld->state == LD_STATE_RUNNING) { /* Return us to toplevel lightningd.c */ log_debug(jcon->ld->log, "io_break: %s", __func__); io_break(jcon->ld); ``` By having the state not set until later, we avoid running this. Of course, we need to avoid calling the main loop when we get there, if we've already been told to shutdown. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 45193db - Browse repository at this point
Copy the full SHA 45193dbView commit details
Commits on Apr 7, 2023
-
hsmd: add support for lightningd signing onchain txs.
We previously used WIRE_HSMD_SIGN_DELAYED_PAYMENT_TO_US, WIRE_HSMD_SIGN_REMOTE_HTLC_TO_US, WIRE_HSMD_SIGN_PENALTY_TO_US and WIRE_HSMD_SIGN_LOCAL_HTLC_TX which allow onchaind to sign txs, but only for its specific channel. We now want lightningd to sign these, but it's not bound to a specific channel. So let's add variants that don't require that. We are also now explicit about *what input* to sign. It's always zero for now, but future combinations may change that. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8726454 - Browse repository at this point
Copy the full SHA 8726454View commit details -
lightningd: handle first case of onchaind handing a tx to us to create.
We add code for the case of spending a (timelocked) to-us output of an HTLC output, so lightningd can do it (rather than onchaind doing all the work itself). onchaind still needs to know whether we bothered to create the tx (fees might have caused it to evaporate, so it should consider it immediately resolved rather than waiting for it), and what the witnesses were, and which parts of the witnesses were signatures (as these parts might change, with RBF or in future, combining other txs). The inputs (known to onchaind) and the witnesses (told by lightningd) uniquely identify the spend for the purposes of onchaind. In particular, they definitely distinguish HTLC-timeout and HTLC-success cases. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 956e6c4 - Browse repository at this point
Copy the full SHA 956e6c4View commit details -
onchaind: infrastructure to offload tx creation to lightningd.
Since we do both our own internal handling and handing it to lightningd, we add to `proposed_resolution` to handle the lightningd case. Note, in particular, that we fix the blockheight calculation: it's out by one, in that if we see a tx and our CSV lock is 5, we only need to wait 4 more blocks, not 5. This will matter as we start using it, and convert the tests. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 86e044a - Browse repository at this point
Copy the full SHA 86e044aView commit details -
pyln-testing: adapt wait_for_onchaind_broadcast function for when onc…
…haind uses lightningd for broadcast. We can no longer grab the tx in one line as we did with wait_for_onchaind_broadcast, we need to track the broadcast from lightningd. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e83bed - Browse repository at this point
Copy the full SHA 3e83bedView commit details -
onchaind: use lightningd to send "delayed_output_to_us" from HTLC txs.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 07413c2 - Browse repository at this point
Copy the full SHA 07413c2View commit details -
onchaind: use lightningd for spending our unilateral "to us" output.
This follows the same pattern as the "spend htlc tx" in fact. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9d5dfa7 - Browse repository at this point
Copy the full SHA 9d5dfa7View commit details -
lightningd: remember depth of closing transaction.
We'll use this later to calculate deadlines for spending txs. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 80cd6f0 - Browse repository at this point
Copy the full SHA 80cd6f0View commit details -
onchaind, pytest: disable RBF logic.
We'll reimplement it once lightningd makes all the onchain txs. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36dd70e - Browse repository at this point
Copy the full SHA 36dd70eView commit details -
onchaind: have lightningd create our penalty txs.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e53c6e - Browse repository at this point
Copy the full SHA 3e53c6eView commit details -
common: expose low-level htlc_tx function.
We'll want this, as lightningd will want to produce htlc txs based on what it's told from onchaind, so we need a lower-level accessor. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f6be4e - Browse repository at this point
Copy the full SHA 2f6be4eView commit details -
onchaind: use lightningd to sign and broadcast htlc_success transacti…
…ons. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a9dfec0 - Browse repository at this point
Copy the full SHA a9dfec0View commit details -
onchaind: use lightningd to sign and broadcast htlc spending txs.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 868fa8a - Browse repository at this point
Copy the full SHA 868fa8aView commit details -
onchaind: use lightningd to sign and broadcast htlc_timeout transacti…
…ons. This breaks tests/test_closing.py::test_onchain_all_dust's accouting checks. That test doesn't really test what it claims to test; sure, onchaind *says* it's going to ignore the output due to high fees, but the tx still gets mined. I cannot figure out what the test is supposed to look like, so I simply disabled the accounting checks :( Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5bdd532 - Browse repository at this point
Copy the full SHA 5bdd532View commit details -
onchaind: use lightningd to sign and broadcast htlc expired txs.
This is when they closed the channel, we can simply make our own tx to expire the HTLC. (The other case is where we closed the channel, and we have a special htlc_timeout tx which we have their signature for). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0c27acc - Browse repository at this point
Copy the full SHA 0c27accView commit details -
pytest: clean up wait_for_onchaind_tx interface, remove wait_for_onch…
…aind_broadcast Using single tuples in Python is ugly, so: 1. Rename wait_for_onchaind_tx to wait_for_onchaind_txs. 2. Make it take tuples explicitly. 3. Make wait_for_onchaind_tx a simpler wrapper/unwrapper. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c5b7dbc - Browse repository at this point
Copy the full SHA c5b7dbcView commit details -
onchaind: propose_ignore specifically to ignore if output reaches depth.
We do this for HTLCs which will timeout to them: we watch them in case we want to fulfill them as a preimage comes in, but once they reach depth we can forget about them. We change the message, which causes some more test churn. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9496e9f - Browse repository at this point
Copy the full SHA 9496e9fView commit details -
onchaind: remove now-unused direct tx creation.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c1bc4d0 - Browse repository at this point
Copy the full SHA c1bc4d0View commit details -
onchaind: no longer need information about current feerates.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a3b81ba - Browse repository at this point
Copy the full SHA a3b81baView commit details -
Configuration menu - View commit details
-
Copy full SHA for dae92c5 - Browse repository at this point
Copy the full SHA dae92c5View commit details -
test: add the timeout to the waitpay command
Inside our integration testing we get another timeout, so this commit adds a timeout to the waitpay command to avoid waiting forever. Signed-off-by: Vincenzo Palazzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bf9c4df - Browse repository at this point
Copy the full SHA bf9c4dfView commit details -
lightningd: update comments now channel-type is merged.
It's in the main bolt, so remove qualifies from the bolt quote so they are checked. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a3ebc1b - Browse repository at this point
Copy the full SHA a3ebc1bView commit details -
Too much context, it didn't apply if you try to rebuild from source! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 06d4269 - Browse repository at this point
Copy the full SHA 06d4269View commit details -
Makefile: update bolts to 60cfb5972ad4bec4c49ee0f9e729fb3352fcdc6a.
"BOLT 4: Remove legacy format, make var_onion_optin compulsory." This also renamed the redundant "tlv_payload" to "payload", so we replace "tlv_tlv_payload" with "tlv_payload" everyhere! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15f8e1e - Browse repository at this point
Copy the full SHA 15f8e1eView commit details -
Makefile: update bolts fc40879995ebc61cc50dfd729512f17afb15b355.
"Allow nodes to overshoot the MPP `total_msat` when paying (ElementsProject#1031)" Signed-off-by: Rusty Russell <[email protected]> Changelog-Changed: Protocol: Allow slight overpaying, even with MPP, as spec now recommends.
Configuration menu - View commit details
-
Copy full SHA for fdf9b13 - Browse repository at this point
Copy the full SHA fdf9b13View commit details -
Makefile: bolt version b38156b9510c0562cf50f8758a64602cc0315c19
"Allow nodes to overshoot final htlc amount and expiry (ElementsProject#1032)" Note that this also renamed `min_final_cltv_expiry` to the more-correct `min_final_cltv_expiry_delta`. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dfa6c0c - Browse repository at this point
Copy the full SHA dfa6c0cView commit details -
Makefile: update bolts a0bbe47b0278b4f152dbaa4f5fab2562413a217c
"BOLT 04: remove associated data from test vector" (We actually use merge point). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f26b116 - Browse repository at this point
Copy the full SHA f26b116View commit details -
Makefile: update to BOLT 20066dc2aba906f37f3be5a810ae67040f265377
"BOLT 03: fix static-remote same amt and pre-image test vector" Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 458a850 - Browse repository at this point
Copy the full SHA 458a850View commit details -
Makefile: update to latest BOLT text.
In particular: - Bolt 4: add route blinding construction - Bolt 4: add blinded payments And this means it's not experimental, so we can turn it on by default! Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: blinded payments are now supported by default (not just with `--experimental-onion-messages`)
Configuration menu - View commit details
-
Copy full SHA for d4ffc75 - Browse repository at this point
Copy the full SHA d4ffc75View commit details -
tests: split fetchinvoice recurrence tests into separate test.
This is for VLS, which doesn't implement signing for the non-standard recurrence fields. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 88905e8 - Browse repository at this point
Copy the full SHA 88905e8View commit details
Commits on Apr 9, 2023
-
reckless: don't crash on subprocess calls
They prefer Paths to be explicitly cast as strings
Configuration menu - View commit details
-
Copy full SHA for e61401a - Browse repository at this point
Copy the full SHA e61401aView commit details -
reckless: add support for additional networks
This should have been added earlier as @cdecker suggested, but is needed to enable CI testing. Changelog-Changed: Reckless - added support for networks beyond bitocoin and regtest
Configuration menu - View commit details
-
Copy full SHA for 55cddcd - Browse repository at this point
Copy the full SHA 55cddcdView commit details -
reckless: use environment variable redirects
This will be used during CI testing in the following commit.
Configuration menu - View commit details
-
Copy full SHA for cf20336 - Browse repository at this point
Copy the full SHA cf20336View commit details -
pytest: add blackbox tests for reckless
A canned lightningd/plugins is used to test against. This allows faster and more deterministic outcomes. Changelog-None
Configuration menu - View commit details
-
Copy full SHA for 2f05062 - Browse repository at this point
Copy the full SHA 2f05062View commit details -
fuzz: add initial seed corpora
These corpora were generated with default libFuzzer flags with 30+ hours of CPU time, and then minimized with: ./fuzz-TARGET -merge=1 -shuffle=0 -prefer_small=1 -use_value_profile=1 corpora/fuzz-TARGET UNMINIMIZED_CORPUS
Configuration menu - View commit details
-
Copy full SHA for 9384692 - Browse repository at this point
Copy the full SHA 9384692View commit details -
The following arguments were copied from Bitcoin Core's corpus merging script https://github.com/bitcoin/bitcoin/blob/master/test/fuzz/test_runner.py: -shuffle=0 -prefer_small=1 -use_value_profile=1
Configuration menu - View commit details
-
Copy full SHA for a1a1373 - Browse repository at this point
Copy the full SHA a1a1373View commit details -
The script runs each fuzz target on its seed corpus and prints any failures.
Configuration menu - View commit details
-
Copy full SHA for fa988d2 - Browse repository at this point
Copy the full SHA fa988d2View commit details -
The target builds and runs each fuzz target on its seed corpus.
Configuration menu - View commit details
-
Copy full SHA for 14afa6e - Browse repository at this point
Copy the full SHA 14afa6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e11a2e - Browse repository at this point
Copy the full SHA 6e11a2eView commit details -
doc: add section about improving fuzzing corpora
We want to encourage contributions to the seed corpora that improve coverage.
Configuration menu - View commit details
-
Copy full SHA for ca80dee - Browse repository at this point
Copy the full SHA ca80deeView commit details -
msggen: fix incorrect assertion.
Adding a new field with `added` fails: ``` AssertionError: Field Feerates.perkb.estimates[] does not have an `added` annotation ``` Looks like this assertion is wrong: we should get an added from the field itself or from the .msggen.json file. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b53cc69 - Browse repository at this point
Copy the full SHA b53cc69View commit details -
plugins/bcli: move commit-fee (dev-max-fee-multiplier) and into core.
Turns out the two bcli replacements I checked (`sauron` and `trustedcoin`) don't even implement this, and the multiplier makes more sense in lightningd, especially as we move to bcli just providing raw feerate estimates. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6799cd5 - Browse repository at this point
Copy the full SHA 6799cd5View commit details -
common: add tal_arr_insert helper to utils.h
We have tal_arr_remove and tal_arr_append already. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a2ca34c - Browse repository at this point
Copy the full SHA a2ca34cView commit details -
pytest: test parsefeerate explicitly.
Since we're messing with feerates, it's good to test this directly upfront. Also, fix documentation! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7aa8c76 - Browse repository at this point
Copy the full SHA 7aa8c76View commit details -
lightningd: clarify uses of dynamic (mempool) feerate floor, and static.
We have the FEERATE_FLOOR constant if you don't care, but usually you want to use the current bitcoind lower limit, so call get_feerate_floor() (which is currently the same, but coming!). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for faae447 - Browse repository at this point
Copy the full SHA faae447View commit details -
lightningd: handle fees as blockcount + range.
Rather than have specific-purpose levels, have an array of [blockcount, feerate], and rebuild the specific-purpose levels for now on top. We also keep a *separate* smoothed feerate, so you can ask for that explicitly. Since all the plugins used the same formula to derive the different named fee levels, we apply the reverse to return to the underlying estimates: updating the interface comes next. This is ugly for now, but various specific-purpose levels will be going away, as we shift to deadline-driven fees. This temporarily breaks the floor calculation, so that test is disabled. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cdb85d5 - Browse repository at this point
Copy the full SHA cdb85d5View commit details -
lightningd: clean up feerate handling, deprecate old terms.
Drop try_get_feerate() in favor of explicit feerate_for_deadline() and smoothed_feerate_for_deadline(). This shows us everywhere we deal with old-style feerates by names. `delayed_to_us` and `htlc_resolution` will be moving to dynamic fees, so deprecate those. Note that "penalty" is still used for generating penalty txs for watchtowers, and "unilateral_close" still used until we get zero-fee anchors. Changelog-Added: JSON-RPC: `feerates` `estimates` array shows fee estimates by blockcount from underlying plugin (usually *bcli*). Changelog-Changed: JSON-RPC: `close`, `fundchannel`, `fundpsbt`, `multifundchannel`, `multiwithdraw`, `txprepare`, `upgradewallet`, `withdraw` `feerate` (`feerange` for `close`) value *slow* is now 100 block-estimate, not half of 100-block estimate. Changelog-Deprecated: JSON-RPC: `close`, `fundchannel`, `fundpsbt`, `multifundchannel`, `multiwithdraw`, `txprepare`, `upgradewallet`, `withdraw` `feerate` (`feerange` for `close`) expressed as, "delayed_to_us", "htlc_resolution", "max_acceptable" or "min_acceptable". Use explicit block counts or *slow*/*normal*/*urgent*/*minimum*. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 64b1ddd - Browse repository at this point
Copy the full SHA 64b1dddView commit details -
lightningd: allow "NNblocks" and "minimum" as feerates.
And consolidate descriptions into lightning-feerates(). Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: JSON-RPC: `close`, `fundchannel`, `fundpsbt`, `multifundchannel`, `multiwithdraw`, `txprepare`, `upgradewallet`, `withdraw` now allow "minimum" and NN"blocks" as `feerate` (`feerange` for `close`).
Configuration menu - View commit details
-
Copy full SHA for c46473e - Browse repository at this point
Copy the full SHA c46473eView commit details -
lightningd: handle bcli plugins returning fee_floor and feerates para…
…meters. Changelog-Added: Plugins: `estimatefees` can return explicit `fee_floor` and `feerates` by block number. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9e2d424 - Browse repository at this point
Copy the full SHA 9e2d424View commit details -
plugins/bcli: use the new feerate levels, and the floor.
Fixes: ElementsProject#4473 Changelog-Deprecated: Plugins: `estimatefees` returning feerates by name (e.g. "opening"); use `fee_floor` and `feerates`. Changelog-Fixed: Plugins: `bcli` now tells us the minimal possible feerate, such as with mempool congestion, rather than assuming 1 sat/vbyte.
Configuration menu - View commit details
-
Copy full SHA for 812a5a1 - Browse repository at this point
Copy the full SHA 812a5a1View commit details -
feerates: add
floor
field for the current minimum feerate bitcoind ……will accept Changelog-Added: JSON-RPC: `feerates`: added `floor` field for current minimum feerate bitcoind will accept Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a3370f - Browse repository at this point
Copy the full SHA 3a3370fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 819d988 - Browse repository at this point
Copy the full SHA 819d988View commit details -
lightningd: split the simple onchain tx signing code.
Splitting into onchaind_tx() into onchaind_tx_unsigned() and sign_and_get_witness() makes it easier to reuse for RBF. Adding more information in onchain_signing_info is required too. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5582970 - Browse repository at this point
Copy the full SHA 5582970View commit details -
lightningd: remember if they set "allowhighfees" when we rebroadcast.
We would only set it the first time, which was OK for how we were using it before. Now we want to also set it for rebroadcast. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3754e28 - Browse repository at this point
Copy the full SHA 3754e28View commit details -
lightningd: rebroadcast all pending txs each 30-60 seconds.
We also do it on every block, but since bitcoind can't always be counted to rebroadcast for us, we might as well be aggressive! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 62fa91e - Browse repository at this point
Copy the full SHA 62fa91eView commit details -
lightningd: do RBF again for all the txs.
Now we've set everything up, the replacement code is quite simple. Some tests now have to deal with RBF though, and our rbf tests need work since they look for the old onchaind messages. In particular, when we can't afford the fee we want, we back off to the next blockcount estimate, rather than spending all on fees (necessarily). So test_penalty_rbf_burn no longer applies. Changelog-Changed: Protocol: spending unilateral close transactions now use dynamic fees based on deadlines (and RBF), instead of fixed fees. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a000ee0 - Browse repository at this point
Copy the full SHA a000ee0View commit details
Commits on Apr 10, 2023
-
connectd: don't try to set TCP_CORK on websocket pipe.
Most of this is piping the flag through so we know it's a websocket! Reported-by: @ShahanaFarooqui Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 295557a - Browse repository at this point
Copy the full SHA 295557aView commit details -
connectd: log broken if TCP_CORK fails.
But not if we're a developer using dev_disconnect, which substitutes the fd. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ed58c24 - Browse repository at this point
Copy the full SHA ed58c24View commit details -
connectd: don't leak fds if we have both IPv4 and IPv6.
We accept that we will fail to listen if we bind both IPv6 and IPv4 to the same socket on a dual-stack machine (e.g. normal Linux), but we weren't closing the fd. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e49cb0 - Browse repository at this point
Copy the full SHA 3e49cb0View commit details -
common: lookup function for symnames.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e514a5d - Browse repository at this point
Copy the full SHA e514a5dView commit details -
connectd: dev-report-fds to do file descriptor audit.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cf80f05 - Browse repository at this point
Copy the full SHA cf80f05View commit details -
lightningd: create small hsm_sync_req() helper for hsm queries.
Commonalizes a small piece of code. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c45eb62 - Browse repository at this point
Copy the full SHA c45eb62View commit details -
db: print nice message and not just backtrace on bad column name.
Happens more than I expected! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8493ee5 - Browse repository at this point
Copy the full SHA 8493ee5View commit details -
lightningd: expose default_locktime for wider usage.
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 57b2cbc - Browse repository at this point
Copy the full SHA 57b2cbcView commit details -
bitcoin: rename confusing functions.
1. anchor_to_remote_redeem => bitcoin_wscript_to_remote_anchored, which matches other witness script producing functions and makes it clear that it's a to_remote variant. 2. is_anchor_witness_script => is_to_remote_anchored_witness_script makes it clear that it's about a to_remote output (as altered when anchors are enabled) not an anchor output! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2fb942d - Browse repository at this point
Copy the full SHA 2fb942dView commit details -
pyln-testing: add support to tell bitcoind not to include txs if fee …
…is too low. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 89b96e8 - Browse repository at this point
Copy the full SHA 89b96e8View commit details -
lightningd: fix parent reporting for memleaks.
This was confusing! We reported every second one. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 34f25db - Browse repository at this point
Copy the full SHA 34f25dbView commit details -
bitcoin: bitcoin_tx_remove_output()
Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d502a7e - Browse repository at this point
Copy the full SHA d502a7eView commit details -
wallet: allow psbt_using_utxos to take a starter psbt.
It will append inputs to this PSBT instead of allocating a new one. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f1deeda - Browse repository at this point
Copy the full SHA f1deedaView commit details -
common/channel_type: routines to set known variants, set scid_alias.
I tested this indeed breaks if we don't accept it, then implemented the code to accept it. Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: protocol: We now correctly accept the `option_scid_alias` bit in `open_channel` `channel_type`. Changelog-Deprecated: protocol: Not setting `option_scid_alias` in `option_channel` `channel_type` for unannounced channels.
Configuration menu - View commit details
-
Copy full SHA for 7e5146a - Browse repository at this point
Copy the full SHA 7e5146aView commit details -
zeroconf: don't accept channel_type with option_zeroconf unless we're…
… really zeroconf. Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: Protocol: we will upfront reject channel_open which asks for a zeroconf channel unless we are going to do a zerconf channel.
Configuration menu - View commit details
-
Copy full SHA for 355aa8f - Browse repository at this point
Copy the full SHA 355aa8fView commit details -
wallet: add channel_type field to db.
This was always the intent, but now we have to reconstruct from the disparate fields. This means `option_anchor_outputs` is now redundant. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7acaccf - Browse repository at this point
Copy the full SHA 7acaccfView commit details -
lightningd: use channel_type as we're supposed to for forward descisi…
…ons. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 75ec1be - Browse repository at this point
Copy the full SHA 75ec1beView commit details -
Configuration menu - View commit details
-
Copy full SHA for b42984a - Browse repository at this point
Copy the full SHA b42984aView commit details -
cln: Fix routehints conversion from cln-rpc and cln-grpc
Fixes ElementsProject#6143 Changelog-Fixed: clnrs: Fixed an issue converting routehints in keysend
Configuration menu - View commit details
-
Copy full SHA for 6d76642 - Browse repository at this point
Copy the full SHA 6d76642View commit details
Commits on Apr 11, 2023
-
ld: Add a couple of logging statements when forwarding
We were debugging a number of issues related to the forwarding logic, when using public scids on private channels, and we noticed that we are very verbose everywhere, except where it counts, i.e., what decisions are being taken. So we add a couple of debug logs, and a final info one that tells the operator which resolution was chosen in the end.
Configuration menu - View commit details
-
Copy full SHA for 650443e - Browse repository at this point
Copy the full SHA 650443eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e30f2cb - Browse repository at this point
Copy the full SHA e30f2cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for c0d3eeb - Browse repository at this point
Copy the full SHA c0d3eebView commit details -
hsmtool: rework common hsm_secret fetch/decode.
1. Rename get_hsm_secret to get_unencrypted_hsm_secret. 2. Create a common helper for fetching full file contents. 3. Create new routine to decrypt if necessary: get_hsm_secret(). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e5c76f8 - Browse repository at this point
Copy the full SHA e5c76f8View commit details -
hsmtool: move sodium_init() to top level.
This way we always call it (we weren't for some paths!). Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 441b38c - Browse repository at this point
Copy the full SHA 441b38cView commit details -
You still need to actually make a rune when lightningd starts, as commando (for safety) won't work unless you actually generate a rune (that it knows of!). Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: hsmtool: `makerune` command to make a master rune for a node.
Configuration menu - View commit details
-
Copy full SHA for 62d9ecb - Browse repository at this point
Copy the full SHA 62d9ecbView commit details -
doc: give helpful examples for feerate values.
mempool.info gives sat/vB, which is 1000 too low for us! See-also: ElementsProject#6161 (complains setting feerate to 5 doesn't work) See-also: ElementsProject#6129 Suggested-by: @lightingorb Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 49b7afe - Browse repository at this point
Copy the full SHA 49b7afeView commit details -
doc: document that urgent doesn't use the 2-block estimate, but the 6…
…-block. Turns out this was accidentally changed for v0.10.1 in d8e6889 where we made fee levels less aggressive. Oops. I guess we can fix the docs. And we now have "2blocks" if you want it really fast! Closes: ElementsProject#6129 Changelog-Fixed: JSON-RPC: `feerates` document correctly that urgent means 6 blocks (not 2), and give better feerate examples. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3f95b55 - Browse repository at this point
Copy the full SHA 3f95b55View commit details
Commits on Apr 12, 2023
-
There are several benefits of doing this: - prevent fuzz target bit rot - more test coverage in CI - greater visibility of fuzz tests, encouraging contributions to the seed corpus and tests themselves
Configuration menu - View commit details
-
Copy full SHA for 3c4b20e - Browse repository at this point
Copy the full SHA 3c4b20eView commit details -
plugins/Makefile: don't use echo -n.
MacOS in particular doesn't like this! Reported-by: @chrisguida Fixes: ElementsProject#6171 Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2de5b84 - Browse repository at this point
Copy the full SHA 2de5b84View commit details -
Makefile: remove plugins/sql-schema_gen.h and plugins on
make clean
Reported-by: @chrisguida Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2c9b043 - Browse repository at this point
Copy the full SHA 2c9b043View commit details -
lightningd: fix 100% CPU hang on shutdown.
This finally happened on my test box; tests simply stopped. Turns out we were spinning here, with waitpid returning -1. Since this is during shutdown, that also explains why pytest under CI would hang, since timeouts don't apply during test teardown! Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f17d8b - Browse repository at this point
Copy the full SHA 6f17d8bView commit details -
pytest: make sure we wait for all feerates to be gathered.
We need to wait until we're sure bcli has handed results to lightningd: ``` > assert feerates['perkw']['mutual_close'] == 5000 E assert 6250 == 5000 tests/test_misc.py:1617: AssertionError ``` Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2e7ecb9 - Browse repository at this point
Copy the full SHA 2e7ecb9View commit details -
pytest: fix test_penalty_htlc_tx_timeout accounting flake.
This test makes l2 save db, make a payment, then rollback. *Sometimes* under CI (but not here) we don't shutdown fast enough after the payment, so the moves.json from the coin_movements.py records it. Sure enough, the result is the node ends up with a -10000msat balance. Validated by putting a time.sleep(5) between: ``` l2.rpc.pay(inv['bolt11']) import time time.sleep(5) # stop both nodes, roll back l2's database ``` The answer, of course, is to save and rollback *both* the db and moves.json file. Here's the error: ``` def test_penalty_htlc_tx_timeout(node_factory, bitcoind, chainparams): ... assert account_balance(l3, channel_id) == 0 > assert account_balance(l2, channel_id) == 0 tests/test_closing.py:1527: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/utils.py:184: in account_balance m_sum -= Millisatoshi(m['debit_msat']) contrib/pyln-client/pyln/client/lightning.py:197: in __sub__ return Millisatoshi(int(self) - int(other)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = -10000msat, v = -10000 ... if self.millisatoshis < 0: > raise ValueError("Millisatoshi must be >= 0") E ValueError: Millisatoshi must be >= 0 contrib/pyln-client/pyln/client/lightning.py:82: ValueError ``` Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 58c624d - Browse repository at this point
Copy the full SHA 58c624dView commit details
Commits on Apr 13, 2023
-
pytest: fix up test_gossip_ratelimit.
We were in fact feeding l1 its own gossip, which it doesn't ratelimit (this was a bit fuzzy before, but definitely is the case now!). So make this node actually l3, so we test what we expected to test. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ba7901b - Browse repository at this point
Copy the full SHA ba7901bView commit details -
gossipd: send our own gossip aggressively when a new peer connects.
This was previously the role of connectd, but it's actually more efficient for us to do it: connectd has to sweep through the entire gossip_store, but we have datastructures for this already. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8ef4b36 - Browse repository at this point
Copy the full SHA 8ef4b36View commit details -
gossipd: make sure we also spam private channels with the peer involved.
Probably not required, but nice to have. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 46bb6be - Browse repository at this point
Copy the full SHA 46bb6beView commit details -
connectd: no longer stream our own generated gossip, let gossipd do it.
This removes the sweep logic as soon as they connect. This should save connectd a significant number of CPU cycles and make @whitslack finally stop hitting me. Changelog-Changed: `connectd` no longer sweeps gossip_store file when peer connects, saving CPU for large nodes. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 00f75d6 - Browse repository at this point
Copy the full SHA 00f75d6View commit details -
connectd: implement timestamp-as-trinary.
This implements the proposal to simply use timestamp as "all", "none" or "stream". There's also a rough spec draft which I will post soon. This *also* removes the last place where we would sometimes sweep the entire gossip_store looking for their given timestamps. We could also get rid of the actual timestamp filtering logic in gossip_store_next if we want to, as it's now basically unused. Changelog-Changed: Protocol: Simplify gossip_timestamp_filter handling to "all", "none" or "recent" instead of exact timestamp. Signed-off-by: Rusty Russell <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6a446a9 - Browse repository at this point
Copy the full SHA 6a446a9View commit details -
connectd: remove handling of push only gossip
This is now handled by gossipd on initial connection to peer.
Configuration menu - View commit details
-
Copy full SHA for bec8586 - Browse repository at this point
Copy the full SHA bec8586View commit details -
gossip_store: remove now-redundant push bit
The push bit was convenient for connectd to send our own gossip to peers upon connecting by naively traversing the gossip_store and sending anything flagged `push`. This function is now performed by gossipd leaving no use for the push bit. Changelog-Changed: `gossipd`: gossip_store PUSH bit is no longer set.
Configuration menu - View commit details
-
Copy full SHA for 54bd024 - Browse repository at this point
Copy the full SHA 54bd024View commit details
Commits on Apr 14, 2023
-
pytest: Highlight the re-entrancy issue for cln-plugin events
This was pointed out by Daywalker [1]: we are synchronously processing events from `lightningd` which means that if processing one of the hooks or requests was slow or delayed, we would not get notifications, hooks, or RPC requests, massively impacting the flexbility. This highlights the issue with a failing test (it times out), and in the next commit we will isolate event processing into their own task, so to free the event loop from having to wait for an eventual response. [1] https://community.corelightning.org/c/developers/hold-invoice-plugin#comment_wrapper_16754493
Configuration menu - View commit details
-
Copy full SHA for db3707f - Browse repository at this point
Copy the full SHA db3707fView commit details -
rs: Run hooks, methods and notification handlers in tokio tasks
Changelog-Changed: cln-plugin: Hooks, notifications and RPC methods now run asynchronously allowing for re-entrant handlers
Configuration menu - View commit details
-
Copy full SHA for f69da84 - Browse repository at this point
Copy the full SHA f69da84View commit details -
make: Use the CLN_PLUGIN_EXAMPLES variable for testbin
Listing things multiple times is error-prone, so use the variable we already have :-)
Configuration menu - View commit details
-
Copy full SHA for 0687fec - Browse repository at this point
Copy the full SHA 0687fecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e5ad0f - Browse repository at this point
Copy the full SHA 2e5ad0fView commit details
Commits on Apr 15, 2023
-
Changelog-Changed: Update libwally to 0.8.9
Configuration menu - View commit details
-
Copy full SHA for cc7d9f3 - Browse repository at this point
Copy the full SHA cc7d9f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b59b6b9 - Browse repository at this point
Copy the full SHA b59b6b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6163138 - Browse repository at this point
Copy the full SHA 6163138View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5a1323 - Browse repository at this point
Copy the full SHA f5a1323View commit details -
reckless: fix crash on non-verbose output
Also cleans up verbose logic
Configuration menu - View commit details
-
Copy full SHA for 6ac0842 - Browse repository at this point
Copy the full SHA 6ac0842View commit details -
reckless: add Installer class to support additional languages
This abstracts the installation procedure to allow generic operations such as dependency installation to be performed for languages.
Configuration menu - View commit details
-
Copy full SHA for d5df26f - Browse repository at this point
Copy the full SHA d5df26fView commit details -
reckless: add installer methods
Also removes support for pip editable install using pyproject.toml `pip install -e .` This was a fallback method when a requirements file was not present, but was hacky and often failed anyway. reckless: remove installation via pyproject.toml This method relied on pip install in editable mode (hacky) and often failed to complete anyhow. We should instead encourage a requirements file to be created/used for user installation.
Configuration menu - View commit details
-
Copy full SHA for 32dd825 - Browse repository at this point
Copy the full SHA 32dd825View commit details -
reckless: install command now uses
Installer
class methodsAlso adds a timeout when testing a plugin. Previously the behavior of pyln-client was relied upon to exit if not communicating with lightningd, however, this behavior is not universal. Changlelog-Changed: reckless now installs node.js plugins
Configuration menu - View commit details
-
Copy full SHA for 2577096 - Browse repository at this point
Copy the full SHA 2577096View commit details -
reckless: match name using installer entry formats
When enabling or disabling a plugin, the entrypoint is inferred from the user provided name. A canonical name should be used, which the installer entrypoint formats help to determine (this generally strips the file extension if one is provided.)
Configuration menu - View commit details
-
Copy full SHA for 347e723 - Browse repository at this point
Copy the full SHA 347e723View commit details -
Configuration menu - View commit details
-
Copy full SHA for d279da5 - Browse repository at this point
Copy the full SHA d279da5View commit details -
reckless: enable case-insensitive searching
Adds a test to validate case matching.
Configuration menu - View commit details
-
Copy full SHA for 233f05e - Browse repository at this point
Copy the full SHA 233f05eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f731695 - Browse repository at this point
Copy the full SHA f731695View commit details -
meta: Add changelog for 23.05rc1
Typo correction Updated delpay changelog
Configuration menu - View commit details
-
Copy full SHA for 15795c9 - Browse repository at this point
Copy the full SHA 15795c9View commit details
Commits on Apr 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for caa402a - Browse repository at this point
Copy the full SHA caa402aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f4554d - Browse repository at this point
Copy the full SHA 1f4554dView commit details -
msggen: Regenerate for ListPeerChannels
Performed using: PYTHONPATH=contrib/msggen python3 contrib/msggen/msggen/__main__.py
Configuration menu - View commit details
-
Copy full SHA for 7d736ec - Browse repository at this point
Copy the full SHA 7d736ecView commit details