1323 Commits

Author SHA1 Message Date
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
9a31cc7d5a
Merge fort-nix/nix-bitcoin#424: spark-wallet: 0.2.17 -> 0.3.1
f739bc51745697e4f3a5edc45f4048f05557e1ba spark-wallet: 0.2.17 -> 0.3.1 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK f739bc51745697e4f3a5edc45f4048f05557e1ba

Tree-SHA512: bfcc5bc076f90037d76757a23f26936f5a1c7331695a0ad31f5e4f69ee3b2cf8f46c984aa8a79926cafc6f195d81e6bd457e88768bd0e657e7300c2614ec556f
2021-11-10 21:58:40 +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
Erik Arvstedt
38a843d005
clightning: update python pkgs to new version 2021-11-10 21:26:11 +01:00
Erik Arvstedt
6ad7107ddb
update nixpkgs
btcpayserver: 1.3.1 -> 1.3.3
clightning: 0.10.1 -> 0.10.2
2021-11-10 21:26:10 +01:00
Jonas Nick
d5d64ace29
Merge fort-nix/nix-bitcoin#419: Add RTL
030f649009b35ce3c59ce25bbdb48238830a234c docs: remove obsolete nixops deploy instructions (nixbitcoin)
0a6324e9dec687510d99a591d51fe21c12403e91 docs: add usage instructions for connecting to RTL (nixbitcoin)
41c4dd041e17d7fb0184be295f7c2e255e37f1d4 test: add rtl & cl-rest (nixbitcoin)
f569227410f5a5f9f9c88b3a1d06956901105795 rtl: add module (nixbitcoin)
0e1e2a1b3cc6d7b1910db44a044f7cf8f3fb2bef cl-rest: init at 0.5.2 (nixbitcoin)
83196f5545209ab29c49f069e268482869a74435 rtl: init at 0.11.2 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 030f649009b35ce3c59ce25bbdb48238830a234c

Tree-SHA512: a6c7694ec945d44f0adfa2e651987301e895d4947dfdd6967cea188c967667f7d97849579189c1043ed9ef6d524c688202ca54a6ce7c2c7ee46b8a59c1c9903d
2021-11-09 15:51:30 +00:00
nixbitcoin
f739bc5174
spark-wallet: 0.2.17 -> 0.3.1 2021-11-09 15:19:14 +00:00
nixbitcoin
030f649009
docs: remove obsolete nixops deploy instructions 2021-11-09 14:15:27 +00:00
nixbitcoin
0a6324e9de
docs: add usage instructions for connecting to RTL 2021-11-09 14:15:22 +00:00
nixbitcoin
41c4dd041e
test: add rtl & cl-rest 2021-11-09 14:13:49 +00:00
nixbitcoin
f569227410
rtl: add module 2021-11-09 14:13:42 +00:00
nixbitcoin
0e1e2a1b3c
cl-rest: init at 0.5.2 2021-11-09 13:07:27 +00:00
nixbitcoin
83196f5545
rtl: init at 0.11.2 2021-11-09 13:07:16 +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
Erik Arvstedt
7f77147b60
makeShell: minor improvements
- import pkgs without the global config to avoid pulling in external state
- rename `path` -> `setPath`
- export `nixpkgsUnstable`
  This avoids garbage collection of nixpkgs-unstable for gcrooted
  shell environments (like those created by lorri)
2021-11-08 12:46:27 +01:00
Erik Arvstedt
a5730eb736
makeShell: make the help msg a shell derivation variable
- The message is now a nix string, which simplifies formatting.
- The message can be now be modified via overrideAttrs in client shells.
  This is more effective than changing the message in Bash.
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
Jonas Nick
2f9b9b674b
Merge fort-nix/nix-bitcoin#420: missing sys import for error path set_onion_address
ae1c90997d15dff25ddf23345bd73121d6cc7673 missing sys import for error path set_onion_address (cadwgan0)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK ae1c90997d15dff25ddf23345bd73121d6cc7673

