Jan Sarenik
deb960a582
commando: change underscore to dash
2022-09-19 10:47:16 +09:30
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
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
Christian Decker
a5d59bd486
command: Fix tests not working after ping changed
2021-12-12 13:45:13 +01:00
Rusty Russell
a7b7c56adc
commando: delete no-datastore test, since it's now built-in.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
d059290f8b
commando: minor cleanups to keep flake8/mypy happy.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
692e117959
commando: add unique id as we hand our runes.
...
This allows us to blacklist them in future.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
ed836894eb
commando: update now datastore uses arrays for keys
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
a903208121
commando: don't let readonly default read the datastore.
...
That... would be dumb, since it holds the master secret!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
02d6bbbf36
requirements.txt: update to runes version which is correctly packaged.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
05160d4724
commando: remove gratuitous logging.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
b1dace0cd4
commando: don't deadlock if the make us call into ourselves.
...
For now we only support calling into commando-rune, not chaining commando
commands!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
ad27d4f624
commando: optionally use runes for authorization.
...
Now it requires the datastore (or datastore.py plugin), if you want
to use runes. The simple reader/writer control lists don't require
that, but for simplicity we always require the runes Python module.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30
Rusty Russell
c05c8bf300
Feedback from GH Review.
...
1. Fix README.md dynamic plugin example (needs keywords, abspath!)
(pointed out by @carnhofdaki).
2. Define magic number we use (suggested by @FreePietje)
2021-09-08 10:11:58 +09:30
Rusty Russell
5d062830ba
commando: reckless? Try going commando!
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2021-09-08 10:11:58 +09:30