mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-05-31 14:01:06 +00:00
Merge branch 'master' into dp-add-denylist-for-unwanted-networks
This commit is contained in:
Generated
+404
-1287
File diff suppressed because it is too large
Load Diff
+7
-10
@@ -6,21 +6,21 @@ edition = "2018"
|
|||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix = "0.10.0"
|
actix = "0.11.1"
|
||||||
actix-web = "3.1.0"
|
actix-web = "4.0.0-beta.4"
|
||||||
actix-web-actors = "3.0.0"
|
actix-web-actors = "4.0.0-beta.3"
|
||||||
actix-http = "2.0.0"
|
actix-http = "3.0.0-beta.4"
|
||||||
bytes = "0.5.6"
|
bytes = "1.0.1"
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
fnv = "1.0.7"
|
fnv = "1.0.7"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = { version = "1.0", features = ["raw_value"] }
|
serde_json = { version = "1.0", features = ["raw_value"] }
|
||||||
primitive-types = { version = "0.7.2", features = ["serde"] }
|
primitive-types = { version = "0.9.0", features = ["serde"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
simple_logger = "1.11.0"
|
simple_logger = "1.11.0"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
parking_lot = "0.11"
|
parking_lot = "0.11"
|
||||||
reqwest = "0.9.18"
|
reqwest = { version = "0.11.1", features = ["blocking", "json"] }
|
||||||
rustc-hash = "1.1.0"
|
rustc-hash = "1.1.0"
|
||||||
clap = "3.0.0-beta.2"
|
clap = "3.0.0-beta.2"
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
@@ -28,6 +28,3 @@ lazy_static = "1"
|
|||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
actix-web = { git = "https://github.com/maciejhirsz/actix-web", branch = "no-panic-normalize" }
|
|
||||||
|
|||||||
+5
-5
@@ -76,7 +76,7 @@ impl From<&LogLevel> for log::LevelFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Entry point for connecting nodes
|
/// Entry point for connecting nodes
|
||||||
#[get("/submit/")]
|
#[get("/submit")]
|
||||||
async fn node_route(
|
async fn node_route(
|
||||||
req: HttpRequest,
|
req: HttpRequest,
|
||||||
stream: web::Payload,
|
stream: web::Payload,
|
||||||
@@ -102,7 +102,7 @@ async fn node_route(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Entry point for connecting feeds
|
/// Entry point for connecting feeds
|
||||||
#[get("/feed/")]
|
#[get("/feed")]
|
||||||
async fn feed_route(
|
async fn feed_route(
|
||||||
req: HttpRequest,
|
req: HttpRequest,
|
||||||
stream: web::Payload,
|
stream: web::Payload,
|
||||||
@@ -116,7 +116,7 @@ async fn feed_route(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Entry point for network state dump
|
/// Entry point for network state dump
|
||||||
#[get("/network_state/{chain}/{nid}/")]
|
#[get("/network_state/{chain}/{nid}")]
|
||||||
async fn state_route(
|
async fn state_route(
|
||||||
path: web::Path<(Box<str>, NodeId)>,
|
path: web::Path<(Box<str>, NodeId)>,
|
||||||
aggregator: web::Data<Addr<Aggregator>>,
|
aggregator: web::Data<Addr<Aggregator>>,
|
||||||
@@ -145,7 +145,7 @@ async fn state_route(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Entry point for health check monitoring bots
|
/// Entry point for health check monitoring bots
|
||||||
#[get("/health/")]
|
#[get("/health")]
|
||||||
async fn health(aggregator: web::Data<Addr<Aggregator>>) -> Result<HttpResponse, Error> {
|
async fn health(aggregator: web::Data<Addr<Aggregator>>) -> Result<HttpResponse, Error> {
|
||||||
match aggregator.send(GetHealth).await {
|
match aggregator.send(GetHealth).await {
|
||||||
Ok(count) => {
|
Ok(count) => {
|
||||||
@@ -184,7 +184,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
.service(state_route)
|
.service(state_route)
|
||||||
.service(health)
|
.service(health)
|
||||||
})
|
})
|
||||||
.bind(format!("{}", opts.socket))?
|
.bind(opts.socket)?
|
||||||
.run()
|
.run()
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for NodeConnector {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Ok(ws::Message::Pong(_)) => return,
|
Ok(ws::Message::Pong(_)) => return,
|
||||||
Ok(ws::Message::Text(text)) => text.into(),
|
Ok(ws::Message::Text(text)) => text.into_bytes(),
|
||||||
Ok(ws::Message::Binary(data)) => data,
|
Ok(ws::Message::Binary(data)) => data,
|
||||||
Ok(ws::Message::Close(_)) => {
|
Ok(ws::Message::Close(_)) => {
|
||||||
ctx.stop();
|
ctx.stop();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use crate::types::{NodeId, NodeLocation};
|
|||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Locator {
|
pub struct Locator {
|
||||||
client: reqwest::Client,
|
client: reqwest::blocking::Client,
|
||||||
cache: Arc<RwLock<FxHashMap<Ipv4Addr, Option<Arc<NodeLocation>>>>>,
|
cache: Arc<RwLock<FxHashMap<Ipv4Addr, Option<Arc<NodeLocation>>>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ impl LocatorFactory {
|
|||||||
|
|
||||||
pub fn create(&self) -> Locator {
|
pub fn create(&self) -> Locator {
|
||||||
Locator {
|
Locator {
|
||||||
client: reqwest::Client::new(),
|
client: reqwest::blocking::Client::new(),
|
||||||
cache: self.cache.clone(),
|
cache: self.cache.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-20
@@ -1594,10 +1594,10 @@ bluebird@^3.4.7, bluebird@^3.5.1:
|
|||||||
resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
||||||
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
|
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
|
||||||
|
|
||||||
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
|
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.9:
|
||||||
version "4.11.9"
|
version "4.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
|
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
|
||||||
integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==
|
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==
|
||||||
|
|
||||||
bn.js@^5.1.1:
|
bn.js@^5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
@@ -1690,7 +1690,7 @@ braces@^3.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
fill-range "^7.0.1"
|
fill-range "^7.0.1"
|
||||||
|
|
||||||
brorand@^1.0.1:
|
brorand@^1.0.1, brorand@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
|
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
|
||||||
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
|
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
|
||||||
@@ -3046,17 +3046,17 @@ elegant-spinner@^1.0.1:
|
|||||||
integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=
|
integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=
|
||||||
|
|
||||||
elliptic@^6.0.0, elliptic@^6.5.2:
|
elliptic@^6.0.0, elliptic@^6.5.2:
|
||||||
version "6.5.3"
|
version "6.5.4"
|
||||||
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
|
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
|
||||||
integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==
|
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
bn.js "^4.4.0"
|
bn.js "^4.11.9"
|
||||||
brorand "^1.0.1"
|
brorand "^1.1.0"
|
||||||
hash.js "^1.0.0"
|
hash.js "^1.0.0"
|
||||||
hmac-drbg "^1.0.0"
|
hmac-drbg "^1.0.1"
|
||||||
inherits "^2.0.1"
|
inherits "^2.0.4"
|
||||||
minimalistic-assert "^1.0.0"
|
minimalistic-assert "^1.0.1"
|
||||||
minimalistic-crypto-utils "^1.0.0"
|
minimalistic-crypto-utils "^1.0.1"
|
||||||
|
|
||||||
emoji-regex@^8.0.0:
|
emoji-regex@^8.0.0:
|
||||||
version "8.0.0"
|
version "8.0.0"
|
||||||
@@ -4224,7 +4224,7 @@ he@1.2.x:
|
|||||||
resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||||
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
|
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
|
||||||
|
|
||||||
hmac-drbg@^1.0.0:
|
hmac-drbg@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
|
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
|
||||||
integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
|
integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
|
||||||
@@ -4510,7 +4510,7 @@ inflight@^1.0.4:
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4:
|
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
@@ -6278,7 +6278,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
|
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
|
||||||
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
|
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
|
||||||
|
|
||||||
minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
|
minimalistic-crypto-utils@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
|
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
|
||||||
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
|
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
|
||||||
@@ -9654,9 +9654,9 @@ uri-js@^4.2.2:
|
|||||||
punycode "^2.1.0"
|
punycode "^2.1.0"
|
||||||
|
|
||||||
urijs@^1.16.1:
|
urijs@^1.16.1:
|
||||||
version "1.19.5"
|
version "1.19.6"
|
||||||
resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.5.tgz#119683ab4b2fb0bd637e5ea6dd9117bcac68d3e4"
|
resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.6.tgz#51f8cb17ca16faefb20b9a31ac60f84aa2b7c870"
|
||||||
integrity sha512-48z9VGWwdCV5KfizHsE05DWS5fhK6gFlx5MjO7xu0Krc5FGPWzjlXEVV0nPMrdVuP7xmMHiPZ2HoYZwKOFTZOg==
|
integrity sha512-eSXsXZ2jLvGWeLYlQA3Gh36BcjF+0amo92+wHPyN1mdR8Nxf75fuEuYTd9c0a+m/vhCjRK0ESlE9YNLW+E1VEw==
|
||||||
|
|
||||||
urix@^0.1.0:
|
urix@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user