Commit Graph

658 Commits

Author SHA1 Message Date
fanquake
23465f06df build: add all-fuzz-programs target
Add a convenience target for building, but not running (i.e check-fuzz),
all fuzz targets.

Signed-off-by: fanquake <fanquake@gmail.com>
2024-11-08 11:13:53 +01:00
Rusty Russell
75362d21c5 channeld_fakenet: fake channeld to simulate network given a gossmap_store.
Our gossmap_store uncompresser generates nodeids with well-known
privkeys, so we can decrypt and respond to HTLCs sent to such nodes.
By replacing channeld with a fake, we can connect a node to another
node, but then once the channel is established, allow payments to be
sent into the generated network, and respond appropriately.

This minimal version handles MPP timeouts, but doesn't insert any
delays or runtime capacity for channels.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: Testing only
2024-11-06 21:17:36 +10:30
Se7enZ
e004f0075e make: Add a phony version target to output version string. 2024-10-31 20:26:30 -07:00
Joseph Goulden
f31a8cf749 build: Update .version as part of the release 2024-10-21 16:56:02 +02:00
Rusty Russell
fe344ee75b BOLT: update to latest BOLT 3 test vectors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
905461f7c4 BOLTs: more catchup ("BOLT 4: More clarifying changes.")
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
76cfff7533 BOLT update: catch up ("BOLT 4: rename onionmsg_hop to blinded_path_hop")
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
f92c9430fd BOLT catchup ("BOLT 4: clarify blinded path requirements.")
This is a significant rework, which lets us clarify a number of our
quotes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
dc18f3cd7b BOLTs: update which renames blinding terminology.
No code changes, just catching up with the BOLT changes which rework our
blinded path terminology (for the better!).

Another patch will sweep the rest of our internal names, this tries only to
make things compile and fix up the BOLT quotes.

1. Inside payload: current_blinding_point -> current_path_key
2. Inside update_add_htlc TLV: blinding_point -> blinded_path
3. Inside blinded_path: blinding -> first_path_key
4. Inside onion_message: blinding -> path_key.
5. Inside encrypted_data_tlv: next_blinding_override -> next_path_key_override

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
f944e03fca BOLT update: remove INVALID_REALM error.
This is obsolete (since modern onions) and so removed from spec.
We should not set it, and don't need to handle it specially.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
63f971b892 BOLTs: catchup with "Drop the required channel_update in failure onions".
Not much difference for us.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30
Rusty Russell
3a9536fd37 BOLT catchup: quiescence is included.
This means we should support it by default.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Protocol: `option_quiesce` enabled by default.
Changelog-Deprecated: Config: --experimental-quiesce: it's now the default.
2024-10-16 07:14:32 +10:30
Christian Decker
1144088e14 make: Weaken over aggressive check-amount-access test
Changelog-None
2024-10-07 14:05:47 +02:00
Se7enZ
537d613035 pytest: Support targeting specific tests using make pytest.
Select tests by setting the `PYTEST_TESTS` environment variable.

Changelog-None
2024-10-03 21:51:26 -07:00
ShahanaFarooqui
75c616c7b3 Makefile: Next version updated to 24.11
Changelog-None.
2024-09-18 16:59:27 +09:30
ShahanaFarooqui
1a71e15cf3 github: Read tag on HEAD in Github Actions
Running `git describe` in local setup correctly identifies the tag available on the tag. But `docker buildx` via actions does not identify it without `--tags` param.

Reference Issue: https://github.com/ElementsProject/lightning/issues/7626

Changelog-Fixed: Docker image created via github actions correctly reads the tag available on the HEAD.
2024-09-05 12:31:49 -07:00
Rusty Russell
624d8b79f7 lightningd: fix up installs in subdirectories.
Commit a1fdeee76b "Makefile: clean up install path handling."
broke the ability to configure with one path and then run in a
different path.  Turns out people actually do this!  So, we have
to use relative paths, compared to our existing binary.

And we can't use path_rel, because that requires that the path
exist (thanks @Lagrang3!).

Fixes: https://github.com/ElementsProject/lightning/issues/7595
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-29 08:14:16 +09:30
Alex Myers
0a6c58133d reckless: add version information to reckless 2024-08-08 11:33:39 +09:30
Rusty Russell
a1fdeee76b Makefile: clean up install path handling.
We had some weird code to try to do relative paths.  Instead, use absolute
ones and keep life simple.  Also rename "daemon_dir" to the clearer
"subdaemon_dir" as that's what it's used for.

