Commit Graph
100 Commits
Author SHA1 Message Date
Erik Arvstedt aa418869b3 tests/trustedcoin: extract fn 2023-08-03 18:40:12 +02:00
Erik Arvstedt 6de5029c49 tests/trustedcoin: refactor
- No need to wait for bitcoind:
  clightning being active implies that bitcoind is active.

- Remove redundant log checks
2023-08-03 18:40:12 +02:00
Erik Arvstedt 53ea447ab7 trustedcoin: add option tor.proxy
By disabling `trustedcoin.tor.proxy` and enabling `clightning.tor.proxy`,
`trustedcoin` can be used without Tor proxying, while clighting still
uses Tor for lightning layer connections.

Previously, disabling Tor for `trustedcoin` required to also disable
Tor for clightning.

Also fix the workaround in the docs for the trustedcoin Tor connection issues:
The previous config snippet only affected systemd hardening settings,
but didn't disable Tor for trustedcoin.
2023-08-03 18:40:12 +02:00
Erik Arvstedt 31b76f1ffe clightning: add option useBcliPlugin
This decouples modules `clightning` and `trustedcoin`.
`clightning` no longer depends on `trustedcoin`, which restores
the acyclic dependency graph described in `modules.nix`
2023-08-03 18:40:12 +02:00
Erik Arvstedt f3e9c644e3 clightning-plugins/trustedcoin: improve docs 2023-08-03 17:14:40 +02:00
Erik Arvstedt 7640c69d79 tests/clightning-plugins: enable active plugin test for trustedcoin 2023-08-03 01:20:05 +02:00
Erik Arvstedt 57455eb897 tests/clightning-plugins: set actual clboss pkg path 2023-08-03 01:20:04 +02:00
Erik Arvstedt dca6813d6b tests/clightning-plugins: extract variable 2023-08-03 01:20:04 +02:00
Erik Arvstedt 858ab1cfd6 clightning: revert whitespace changes 2023-08-03 01:20:04 +02:00
Erik Arvstedt 14ca8b461b rtl: fix lnd, lightning-loop connection errors
lnd and lightning-loop resolve `localhost` to an IPv4 address when
creating RPC sockets.

Since NixOS 23.05, RTL (nodejs) resolves `localhost` to an IPv6
address when connecting to lnd and lightning-loop, which leads to
connection errors.

To fix these and other potential errors, replace all instances
of `localhost` with `127.0.0.1`.
2023-07-29 19:07:10 +02:00
Erik Arvstedt e658209d56 run-tests.sh: fix building tests for Nix ≥ 2.15 2023-07-19 17:22:01 +02:00
Erik Arvstedt bb2e88cec2 fix python packages for nixos 23.05 2023-07-19 17:22:01 +02:00
Erik Arvstedt e31cc686f2 run-tests: make compatible with new shellcheck version 2023-07-19 17:22:01 +02:00
Erik Arvstedt 76dc7b92e1 examples/deploy-container.sh: add extra-container version check
It now uses the same version check as
make-container.sh (which is called by run-tests.sh)
2023-07-19 17:22:01 +02:00
Erik Arvstedt 6c2d1108a4 update the required extra-container version for nixos 23.05 2023-07-19 17:22:01 +02:00
Erik Arvstedt e2cce7daa8 update to nixos 23.05 2023-07-19 17:22:01 +02:00
Erik Arvstedt 55c64d8dff update nixpkgs
clightning: 23.05.1 -> 23.05.2
lightning-pool: 0.5.3-alpha -> 0.6.4-beta
2023-07-19 17:22:01 +02:00
Erik Arvstedt bd77b89fea rtl, clightning-rest: update to nodejs 18
16 is no longer supported by NixOS 23.05.
18 is the latest LTS version.
2023-07-19 17:22:01 +02:00
Erik Arvstedt 5eaf104efe secure-node: add sudo shell alias for doas
A convenience helper which allows running most `sudo` cmds while
`doas` is enabled.

This is safe because all args supported by both `sudo` and
`doas` that lead to command execution (like `-u <user>`)
have identical semantics.
2023-07-10 07:22:00 +02:00
Erik Arvstedt 6510f269f6 release: add nixos-* version branch
Best practice for flakes containing NixOS modules.

