Skip to content

Commit c402dec

Browse files
committedDec 13, 2021
Refactor ZMQ message bus addresses
1 parent f3f0893 commit c402dec

39 files changed

+532
-582
lines changed
 

‎Cargo.lock

+16-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ lnpbp = "0.5.0"
9797
bitcoin = "0.27.1"
9898
lnp-core = { version = "0.5.2", git = "https://github.com/LNP-BP/lnp-core" }
9999
rgb-core = { version = "0.5.0", optional = true }
100-
internet2 = "0.5.0"
100+
internet2 = "0.5.7"
101101
microservices = { version = "0.5.0", default-features = false, features = ["peer"] }
102102
lazy_static = "1.4"
103103
clap = "3.0.0-beta.5"

‎doc/demo-alpha.4/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ FLAGS:
111111
OPTIONS:
112112
-n, --chain <chain> Blockchain to use [env: LNP_NODE_NETWORK=] [default: signet]
113113
-c, --config <config> Path to the configuration file [env: LNP_NODE_CONFIG=]
114-
-x, --ctl-socket <ctl-socket> ZMQ socket name/address for daemon control interface [env:
114+
-r, --rpc-socket <Failure::from(err.clone())> ZMQ socket name/address for daemon control interface [env:
115115
LNP_NODE_CTL_SOCKET=] [default:
116116
lnpz:{data_dir}/ctl.rpc?api=esb]
117117
-d, --data-dir <data-dir> Data directory path [env: LNP_NODE_DATA_DIR=] [default:

‎shell/_channeld

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ _channeld() {
1717
_arguments "${_arguments_options[@]}" \
1818
'-k+[Node key file]:KEY_FILE:_files' \
1919
'--key-file=[Node key file]:KEY_FILE:_files' \
20-
'-r+[ZMQ socket name/address for RGB Node fungible RPC interface (RGB20 RPC)]:RGB20_SOCKET:_files' \
2120
'--rgb20-rpc=[ZMQ socket name/address for RGB Node fungible RPC interface (RGB20 RPC)]:RGB20_SOCKET:_files' \
2221
'-d+[Data directory path]:DATA_DIR:_files -/' \
2322
'--data-dir=[Data directory path]:DATA_DIR:_files -/' \
24-
'-c+[Path to the configuration file]:CONFIG:_files' \
25-
'--config=[Path to the configuration file]:CONFIG:_files' \
23+
'-c+[Path for the configuration file]:CONFIG:_files' \
24+
'--config=[Path for the configuration file]:CONFIG:_files' \
2625
'-T+[Use Tor]:TOR_PROXY:_hosts' \
2726
'--tor-proxy=[Use Tor]:TOR_PROXY:_hosts' \
28-
'-m+[ZMQ socket name/address to forward all incoming lightning messages]:MSG_SOCKET:_files' \
29-
'--msg-socket=[ZMQ socket name/address to forward all incoming lightning messages]:MSG_SOCKET:_files' \
30-
'-x+[ZMQ socket name/address for daemon control interface]:CTL_SOCKET:_files' \
31-
'--ctl-socket=[ZMQ socket name/address for daemon control interface]:CTL_SOCKET:_files' \
27+
'-m+[ZMQ socket used internally by daemon message bus]:MSG_SOCKET:_files' \
28+
'--msg=[ZMQ socket used internally by daemon message bus]:MSG_SOCKET:_files' \
29+
'-r+[ZMQ socket for daemon RPC interface]:RPC_SOCKET:_files' \
30+
'--rpc=[ZMQ socket for daemon RPC interface]:RPC_SOCKET:_files' \
3231
'-n+[Blockchain to use]:CHAIN: ' \
3332
'--chain=[Blockchain to use]:CHAIN: ' \
34-
'--electrum-server=[Electrum server to use. `extract` command]:ELECTRUM_SERVER: ' \
33+
'--electrum-server=[Electrum server to use]:ELECTRUM_SERVER:_hosts' \
3534
'--electrum-port=[Customize Electrum server port number. By default the wallet will use port matching the selected network]:ELECTRUM_PORT: ' \
3635
'-h[Print help information]' \
3736
'--help[Print help information]' \
3837
'-V[Print version information]' \
3938
'--version[Print version information]' \
4039
'*-v[Set verbosity level]' \
4140
'*--verbose[Set verbosity level]' \
41+
'--threaded-daemons[Spawn daemons as threads and not processes]' \
4242
':channel-id -- Channel id:' \
4343
&& ret=0
4444
}

‎shell/_channeld.ps1

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@ Register-ArgumentCompleter -Native -CommandName 'channeld' -ScriptBlock {
2222
'channeld' {
2323
[CompletionResult]::new('-k', 'k', [CompletionResultType]::ParameterName, 'Node key file')
2424
[CompletionResult]::new('--key-file', 'key-file', [CompletionResultType]::ParameterName, 'Node key file')
25-
[CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for RGB Node fungible RPC interface (RGB20 RPC)')
2625
[CompletionResult]::new('--rgb20-rpc', 'rgb20-rpc', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for RGB Node fungible RPC interface (RGB20 RPC)')
2726
[CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Data directory path')
2827
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'Data directory path')
29-
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path to the configuration file')
30-
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path to the configuration file')
28+
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path for the configuration file')
29+
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path for the configuration file')
3130
[CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'Use Tor')
3231
[CompletionResult]::new('--tor-proxy', 'tor-proxy', [CompletionResultType]::ParameterName, 'Use Tor')
33-
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
34-
[CompletionResult]::new('--msg-socket', 'msg-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
35-
[CompletionResult]::new('-x', 'x', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
36-
[CompletionResult]::new('--ctl-socket', 'ctl-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
32+
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket used internally by daemon message bus')
33+
[CompletionResult]::new('--msg', 'msg', [CompletionResultType]::ParameterName, 'ZMQ socket used internally by daemon message bus')
34+
[CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'ZMQ socket for daemon RPC interface')
35+
[CompletionResult]::new('--rpc', 'rpc', [CompletionResultType]::ParameterName, 'ZMQ socket for daemon RPC interface')
3736
[CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Blockchain to use')
3837
[CompletionResult]::new('--chain', 'chain', [CompletionResultType]::ParameterName, 'Blockchain to use')
39-
[CompletionResult]::new('--electrum-server', 'electrum-server', [CompletionResultType]::ParameterName, 'Electrum server to use. `extract` command')
38+
[CompletionResult]::new('--electrum-server', 'electrum-server', [CompletionResultType]::ParameterName, 'Electrum server to use')
4039
[CompletionResult]::new('--electrum-port', 'electrum-port', [CompletionResultType]::ParameterName, 'Customize Electrum server port number. By default the wallet will use port matching the selected network')
4140
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
4241
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
4342
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
4443
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
4544
[CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Set verbosity level')
4645
[CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Set verbosity level')
46+
[CompletionResult]::new('--threaded-daemons', 'threaded-daemons', [CompletionResultType]::ParameterName, 'Spawn daemons as threads and not processes')
4747
break
4848
}
4949
})

‎shell/_gossipd

+8-9
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,27 @@ _gossipd() {
1515

1616
local context curcontext="$curcontext" state line
1717
_arguments "${_arguments_options[@]}" \
18-
'-r+[RGB configuration: ignored by this daemon]:R: ' \
19-
'--rgb20-rpc=[RGB configuration: ignored by this daemon]:R: ' \
2018
'-d+[Data directory path]:DATA_DIR:_files -/' \
2119
'--data-dir=[Data directory path]:DATA_DIR:_files -/' \
22-
'-c+[Path to the configuration file]:CONFIG:_files' \
23-
'--config=[Path to the configuration file]:CONFIG:_files' \
20+
'-c+[Path for the configuration file]:CONFIG:_files' \
21+
'--config=[Path for the configuration file]:CONFIG:_files' \
2422
'-T+[Use Tor]:TOR_PROXY:_hosts' \
2523
'--tor-proxy=[Use Tor]:TOR_PROXY:_hosts' \
26-
'-m+[ZMQ socket name/address to forward all incoming lightning messages]:MSG_SOCKET:_files' \
27-
'--msg-socket=[ZMQ socket name/address to forward all incoming lightning messages]:MSG_SOCKET:_files' \
28-
'-x+[ZMQ socket name/address for daemon control interface]:CTL_SOCKET:_files' \
29-
'--ctl-socket=[ZMQ socket name/address for daemon control interface]:CTL_SOCKET:_files' \
24+
'-m+[ZMQ socket used internally by daemon message bus]:MSG_SOCKET:_files' \
25+
'--msg=[ZMQ socket used internally by daemon message bus]:MSG_SOCKET:_files' \
26+
'-r+[ZMQ socket for daemon RPC interface]:RPC_SOCKET:_files' \
27+
'--rpc=[ZMQ socket for daemon RPC interface]:RPC_SOCKET:_files' \
3028
'-n+[Blockchain to use]:CHAIN: ' \
3129
'--chain=[Blockchain to use]:CHAIN: ' \
32-
'--electrum-server=[Electrum server to use. `extract` command]:ELECTRUM_SERVER: ' \
30+
'--electrum-server=[Electrum server to use]:ELECTRUM_SERVER:_hosts' \
3331
'--electrum-port=[Customize Electrum server port number. By default the wallet will use port matching the selected network]:ELECTRUM_PORT: ' \
3432
'-h[Print help information]' \
3533
'--help[Print help information]' \
3634
'-V[Print version information]' \
3735
'--version[Print version information]' \
3836
'*-v[Set verbosity level]' \
3937
'*--verbose[Set verbosity level]' \
38+
'--threaded-daemons[Spawn daemons as threads and not processes]' \
4039
&& ret=0
4140
}
4241

‎shell/_gossipd.ps1

+8-9
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,27 @@ Register-ArgumentCompleter -Native -CommandName 'gossipd' -ScriptBlock {
2020

2121
$completions = @(switch ($command) {
2222
'gossipd' {
23-
[CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'RGB configuration: ignored by this daemon')
24-
[CompletionResult]::new('--rgb20-rpc', 'rgb20-rpc', [CompletionResultType]::ParameterName, 'RGB configuration: ignored by this daemon')
2523
[CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Data directory path')
2624
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'Data directory path')
27-
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path to the configuration file')
28-
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path to the configuration file')
25+
[CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Path for the configuration file')
26+
[CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Path for the configuration file')
2927
[CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'Use Tor')
3028
[CompletionResult]::new('--tor-proxy', 'tor-proxy', [CompletionResultType]::ParameterName, 'Use Tor')
31-
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
32-
[CompletionResult]::new('--msg-socket', 'msg-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address to forward all incoming lightning messages')
33-
[CompletionResult]::new('-x', 'x', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
34-
[CompletionResult]::new('--ctl-socket', 'ctl-socket', [CompletionResultType]::ParameterName, 'ZMQ socket name/address for daemon control interface')
29+
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'ZMQ socket used internally by daemon message bus')
30+
[CompletionResult]::new('--msg', 'msg', [CompletionResultType]::ParameterName, 'ZMQ socket used internally by daemon message bus')
31+
[CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'ZMQ socket for daemon RPC interface')
32+
[CompletionResult]::new('--rpc', 'rpc', [CompletionResultType]::ParameterName, 'ZMQ socket for daemon RPC interface')
3533
[CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Blockchain to use')
3634
[CompletionResult]::new('--chain', 'chain', [CompletionResultType]::ParameterName, 'Blockchain to use')
37-
[CompletionResult]::new('--electrum-server', 'electrum-server', [CompletionResultType]::ParameterName, 'Electrum server to use. `extract` command')
35+
[CompletionResult]::new('--electrum-server', 'electrum-server', [CompletionResultType]::ParameterName, 'Electrum server to use')
3836
[CompletionResult]::new('--electrum-port', 'electrum-port', [CompletionResultType]::ParameterName, 'Customize Electrum server port number. By default the wallet will use port matching the selected network')
3937
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
4038
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
4139
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
4240
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
4341
[CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Set verbosity level')
4442
[CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Set verbosity level')
43+
[CompletionResult]::new('--threaded-daemons', 'threaded-daemons', [CompletionResultType]::ParameterName, 'Spawn daemons as threads and not processes')
4544
break
4645
}
4746
})

0 commit comments

Comments
 (0)