Since we end up consolidating some of the return values for `pay` and
`paystatus` and change the public interface we need to add the compatibility
flag and guard the switchover behind it.
Changelog-Added: We now install `lightning-hsmtool` for your `hsm_secret` needs.
See: https://github.com/ElementsProject/lightning/issues/3717#issuecomment-644844594
It seems reasonable to add this to the standard install, and to document it properly as well, hopefully we can fill in the documentation better later on.
They're almost entirely autogenerated, and we use symlinks into the
top directory to reduce replication.
They can't be under pyln.spec.message, because a package can't also
be a namespace.
We also add fulltext and desc fields, and exclude our "gen" files from
flake8, since the spec quotes contain weird whitespace.
Changelog-Added: Python: pyln.spec.bolt{1,2,4,7} packages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The main change here is that the previously-optional open/accept
fields and reestablish fields are now compulsory (everyone was
including them anyway). In fact, the open/accept is a TLV
because it was actually the same format.
For more details, see lightning-rfc/f068dd0d8dfa5ae75feedd99f269e23be4777381
Changelog-Removed: protocol: support for optioned form of reestablish messages now compulsory.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
- we've moved tmpctx management to setup.c from daemon.c, so we update
the `check-tmpctx`
- `common_setup(char *)` is now a valid analog for `setup_locale`, so we
check for either in check-setup_locale
Hide CFLAGS and LDFLAGS line noise each time an object file is compiled
or linked.
Also add a `make show-flags` command for displaying CC, LD, CFLAGS and
LDFLAG information. This is shown at the start of each build.
Use `V=1 make` to restore original output
make
CC: gcc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall [..]
LD: gcc -Og -Lexternal -lwallycore -lsecp256k1 -ljsmn [..]
...
cc wallet/test/run-db.c
cc lightningd/test/run-jsonrpc.c
cc lightningd/test/run-invoice-select-inchan.c
cc lightningd/test/run-log-pruning.c
cc lightningd/test/run-find_my_abspath.c
cc cli/test/run-large-input.c
cc cli/test/run-remove-hint.c
ld lightningd/lightning_hsmd
ld lightningd/lightning_gossipd
ld lightningd/lightning_openingd
ld lightningd/lightning_channeld
ld lightningd/lightning_closingd
...
Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Changed: build: default compile output is prettier and much less verbose
We had them split according the separate use-cases:
- testing
- doc-gen
- wire-gen
But that was causing new contributors to miss some dependencies when they
first got hacking. So this consolidates all of our own dependencies in a root
requirements.txt, with the notable exception of `pyln-client`, `pyln-testing`
and `pyln-proto` which are distributed as PyPI modules and therefore have
their own dependencies that need to be tracked in the module root.
Closes#3518
Don't let make pollute subprojects' environment with our own `CFLAGS`,
which are quite strict because that breaks at least libwally-core:
```sh
$ ./configure ...
$ CFLAGS=whatever_this_is_irrelevant make
...
cd external/libwally-core-build && ../libwally-core/configure ...
...
CFLAGS = -DBINTOPKGLIBEXECDIR="\"../libexec/c-lightning\"" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -std=gnu11 -g -fstack-protector -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/libbacktrace-build -I . -I/usr/local/include -DCCAN_TAKE_DEBUG=1 -DCCAN_TAL_DEBUG=1 -DCCAN_JSON_OUT_DEBUG=1 -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DBUILD_ELEMENTS=1 -W -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings -fvisibility=hidden -O3
...
In file included from ../../libwally-core/src/base58.c:4:
../../libwally-core/src/ccan/ccan/endian/endian.h:71:24: error: unused function 'bswap_16'
[-Werror,-Wunused-function]
static inline uint16_t bswap_16(uint16_t val)
^
```
If `CFLAGS` is set in its environment, then `make` would export our own
`CFLAGS` to any subprocesses it starts, which means subprojects would
inherit our `CFLAGS="-Wall -Werror"` in their environments.
GNU Make's documentation:
https://www.gnu.org/software/make/manual/html_node/Variables_002fRecursion.html#Variables_002fRecursion
> make exports a variable only if it is either defined in the environment initially...
Example:
```make
A = x
default:
echo $$A
```
then:
```sh
$ make # prints nothing, A is not exported to the subprocess
$ A=y make # prints "x", our A=x is exported to the subprocess
```
Changelog-None
Added in d901304120, this column is null in old dbs like mine:
2020-02-15T00:08:41.444Z **BROKEN** database: Accessing a null column 12 in query SELECT id, channel_htlc_id, msatoshi, cltv_expiry, hstate, payment_hash, payment_key, routing_onion, failuremsg, malformed_onion, origin_htlc, shared_secret, received_time FROM channel_htlcs WHERE direction= ? AND channel_id= ? AND hstate != ?
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Most is taken from lightningd/bitcoind and adapted. This currently
exposes 5 commands:
- `getchaininfo`, currently called at startup to check the network and
whether we are on IBD.
- `getrawblockbyheight`, which basically does the `getblockhash` +
`getblock` trick.
- `getfeerate`
- `sendrawtransaction`
- `getutxout`, used to gather infos about an output and currently used by
`getfilteredblock` in `lightningd/bitcoind`.
On CI it is nice to cache the external dependencies. However if we
always compile them in the same folder we cannot cache for multiple
different architectures. After this commit native compile targets will
still live in `external` but cross compiled versions will live in
`external/<arch>`.
Put `LC_ALL=C sort` in a variable and use it everywhere. It was
forgotten in one place.
Without `LC_ALL=C` it would order `a.b` before `a-c` even though
`. (0x2E)` > `- (0x2D)`.
Changelog-None
Before this change `make` would build everything but the docs.
They would be built during `make install` which is unexpected.
Add a dependency to `doc-all` to the `default` target so that docs are
build together with the rest of the programs. Leave the `install-data`
as is, to still build the docs if they are not built yet during install.
Changelog-None
This should not affect any consumer of the API since we just shift the actual
implementation from one side to the other, and keep aliases in place so
scripts don't break.
We also bump the version number from 0.0.7.3 to 0.7.4 which allows us to be in
sync with c-lightning itself, and remove the superfluous `0` in front.
If we have the client library for postgres configure will define HAVE_POSTGRES
the same way it already handled libsqlite3 an we start linking against it.
Signed-off-by: Christian Decker <decker.christian@gmail.com>
/bin/sh: 1: ccan/ccan/cdump/tools/cdump-enumstr: Text file busy
make[1]: *** [common/Makefile:81: common/gen_htlc_state_names.h] Error 2
make[1]: *** Waiting for unfinished jobs....
The fix is to make sure all generated headers are made first, and
thus cdump-enumstr.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
installcheck calls $(MAKE) under the covers, which can race with the
current builds, and we can try installing something which is still
being built:
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
/usr/bin/ld: can not read symbols: File truncated
/usr/bin/ld: .eh_frame/.stab edit: File truncated
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.interp' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.note.ABI-tag' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.note.gnu.build-id' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.gnu.hash' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.dynsym' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.dynstr' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.gnu.version' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.gnu.version_r' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.rela.dyn' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.rela.plt' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.init' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.plt' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.plt.got' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.text' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.fini' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.rodata' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.eh_frame' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.init_array' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.fini_array' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.data.rel.ro' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.dynamic' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.got' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `.data' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `xautodata_json_command' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `xautodata_hooks' not in segment
/usr/bin/ld: lightningd/lightningd: warning: allocated section `xautodata_type_to_string' not in segment
Makefile:390: recipe for target 'lightningd/lightningd' failed
make[1]: *** [lightningd/lightningd] Error 1
make[1]: Leaving directory '/home/rusty/lightning'
Makefile:553: recipe for target 'installcheck' failed
make: *** [installcheck] Error 2
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>