fix config test server localhost, align more close with upstream vls

This commit is contained in:
Evan Feenstra
2022-07-11 20:30:30 -07:00
parent afa5ee7083
commit ffb19e8abb
7 changed files with 26 additions and 21 deletions

View File

@@ -6,12 +6,14 @@ default-run = "sphinx-key-broker"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
vls-protocol = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std" }
vls-proxy = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std" }
vls-frontend = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std" }
vls-protocol-client = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std" }
# vls-protocol = { path = "../../../evanf/validating-lightning-signer/vls-protocol" } # vls-protocol = { path = "../../../evanf/validating-lightning-signer/vls-protocol" }
# vls-proxy = { path = "../../../evanf/validating-lightning-signer/vls-proxy" } # vls-proxy = { path = "../../../evanf/validating-lightning-signer/vls-proxy" }
# vls-frontend = { path = "../../../evanf/validating-lightning-signer/vls-frontend" }
# vls-protocol-client = { path = "../../../evanf/validating-lightning-signer/vls-protocol-client" }
vls-protocol = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1" }
vls-proxy = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1" }
vls-frontend = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1" }
vls-protocol-client = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1" }
rumqttd = { git = "https://github.com/Evanfeenstra/rumqtt", branch = "metrics" } rumqttd = { git = "https://github.com/Evanfeenstra/rumqtt", branch = "metrics" }
pretty_env_logger = "0.4.0" pretty_env_logger = "0.4.0"
confy = "0.4.0" confy = "0.4.0"
@@ -22,8 +24,8 @@ anyhow = {version = "1", features = ["backtrace"]}
log = "0.4" log = "0.4"
fern = { version = "0.6", features = ["colored"] } fern = { version = "0.6", features = ["colored"] }
rumqttc = "0.12.0" rumqttc = "0.12.0"
clap = "3.2.6" clap = "=3.0.0-beta.2"
clap_derive = "3.2.6" clap_derive = "=3.0.0-beta.5"
chrono = "0.4" chrono = "0.4"
once_cell = "1.12.0" once_cell = "1.12.0"
bitcoin = "0.28.1" bitcoin = "0.28.1"

View File

@@ -9,7 +9,7 @@ mod util;
use crate::chain_tracker::MqttSignerPort; use crate::chain_tracker::MqttSignerPort;
use crate::mqtt::start_broker; use crate::mqtt::start_broker;
use crate::unix_fd::SignerLoop; use crate::unix_fd::SignerLoop;
use clap::{arg, App, AppSettings, Arg}; use clap::{App, AppSettings, Arg};
use std::env; use std::env;
use std::sync::Arc; use std::sync::Arc;
use tokio::sync::{mpsc, oneshot}; use tokio::sync::{mpsc, oneshot};
@@ -45,14 +45,14 @@ fn main() -> anyhow::Result<()> {
.setting(AppSettings::NoAutoVersion) .setting(AppSettings::NoAutoVersion)
.about("CLN:mqtt - connects to an embedded VLS over a MQTT connection") .about("CLN:mqtt - connects to an embedded VLS over a MQTT connection")
.arg( .arg(
Arg::new("dev-disconnect") Arg::new("--dev-disconnect")
.help("ignored dev flag") .about("ignored dev flag")
.long("dev-disconnect") .long("dev-disconnect")
.takes_value(true), .takes_value(true),
) )
.arg(arg!(--"log-io" "ignored dev flag")) .arg(Arg::from("--log-io ignored dev flag"))
.arg(arg!(--version "show a dummy version")) .arg(Arg::from("--version show a dummy version"))
.arg(arg!(--test "run a test against the embedded device")) .arg(Arg::from("--test run a test against the embedded device"));
let matches = app.get_matches(); let matches = app.get_matches();

View File

@@ -5,7 +5,7 @@ edition = "2021"
[dependencies] [dependencies]
# vls-protocol = { path = "../../../evanf/validating-lightning-signer/vls-protocol" } # vls-protocol = { path = "../../../evanf/validating-lightning-signer/vls-protocol" }
vls-protocol = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std" } vls-protocol = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1" }
serde = { version = "1.0", default-features = false } serde = { version = "1.0", default-features = false }
serde_bolt = { version = "0.2", default-features = false } serde_bolt = { version = "0.2", default-features = false }

View File

