Skip to content

Commit

Permalink
Merge #631: rtl: fix lnd, lightning-loop connection errors
Browse files Browse the repository at this point in the history
14ca8b4 rtl: fix lnd, lightning-loop connection errors (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 14ca8b4

Tree-SHA512: 9e82da82c0964c5f24fda1276b2dc27f1d4c57e040bf755568905225e6e3ad00a810a9c99c21041acbae10bbaf030f06aaaa715170e8a754025cf358f5ba1535
  • Loading branch information
jonasnick committed Jul 29, 2023
2 parents 369ce1c + 14ca8b4 commit 2e53fd2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions dev/dev-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ c journalctl -u joinmarket-ob-watcher
c journalctl -f -u joinmarket-ob-watcher

# Check webinterface
c curl localhost:62601
c curl 127.0.0.1:62601
nix run --inputs-from . nixpkgs#lynx -- --dump $ip:62601
c curl -s localhost:62601 | grep -i "orders found"
c curl -s 127.0.0.1:62601 | grep -i "orders found"

#―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
# rtl
Expand Down
10 changes: 5 additions & 5 deletions docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ yourself with custom permissions.
Normally you would connect to RTL via SSH tunneling with a command like this

```
ssh -L 3000:localhost:3000 root@bitcoin-node
ssh -L 3000:127.0.0.1:3000 root@bitcoin-node
```

Or like this, if you are using `netns-isolation`
Expand Down Expand Up @@ -326,7 +326,7 @@ lndconnect-wg --url

On Desktop
```
electrum --oneserver -1 -s "<electrs onion address>:t" -p socks5:localhost:9050
electrum --oneserver -1 -s "<electrs onion address>:t" -p socks5:127.0.0.1:9050
```

On Android
Expand Down Expand Up @@ -365,11 +365,11 @@ lndconnect-wg --url
4. Connect to your nix-bitcoin node's SSH onion service, forwarding a local port to the nix-bitcoin node's SSH server
```
ssh -i ~/.ssh/id_ed25519 -L <random port of your choosing>:localhost:22 root@<SSH onion address>
ssh -i ~/.ssh/id_ed25519 -L <random port of your choosing>:127.0.0.1:22 root@<SSH onion address>
```
5. Edit your deployment tool's configuration and change the node's address to `localhost` and the ssh port to `<random port of your choosing>`.
If you use krops as described in the [installation tutorial](./install.md), set `target = "localhost:<random port of your choosing>";` in `krops/deploy.nix`.
5. Edit your deployment tool's configuration and change the node's address to `127.0.0.1` and the ssh port to `<random port of your choosing>`.
If you use krops as described in the [installation tutorial](./install.md), set `target = "127.0.0.1:<random port of your choosing>";` in `krops/deploy.nix`.
6. After deploying the new configuration, it will connect through the SSH tunnel you established in step iv. This also allows you to do more complex SSH setups that some deployment tools don't support. An example would be authenticating with [Trezor's SSH agent](https://github.com/romanz/trezor-agent), which provides extra security.
Expand Down
2 changes: 1 addition & 1 deletion modules/joinmarket.nix
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ let
[DAEMON]
no_daemon = 0
daemon_port = 27183
daemon_host = localhost
daemon_host = 127.0.0.1
use_ssl = false
[BLOCKCHAIN]
Expand Down
4 changes: 2 additions & 2 deletions modules/lightning-loop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let
enable = mkEnableOption "Lightning Loop, a non-custodial off/on chain bridge";
rpcAddress = mkOption {
type = types.str;
default = "localhost";
default = "127.0.0.1";
description = mdDoc "Address to listen for gRPC connections.";
};
rpcPort = mkOption {
Expand Down Expand Up @@ -121,7 +121,7 @@ in {
"d '${cfg.dataDir}' 0770 ${lnd.user} ${lnd.group} - -"
];

services.lightning-loop.certificate.extraIPs = mkIf (cfg.rpcAddress != "localhost") [ "${cfg.rpcAddress}" ];
services.lightning-loop.certificate.extraIPs = mkIf (cfg.rpcAddress != "127.0.0.1") [ "${cfg.rpcAddress}" ];

systemd.services.lightning-loop = {
wantedBy = [ "multi-user.target" ];
Expand Down
2 changes: 1 addition & 1 deletion modules/lightning-pool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let
enable = mkEnableOption "Lightning Pool, a marketplace for inbound lightning liquidity ";
rpcAddress = mkOption {
type = types.str;
default = "localhost";
default = "127.0.0.1";
description = mdDoc "Address to listen for gRPC connections.";
};
rpcPort = mkOption {
Expand Down
8 changes: 4 additions & 4 deletions modules/lnd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let
enable = mkEnableOption "Lightning Network daemon, a Lightning Network implementation in Go";
address = mkOption {
type = types.str;
default = "localhost";
default = "127.0.0.1";
description = mdDoc "Address to listen for peer connections";
};
port = mkOption {
Expand All @@ -16,7 +16,7 @@ let
};
rpcAddress = mkOption {
type = types.str;
default = "localhost";
default = "127.0.0.1";
description = mdDoc "Address to listen for RPC connections.";
};
rpcPort = mkOption {
Expand All @@ -26,7 +26,7 @@ let
};
restAddress = mkOption {
type = types.str;
default = "localhost";
default = "127.0.0.1";
description = mdDoc "Address to listen for REST connections.";
};
restPort = mkOption {
Expand Down Expand Up @@ -224,7 +224,7 @@ in {
"d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group} - -"
];

services.lnd.certificate.extraIPs = mkIf (cfg.rpcAddress != "localhost") [ "${cfg.rpcAddress}" ];
services.lnd.certificate.extraIPs = mkIf (cfg.rpcAddress != "127.0.0.1") [ "${cfg.rpcAddress}" ];

systemd.services.lnd = {
wantedBy = [ "multi-user.target" ];
Expand Down
4 changes: 2 additions & 2 deletions test/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ let
# lightning-loop contains no builtin swap server for regtest.
# Add a dummy definition.
services.lightning-loop.extraConfig = ''
server.host=localhost
server.host=127.0.0.1
'';

# lightning-pool contains no builtin auction server for regtest.
# Add a dummy definition
services.lightning-pool.extraConfig = ''
auctionserver=localhost
auctionserver=127.0.0.1
'';

# `validatepegin` is incompatible with regtest
Expand Down

0 comments on commit 2e53fd2

Please sign in to comment.