`push-release` now pushes to an extra branch named `nixos-<version>`,
alongside branch `release`.
This allows users to track a specific NixOS release, so that their
config doesn't break when nix-bitcoin switches to a new NixOS
release.
2023-07-09 13:13:05 +02:00
Erik Arvstedt dd532d4738 push-release: fix OAUTH_TOKEN error handling 2023-07-09 13:07:29 +02:00
Erik Arvstedt a2b45e00c7 push-release: auto-create release version number 2023-07-09 13:07:29 +02:00
Erik Arvstedt 0ce3fb1c94 push-release: use curl -fSs
Best practice when using curl in scripts.
2023-07-09 13:07:29 +02:00
Erik Arvstedt 40c5419a75 push-release: rename TAG_NAME -> releaseVersion
More precise name.
2023-07-09 13:07:29 +02:00
Erik Arvstedt 50aa13c3b4 clightning-rest: 0.10.4 -> 0.10.5 2023-06-29 12:48:25 +02:00
Erik Arvstedt 26b35120ad tests/trustedcoin: remove from CI, disable temporarily
- Don't spin up a CI node for the minor `trustedcoin` test.
- Add the test to `run-tests.sh`, but disable it because it
  occasionally fails.
2023-06-26 00:10:31 +02:00
Erik Arvstedt edcf39daf5 clightning-rest: 0.10.3 -> 0.10.4 2023-06-21 23:09:39 +02:00
Erik Arvstedt bed10d1fca versioning: improve configVersion description 2023-06-09 21:51:20 +02:00
Erik Arvstedt 1b741c7cc1 clightning-plugins/prometheus: fix patch not being applied
`patchPhase` can't be used with `buildCommand`.
2023-06-09 14:40:32 +02:00
Erik Arvstedt af87d5958a obsolete-options: simplify removal of clightning plugin commando 2023-06-02 10:50:11 +00:00
Erik Arvstedt 9b575e4f3f test/backups: check that bitcoind stops without errors 2023-06-02 10:50:11 +00:00
Erik Arvstedt 8a791b754e rtl: 0.13.6 -> 0.14.0 2023-06-02 10:50:11 +00:00
Erik Arvstedt 29a95ea311 clightning-rest: update module to v0.10.3 2023-06-02 10:49:35 +00:00
Erik Arvstedt 67475f768e clightning-rest: 0.9.0 -> 0.10.3 2023-06-02 10:49:35 +00:00
Erik Arvstedt fe76516790 bitcoind: update module to v25.0 2023-06-02 10:49:25 +00:00
Erik Arvstedt 2166bfd1ee clboss: deprecate, add clighting 23.05 compatibility 2023-05-29 06:41:38 +00:00
Erik Arvstedt 1d69c9c824 lnd: fix non-static patch URL 2023-05-07 22:30:31 +02:00
Erik Arvstedt 9f3daab64f lnd: fix cert key format bug 2023-05-07 21:11:00 +02:00
Erik Arvstedt 744d8fe379 update nixpkgs
fulcrum: 1.9.0 -> 1.9.1
lightning-loop: 0.20.0-beta -> 0.23.0-beta
lnd: 0.15.5-beta -> 0.16.2-beta
2023-05-06 23:14:46 +02:00
Erik Arvstedt cea69b73d2 nodeinfo: enable required option nix-bitcoin.operator 2023-03-11 20:15:14 +01:00
Erik Arvstedt 27d95fda85 nodeinfo/lnd: add onion_rest_address 2023-03-11 20:10:55 +01:00
Erik Arvstedt 54a21874ae nodeinfo/lnd: add rest_address 2023-03-11 20:10:55 +01:00
Erik Arvstedt a4bfefd562 add presets/wireguard.nix
This allows using `lndconnect` via a direct WireGuard connection.
2023-03-11 20:10:54 +01:00
Erik Arvstedt 477e1709fb lndconnect: update to Zeus 0.7.1
- Generate lndconnect URLs with protocol `c-lightning-rest` for clightning.
  (Zeus now auto-detects the lightning implementation by the URL protocol.)
- Use improved QR code format (via qrencode)  .
2023-02-27 14:39:29 +01:00
Erik Arvstedt f996ef37d9 lnd, clightning-rest: remove lndconnectOnion, add generic option lndconnect
For both lnd and clightning-rest, `lndconnectOnion` is replaced by
options `lndconnect.enable` and `lndconnect.onion`.

