Merge pull request #316 from paritytech/dp-add-changelog

Add a CHANGELOG
This commit is contained in:
David
2021-03-29 22:22:05 +02:00
committed by GitHub
6 changed files with 41 additions and 13 deletions
+25
View File
@@ -0,0 +1,25 @@
# Changelog
All notable changes to this crate are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this crate adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3] - 2021-03-25
### Added
- Add `--denylist network1 network2` switch to deny nodes on the given networks to connect [#315](https://github.com/paritytech/substrate-telemetry/pull/314)
- Add `--log` switch to configure log levels [#314](https://github.com/paritytech/substrate-telemetry/pull/314)
### Fixed
- Fix clippy warnings [#314](https://github.com/paritytech/substrate-telemetry/pull/314)
### Changed
- Docker image use alpine (for now) [#326](https://github.com/paritytech/substrate-telemetry/pull/326)
- Mute denied nodes [#322](https://github.com/paritytech/substrate-telemetry/pull/322)
- Build actix-web without compression support [#319](https://github.com/paritytech/substrate-telemetry/pull/319)
- Update to actix v4 beta [#316](https://github.com/paritytech/substrate-telemetry/pull/317)
- Cap third party networks to at most 500 connected nodes. Polkadot, Kusama, Westend and Rococo are not subject to this limit. [#314](https://github.com/paritytech/substrate-telemetry/pull/314)
+4 -4
View File
@@ -63,14 +63,14 @@ For the sake of brevity below, I will name the containers `backend` and `fronten
Let's start the backend first. We will be using the published [chevdor](https://hub.docker.com/u/chevdor) images here, feel free to replace with your own image.
```
```sh
docker run --rm -i --name backend -p 8000:8000 \
chevdor/substrate-telemetry-backend -l 0.0.0.0:8000
```
Let's now start the frontend:
```
```sh
docker run --rm -i --name frontend --link backend -p 80:80 \
-e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \
chevdor/substrate-telemetry-frontend
@@ -84,7 +84,7 @@ At that point, you can already open your browser at [http://localhost](http://lo
Let's bring some data in with a node:
```
```sh
docker run --rm -i --name substrate --link backend -p 9944:9944 \
chevdor/substrate substrate --dev --telemetry-url 'ws://backend:8000/submit 0'
```
@@ -111,6 +111,6 @@ Now navigate to [http://localhost:3000](http://localhost:3000/) in your browser
The building process is standard. You just need to notice that the Dockerfile is in ./packages/frontend/ and tell docker about it. The context must remain the repository's root though.
```
```sh
DOCKER_USER=chevdor ./scripts/build-docker-frontend.sh
```
+8 -4
View File
@@ -1,13 +1,17 @@
# Frontend
# Roadmap
## Frontend
- Provide a pie chart of node implementations/versions above the list, next to Last Block timer, to have an overview of what the dominant impl/version is, and whether there is a significant amount of nodes running older versions.
+ Latest partial implementation of this can be found in the `mh-piechart-new` branch.
Latest partial implementation of this can be found in the `mh-piechart-new` branch.
- Provide a block propagation graph: X axis being a number of blocks a node is behind, while Y axis is the number of nodes in that bucket. The size of buckets should grow: [0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000]
+ Partial implementation of this can be found in `mh-version-piecharts` branch, although that branch is pre FE refactoring, so starting a new one and splitting it from pie charts would be advised.
Partial implementation of this can be found in `mh-version-piecharts` branch, although that branch is pre FE refactoring, so starting a new one and splitting it from pie charts would be advised.
- Network search by name when viewing the complete list (#276).
# Backend
## Backend
- To keep up with increasing traffic, we should split out a new service from the current backend that replaces the `/submit` endpoint. This new service should take ownership of JSON deserialization of incoming messages from the nodes, discarding messages that Telemetry does not need, resolving chain multiplexing (this will likely need some two-way communication with the main backend when a new node connects), and then forwarding those messages using a lightweight protocol (Cap'n Proto or Protocol Buffers) to the main telemetry backend. Unlike the backend, which needs to have a single instance to keep track of all state changes, this new service should be stateless and therefore we should be able to spawn multiple instances of it behind a load balancer. This would solve the two bottlenecks we're currently having: the number of concurrent connections going to the backend, and the CPU use that comes from IO switching and JSON deserialization.
+1 -1
View File
@@ -1682,7 +1682,7 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "telemetry"
version = "0.2.1"
version = "0.3.0"
dependencies = [
"actix",
"actix-http",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "telemetry"
version = "0.2.1"
version = "0.3.0"
authors = ["Parity Technologies Ltd. <admin@parity.io>"]
edition = "2018"
license = "GPL-3.0"
+2 -3
View File
@@ -40,7 +40,6 @@ struct Opts {
#[clap(
required = false,
long = "denylist",
default_value = "Earth",
about = "Space delimited list of chains that are not allowed to connect to telemetry. Case sensitive."
)]
denylist: Vec<String>,
@@ -165,7 +164,7 @@ async fn health(aggregator: web::Data<Addr<Aggregator>>) -> Result<HttpResponse,
/// This can be changed using the `PORT` and `BIND` ENV variables.
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let opts: Opts = Opts::parse();
let opts = Opts::parse();
let log_level = &opts.log_level;
SimpleLogger::new().with_level(log_level.into()).init().expect("Must be able to start a logger");
@@ -173,7 +172,7 @@ async fn main() -> std::io::Result<()> {
let aggregator = Aggregator::new(denylist).start();
let factory = LocatorFactory::new();
let locator = SyncArbiter::start(4, move || factory.create());
log::info!("Starting telemetry version: {}", env!("CARGO_PKG_VERSION"));
HttpServer::new(move || {
App::new()
.wrap(middleware::NormalizePath::default())