623 Commits

Author SHA1 Message Date
nixbitcoin
b5984a603c
joinmarket: 0.9.3 -> 0.9.4
Ilita IRC server & use upstream twisted again
2021-12-08 12:38:28 +00:00
nixbitcoin
1a8e7d6348
clightning: re-enable seccomp filtering 2021-12-08 12:38:10 +00:00
Erik Arvstedt
6b539627ee
add presets/bitcoind-remote.nix
This simplifies integrating a remote bitcoind instance and
makes `bitcoin-cli` work with the remote node.

Add note regarding `whitelistedPort` to docs.
2021-12-07 15:35:33 +01:00
Erik Arvstedt
1596b3a5d2
minor fixes
- README: fix uppercase

- bitcoind: add whitespace

- hardware-wallets: remove unused variables
2021-12-07 15:35:33 +01:00
Jonas Nick
747019a9e9
Merge fort-nix/nix-bitcoin#425: Misc. improvements
def64a73b8d87a1c6cb261508b53c9477d3b049f treewide: use TODO-EXTERNAL (Erik Arvstedt)
6f37bef2a359ee7f3926e3a253711cb2f04ff95f netns-isolation: simplify firewall setup (Erik Arvstedt)
f52059ce3c3729fd68245d6781e7c4f13ffd0a6b docs: add doc 'Configuration and maintenance' (Erik Arvstedt)
94aee8174d291a7f1265834c8e515a64451841eb usage.md: add section `Managing services` (Erik Arvstedt)
8cc7b83da1077f68f7323a26717212b506f45ef9 usage.md: convert to '#' heading syntax (Erik Arvstedt)
91fbcfcc776db3201ee30869f9dded59931786a7 faq.md: reformat (Erik Arvstedt)
9e4f4d6b0f9fd57ee893adb754e76501c98d36fc bitcoind: add option `txindex` (Erik Arvstedt)
10a744a59845e59c7a31ac4fd922368110728047 rtl: add option `extraCurrency` (Erik Arvstedt)
62a2602e7832e01b668090d5f3df1d9b2c231d11 electrs: use dataDir for storing extra config (Erik Arvstedt)
9bda7305fd270765734b7a08f3a45dd8debe1650 services: add `tor.*` options (Erik Arvstedt)
ff24e73ad7491cb5b26ae1492ada803f6960992b onion-addresses: fix files not being copied (Erik Arvstedt)
c6fe017aeb8acde5b14ab91c4f76cc1f5ed9fdd3 netns-isolation: avoid creating service files for disabled services (Erik Arvstedt)
017e08ca10d44d3e08b11de3c6c5613c89c5999c btcpayserver: move nbxplorer options to bottom (Erik Arvstedt)
e1d869d76c40c5d981b302a1df102891e4e2560c modules.nix: move rtl to fix topological sorting (Erik Arvstedt)
e44cd7ecdc7ae72cf7256d01bdf4efbf9d06f417 rtl: improve descriptions (Erik Arvstedt)
bd275d3a9ad45d950e157821d4345d2d37257c08 minor improvements (Erik Arvstedt)
8aa28da110123c1d5de9dad343615dace8cb4337 remove `recurring-donations` module (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK def64a73b8d87a1c6cb261508b53c9477d3b049f
  jonasnick:
    ACK def64a73b8d87a1c6cb261508b53c9477d3b049f

Tree-SHA512: 13acd2a3dd73c07f9c31874c8e961f12f39accb48847cbad08479b9a8154b79a6f186819272072dfb5c4768264b81f6e058e9afa57a729db2096784e48352dfd
2021-11-29 18:05:19 +00:00
Erik Arvstedt
def64a73b8
treewide: use TODO-EXTERNAL
Use TODO-EXTERNAL for TODOs that depend on external factors like
upstream fixes.
2021-11-29 13:47:48 +01:00
Erik Arvstedt
6f37bef2a3
netns-isolation: simplify firewall setup
Set all allowed INPUT/OUTPUT addresses in a single `iptables` command.
2021-11-29 13:47:48 +01:00
Erik Arvstedt
9e4f4d6b0f
bitcoind: add option txindex 2021-11-29 13:22:44 +01:00
Erik Arvstedt
10a744a598
rtl: add option extraCurrency 2021-11-29 13:22:44 +01:00
Erik Arvstedt
62a2602e78
electrs: use dataDir for storing extra config
This is simpler and more memory-efficient.
We've also changed other services to use this appraoch.

Also remove unneded `wait_for_unit` in the electrs regtest test.
2021-11-29 13:22:44 +01:00
Erik Arvstedt
9bda7305fd
services: add tor.* options
Split `enforceTor` into `tor.proxy` and `tor.enforce`.
By enabling `tor.proxy` without `tor.enforce`, a service can accept
incoming clearnet connections.
E.g., this allows setting up a Tor-proxied bitcoind node that accepts
RPC connections from LAN.
2021-11-29 13:22:43 +01:00
Erik Arvstedt
ff24e73ad7
onion-addresses: fix files not being copied
When NixOS is already running and Tor is restarted due to config
changes, `/var/lib/tor/state` may be present even when Tor has not
yet finished setting up onion services.
This caused the previous version of `onion-addresses` to not wait for
Tor and to skip not yet present onion service files.

`onion-addresses` now waits until each required onion service file
has appeared.
2021-11-29 13:22:43 +01:00
Erik Arvstedt
c6fe017aeb
netns-isolation: avoid creating service files for disabled services
Only set the `serviceConfig` option when the service is enabled.
Otherwise a service file is created.
2021-11-29 13:22:43 +01:00
Erik Arvstedt
017e08ca10
btcpayserver: move nbxplorer options to bottom
These are largely irrelevant to end users.
2021-11-28 21:18:49 +01:00
Erik Arvstedt
e1d869d76c
modules.nix: move rtl to fix topological sorting
rtl depends on lnd and lightning-loop.
2021-11-28 21:18:47 +01:00
Erik Arvstedt
e44cd7ecdc
rtl: improve descriptions
Also move cl-rest to the bottom.
2021-11-28 21:18:44 +01:00
Erik Arvstedt
bd275d3a9a
minor improvements
- README:
  - Add RTL

- examples/configuration.nix:
  - Fix comment

- btcpayserver.nix:
  - Use nbLib.addressWithPort
  - Embed optionalString like the other optionalStrings

- clboss.nix:
  - Improve description

- clightning.nix:
  - Option `extraConfig`: Add example, improve description.
  - Disable `log-timestamps`. Timestamps are already logged via journald.
  - Simplify `preStart` script

- electrs.nix:
  - Use `port` description wording like in other services.
2021-11-28 21:18:40 +01:00
Erik Arvstedt
8aa28da110
remove recurring-donations module
This module has failed to evaluate for quite some time.
We might bring it back someday with bolt12 and LNURL support.
2021-11-28 21:18:39 +01:00
Jonas Nick
76737ead9f
update nixpkgs
btcpayserver: 1.3.3 -> 1.3.6
electrs: 0.9.2 -> 0.9.3
lnd: 0.13.3-beta -> 0.14.1-beta
nbxplorer: 2.2.16 -> 2.2.18

electrs does not accept command line argument -vv anymore, so we have to use
--log-filter instead.
2021-11-28 17:34:10 +00:00
Jonas Nick
6673c8245c
Merge fort-nix/nix-bitcoin#423: Misc. improvements
4a74b7de084f46655b1f11f738d9e1763ccefcc7 clightning: work around unsupported seccomp syscall (Erik Arvstedt)
38a843d005698152e0d9cf0753a82f84944c40fe clightning: update python pkgs to new version (Erik Arvstedt)
6ad7107ddbd26a45b3838c38301bc4bbad40e4e4 update nixpkgs (Erik Arvstedt)
f58d67677e3179258159d0dc3145ac1aac65e1ec netns-isolation: separate host and netns setup (Erik Arvstedt)
cb6e5ef7029954a737bdb45401c573d051cf9501 netns-isolation: fix routing issues due to netns restarting (Erik Arvstedt)
7f77147b600b62326db9192c2f0c2e5ac62236be makeShell: minor improvements (Erik Arvstedt)
a5730eb736c2f71b3762621d978e38258932799a makeShell: make the help msg a shell derivation variable (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 4a74b7de084f46655b1f11f738d9e1763ccefcc7

Tree-SHA512: 75454b51db6d7ab41590d8579e0a5136e5ac1be78d5c2f547c6ef1982c0de679968879bb9bac57dd66413f59a4659236601ab75414486b0137c7c43d73d22759
2021-11-10 21:57:16 +00:00
Erik Arvstedt
4a74b7de08
clightning: work around unsupported seccomp syscall 2021-11-10 21:26:56 +01:00
nixbitcoin
f569227410
rtl: add module 2021-11-09 14:13:42 +00:00
Erik Arvstedt
f58d67677e
netns-isolation: separate host and netns setup
- Improves readability

- `netns exec ...` (called via `netnsIptables`) incurs a large
  overhead: In addition to netns switching, a mount namespace
  is setup and populated with the contents of /etc/netns/<ns>/.
  Instead, simply run `nsenter`.
2021-11-08 12:46:28 +01:00
Erik Arvstedt
cb6e5ef702
netns-isolation: fix routing issues due to netns restarting
Previously, restarting a service implied restarting its netns.
For unknown reasons, this sometimes caused the netns-local address
to not be routable from the root netns for up to 20 s.
I.e., the service was sometimes unreachable after restarting.

Now the netns is no longer stopped when the service is stopped.
2021-11-08 12:46:27 +01:00
Jonas Nick
3f844c06f0
Merge fort-nix/nix-bitcoin#418: update nixpkgs
b3e868d0af9a1b724d8466affbaa4c7d5454084d tests/regtest: disable incompatible `validatepegin` for liquidd (Erik Arvstedt)
c30fe1919b81d89e0d6e22a58028c7b7e112c16d netns-isolation: don't auto-assign IPv6 addrs to peer links (Erik Arvstedt)
6584540828242d15ab9f50831b47581d9ff793a2 makeShell: make help message extensible (Erik Arvstedt)
0478354477c67de6df65ca1c070deb2b200d30ea versioning: move variable (Erik Arvstedt)
8616254d63a391a1f7948cb6b4c3273b134d7496 bitcoind-rpc-public-whitelist: remove waitfornewblock (Erik Arvstedt)
083e141e3e6dabeceb83221fbd2a8296f98f42db tests/btcpayserver: test bitcoind P2P connection in regtest (Erik Arvstedt)
82c92df162b6635708f7b281b749ae8eb25defa4 tests/regtest: fix restarting bitcoind (Erik Arvstedt)
49086abcc53f80134e5fa62cea5e5edbe9f5e8da liquidd: use systemd startup notification (Erik Arvstedt)
b83fd845c29787504f2e3378bb7ca1198f25ac3d update nixpkgs (nixbitcoin)
852c112603fb93d552904f8664dba3c798ebaea9 Use HTTPS URL for spark-wallet GitHub node packages (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK b3e868d0af9a1b724d8466affbaa4c7d5454084d
  jonasnick:
    utACK b3e868d0af9a1b724d8466affbaa4c7d5454084d

Tree-SHA512: 300410157a54f90f40abda064ed9b8f2310e3002bd2eac0527404d5402cd7d87c2d2d1d79d68cf1569841645c333b281d706607deae9461e1ef07f6c20427297
2021-11-03 10:25:38 +00:00
cadwgan0
ae1c90997d missing sys import for error path set_onion_address 2021-11-02 23:25:55 -04:00
Erik Arvstedt
b3e868d0af
tests/regtest: disable incompatible validatepegin for liquidd
Otherwise liquidd startup fails. This bug was not covered by our tests,
because we're not combining `regtest` with `secure-node`.
But nixbitcoin.org does, which should suffice for now.
2021-11-02 17:40:43 +01:00
Erik Arvstedt
c30fe1919b
netns-isolation: don't auto-assign IPv6 addrs to peer links
This simplifies the host's address configuration.

This also removes unused addresses that are returned when resolving
container hostnames via nss-mymachines:
`getent ahosts nb-test`
2021-11-02 17:40:43 +01:00
Erik Arvstedt
0478354477
versioning: move variable
The variable is an internal implementation detail. Move it close to
where it's used.
2021-11-02 17:40:43 +01:00
Erik Arvstedt
8616254d63
bitcoind-rpc-public-whitelist: remove waitfornewblock
This is an internal testing function and it's no longer used by electrs.
2021-11-02 17:40:43 +01:00
Erik Arvstedt
49086abcc5
liquidd: use systemd startup notification 2021-11-02 17:40:43 +01:00
nixbitcoin
c2eb81b57e
btcpayserver: fix liquidd whitelistedPort 2021-11-01 11:59:05 +00:00
Jonas Nick
bac8518e7c
secure-node: stop pruning liquidd
There is no security reason why pruning should be enabled and therefore it
surprises users. Turning on pruning in the first place was simply a mistake.
2021-10-31 14:37:56 +00:00
Jonas Nick
347a0f3aee
secure-node: add dummy option to determine if the preset is enabled
This is useful for versioning.nix.
2021-10-31 14:00:46 +00:00
Erik Arvstedt
aada35fc7b
minor improvements
- README: add matrix room

- examples/configuration.nix: explain why bitcoind is enabled by default

- btcpayserver: group lnd service settings

- clightning:
  Use public onion port only when the onion service is public

  This allows users to enable the onion service while announcing a
  non-onion public address.

- netns-isolation: move `readOnly` attr to the top

- tests: use mkDefault to allow for easier overriding

- tests/btcpayserver: test web server response
2021-10-30 15:34:48 +02:00
Erik Arvstedt
1da23cd933
bitcoind, liquidd: add whitelisted socket
This allows whitelisting local services without implicitly
whitelisting all inbound onion connections, which would happen when
setting bitcoind/liquidd option `whitelist=localhost`.

Used by electrs and nbxplorer, which requires the unsafe `mempool`
permission.
2021-10-29 18:28:31 +02:00
Erik Arvstedt
8c3a88b2e8
update nixpkgs-unstable
Switch back from nixpkgs master to unstable.

Pkg updates:
btcpayserver: 1.2.3 -> 1.2.4
electrs: 0.9.0 -> 0.9.1
elementsd: 0.18.1.12 -> 0.21.0
lightning-pool: 0.5.0-alpha -> 0.5.1-alpha
nbxplorer: 2.2.5 -> 2.2.11

- liquidd:
  add `onionPort` like in bitcoind

- tests/electrs:
  remove KillSignal workaround
2021-10-29 17:59:25 +02:00
Erik Arvstedt
cc3d43f4e9
bitcoind: set onionPort in bitcoind module
This removes the module-level dependency from onion-services to
bitcoind.
Due to the `or false` fallback, there's no dependency added in
the reverse direction.

In particular, this allows us to not add a dependency on liquidd in
the following commit.
2021-10-28 22:24:24 +02:00
Jonas Nick
20d4240919
Merge fort-nix/nix-bitcoin#410: joinmarket: 0.9.2 -> 0.9.3
d5ce1c43a81869dacb25c0c9fd537ad226afd547 test: make joinmarket work with regtest (nixbitcoin)
a10aa21c695eb8ae482937b45ed4b545eabe765d joinmarket: 0.9.2 -> 0.9.3 (nixbitcoin)
721ba1aeba6500ecf7bf109d11307fd396a6f8f8 python-packages: separate `specific-versions` pkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK d5ce1c43a81869dacb25c0c9fd537ad226afd547
  jonasnick:
    light utACK d5ce1c43a81869dacb25c0c9fd537ad226afd547

Tree-SHA512: 5ddccbf9a88640086d14051283b59e704364d4d5f3f6aa6c698d88d8a6634ac9a7b525b11cf1670c9aaa6a797635bc23e135972d9bc8c909ec51b58fe57e8f5c
2021-10-28 09:50:22 +00:00
nixbitcoin
d5ce1c43a8
test: make joinmarket work with regtest 2021-10-27 16:08:28 +02:00
nixbitcoin
a10aa21c69
joinmarket: 0.9.2 -> 0.9.3 2021-10-27 16:02:59 +02:00
kon
b6d1928e90 clightning: add public port
Co-authored-by: Erik Arvstedt <erik.arvstedt@gmail.com>
2021-10-26 21:34:33 +02:00
Jonas Nick
bfe8ac972c
Merge fort-nix/nix-bitcoin#405: bitcoind: add separate p2p socket for tor connections
ec4a4dbe4117857231e39524b792025968dd1fc9 btcpayserver: fix whitelist security issue (Erik Arvstedt)
df2070b44abeaea5a988a5f597c7f522e348cbea bitcoind: add separate p2p socket for tor connections (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK ec4a4dbe4117857231e39524b792025968dd1fc9

Tree-SHA512: 457bfb5806dca65507261c1868ca89c86a39f63bd10833b7531fd74dd779816083270c8ccc95ad08a5306e9b31c440904e3cba35464d47c0d87418d0be3e732d
2021-10-21 12:17:17 +00:00
Erik Arvstedt
ec4a4dbe41
btcpayserver: fix whitelist security issue
Whitelisting localhost implicitly whitelists all inbound onion
connections. This prevents banning misbehaving inbound onion peers
and enables message `mempool` which can cause privacy leaks.

Instead, grant `download` as the single bitcoind whitelist permission, which
should be safe for onion peers.
Remove liquidd whitelisting because it doesn't support fine-grained permissions.

After a cursory glance at the nbxplorer code I think that nbxplorer
requires none of the other default whitelist permissions (noban, mempool,
relay).
Details: https://github.com/dgarage/NBXplorer/issues/344
2021-10-21 11:40:40 +02:00
Erik Arvstedt
df2070b44a
bitcoind: add separate p2p socket for tor connections
This re-enables onion tagging while still supporting untagged connections.

Onion sockets are not yet supported in the latest liquidd/elements
version 0.18.1.12 available on nixpkgs.
2021-10-21 11:40:40 +02:00
Jonas Nick
8b1b06311d
Merge fort-nix/nix-bitcoin#406: bitcoind: one-option i2p support
63836127c9f1e022eb5a90873d75d871e5b829c6 bitcoind: one-option i2p support (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 63836127c9f1e022eb5a90873d75d871e5b829c6
  jonasnick:
    utACK 63836127c9f1e022eb5a90873d75d871e5b829c6

Tree-SHA512: be7806657885ba455e7137dfc8c20ea4d58898b04db030a964aafbde1c505041a1f9e700654ad9c75ab2bb9267174bdbe84c9d7e4de63a09508b72fbd5c8f1a1
2021-10-15 11:02:09 +00:00
Jonas Nick
2250b9bcb7
Merge fort-nix/nix-bitcoin#408: joinmarket: 0.9.1 -> 0.9.2
3781a85c9bb0b42299134ca783a670ff863bf234 joinmarket: enable Agora as a third IRC server (nixbitcoin)
ced1637d07516794c2942a0d4ba2ac4f2fb4580e joinmarket: share IRC server definitions between jm and ob-watcher (Erik Arvstedt)
59fc003ebdd188fef95d1f6ea41ae0d230c500ca joinmarket: 0.9.1 -> 0.9.2 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 3781a85c9bb0b42299134ca783a670ff863bf234

Tree-SHA512: 5ec919d2291ecf96fb4ca880f3dbeabff13f2bab71822db893ebbaba1b95463666b098ccc1412a1b56f327a231e10c1f2d47feb0f520fce349ab243d398bf7b4
2021-10-15 10:58:01 +00:00
nixbitcoin
3781a85c9b
joinmarket: enable Agora as a third IRC server 2021-10-13 14:45:52 +02:00
Erik Arvstedt
ced1637d07
joinmarket: share IRC server definitions between jm and ob-watcher
Also add server name comments.
2021-10-13 14:44:36 +02:00
kon
40ab4b368a add lnd TimoutSec 2021-10-12 21:56:59 +02:00