Commit Graph

638 Commits

Author SHA1 Message Date
PestToast
59010ec851 Update required pyln-client version
A simple update to resolve issue #312
2022-04-28 12:59:22 +02:00
Aaron Dewes
20c6bf9d63 Add TypeScript API 2022-04-28 12:58:59 +02:00
laanwj
b3c7cce8d9 prometheus: Listen on 127.0.0.1 by default
Make the prometheus plugin listen on 127.0.0.1 (localhost) by default
instead of open to the world. This closes a privacy breach in the
default configuration.
2022-04-28 12:58:42 +02:00
Christian Decker
e96d400c10 gci: I like colors ;-) 2022-04-28 12:57:06 +02:00
Christian Decker
8077a5cebb gci: Do not nest virtualenvs in poetry
Poetry will automatically manage virtualenvs for our project, so we
can rely on `poetry install` and `poetry run` in the main environment
to keep the nested env up-to-date and enter it for testing.
2022-04-28 12:57:06 +02:00
Christian Decker
1073ac347c gci: Remove unused report uploads 2022-04-28 12:57:06 +02:00
Christian Decker
f877537f8f autopilot: Migrate to poetry 2022-04-28 12:57:06 +02:00
Christian Decker
8717789595 gci: Don't test with 3.6, pyln-testing and pyln-client require >=3.7 2022-04-28 12:57:06 +02:00
Christian Decker
42f88ce24a backup: Migrate to poetry 2022-04-28 12:57:06 +02:00
Christian Decker
74594a5b6e gci: Add support for poetry / PEP 517 based plugins
We also migrate the `historian` plugin to show how this looks
like. Next up is migrating the individual plugins.
2022-04-28 12:57:06 +02:00
Michael Schmoock
be688b0920 feeadjuster: improve setchannelfee deprecation detection 2022-04-27 22:19:11 +02:00
Vincenzo Palazzo
4b3ff33576 commando: fixes requirements.txt for a plugin
In a clean machine a new user will endup with the following exception

```
Traceback (most recent call last):
  File "/home/lightning/.lightning/plugins/commando.py", line 22, in <module>
    from pyln.client import Plugin, RpcError  # type: ignore
ModuleNotFoundError: No module named 'pyln'
```

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-04-12 09:35:43 +02:00
Rusty Russell
9448a06b30 commando: document the command limits.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
3db50f4796 commando: limit total request size.
1MB normally, but 10MB if you have a cached rune.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
36080d6771 commando: discard collated requests upon peer disconnect.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
96702e1b57 command: add overlength test
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
7b76bf63ea commando: allow sending of overlength requests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Rusty Russell
fc00ad4183 commando: allow stupidly-long commands.
This is backwards compatible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-10 14:37:02 +09:30
Michael Schmoock
f022ca380d drain: upgrade testcase for new setchannel command 2022-04-03 17:15:35 +02:00
Michael Schmoock
5c43c7f3bf feeadjuster: upgrade to new setchannel command 2022-04-03 17:15:35 +02:00
Rusty Russell
5b2dd9a3f6 commando: actually do RPC dispatch async.
We use multiprocessing for this, because the pyln-client RPC
command api doesn't support async.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-03-17 15:52:13 +10:30
Rusty Russell
efaf634f1b commando: make custommsg hook async.
Otherwise it blocks everything while it's working, which can be a
while for a slow command.

Fixes: #347
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-03-17 15:52:13 +10:30
Keagan McClelland
2779264f72 Update .gitmodules 2022-02-27 20:29:16 +01:00
Keagan McClelland
c119595767 Update .gitmodules 2022-02-27 20:29:16 +01:00
Michael Schmoock
225b4ca9b7 autopilot: fixme division by zero
I don't understand the code at that location, but it can raise
a division by zero in testing environment where no real graph
was accessible because it couldn't be downloaded.
2022-02-21 18:37:37 +01:00
Michael Schmoock
00ebb60a1b autopilot: sets 'unable to connect' message to warn 2022-02-21 18:37:37 +01:00
Michael Schmoock
e1c063b293 autopilot: improve test_main that is disabled for CI
The old skipIf annotation doesn't seem to work correctly:

```
PytestUnknownMarkWarning: Unknown pytest.mark.skipIf - is this a typo?
You can register custom marks to avoid this warning -
for details, see https://docs.pytest.org/en/stable/mark.html
    @pytest.mark.skipIf(True, "Test autopilot is hanging on DNS request")
```
2022-02-21 18:37:37 +01:00
Michael Schmoock
8d6248573d autopilot: fix deprecation warning for dns.resolver.query 2022-02-21 18:37:37 +01:00
Michael Schmoock
43317e0901 noise: rename last_id to msg_id and make code more readable 2022-02-21 17:54:11 +01:00
Michael Schmoock
ac9d1e4be1 noise: cleanup some nits 2022-02-21 17:54:11 +01:00
Michael Schmoock
8e0c748253 noise: adds testcase that checks correct order
Just to check the latest fix does not break anything.
2022-02-21 17:54:11 +01:00
Michael Schmoock
23a8f09b4d noise: fix #331
fixes an off by one error
2022-02-21 17:54:11 +01:00
Michael Schmoock
f472484acd noise: adds xfail testcase for #331 2022-02-21 17:54:11 +01:00
Michael Schmoock
a7448c91c1 noise: revert broken fix #332 for #331 2022-02-21 17:54:11 +01:00
Michael Schmoock
689be5a70d noise: adds docstrings to plugin methods 2022-02-21 17:54:11 +01:00
Michael Schmoock
69e02e23b1 cleanups: feeadjuster, drain and summary 2022-02-17 10:26:54 +01:00
PestToast
6df68dcebc Update noise.py
This fixes the problems described in issue #331
2022-02-08 17:32:51 +01:00
svewa
a207969404 another instance of unchecked short_channel_id access in fee_strategy: get_fees_median (#330)
* skip channels that are not (yet) locked in

* another unchecked request to ch['short_channel_id']

* this was meant to be the change.
2022-01-28 15:53:07 +01:00
svewa
f492affe2e skip channels that are not (yet) locked in 2022-01-27 17:40:48 +01:00
Christian Decker
b88c927810 readme: Add the noise plugin to the matrix 2022-01-09 12:51:42 +01:00
Christian Decker
b65fbc541f ci: Revert bitcoind update
We don't yet have the stripped bundles
2022-01-07 14:58:55 +01:00
Christian Decker
7ee9d6ca07 drain: Disable the refill test, it was flaky and now it's broken 2022-01-07 14:55:04 +01:00
Christian Decker
3c2ac14ad8 ci: Reduce the noise of initializing virtualenvs 2022-01-04 18:17:24 +01:00
Vincenzo Palazzo
22923724a9 summary: close the db when the lightningd will stop.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2021-12-19 15:17:30 +01:00
Vincenzo Palazzo
a6829450db summary: check for all the extension of the db
Reported by: nathanael on IRC

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2021-12-19 15:17:30 +01:00
Vincenzo Palazzo
4d7ed5cb5f Make a sanity check during the initialization of the db
This commit try to solve the following exception with an additional sanity check:

```
{
   "code": -32600,
   "message": "Error while processing summary: 'Plugin' object has no attribute 'persist'",
   "traceback": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 627, in _dispatch_request\n    result = self._exec_func(method.func, request)\n  File \"/usr/local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 609, in _exec_func\n    return func(*ba.args, **ba.kwargs)\n  File \"/home/_lightning/plugins/summary.py\", line 124, in summary\n    addpeer(plugin, p)\n  File \"/var/git/plugins/summary/summary_avail.py\", line 7, in addpeer\n    if pid not in p.persist['peerstate']:\nAttributeError: 'Plugin' object has no attribute 'persist'\n"
}
```

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2021-12-19 15:17:30 +01:00
Christian Decker
38d1f337a9 historian: Do not crash if we get an unknown address type 2021-12-19 15:15:37 +01:00
Christian Decker
7d3e7a12a4 readme: Add @andrewtoth's listmempoolfunds 2021-12-19 15:15:37 +01:00
LightningHelper
bcebb1ba2a added fee per channel
Knowing the fee per channel is very useful for fee selection.
I assume an option can be added to show the fees only if --details is an argument, but it will make the code a bit less clean.
2021-12-13 14:20:29 +01:00
Christian Decker
daff5ecd7a ci(Mergify): configuration update
Signed-off-by: Christian Decker <null>
2021-12-13 13:49:00 +01:00