coconut qa-testing
- after setting the features to coconut in the socks5 config - we then set enabled credentials - after configuration is tinkered, we still need to buy bandwidth - POC
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"id": "nym-testing",
|
||||
"description": "coconuts",
|
||||
"items": [
|
||||
{
|
||||
"id": "nym-coconut",
|
||||
"description": "nym-credentials",
|
||||
"address": "<input service provider address>",
|
||||
"gateway": "<input these values>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use std::error::Error;
|
||||
use std::str::FromStr;
|
||||
|
||||
use crate::client::config::Config;
|
||||
use crate::error::Socks5ClientError;
|
||||
@@ -39,6 +40,7 @@ use nymsphinx::addressing::clients::Recipient;
|
||||
use nymsphinx::addressing::nodes::NodeIdentity;
|
||||
use tap::TapFallible;
|
||||
use task::{wait_for_signal_and_error, ShutdownListener, ShutdownNotifier};
|
||||
use url::Url;
|
||||
|
||||
pub mod config;
|
||||
|
||||
@@ -199,25 +201,23 @@ impl NymClient {
|
||||
.expect("provided gateway id is invalid!");
|
||||
|
||||
#[cfg(feature = "coconut")]
|
||||
//temp hard code these values for testing
|
||||
let qwerty_validator: Url =
|
||||
Url::from_str("http://qwerty-validator.qa.nymte.ch:26657/").unwrap();
|
||||
let val_api: Url =
|
||||
Url::from_str("https://qwerty-coconut-one-validator-api.qa.nymte.ch/api").unwrap();
|
||||
|
||||
let bandwidth_controller = {
|
||||
let details = network_defaults::NymNetworkDetails::new_from_env();
|
||||
let mut client_config =
|
||||
validator_client::Config::try_from_nym_network_details(&details)
|
||||
.expect("failed to construct validator client config");
|
||||
let nymd_url = self
|
||||
.config
|
||||
.get_base()
|
||||
.get_validator_endpoints()
|
||||
.pop()
|
||||
.expect("No nymd validator endpoint provided");
|
||||
let api_url = self
|
||||
.config
|
||||
.get_base()
|
||||
.get_validator_api_endpoints()
|
||||
.pop()
|
||||
.expect("No validator api endpoint provided");
|
||||
|
||||
// overwrite env configuration with config URLs
|
||||
client_config = client_config.with_urls(nymd_url, api_url);
|
||||
client_config = client_config.with_urls(qwerty_validator, val_api);
|
||||
|
||||
println!("{:?}", client_config);
|
||||
|
||||
let client = validator_client::Client::new_query(client_config)
|
||||
.expect("Could not construct query client");
|
||||
let coconut_api_clients =
|
||||
|
||||
+4
-5
@@ -1,8 +1,6 @@
|
||||
CONFIGURED=true
|
||||
|
||||
RUST_LOG=info
|
||||
RUST_BACKTRACE=1
|
||||
|
||||
BECH32_PREFIX=n
|
||||
MIX_DENOM=unym
|
||||
MIX_DENOM_DISPLAY=nym
|
||||
@@ -12,9 +10,10 @@ DENOMS_EXPONENT=6
|
||||
MIXNET_CONTRACT_ADDRESS=n14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sjyvg3g
|
||||
VESTING_CONTRACT_ADDRESS=n1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq73f2nw
|
||||
BANDWIDTH_CLAIM_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0
|
||||
COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0
|
||||
MULTISIG_CONTRACT_ADDRESS=n19lc9u84cz0yz3fww5283nucc9yvr8gsjmgeul0
|
||||
COCONUT_BANDWIDTH_CONTRACT_ADDRESS=n12ckdkm3q7eytefs7rwu4ue3t9hxgvl9v08jddmtwgct2ve0pv50q0t8dlt
|
||||
MULTISIG_CONTRACT_ADDRESS=n14krxe8ukzagwhvec0rmteexu62w8k9kp9sra9ww6em2hnmzcukqsa0utc8
|
||||
COCONUT_DKG_CONTRACT_ADDRESS=n1rl5n6cxuz2hdy3f7d9hsnw8zn0zwwwr0r4dxfz7tktgpgkcnz9zshmvksc
|
||||
REWARDING_VALIDATOR_ADDRESS=n10yyd98e2tuwu0f7ypz9dy3hhjw7v772q6287gy
|
||||
STATISTICS_SERVICE_DOMAIN_ADDRESS="https://mainnet-stats.nymte.ch:8090"
|
||||
NYMD_VALIDATOR="https://qwerty-validator.qa.nymte.ch/"
|
||||
API_VALIDATOR="https://qwerty-validator-api.qa.nymte.ch/api"
|
||||
API_VALIDATOR="https://qwerty-coconut-one-validator-api.qa.nymte.ch/api"
|
||||
|
||||
Generated
+8
-2
@@ -630,7 +630,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "client-core"
|
||||
version = "1.1.0"
|
||||
version = "1.1.1"
|
||||
dependencies = [
|
||||
"client-connections",
|
||||
"config",
|
||||
@@ -973,6 +973,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bls12_381 0.5.0",
|
||||
"coconut-interface",
|
||||
"cosmrs",
|
||||
"crypto",
|
||||
"thiserror",
|
||||
"validator-api-requests",
|
||||
@@ -1867,6 +1868,7 @@ name = "gateway-client"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"coconut-interface",
|
||||
"credential-storage",
|
||||
"credentials",
|
||||
"crypto",
|
||||
@@ -1885,6 +1887,7 @@ dependencies = [
|
||||
"tokio-tungstenite",
|
||||
"tungstenite",
|
||||
"url",
|
||||
"validator-client",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-timer",
|
||||
@@ -1896,6 +1899,7 @@ name = "gateway-requests"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bs58",
|
||||
"coconut-interface",
|
||||
"credentials",
|
||||
"crypto",
|
||||
"futures",
|
||||
@@ -3351,14 +3355,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nym-socks5-client"
|
||||
version = "1.1.0"
|
||||
version = "1.1.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"client-connections",
|
||||
"client-core",
|
||||
"coconut-interface",
|
||||
"completions",
|
||||
"config",
|
||||
"credential-storage",
|
||||
"credentials",
|
||||
"crypto",
|
||||
"dirs",
|
||||
"futures",
|
||||
|
||||
@@ -41,7 +41,7 @@ url = "2.2"
|
||||
client-core = { path = "../../clients/client-core" }
|
||||
config-common = { path = "../../common/config", package = "config" }
|
||||
logging = { path = "../../common/logging"}
|
||||
nym-socks5-client = { path = "../../clients/socks5" }
|
||||
nym-socks5-client = { path = "../../clients/socks5", features = ["coconut"] }
|
||||
topology = { path = "../../common/topology" }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -127,6 +127,8 @@ pub async fn init_socks5_config(provider_address: String, chosen_gateway_id: Str
|
||||
.set_custom_validator_apis(config_common::parse_validators(&raw_validators));
|
||||
}
|
||||
|
||||
config.get_base_mut().with_disabled_credentials(false);
|
||||
|
||||
let gateway = setup_gateway(
|
||||
&id,
|
||||
register_gateway,
|
||||
@@ -134,6 +136,7 @@ pub async fn init_socks5_config(provider_address: String, chosen_gateway_id: Str
|
||||
config.get_socks5(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
config.get_base_mut().with_gateway_endpoint(gateway);
|
||||
|
||||
let config_save_location = config.get_socks5().get_config_file_save_location();
|
||||
|
||||
@@ -14,6 +14,7 @@ use crate::menu::AddDefaultSubmenus;
|
||||
use crate::menu::{create_tray_menu, tray_menu_event_handler};
|
||||
use crate::state::State;
|
||||
use crate::window::window_toggle;
|
||||
use std::path::PathBuf;
|
||||
|
||||
mod config;
|
||||
mod error;
|
||||
@@ -26,7 +27,12 @@ mod window;
|
||||
|
||||
fn main() {
|
||||
setup_logging();
|
||||
setup_env(None);
|
||||
|
||||
//use qwerty environment
|
||||
//path may need changing for your set up
|
||||
let qwerty_environment = PathBuf::from("~/nym/envs/qa-qwerty.env");
|
||||
setup_env(Some(qwerty_environment));
|
||||
|
||||
println!("Starting up...");
|
||||
|
||||
// As per breaking change description here
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::error::Result;
|
||||
use crate::models::DirectoryService;
|
||||
|
||||
static SERVICE_PROVIDER_WELLKNOWN_URL: &str =
|
||||
"https://nymtech.net/.wellknown/connect/service-providers.json";
|
||||
//lets host our own service file locally
|
||||
static SERVICE_PROVIDER_WELLKNOWN_URL: &str = "http://localhost:3000/service-providers.json";
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn get_services() -> Result<Vec<DirectoryService>> {
|
||||
|
||||
Reference in New Issue
Block a user