Commit Graph

13866 Commits

Author SHA1 Message Date
Rusty Russell 8dcfe1a75c pytest: make test_splice_gossip more precise.
Check the exact scids.  Makes it simpler when failures occur.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Rusty Russell eaf76ddbd6 doc: fix listpeerchannels schema to allow CHANNELD_AWAITING_SPLICE in state.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Rusty Russell c52ab02bc9 patch remove-developer-test-annotations.patch 2023-10-02 11:41:19 +10:30
Rusty Russell 6203d250bf pytest: fix flake in upfront warning.
This is actually a real issue (l1 doesn't see the warning before l2
drops the connection), but it's unrelated to this PR, and will require
another one to fix.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Rusty Russell 57a3680449 contrib/pyln-grpc-proto/ regenerate.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Rusty Russell 25a4b96ebc poetry: run poetry update.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
ShahanaFarooqui 77e3c3a38e plugin/clnrest: Adjusting flask-cors install after rebase 2023-09-29 16:00:05 +09:30
Christian Decker 452b45f675 lnproto: Remove unused report upload on GH Actions 2023-09-29 16:00:05 +09:30
Christian Decker 9afcec0404 lnproto: Fix up the lnprototest docker image 2023-09-29 16:00:05 +09:30
Christian Decker 414f65fc66 py: Add the grpc extra to pyln-testing dependency 2023-09-29 16:00:05 +09:30
Christian Decker 1242012efb gen: Update generated files 2023-09-29 16:00:05 +09:30
ShahanaFarooqui e010eece1b plugins/clnrest: Updated clnrest's requirements.txt
Even after migrating from pip install to poetry install for clnrest,
we still need to keep `plugins/clnrest/requirements.txt` for Fedora-28-amd64
build. `Dockerfile.builder.fedora` does not have poetry and will need
requirements.txt to install libraries with pip.

It is also required for non-developers who want to build cln from a tagged or master version.
2023-09-29 16:00:05 +09:30
ShahanaFarooqui 4301030a12 plugins/clnrest: Updated clnrest install command in Docker images and CI
We do not need explicit clnrest dependencies installation for clnrest
because `poetry install` will also install clnrest libraries.
2023-09-29 16:00:05 +09:30
ShahanaFarooqui 6a756256c0 plugins/clnrest: Adding pyproject.toml for Poetry install
Reference links:
https://github.com/ElementsProject/lightning/issues/6637
https://github.com/nix-community/poetry2nix

Changelog-Changed: Upgraded clnrest to poetry project.
2023-09-29 16:00:05 +09:30
Vincenzo Palazzo 7354a9ee1c lnprototest: bump to the new version
Thi commit includes the following change in lnprototest:

