joinmarket: 0.9.5 -> 0.9.6

This commit is contained in:
nixbitcoin 2022-05-27 09:06:14 +00:00
parent 568d728e5c
commit cb295d1a16
No known key found for this signature in database
GPG Key ID: B6044ECBA2DAE5D0
4 changed files with 46 additions and 15 deletions

View File

@ -49,7 +49,7 @@ let
rpc_port = ${toString bitcoind.rpc.port} rpc_port = ${toString bitcoind.rpc.port}
rpc_user = ${bitcoind.rpc.users.joinmarket-ob-watcher.name} rpc_user = ${bitcoind.rpc.users.joinmarket-ob-watcher.name}
${joinmarket.ircServers} ${joinmarket.messagingConfig}
''; '';
in { in {
inherit options; inherit options;

View File

@ -20,6 +20,21 @@ let
default = 64180; # A random private port default = 64180; # A random private port
description = "The port corresponding to option `payjoinAddress`."; description = "The port corresponding to option `payjoinAddress`.";
}; };
messagingAddress = mkOption {
type = types.str;
default = "127.0.0.1";
description = ''
The address where messaging onion connections are forwarded to.
This address is never used directly, it only serves as the internal endpoint
for the messaging onion service.
The onion service is automatically setup by joinmarket.
'';
};
messagingPort = mkOption {
type = types.port;
default = 64181; # payjoinPort + 1
description = "The port corresponding to option `messagingAddress`.";
};
dataDir = mkOption { dataDir = mkOption {
type = types.path; type = types.path;
default = "/var/lib/joinmarket"; default = "/var/lib/joinmarket";
@ -47,9 +62,9 @@ let
defaultText = "(See source)"; defaultText = "(See source)";
}; };
# Used by ./joinmarket-ob-watcher.nix # Used by ./joinmarket-ob-watcher.nix
ircServers = mkOption { messagingConfig = mkOption {
readOnly = true; readOnly = true;
default = ircServers; default = messagingConfig;
defaultText = "(See source)"; defaultText = "(See source)";
}; };
# This option is only used by netns-isolation. # This option is only used by netns-isolation.
@ -133,7 +148,18 @@ let
socks5_port = ${toString torAddress.port} socks5_port = ${toString torAddress.port}
''; '';
ircServers = '' messagingConfig = ''
[MESSAGING:onion]
type = onion
${socks5Settings}
tor_control_host = unix:/run/tor/control
# required option, but ignored for unix socket host
tor_control_port = 9051
onion_serving_host = ${cfg.messagingAddress}
onion_serving_port = ${toString cfg.messagingPort}
hidden_service_dir =
directory_nodes = 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222,jmdirjmioywe2s5jad7ts6kgcqg66rj6wujj6q77n6wbdrgocqwexzid.onion:5222,bqlpq6ak24mwvuixixitift4yu42nxchlilrcqwk2ugn45tdclg42qid.onion:5222
# irc.darkscience.net # irc.darkscience.net
[MESSAGING:server1] [MESSAGING:server1]
host = darkirc6tqgpnwd3blln3yfv5ckl47eg7llfxkmtovrv7c7iwohhb6ad.onion host = darkirc6tqgpnwd3blln3yfv5ckl47eg7llfxkmtovrv7c7iwohhb6ad.onion
@ -142,17 +168,17 @@ let
usessl = true usessl = true
${socks5Settings} ${socks5Settings}
# irc.hackint.org # ilita
[MESSAGING:server2] [MESSAGING:server2]
host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion host = ilitafrzzgxymv6umx2ux7kbz3imyeko6cnqkvy4nisjjj4qpqkrptid.onion
channel = joinmarket-pit channel = joinmarket-pit
port = 6667 port = 6667
usessl = false usessl = false
${socks5Settings} ${socks5Settings}
# ilita # irc.hackint.org
[MESSAGING:server3] [MESSAGING:server3]
host = ilitafrzzgxymv6umx2ux7kbz3imyeko6cnqkvy4nisjjj4qpqkrptid.onion host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion
channel = joinmarket-pit channel = joinmarket-pit
port = 6667 port = 6667
usessl = false usessl = false
@ -176,7 +202,7 @@ let
rpc_user = ${bitcoind.rpc.users.privileged.name} rpc_user = ${bitcoind.rpc.users.privileged.name}
${optionalString (cfg.rpcWalletFile != null) "rpc_wallet_file = ${cfg.rpcWalletFile}"} ${optionalString (cfg.rpcWalletFile != null) "rpc_wallet_file = ${cfg.rpcWalletFile}"}
${ircServers} ${messagingConfig}
[LOGGING] [LOGGING]
console_log_level = INFO console_log_level = INFO
@ -195,11 +221,13 @@ let
max_sats_freeze_reuse = -1 max_sats_freeze_reuse = -1
interest_rate = 0.015 interest_rate = 0.015
bondless_makers_allowance = 0.125 bondless_makers_allowance = 0.125
bond_value_exponent = 1.3
taker_utxo_retries = 3 taker_utxo_retries = 3
taker_utxo_age = 5 taker_utxo_age = 5
taker_utxo_amtpercent = 20 taker_utxo_amtpercent = 20
accept_commitment_broadcasts = 1 accept_commitment_broadcasts = 1
commit_file_location = cmtdata/commitments.json commit_file_location = cmtdata/commitments.json
commitment_list_location = cmtdata/commitmentlist
[PAYJOIN] [PAYJOIN]
payjoin_version = 1 payjoin_version = 1
@ -209,6 +237,8 @@ let
onion_socks5_host = ${torAddress.addr} onion_socks5_host = ${torAddress.addr}
onion_socks5_port = ${toString torAddress.port} onion_socks5_port = ${toString torAddress.port}
tor_control_host = unix:/run/tor/control tor_control_host = unix:/run/tor/control
# Required option, but unused because `tor_control_host` is a Unix socket
tor_control_port = 9051
onion_serving_host = ${cfg.payjoinAddress} onion_serving_host = ${cfg.payjoinAddress}
onion_serving_port = ${toString cfg.payjoinPort} onion_serving_port = ${toString cfg.payjoinPort}
hidden_service_ssl = false hidden_service_ssl = false