This allows using lndconnect without Tor.
2023-02-27 14:39:29 +01:00
Erik Arvstedt b4bc621b8c rename lndconnect-onion.nix -> lndconnect.nix 2023-02-27 14:39:29 +01:00
Erik Arvstedt 907cfe4f4c docs/services: improve title, fix numbering 2023-02-27 14:39:29 +01:00
Erik Arvstedt 3a2730d287 btcpayserver: support restarting from the web interface
This is required since version 1.7.4.
See: https://github.com/btcpayserver/btcpayserver/releases/tag/v1.7.4
2023-02-27 12:44:08 +00:00
Erik Arvstedt bf8de6744e README: add mempool extension module 2023-02-19 22:02:23 +01:00
Erik Arvstedt c12ff6251d README: add some module descriptions 2023-02-04 13:22:41 +01:00
Erik Arvstedt 2c3fa63baa dev/features: improve enter_service
Read uid/gid directly from the service pid.

This makes this fn work with arbitrary services, and with `bitcoind`,
where, for historical reasons, the service user name (`bitcoin`) doesn't
equal the service name.
2023-02-04 13:22:41 +01:00
Erik Arvstedt addfa8ec6b test: support run, debug commands in basic NixOS tests
Currently, this only affects the basic NixOS test `clightning-replication`.
2023-02-02 10:51:41 +01:00
Erik Arvstedt ae733d887e tests/clightning-replication: reuse pkgs instance
This reduces eval time by 30%.
2023-02-02 10:51:41 +01:00
Erik Arvstedt 6cbd0d93ae tests: rename clightningReplication -> clightning-replication
The test name now matches the file name.
2023-02-02 10:51:41 +01:00
Erik Arvstedt 85310b533a secrets: use type lines for generateSecretsCmds
This allows users to amend secrets cmds.
2023-02-02 10:51:41 +01:00
Erik Arvstedt bc2f66d4f1 bitcoind, liquid: increase start/stop timeouts 2023-02-02 10:51:41 +01:00
Erik Arvstedt 519ae31202 netns-isolation: improve formatting 2023-02-02 10:51:41 +01:00
Erik Arvstedt a1023696e6 netns-isolation: reserve netns id for mempool
This allows using the old id in the extension flake, so that
existing configs are not changed.
2023-02-02 10:51:41 +01:00
Erik Arvstedt 34fe8675bd add option nix-bitcoin.pkgOverlays
This simplifies extending `nix-bitcoin.pkgs` and is required for
extension flakes.
For now, mark this as `internal`.
2023-02-02 10:51:40 +01:00
Erik Arvstedt a3bdecb10b helper: add start-bash-session.sh 2023-02-02 10:51:40 +01:00
Erik Arvstedt 6291d4fbea rtl: 0.13.2 -> 0.13.4 2023-01-26 23:08:05 +01:00
Erik Arvstedt 690a8f6256 nodeinfo: extract fn mkInfoLong
This is required by the mempool extension flake.
2023-01-26 11:17:03 +01:00
Erik Arvstedt 2af642f56a improve comments
The comment in python-packackges was obsolete.
2023-01-26 11:17:02 +01:00
Erik Arvstedt 56c2abd91a update nixpkgs
btcpayserver: 1.7.2 -> 1.7.3
electrs: 0.9.10 -> 0.9.11
hwi: 2.1.1 -> 2.2.0
2023-01-25 23:57:29 +01:00
Erik Arvstedt 86dc7e2669 fulcrum: allow access to /proc/meminfo
This still hides the proc subdirectories for other processes.

Without this setting, fulcrum fails when the config value of
`fast-sync` is greater than 2^31 bytes.
2023-01-21 13:28:32 +01:00
Erik Arvstedt c948af2e18 dev/dev-features: add enter_service helper 2023-01-21 13:20:49 +01:00
Erik Arvstedt 5634f08873 rtl: make extraConfig recursively mergeable
Previously, when merging different definitions of `extraConfig`,
only the top-level attrset was merged.

Example:
The two separate settings
  nodes.lnd.extraConfig.Settings.userPersona = "MERCHANT";
  nodes.lnd.extraConfig.Settings.logLevel = "DEBUG";
were previously merged into
  nodes.lnd.extraConfig.Settings = { logLevel = "DEBUG" };