- cln: fix the check on the exit code (https://github.com/rustyrussell/lnprototest/pull/111)

Link: https://github.com/ElementsProject/lightning/issues/6727
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-09-29 12:57:57 +09:30
Vincenzo Palazzo 57ead06e3c ci: autopublish rust crates on tag event
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-09-28 14:00:59 +02:00
Vincenzo Palazzo a51894f510 rust: fixes the dependencies build with the rustc 1.73.0
This commit is just bumping the Cargo.lock file to
fix the following build issue with the more
recent rust version.

cargo build --quiet --example cln-plugin-startup
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/vincent/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-09-28 14:00:59 +02:00
Matt Whitlock 15b1ccb149 Makefile: use `xargs -0` consistently
In its default mode, `xargs` interprets any whitespace as a delimiter,
and it interprets single and double quotes and backslashes specially.
This can play havoc when fed by tools that don't escape these special
characters in their output.

Fortunately, `xargs` (at least the GNU version of it) has a `-0` option
that changes the behavior so that only NUL characters act as delimiters,
and no other characters have any special meaning. Use this option
consistently to avoid any nasty surprises.

Note that `git-ls-files` has a `-z` option that causes it to terminate
filenames on output with a NUL character instead of a newline, and
`grep` has a `-z` option that causes it to operate on NUL-terminated
records rather than on lines. Use these options together with
`xargs -0`.

Note: This commit corrects an oversight introduced in
9d94687b0d.

Changelog-None
2023-09-27 13:01:39 +09:30
Christian Decker 4121941d92 pytest: Fix elementsd tests 2023-09-26 19:21:05 +02:00
Christian Decker 9a51418e82 gci: Update apt before installing
A stale apt-get cache could otherwise cause a test failure.
2023-09-26 19:21:05 +02:00
Christian Decker d82d561593 gci: Print envvars and configuration when testing 2023-09-26 19:21:05 +02:00
Christian Decker 36494b6a51 gci: Only install one of elementsd or bitcoind
We were accidentally testing against `bitcoind` rather than
`elementsd` which meant we believed everything was find, when in
reality some tests broke. By only installing the required daemon we
ensure that such a mixup causes a CI failure.
2023-09-26 19:21:05 +02:00
Christian Decker 8ac63daf71 ci: Unbreak the liquid-regtest run on Github Actions 2023-09-26 19:21:05 +02:00
hMsats dc16f3411b Only 3 question marks for 4 variables 2023-09-26 11:52:27 +02:00
Rusty Russell 577161a4fa renepay: remove custom debug, in favor of normal operations.
As a bonus, unit tests no longer leave files in /tmp.

Reported-by: https://github.com/whitslack
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-25 13:59:13 +09:30
Matt Whitlock 7c582944bd lightningd/test: use tmpdir_mkstemp() to create log file
Changelog-None
2023-09-25 13:59:13 +09:30
Matt Whitlock 2d904d3655 configure: recognize --disable-ub-sanitizer option
There was a typo in the `case` pattern. Now we recognize both forms.

Changelog-None
2023-09-25 13:58:59 +09:30
Vincenzo Palazzo 376e2f9997 lnprototest: included the last lnprototest fixes
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (https://github.com/rustyrussell/lnprototest/pull/106)
- Fixing reorg issue in the ln helper function (https://github.com/rustyrussell/lnprototest/pull/107)

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-09-25 12:00:40 +09:30
Rusty Russell 39cb8d094e pyln-grpc-proto: regenerate after last patch.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-22 16:41:38 +09:30
daywalker90 10eeceabd5 add CHANNELD_AWAITING_SPLICE state to cln-rpc 2023-09-21 18:53:51 +02:00
Rusty Russell 9d94687b0d Makefile: don't fail find -delete if we run in parallel.
Use xargs rm -f which doesn't care if it's already deleted.

```
find contrib/pyln-grpc-proto/pyln/ -type f -name "*.py.bak" -delete
find contrib/pyln-grpc-proto/pyln/ -type f -name "*.py.bak" -delete
find: cannot delete ‘contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py.bak’: No such file or directory
make: *** [Makefile:390: contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py] Error 1
make: *** Waiting for unfinished jobs....
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 3d3bf87b34 build: remove all trace of DEVELOPER.
If you previously configured with `--enable-developer` we turn that into `--enable-debugbuild`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: build: `--enable-developer` arg to configure (and DEVELOPER variables): use `./configure --enable-debugbuild` and `developer` setting at runtime.
2023-09-21 20:08:24 +09:30
Rusty Russell 6c15ea44dd pytest: use --developer instead of environment variable.
And we always enable it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 573ce14509 tools: remove DEVELOPER.
We can now always enable developer using --developer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 2bcae6fc76 plugins/renepay: remove DEVELOPER build-time, in favor of runtime.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 3e124d9ec1 lightningd: remove #if DEVELOPER.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell f725edad62 plugins: remove #if DEVELOPER.
And rename dev-only-option `use_shadow` to `dev_use_shadow`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell ef87999f9a common: add option for dev-only parameters.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell de81a59b1e lightningd: mark explicitly what commands are dev-only.
And require --developer to use them.

Also refuse redirection to deprecated APIs if deprecated APIs are disabled! 

Changelog-Removed: `dev-sendcustommsg` (use `sendcustommsg`, which was added in v0.10.1)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 1ecf31bae7 db: remove #if DEVELOPER in favor of runtime flag inside db struct.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell af91c6fae3 closingd: remove #if DEVELOPER in favor of runtime flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 60def0ead7 hsmd: remove #if DEVELOPER in favor of runtime flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 1fc603ea6e gossipd: remove #if DEVELOPER in favor of runtime flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell f2d8f37f1f channeld: remove #if DEVELOPER in favor of runtime flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 01119fbe26 openingd: remove #if DEVELOPER in favor of runtime flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell dba4af37f1 onchaind: remove #if DEVELOPER.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 0ff91e65dc connectd: remove #if DEVELOPER
We still refuse to run dev commands if lightningd sends it to us
despite us not being in developer mode, but that's mainly paranoia.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell 91b5a3b323 bitcoin: remove DEVELOPER options.
Mainly removing the PSBT re-marshalling which hasn't had any issues in
recent libwally, and making dev_no_grind into the clearer
dev_no_signature_grind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell c5f6893e28 common: remove #if DEVELOPER.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell dee94f215b common/bolt11: remove #if DEVELOPER.
We expose the dev handles directly for the test vectors to use.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30