Tree-SHA512: 4fce73b3d5f15a7e8d809f6ccfc305539d6eb75f1248ca3f50284216db851ec0149f6888209000b22bb272842c331da0e955004f7e6eec1551e2d6e487a54ee8
2021-11-03 09:17:12 +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
6584540828
makeShell: make help message extensible
Users can now override help and print more help messages alongside `nixBitcoinHelp`.
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
083e141e3e
tests/btcpayserver: test bitcoind P2P connection in regtest
nbxplorer requires at least 100 blocks (coinbase maturity) in regtest.
2021-11-02 17:40:43 +01:00
Erik Arvstedt
82c92df162
tests/regtest: fix restarting bitcoind
Previously, the test wallet was not loaded after restarting bitcoind and
generating blocks failed.
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
b83fd845c2
update nixpkgs
Includes
- update stable
- btcpayserver: 1.2.4 -> 1.3.1
- electrs: 0.9.1 -> 0.9.2
- nbxplorer: 2.2.11 -> 2.2.16
2021-11-02 14:07:32 +00:00
nixbitcoin
852c112603
Use HTTPS URL for spark-wallet GitHub node packages
Manually patch spark-wallet until
https://github.com/svanderburg/node2nix/pull/269 is merged
2021-11-02 14:07:28 +00:00
Jonas Nick
42258feac3
Merge fort-nix/nix-bitcoin#417: btcpayserver: fix liquidd whitelistedPort
c2eb81b57e8ede3c235de9f3837266221cc0bc11 btcpayserver: fix liquidd whitelistedPort (nixbitcoin)

Pull request description:

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

Tree-SHA512: 452e3767fb23f4ed0a1a3c93322eae7517efbe73a8302b91bf2a1143b9d5e358f2ec3f31b1b37b6fe357407850d9b85e044df7184e890563b9ce29a8716a7732
2021-11-01 13:08:47 +00:00
nixbitcoin
c2eb81b57e
btcpayserver: fix liquidd whitelistedPort 2021-11-01 11:59:05 +00:00
Jonas Nick
41514b8667
Merge fort-nix/nix-bitcoin#416: secure-node: stop pruning liquidd
bac8518e7c91d7fb25bd89ac363b6939332aea1a secure-node: stop pruning liquidd (Jonas Nick)
347a0f3aeeb41b6ea05d184b3b6ffb154e958ce9 secure-node: add dummy option to determine if the preset is enabled (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK bac8518e7c91d7fb25bd89ac363b6939332aea1a

Tree-SHA512: df09889933355e97ccfa0cbbe3e5776e6984c492d52dd51e97220e7efbac0248599ee1187773d0db4f314b47def7cb6c5cd1074ec92cd4cfa824c8f1ee11d547
2021-10-31 15:41:58 +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
Jonas Nick
3e018d0263
Merge fort-nix/nix-bitcoin#414: Update nixpkgs-unstable, fix whitelisting local services
aada35fc7b5a0a38f56792f8986577a0b19f2e3f minor improvements (Erik Arvstedt)
1da23cd933aa3b19db7b25599ed4d64a39c4c6cc bitcoind, liquidd: add whitelisted socket (Erik Arvstedt)
8c3a88b2e877df472d69f51a9652a9e1bc3d81dd update nixpkgs-unstable (Erik Arvstedt)
cc3d43f4e95b2431eea271f8803d8152f2afc742 bitcoind: set onionPort in bitcoind module (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK aada35fc7b5a0a38f56792f8986577a0b19f2e3f

Tree-SHA512: cd9ea2386bd28b0b1fc6a9c1691022f9c4ce40bb92acc6606b4ca55cf8cc57fe20e9bd3d19255c345c4015b1a13d2f292c035c2a05a421031859026f50c7ce20
2021-10-30 15:37:12 +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
Jonas Nick
c40a7a75cc
Merge fort-nix/nix-bitcoin#412: clightning: fix announce addr
b6d1928e905079ef8004c3b8fabab1a3f76cf64b clightning: add public port (kon)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK b6d1928e905079ef8004c3b8fabab1a3f76cf64b
  jonasnick:
    ACK b6d1928e905079ef8004c3b8fabab1a3f76cf64b

Tree-SHA512: 78955c453af54d7da42dc7f31474509f6cafe61fae0c3943fc8bd3353d3927b3ed5c2db8bd22600daf2cfd266ef390ead7f6be1c6de7e530f77b091a5285e08a
2021-10-26 19:53:55 +00:00
kon
b6d1928e90 clightning: add public port
Co-authored-by: Erik Arvstedt <erik.arvstedt@gmail.com>
2021-10-26 21:34:33 +02:00
Erik Arvstedt
721ba1aeba
python-packages: separate specific-versions pkgs
This simplifies maintenance.
2021-10-24 21:18:56 +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