(The last definition has precedence.)
2023-01-20 13:46:08 +01:00
Erik Arvstedt b76728a1ec treewide: use bool literals for systemd
Run this from the repo root to check that there are no more remaining
bool strings:
grep -P '"true"|"false"' -r --exclude-dir=.git
2023-01-20 13:46:08 +01:00
Erik Arvstedt b4d7e1aa8f add dev helper and docs 2023-01-15 20:28:49 +01:00
Erik Arvstedt b35d08d3f2 docs: move test docs from examples/README to test/README 2023-01-15 20:28:48 +01:00
Erik Arvstedt 4d76eb9183 docs/configuration: fix typo 2023-01-15 20:28:48 +01:00
Erik Arvstedt dc0710f3f4 tests: add example scenario customTest 2023-01-15 20:28:48 +01:00
Erik Arvstedt 9019a17bfc versioning: add fulcrum db change info 2023-01-07 19:32:54 +00:00
Erik Arvstedt 9e30d2728b tests: formatting
Move line next to `services.lnd` config for clarity.
2023-01-06 23:46:43 +01:00
Erik Arvstedt c6d85c6fe3 tests: fix broken unit file when clightning is disabled
Previously, an incomplete clightning unit was always created because
attr `clightning` was always defined in option attrset `systemd.services`.
2023-01-06 23:46:43 +01:00
Erik Arvstedt a51f7b419e run-tests: use arg instead of env var for scenario overrides
This removes a source of implicit state and guarantees that regular
calls to `run-tests.sh` always run the builtin tests.
2023-01-06 23:46:43 +01:00
Erik Arvstedt 4b5b4eac58 examples/deploy-container: fix sudo env propagation
Env vars can't be reliably passed through `sudo`, so always
call nix-shell to setup the env after running sudo.
2023-01-06 23:23:54 +01:00
Erik Arvstedt 8d476cfeaf nix-bitcoin/runAsUserCmd: remove workaround 2023-01-03 16:18:27 +01:00
Erik Arvstedt 314020b246 rtl: 0.13.1 -> 0.13.2 2022-12-20 23:24:24 +01:00
Erik Arvstedt 00cceca861 joinmarket: fix Python packages 2022-12-18 20:01:53 +01:00
Erik Arvstedt e4b8e14d3a 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/
2022-12-18 20:01:53 +01:00
Erik Arvstedt d1ef2a6e1e 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.
2022-12-18 20:01:52 +01:00
Erik Arvstedt 74c8593407 pythonPackages: add indentation
This makes the following commit more readable.
2022-12-18 20:01:52 +01:00
Erik Arvstedt 109dccca27 treewide: use mdDoc for descriptions
Enable markdown syntax (instead of docbook) for descriptions.
This only affects external doc tooling that renders the descriptions.
2022-12-18 20:01:52 +01:00
Erik Arvstedt a9c1995ed9 treewide: rename maintainer earvstedt -> erikarvstedt 2022-12-18 20:01:52 +01:00
Erik Arvstedt 9e456ea3a9 shellcheck-services.nix: update to NixOS 22.11 2022-12-18 20:01:52 +01:00
Erik Arvstedt 77d58162e7 test: update to NixOS 22.11 2022-12-18 20:01:52 +01:00
Erik Arvstedt 142cbcfb37 flake: remove 32-bit systems 2022-12-18 20:01:52 +01:00
Erik Arvstedt c9b1e59f20 update to NixOS 22.11
This includes no pkg version updates.
2022-12-18 20:01:52 +01:00
Erik Arvstedt 62515a5696 helper/update-flake: support updating NixOS versions 2022-12-18 20:01:48 +01:00
Erik Arvstedt c5493717b7 lnd: support INADDR_ANY addresses for bitcoind.zmqpubraw*
Also use `mkDefault` when defining `bitcoind.zmqpubraw*` to simplify
overriding for users.
2022-11-11 12:10:00 +01:00
Erik Arvstedt 0447c5bacb 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.
2022-11-08 23:04:56 +01:00
Erik Arvstedt 0de16095e1 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
2022-11-04 11:51:44 +01:00
Erik Arvstedt d332177d3e clightning: extract var bitcoind
Follow the default module formatting style.
2022-11-04 11:07:36 +01:00
Erik Arvstedt 1b5e51b7fe examples/vm-config: fix syntax error 2022-11-04 00:33:53 +01:00
Erik Arvstedt 565deb770a examples/minimal-vm: add lightning-cli demo command 2022-11-04 00:33:31 +01:00
Erik Arvstedt edbaeb9813 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.
2022-11-03 23:08:06 +01:00
Erik Arvstedt 90e942e5ae nodeinfo: rename nodeinfoLib -> lib 2022-11-03 23:08:06 +01:00
Erik Arvstedt 8eaa4cce30 tests: move mkIfTest to nix-bitcoin.lib 2022-11-03 23:08:06 +01:00
Erik Arvstedt 47a09ec214 flake: expose supportedSystems 2022-11-03 23:08:05 +01:00