We now need special magic to do "installcheck", which is a bit awkward,
but at least it's contained.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-07 18:32:56 +02:00
Rusty Russell
99e8e9246e devtools/gossmap-compress: use transparent zlib compression if available.
Before:
```
-rw-rw-r-- 1 rusty rusty 1643258 Jul 26 09:51 compressed
```

After:
```
-rw-rw-r-- 1 rusty rusty 508332 Jul 26 09:49 compressed
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-07 11:18:55 +09:30
Rusty Russell
6bf41f4807 unittests: use current version of BOLTS when reading specs.
We check out the master bolts branch, and that recently changed test vectors
causing our CI to change.  We should test them against our current BOLTVERSION,
which is in .tmp.lightningrfc/

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-17 10:57:11 +02:00
Rusty Russell
242ecbc906 Makefile: only run cppcheck on non-generated files.
For some reason CI now hits a race where it tries to analyze a still-being-generated file:

```
tools/headerversions.c:52:30: error: syntax error [syntaxError]
 new = tal_fmt(NULL, template,
                             ^
make: *** [Makefile:552: check-cppcheck] Error 123
```

Restrict it to real source files instead.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-10 12:21:19 +09:30
Rusty Russell
531845971c gossipd: drop zlib support.
This was removed from the spec on Apr 25, 2022.  We stopped ever sending them
in 0.12.0 (2022-08-23).  Now we remove receive support.

Changelog-Protocol: Removed support for zlib-compressed short-channel-ids in query responses.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-10 12:21:19 +09:30
Rusty Russell
7ef8645aad Makefile: don't make every file depend on version headers.
common/version.o depends on common/version_gen.h explicitly already,
and header_versions_gen.h is only used by lightningd, so we can make
that dependency explicit.

This means when version changes (i.e. different git commit) we only
relink, not recompile.

Before:
```
real	0m6.578s
user	0m14.705s
sys	0m13.621s
```

After:
```
real	0m2.098s
user	0m6.763s
sys	0m4.844s
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-02 10:00:55 +02:00
Rusty Russell
0afaf2f3ca msggen: don't spam every time we rebuild.
2923 lines of output?  Even with warnings-only, it's 59 lines, so only
enable that with `make V=1`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 12:34:41 +02:00
Rusty Russell
2175cd7db3 onchaind: remove support for rescuing non-static channels when we've lost data.
We could get the current key from the reestablish message even if we'd
lost our db, but there are very few of these channels left: we upgraded to use them
in the 2019-01-09 release.

We will eventually remove support altogether, but this is a nice removal of
some ugly code for something which "never happens".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
002dc60b33 Gossip: BOLT catch, remove initial_routing_sync.
Everyone sends a gossip_timestamp_filter message these days to start gossip.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
06cf5ac841 Doc: update bolts to assume gossip_queries under the new meaning.
Everyone understands gossip_queries now, but peers leave it unset to indicate
they have nothing useful to say.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
65ef909bd3 Doc: update to BOLT which assumes option_var_onion_optin.
We have assumed this for a long time, so nothing changes.

Confusingly, this BOLT commit also cleaned up one reamining `option_anchors_zero_fee_htlc_tx`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
7f2aedc76f common: BOLT update: option_anchors_zero_fee_htlc_tx is now simply "option_anchors".
This is a difficult transition for us: this string appears in channel
types.  We make the transition now in the understanding that it will
be more difficult in future.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Changelog-Deprecated: JSON-RPC: `listpeers` `features` array string "option_anchors_zero_fee_htlc_tx": use "option_anchors" (spec renamed it).
Changelog-Added: JSON-RPC: `listpeers` `features` array string uses "option_anchors" for feature 22/23, following renaming in BOLT 9.
Changelog-Changed: JSON-RPC: `listclosedchannels`, `listpeerchannels`, `openchannel_update`, `openchannel_init`, `fundchannel`, `fundchannel_start` and `multifundchannel`: `channel_type` array `names` now contains "anchors" instead of "anchors_zero_fee_htlc_tx".
Changelog-Changed: lightningd: `--list-features-only` now lists "option_anchors" instead of "option_anchors_zero_fee_htlc_tx".
2024-06-19 15:54:24 +09:30
Rusty Russell
7d3d763b96 channeld: BOLT update, no longer allow creation of old (experimental-only!) non-zero-fee anchor channels.
These were removed from the spec.

We still support existing ones, though we were the only implementation
which ever did, and only in experimental mode, so we should be able to
upgrade them and avoid a forced close, with a bit of engineering...

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
b6d7ee1f11 common: No longer support new channels without option_static_remotekey.
We still support *existing* channels.  Just not new ones (before they could,
in theory, explicitly ask for one).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
e0b4a579b1 common: update BOLTs to bring LaTeX formatting into onion spec.
Soo.... pretty....

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
f1d78ff35a common/onion_decode: update to latest BOLT spec, reject encrypted_recipient_data with both scid and node.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-19 15:54:24 +09:30
Rusty Russell
ba69007f7b Makefile: next version is 24.08.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-14 11:30:26 +09:30
Erik De Smedt
24ae7751cf Makefile: Include pyln-grpc proto in PYTHONPATH
When running `make check-python` we'll expclicitly include
`pyln-grpc-proto` in the `PYTHONPATH`.

This ensures we always run the tests using the version installed in
`./contrib/pyln-grpc-proto`
2024-05-16 14:00:18 +02:00
Rusty Russell
2cb6da14fb BOLT: catch up now Dual-funding is included.
Mainly we don't need to patch the spec anywhere near as much.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-09 16:14:23 -05:00
Rusty Russell
cca784c9d0 BOLT: update to include 2016 for max_htlc_cltv.
And deprecate the --max-locktime-blocks which allows them to set it.

Hilariously, the spec misspells CLTV as CTLV at one point, so we work around it for now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-09 16:14:23 -05:00
Rusty Russell
bbb6fd4413 BOLTs: catch up with minor clarifications.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-09 16:14:23 -05:00
Rusty Russell
b22095b275 ccan: update tal so we can annote allcators as never returning NULL.
This helps with -O3 warnings on these commits.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-06 20:51:19 -05:00
ShahanaFarooqui
720af34d43 plugins/wss-proxy: Plugin included in core lightning 2024-04-22 09:12:09 +09:30
Rusty Russell
037eb08fd6 Makefile: update CLN_NEXT_VERSION so deprecations tick over.
Indeed, we now need to adjust our tests to use --i-promise-to-fix-broken-api-user
for the specific APIs past end-of-life.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-25 15:02:35 +10:30
Christian Decker
6e980c45eb make: The protobuf files are a grouped target 2024-02-21 11:59:41 +01:00
Christian Decker
cfea45d827 make: Add missing dependency between schemas and schema bundle
Reported-by: microsatoshi
2024-02-09 12:20:45 +01:00
Dusty Daemon
2cbf426296 make: always generate proto files sans rust
Generating the msggen proto files doesn’t require rust (even though it generates rust files).

Changelog-None
2024-02-08 15:05:18 +01:00
Christian Decker
00fbd5977f msggen: Start making the msggen library a standalone tool
There are quite some things we want to generate from the schema
definitions, both inside and outside of CLN itself. By bundling the
schemas into the library we can make use of the tooling without
running in the CLN source tree. This is in part used to generate some
of the interfaces in Greenlight.

Changelog-None
2024-02-08 15:03:34 +01:00
Rusty Russell
1093b43ccf lnprototest: remove.
At this point it needs a complete rewrite to be useful, and it's just
constraining development.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-31 14:10:51 +10:30
Rusty Russell
94a539ee3d Makefile: add CLN_NEXT_VERSION, functions encoding deprecation schedule.
Each feature has a name, and says when deprecation begins and ends.

There's an API coming to allow you to re-enable on a per-feature basis
even if it's ended (as long as it's not been removed from the code ofc!).

Default end is 6 months after deprecation, i.e. we complain about it
at that point, if we can detect its use.

e.g, a standard deprecation in v24.05:

v24.02: allowed
v24.02 with mods: allowed

master after v24.02: allowed unless deprecated APIs disabled.
v24.05: allowed unless deprecated APIs disabled.
v24.08: allowed unless deprecated APIs disabled.

v24.11: allowed unless deprecated APIs disabled, but logs at BROKEN level.

v25.02: allowed only if --i-promise-to-fix-broken-api-user=FEATURE.
v25.05: code is actually removed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30
Jon Griffiths
1b2d81f7ce wally: remove now-redundant BUILD_ELEMENTS define
As of wally v1.0.0, Elements/Liquid support is enabled and part of the
library ABI by default.

Changelog-None

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
2024-01-16 15:47:03 +01:00
Peter Neuroth
8f8202daa7 meta: Update release checklist
Add a version bump for clnrest and the main poetry.lock to the makefile
and update the release checklist to include the new target.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2023-11-16 15:20:33 +01:00