@@ -8,7 +8,7 @@ edition = "2018"
sphinx-key-parser = { path = "../parser" } sphinx-key-parser = { path = "../parser" }
# vls-protocol-signer = { path = "../../../evanf/validating-lightning-signer/vls-protocol-signer", default-features = false, features = ["std", "secp-lowmemory"] } # vls-protocol-signer = { path = "../../../evanf/validating-lightning-signer/vls-protocol-signer", default-features = false, features = ["std", "secp-lowmemory"] }
# vls-protocol-signer = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer", default-features = false, features = ["secp-lowmemory"] } # vls-protocol-signer = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer", default-features = false, features = ["secp-lowmemory"] }
vls-protocol-signer = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std", default-features = false, features = ["std", "secp-lowmemory"] } vls-protocol-signer = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1", default-features = false, features = ["std", "secp-lowmemory"] }
anyhow = {version = "1", features = ["backtrace"]} anyhow = {version = "1", features = ["backtrace"]}
log = "0.4" log = "0.4"

View File

@@ -8,8 +8,8 @@ edition = "2018"
sphinx-key-signer = { path = "../signer" } sphinx-key-signer = { path = "../signer" }
sphinx-key-parser = { path = "../parser" } sphinx-key-parser = { path = "../parser" }
sphinx-key-crypter = { path = "../crypter" } sphinx-key-crypter = { path = "../crypter" }
vls-protocol = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std" } vls-protocol = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1" }
vls-protocol-signer = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "partial-std", default-features = false, features = ["std", "secp-lowmemory"] } vls-protocol-signer = { git = "https://gitlab.com/Evanfeenstra/validating-lightning-signer", branch = "sphinx-key-1", default-features = false, features = ["std", "secp-lowmemory"] }
# vls-protocol = { path = "../../../evanf/validating-lightning-signer/vls-protocol" } # vls-protocol = { path = "../../../evanf/validating-lightning-signer/vls-protocol" }
# vls-protocol-signer = { path = "../../../evanf/validating-lightning-signer/vls-protocol-signer", default-features = false, features = ["std", "secp-lowmemory"] } # vls-protocol-signer = { path = "../../../evanf/validating-lightning-signer/vls-protocol-signer", default-features = false, features = ["std", "secp-lowmemory"] }
anyhow = {version = "1", features = ["backtrace"]} anyhow = {version = "1", features = ["backtrace"]}
@@ -17,8 +17,8 @@ log = "0.4"
rumqttc = "0.12.0" rumqttc = "0.12.0"
tokio = { version = "1.4.0", features = ["rt", "rt-multi-thread", "macros"] } tokio = { version = "1.4.0", features = ["rt", "rt-multi-thread", "macros"] }
pretty_env_logger = "0.4.0" pretty_env_logger = "0.4.0"
clap = "3.2.6" clap = "=3.0.0-beta.2"
clap_derive = "3.2.6" clap_derive = "=3.0.0-beta.5"
fern = { version = "0.6", features = ["colored"] } fern = { version = "0.6", features = ["colored"] }
chrono = "0.4" chrono = "0.4"
rand = "0.8" rand = "0.8"

3
tester/rocket.toml Normal file
View File

@@ -0,0 +1,3 @@
[default]
address = "0.0.0.0"

View File

@@ -1,7 +1,7 @@
use sphinx_key_parser as parser; use sphinx_key_parser as parser;
use sphinx_key_signer::lightning_signer::bitcoin::Network; use sphinx_key_signer::lightning_signer::bitcoin::Network;
use clap::{arg, App, AppSettings}; use clap::{App, AppSettings, Arg};
use rumqttc::{self, AsyncClient, Event, MqttOptions, Packet, QoS}; use rumqttc::{self, AsyncClient, Event, MqttOptions, Packet, QoS};
use sphinx_key_signer::vls_protocol::model::PubKey; use sphinx_key_signer::vls_protocol::model::PubKey;
use sphinx_key_signer::{self, InitResponse}; use sphinx_key_signer::{self, InitResponse};
@@ -23,8 +23,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
let app = App::new("tester") let app = App::new("tester")
.setting(AppSettings::NoAutoVersion) .setting(AppSettings::NoAutoVersion)
.about("CLN:mqtt-tester - MQTT client signer") .about("CLN:mqtt-tester - MQTT client signer")
.arg(arg!(--test "run a test against the embedded device")) .arg(Arg::from("--test run a test against the embedded device"))
.arg(arg!(--log "log each VLS message")); .arg(Arg::from("--log log each VLS message"));
let matches = app.get_matches(); let matches = app.get_matches();
let is_test = matches.is_present("test"); let is_test = matches.is_present("test");
let is_log = matches.is_present("log"); let is_log = matches.is_present("log");