Commit Graph

1718 Commits

Author SHA1 Message Date
Erik Arvstedt
0e35b8a79a nix-bitcoin/runAsUserCmd: remove workaround 2023-06-01 02:56:22 -07:00
Erik Arvstedt
e6ce10a478 joinmarket: fix Python packages 2023-06-01 02:56:22 -07:00
Erik Arvstedt
d6cb65fbde clightning: fix Python packages
Patching `pyln-proto` to use cryptography 38 lets
us avoid adding many older Python pkg versions.

The backwards incompatible changes from cryptography 36 to 38
only include the removal of deprecated fns that pyln-proto
doesn't use.
See string "BACKWARDS INCOMPATIBLE" in
https://cryptography.io/en/latest/changelog/
2023-06-01 02:56:22 -07:00
Erik Arvstedt
2737e8374c pythonPackages: improve layout
- Move the creation of the joinmarket Python pkgs from
  `joinmarket/default.nix` to `pkgs/python-packages/default.nix`.

- Move definitions of old pkg versions from the main Python pkgs
  to the joinmarket Python pkgs.
  These old versions are only required by joinmarket.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
c3d2072b58 pythonPackages: add indentation
This makes the following commit more readable.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
f603cb6101 treewide: use mdDoc for descriptions
Enable markdown syntax (instead of docbook) for descriptions.
This only affects external doc tooling that renders the descriptions.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
e96ff7075e treewide: rename maintainer earvstedt -> erikarvstedt 2023-06-01 02:56:22 -07:00
Erik Arvstedt
ba54d3d699 shellcheck-services.nix: update to NixOS 22.11 2023-06-01 02:56:22 -07:00
Erik Arvstedt
2e5b287bc8 test: update to NixOS 22.11 2023-06-01 02:56:22 -07:00
Erik Arvstedt
7a2c1efd5d flake: remove 32-bit systems 2023-06-01 02:56:22 -07:00
Erik Arvstedt
2156b4410d update to NixOS 22.11
This includes no pkg version updates.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
bf7dc0f27a helper/update-flake: support updating NixOS versions 2023-06-01 02:56:22 -07:00
JayDeLux
85aa6f8ede minor typo 2023-06-01 02:56:22 -07:00
Erik Arvstedt
f3fdab1d76 rtl: 0.13.1 -> 0.13.2 2023-06-01 02:56:22 -07:00
nixbitcoin
de4dccb006 joinmarket: 0.9.7 -> 0.9.8 2023-06-01 02:56:22 -07:00
Jonas Nick
bc72ad94b3 clightning: set "database-upgrade=true" for 22.11.1 2023-06-01 02:56:22 -07:00
Jonas Nick
6b7b23cd6e update nixpkgs
btcpayserver: 1.6.12 -> 1.7.1
bitcoind: 24.0 -> 24.0.1
clightning: 0.12.1 -> 22.11.1
lnd: 0.15.4-beta -> 0.15.5-beta
nbxplorer: 2.3.41 -> 2.3.49
2023-06-01 02:56:22 -07:00
Jonas Nick
de4797be1f update nixpkgs
bitcoin: 23.0 -> 24.0
bitcoind: 23.0 -> 24.0
charge-lnd: 0.2.12 -> 0.2.13
2023-06-01 02:56:22 -07:00
Erik Arvstedt
761898f380 lnd: support INADDR_ANY addresses for bitcoind.zmqpubraw*
Also use `mkDefault` when defining `bitcoind.zmqpubraw*` to simplify
overriding for users.
2023-06-01 02:56:22 -07:00
Jonas Nick
206deaf2b3 update nixpkgs
electrs: 0.9.9 -> 0.9.10
elementsd: 22.0 -> 22.0.2
extra-container: 0.10 -> 0.11
lnd: 0.15.2-beta -> 0.15.4-beta
2023-06-01 02:56:22 -07:00
Jonas Nick
c263aec335 Revert "pkgs: add lnd 0.15.4 (hotfix)"
This reverts commit 57b76d4461.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
9c61850621 clightning-replication: switch system before waiting for server sshd
This is primarily a cosmetic change.
- Increases code clarity because all system test blocks now start with `switch_to_system`
- Optimizes dependency ordering because `switch_to_system` has no
  dependency on the server sshd
