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.
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 <rusty@rustcorp.com.au>
Changelog-Added: hsmtool: `makerune` command to make a master rune for a node.
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 <rusty@rustcorp.com.au>
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
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 <rusty@rustcorp.com.au>
We only handle top-level objects with an array of objects:
make sure it is one before we call the routines.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This means we will document deprecations and additions, rather than just
pretending they've always been that way!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The switch to logging enabled verbose output regardless of the option
flag. Here the functionality is restored.
Changelog-Fixed: reckless verbosity properly applied.
Ubuntu clang 15.0.2-1 complains:
```
wire/peer_exp_wiregen.c:257:14: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
for (size_t i = 0; *plen != 0; i++) {
^
wire/peer_exp_wiregen.c:1373:14: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
for (size_t i = 0; *plen != 0; i++) {
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
`urllib3` does not ship as built-in with any of the recent python
releases, whereas `urllib` does, and for the uses we have, they are
pretty much identical.
The requests package is preferred, but until installation of python user
dependencies is implemented, sticking with standard modules allows a
frictionless experience.
And make errors gcc-style, so emacs can jump through the automatically.
```
In devtools/reduce-includes.sh line 21:
echo -n "-$LINE"
^-- SC3037 (warning): In POSIX sh, echo flags are undefined.
In devtools/reduce-includes.sh line 25:
echo -n "."
^-- SC3037 (warning): In POSIX sh, echo flags are undefined.
In tools/rel.sh line 6:
prefix=$(printf '%s\n' "${from#$common}" | sed 's@[^/][^/]*@..@g')
^-----^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.
Did you mean:
prefix=$(printf '%s\n' "${from#"$common"}" | sed 's@[^/][^/]*@..@g')
In tools/rel.sh line 7:
printf '%s\n' "$prefix/${to#$common}"
^-----^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.
Did you mean:
printf '%s\n' "$prefix/${to#"$common"}"
For more information:
https://www.shellcheck.net/wiki/SC3037 -- In POSIX sh, echo flags are undef...
https://www.shellcheck.net/wiki/SC2295 -- Expansions inside ${..} need to b...
make: *** [Makefile:553: check-shellcheck] Error 123
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reckless was failing to install multiple plugins due to git not
appreciating the cwd being a now removed dir after the first plugin
tmp files were cleaned up.
While loading the appropriate lightningconfig file, it is now checked
against the active config file in lightningd. Because a deviation from the
default file structure would not be possible, a -conf option is also added
to explicitly pass the lightningd config file into reckless.
This also simplifies dynamic enable/disable by catching the exception
raised when the cli is unable to connect to RPC (lightningd offline or
misconfigured relative to reckless).
This change makes it easier to follow retrieval of parent directories.
Additional os.path operations replaced with their pathlib.Path equivalents
to keep module usage consistent.
The goal was to support passing a list to install, enable, etc. in order
to improve performance. Passing lists to most of the functions was less
practical than iterating through the items from the top level.
`reckless help <cmd>` previously called the function docstring. This could
be updated to use the subparser help, but would require a strict naming
convention or a dictionary. Providing a hint to use the built-in
contextual help via the option flag is hopefully sufficient.
Regtest environments commonly use explicit definition of the config
file for lightningd. This can be queried and utilized by default,
saving redundant definitions between lightning and reckless.
A simple standalone python executable to track plugin repositories, clone
to /tmp, install requirements, test plugin runs, then install and enable in
lightningd and in the config.
Changelog-Added: Reckless - a Core Lightning plugin manager
Mainly, field name changes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: Protocol: Support for forwarding blinded payments (as per latest draft)
This allows GDB to print values, but also allows us to use them in
'case' statements. This wasn't allowed before because they're not
constant terms.
This also made it clear there's a clash between two error codes,
so move one.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: Error code from bcli plugin changed from 400 to 500.
This broke with COPTFLAGS="-flto -O3", and so I took a look (it
complains more than normal because main isn't there). We should never
be running update-mocks except on programs expected to compile: in
this case, that's tools/test/run-test-wire.c.
Remove the code which tries to run this, which also means
non-developers won't be running update-mocks!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: `hsmtool`: hsm_secret (ignored) on cmdline for dumponchaindescriptors (deprecated in v0.9.3)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>