View File

@ -336,6 +336,7 @@ in {
services.joinmarket = { services.joinmarket = {
payjoinAddress = netns.joinmarket.address; payjoinAddress = netns.joinmarket.address;
messagingAddress = netns.joinmarket.address;
cliExec = mkCliExec "joinmarket"; cliExec = mkCliExec "joinmarket";
}; };
systemd.services.joinmarket-yieldgenerator = mkIf config.services.joinmarket.yieldgenerator.enable { systemd.services.joinmarket-yieldgenerator = mkIf config.services.joinmarket.yieldgenerator.enable {

View File

@ -1,18 +1,18 @@
{ stdenv, lib, fetchurl, applyPatches, fetchpatch, python3, nbPythonPackageOverrides, pkgs }: { stdenv, lib, fetchurl, applyPatches, fetchpatch, python3, nbPythonPackageOverrides, pkgs }:
let let
version = "0.9.5"; version = "0.9.6";
src = applyPatches { src = applyPatches {
src = fetchurl { src = fetchurl {
url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz"; url = "https://github.com/JoinMarket-Org/joinmarket-clientserver/archive/v${version}.tar.gz";
sha256 = "0q8hfq4y7az5ly97brq1khhhvhnq6irzw0ginmz20fwn7w3yc5sn"; sha256 = "040qj3abqkk74zyi5yav1ijlh5cmd49wlymald2lzk35adnx804g";
}; };
patches = [ patches = [
(fetchpatch { (fetchpatch {
# https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1206 # https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1264
name = "ob-export-fix"; name = "use-twisted-22.4.0";
url = "https://patch-diff.githubusercontent.com/raw/JoinMarket-Org/joinmarket-clientserver/pull/1206.patch"; url = "https://patch-diff.githubusercontent.com/raw/JoinMarket-Org/joinmarket-clientserver/pull/1264.patch";
sha256 = "0532gixjyc8r11sfmlf32v5iwy0rhkpa8rbvm4b7h509hnyycvhx"; sha256 = "1nlyhc5myph9239d5zczsl4jan4qj4ggy0l1f39jv0ihjbjhcks5";
}) })
]; ];
}; };