2023-06-01 02:56:22 -07:00
Erik Arvstedt
45bfc181fc clightning: extract var bitcoind
Follow the default module formatting style.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
4bb95d1e29 examples/vm-config: fix syntax error 2023-06-01 02:56:22 -07:00
Erik Arvstedt
a1a27857e7 examples/minimal-vm: add lightning-cli demo command 2023-06-01 02:56:22 -07:00
Erik Arvstedt
6dd365e719 treewide: set shebang for bash scripts
These scripts previously failed when called with syscalls like
`execve` (used by, e.g., Python's `subprocess.run`) that use no default
interpreter for scripts without a shebang.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
e68cb010ba tests: define tests via flake
Advantages:
- Pure test evaluations
- The test framework can now be used by flakes that extend nix-bitcoin
- Most features of `run-tests.sh` are now accessible via `nix build`/`nix run`.
  We keep `run-tests.sh` for advanced features like `scenarioOverridesFile` and adhoc scenarios.

Other changes:
- `run-tests.sh` now builds aggregate VM tests like `basic` or
  `buildable` by creating all VMs in a single evaluation.
  This speeds up the tests and eases debugging by separating the eval and build steps.
- Use the new `nix` CLI which has improved build output logging
  by prefixing output lines with the origin drv name.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
f4f4808d59 nodeinfo: rename nodeinfoLib -> lib 2023-06-01 02:56:22 -07:00
Erik Arvstedt
32db35d1bf tests: move mkIfTest to nix-bitcoin.lib 2023-06-01 02:56:22 -07:00
Erik Arvstedt
bd5d70813f flake: expose supportedSystems 2023-06-01 02:56:22 -07:00
Erik Arvstedt
d70fc7d71b nixos-search/flake: formatting 2023-06-01 02:56:22 -07:00
Erik Arvstedt
820a71f34f flake: rename input nixpkgsUnstable -> nixpkgs-unstable
This follows common flake naming conventions.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
ab23466fb7 tests/container: don't require services.clightning to be defined 2023-06-01 02:56:22 -07:00
Erik Arvstedt
365068d763 tests/run-tests.sh: print examples before running
This eases debugging example failures.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
e2d653e7cb tests/copy-src: always copy .git dir
This is required by a later commit that introduces flakes-based test
evaluation. Evaluating local flakes needs a repo dir.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
f405a2ceda make-container.sh: improve root handling
Don't auto-switch to root when executing make-container.sh, because
auto root switching is also implemented in extra-container.

Besides simplifying the code, this is useful for a later commit that
introduces flakes-based container building.
With this change, the container is built under the regular user
instead of root, thereby utilizing the user's regular fetcher and
evaluation caches.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
6a2d4ab1d7 profiles/hardened: support pure eval mode 2023-06-01 02:56:22 -07:00
Erik Arvstedt
ada564c1ea add compatibility with Nix PR #6530 (Source tree abstraction)
Avoid adding flake resource paths to the store (via string
interpolation).
This reduces performance and can lead to modules getting imported
twice, once through a local path and once through a store path.

This might not be needed in a future Nix release, in which case we can
revert this.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
514c05ee47 tests/vmWithoutTests: poweroff on shell exit
This allows quitting the VM with Ctrl-D like in the minimal example VM.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
c12489d838 tests, example: avoid lengthy documentation build
This options manual rebuild takes 30-60s and is triggered by the extra
NixOS options defined by nix-bitcoin.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
d5e50191d6 test/shellcheck-services: add configurable source prefix
This allows using this module for services defined outside of nix-bitcoin.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
b2bae90584 bitcoind: fix rare startup error
Previously, dhcpcd and bitcoind starting up in parallel could lead to
the following error in bitcoind:
```
bitcoind: libevent: getaddrinfo: address family for nodename not supported
bitcoind: Binding RPC on address 127.0.0.1 port 8332 failed.
bitcoind: Unable to bind any endpoint for
```
After the initial failure, the bitcoind service would always restart successfully.

This race condition, where both applications were simultaneously
manipulating network resources, was only triggered under specific
hardware conditions.

Fix it by running bitcoind after dhcp has started (by running after
`network-online.target`).
This bug and the fix only affect the default NixOS scripted
networking backend.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
f874c3b563 pkgs: add lnd 0.15.4 (hotfix)
Includes an emergency hotfix:
https://github.com/lightningnetwork/lnd/releases/tag/v0.15.4-beta
2023-06-01 02:56:22 -07:00
Erik Arvstedt
b3c134c01d lnd: fix missing RPC permissions when bitcoind is pruned 2023-06-01 02:56:22 -07:00
Erik Arvstedt
29d1a6b8a8 test/shellcheck-services: fix error by excluding unavailable services 2023-06-01 02:56:22 -07:00
Erik Arvstedt
425a411e2b test/shellcheck-services: simplify accessing service definitions
This also improves performance by removing the extra module evaluation.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
5e6b560fcf tests: run flake-info in sandbox
Don't use sandboxing in Cirrus CI where namespace support is missing.
2023-06-01 02:56:22 -07:00
Erik Arvstedt
bdb4ee0e0b revert "tests: disable nixosSearch" 2023-06-01 02:56:22 -07:00
Erik Arvstedt
d96c0a628a btcpayserver: use new option certfilepath for lnd 2023-06-01 02:56:22 -07:00
Erik Arvstedt
589860b842 Revert "pkgs: add lnd 0.15.2"
This reverts commit cf836b5d3b.
2023-06-01 02:56:22 -07:00