Skip to content

Commit

Permalink
Merge #408: joinmarket: 0.9.1 -> 0.9.2
Browse files Browse the repository at this point in the history
3781a85 joinmarket: enable Agora as a third IRC server (nixbitcoin)
ced1637 joinmarket: share IRC server definitions between jm and ob-watcher (Erik Arvstedt)
59fc003 joinmarket: 0.9.1 -> 0.9.2 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 3781a85

Tree-SHA512: 5ec919d2291ecf96fb4ca880f3dbeabff13f2bab71822db893ebbaba1b95463666b098ccc1412a1b56f327a231e10c1f2d47feb0f520fce349ab243d398bf7b4
  • Loading branch information
jonasnick committed Oct 15, 2021
2 parents 8f25bb7 + 3781a85 commit 2250b9b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 49 deletions.
23 changes: 2 additions & 21 deletions modules/joinmarket-ob-watcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ let
nbPkgs = config.nix-bitcoin.pkgs;
secretsDir = config.nix-bitcoin.secretsDir;

inherit (config.services) bitcoind;

torAddress = config.services.tor.client.socksListenAddress;
socks5Settings = with config.services.tor.client.socksListenAddress; ''
socks5 = true
socks5_host = ${addr}
socks5_port = ${toString port}
'';
inherit (config.services) bitcoind joinmarket;

configFile = builtins.toFile "config" ''
[BLOCKCHAIN]
Expand All @@ -58,19 +51,7 @@ let
rpc_port = ${toString bitcoind.rpc.port}
rpc_user = ${bitcoind.rpc.users.joinmarket-ob-watcher.name}
[MESSAGING:server1]
host = darkirc6tqgpnwd3blln3yfv5ckl47eg7llfxkmtovrv7c7iwohhb6ad.onion
channel = joinmarket-pit
port = 6697
usessl = true
${socks5Settings}
[MESSAGING:server2]
host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion
channel = joinmarket-pit
port = 6667
usessl = false
${socks5Settings}
${joinmarket.ircServers}
'';
in {
inherit options;
Expand Down
45 changes: 32 additions & 13 deletions modules/joinmarket.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ let
cli = mkOption {
default = cli;
};
# Used by ./joinmarket-ob-watcher.nix
ircServers = mkOption {
readOnly = true;
default = ircServers;
};
# This option is only used by netns-isolation
enforceTor = mkOption {
readOnly = true;
Expand Down Expand Up @@ -112,6 +117,32 @@ let
socks5_port = ${toString torAddress.port}
'';

ircServers = ''
# irc.darkscience.net
[MESSAGING:server1]
host = darkirc6tqgpnwd3blln3yfv5ckl47eg7llfxkmtovrv7c7iwohhb6ad.onion
channel = joinmarket-pit
port = 6697
usessl = true
${socks5Settings}
# irc.hackint.org
[MESSAGING:server2]
host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion
channel = joinmarket-pit
port = 6667
usessl = false
${socks5Settings}
# agora.anarplex.net
[MESSAGING:server3]
host = vxecvd6lc4giwtasjhgbrr3eop6pzq6i5rveracktioneunalgqlwfad.onion
channel = joinmarket-pit
port = 6667
usessl = false
${socks5Settings}
'';

# Based on https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/jmclient/jmclient/configure.py
yg = cfg.yieldgenerator;
configFile = builtins.toFile "config" ''
Expand All @@ -129,19 +160,7 @@ let
rpc_user = ${bitcoind.rpc.users.privileged.name}
${optionalString (cfg.rpcWalletFile != null) "rpc_wallet_file = ${cfg.rpcWalletFile}"}
[MESSAGING:server1]
host = darkirc6tqgpnwd3blln3yfv5ckl47eg7llfxkmtovrv7c7iwohhb6ad.onion
channel = joinmarket-pit
port = 6697
usessl = true
${socks5Settings}
[MESSAGING:server2]
host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion
channel = joinmarket-pit
port = 6667
usessl = false
${socks5Settings}
${ircServers}
[LOGGING]
console_log_level = INFO
Expand Down
20 changes: 5 additions & 15 deletions pkgs/joinmarket/default.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
{ stdenv, lib, fetchurl, applyPatches, fetchpatch, python3, nbPython3Packages, pkgs }:
{ stdenv, lib, fetchurl, python3, nbPython3Packages, pkgs }:

let
version = "0.9.1";
src = applyPatches {
src = fetchurl {
url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz";
sha256 = "0a8jlzi3ll1dw60fwnqs5awmcfxdjynh6i1gfmcc29qhwjpx5djl";
};
patches = [
(fetchpatch {
# https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/999
name = "improve-genwallet";
url = "https://patch-diff.githubusercontent.com/raw/JoinMarket-Org/joinmarket-clientserver/pull/999.patch";
sha256 = "etlbi0yhb4X5EAPUerIIAXU6l7EeB9O2c07QaXxCEAg=";
})
];
version = "0.9.2";
src = fetchurl {
url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz";
sha256 = "0nzhnf2324d0qc9pljcjwpzpvhcclqg0ijvzb1skmn73s4f25akg";
};

runtimePackages = with nbPython3Packages; [
Expand Down

0 comments on commit 2250b9b

Please sign in to comment.