diff --git a/.editorconfig b/.editorconfig
index 47fde53b690b5b86037ede8cbf0337db8a472d7d..2b40ec32fac3e935b4f85e70bf339224d5e8f8b0 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -14,3 +14,9 @@ indent_style=space
indent_size=2
tab_width=8
end_of_line=lf
+
+[*.sh]
+indent_style=space
+indent_size=2
+tab_width=8
+end_of_line=lf
diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md
new file mode 100644
index 0000000000000000000000000000000000000000..6067dbf12fa70ab43a3065e59e7e68375b721049
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/release.md
@@ -0,0 +1,9 @@
+---
+title: Release failure for {{ ref }}
+---
+
+Pipeline for release {{ ref }} failed. Please investigate.
+
+If the pipeline has failed before pushing to crates.io, delete the release tag
+and fix the release as necessary, retagging after complete. If the pipeline has
+failed after pushing to crates.io, create a new tag incrementing the version.
diff --git a/.github/workflows/check-gitlab-pipeline.yml b/.github/workflows/check-gitlab-pipeline.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c87f17c2f732e447cacf297cfe41e7b266a4bc99
--- /dev/null
+++ b/.github/workflows/check-gitlab-pipeline.yml
@@ -0,0 +1,30 @@
+# A github action to track the status of the gitlab pipeline for tagged
+# releases, and cancel the release/create a new issue if it fails
+
+name: Monitor gitlab pipeline status
+
+on:
+ push:
+ tags:
+ - v*
+ - ci-release-*
+
+jobs:
+ monitor:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Monitor pipeline
+ run: env; ./.maintain/github/check_gitlab_pipeline.sh
+ id: monitor_pipeline
+ env:
+ TAGGER: ${{ github.event.pusher.name }}
+ - name: Create Issue
+ if: failure()
+ uses: JasonEtco/create-an-issue@v2
+ with:
+ filename: .github/ISSUE_TEMPLATE/release.md
+ assignees: ${{ github.event.pusher.name }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release-bot.yml b/.github/workflows/release-bot.yml
new file mode 100644
index 0000000000000000000000000000000000000000..08aa94417c047d4e93645e4b6d0949ee2df29777
--- /dev/null
+++ b/.github/workflows/release-bot.yml
@@ -0,0 +1,18 @@
+name: Pushes release updates to a pre-defined Matrix room
+on:
+ release:
+ types:
+ - edited
+ - prereleased
+ - published
+jobs:
+ ping_matrix:
+ runs-on: ubuntu-latest
+ steps:
+ - name: send message
+ uses: s3krit/matrix-message-action@v0.0.2
+ with:
+ room_id: ${{ secrets.MATRIX_ROOM_ID }}
+ access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
+ message: "**${{github.event.repository.full_name}}:** A release has been ${{github.event.action}}
Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
***Description:***
${{github.event.release.body}}
"
+ server: "matrix.parity.io"
diff --git a/.github/workflows/release-tagging.yml b/.github/workflows/release-tagging.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c55fc13a626e0be0aef571cfae18a5c5210e7bef
--- /dev/null
+++ b/.github/workflows/release-tagging.yml
@@ -0,0 +1,20 @@
+# Github action to ensure the `release` tag always tracks latest release
+
+name: Retag release
+
+on:
+ release:
+ types: [ published ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Set Git tag
+ uses: s3krit/walking-tag-action@master
+ with:
+ TAG_NAME: release
+ TAG_MESSAGE: Latest release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/trigger-review-pipeline.yml b/.github/workflows/trigger-review-pipeline.yml
new file mode 100644
index 0000000000000000000000000000000000000000..af54ec4358b438b7cd53513c33e661fef833aa94
--- /dev/null
+++ b/.github/workflows/trigger-review-pipeline.yml
@@ -0,0 +1,20 @@
+name: Trigger pipeline for review
+
+on:
+ pull_request:
+ types: [ready_for_review]
+
+jobs:
+ trigger:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Trigger pipeline
+ run: |
+ curl -X POST \
+ -F token="$TOKEN" \
+ -F ref="$REF" \
+ https://gitlab.parity.io/api/v4/projects/145/trigger/pipeline
+ env:
+ REF: ${{ github.event.number }}
+ TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
diff --git a/.gitignore b/.gitignore
index aadaa13912c19dbc056245784442d8b4c9de2a82..353d49df28f34b896567b0aa91bb08e056a5832c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,6 @@ rls*.log
*.rej
**/wip/*.stderr
.local
+**/hfuzz_target/
+**/hfuzz_workspace/
+.cargo/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bc7ce84a80512e5fa7554bc1f13e82974340ed3a..bdf614063a7b196ddeda4882ff01ea5601f32c0b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,7 @@
#
# my-example-job:
# stage: test # One of the stages listed below this job (required)
-# image: parity/tools:latest # Any docker image (required)
+# image: paritytech/tools:latest # Any docker image (required)
# allow_failure: true # Allow the pipeline to continue if this job fails (default: false)
# dependencies:
# - build-rust-doc-release # Any jobs that are required to run before this job (optional)
@@ -22,25 +22,26 @@
# - ./.maintain/gitlab/my_amazing_script.sh
stages:
+ - check
- test
- build
+ - post-build-test
- publish
- kubernetes
- flaming-fir
-variables:
+variables: &default-vars
GIT_STRATEGY: fetch
GIT_DEPTH: 100
- CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
- SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
CARGO_INCREMENTAL: 0
- CI_SERVER_NAME: "GitLab CI"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
# FIXME set to release
- CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.6"
- CARGO_UNLEASH_PKG_DEF: "--skip node node-* subkey chain-spec-builder"
+ CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.10"
+ CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
+default:
+ cache: {}
.collect-artifacts: &collect-artifacts
artifacts:
@@ -74,7 +75,6 @@ variables:
- runner_system_failure
- unknown_failure
- api_failure
- dependencies: []
interruptible: true
tags:
- linux-docker
@@ -86,46 +86,64 @@ variables:
- /^pre-v[0-9]+\.[0-9]+-[0-9a-f]+$/
- web
+#### stage: .pre
+skip-if-draft:
+ image: paritytech/tools:latest
+ <<: *kubernetes-build
+ stage: .pre
+ only:
+ - /^[0-9]+$/ # Pull requests
+ script:
+ - ./.maintain/gitlab/skip_if_draft.sh
-#### stage: test
+#### stage: check
check-runtime:
- stage: test
- image: parity/tools:latest
+ stage: check
+ image: paritytech/tools:latest
<<: *kubernetes-build
only:
- /^[0-9]+$/
variables:
+ <<: *default-vars
GITLAB_API: "https://gitlab.parity.io/api/v4"
GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api"
script:
- ./.maintain/gitlab/check_runtime.sh
- interruptible: true
allow_failure: true
check-signed-tag:
- stage: test
- image: parity/tools:latest
+ stage: check
+ image: paritytech/tools:latest
<<: *kubernetes-build
only:
- - tags
+ - /^ci-release-.*$/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- ./.maintain/gitlab/check_signed.sh
- allow_failure: false
check-line-width:
- stage: test
- image: parity/tools:latest
+ stage: check
+ image: paritytech/tools:latest
<<: *kubernetes-build
only:
- /^[0-9]+$/
script:
- ./.maintain/gitlab/check_line_width.sh
- interruptible: true
allow_failure: true
+test-dependency-rules:
+ stage: check
+ image: paritytech/tools:latest
+ <<: *kubernetes-build
+ except:
+ variables:
+ - $DEPLOY_TAG
+ script:
+ - .maintain/ensure-deps.sh
+
+#### stage: test
cargo-audit:
stage: test
@@ -136,15 +154,30 @@ cargo-audit:
- cargo audit
allow_failure: true
+cargo-deny:
+ stage: test
+ <<: *docker-env
+ script:
+ - cargo deny check --hide-inclusion-graph -c .maintain/deny.toml
+ after_script:
+ - echo "___The complete log is in the artifacts___"
+ - cargo deny check -c .maintain/deny.toml 2> deny.log
+ artifacts:
+ name: $CI_COMMIT_SHORT_SHA
+ expire_in: 3 days
+ when: always
+ paths:
+ - deny.log
cargo-check-benches:
stage: test
<<: *docker-env
script:
- BUILD_DUMMY_WASM_BINARY=1 time cargo +nightly check --benches --all
+ - cargo run --release -p node-bench -- ::node::import::native::sr25519::transfer_keep_alive::paritydb::small
+ - cargo run --release -p node-bench -- ::trie::read::small
- sccache -s
-
cargo-check-subkey:
stage: test
<<: *docker-env
@@ -155,38 +188,21 @@ cargo-check-subkey:
- BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
- sccache -s
-
test-linux-stable: &test-linux
stage: test
<<: *docker-env
variables:
+ <<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
- RUSTFLAGS: -Cdebug-assertions=y
+ RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
+ RUST_BACKTRACE: 1
except:
variables:
- $DEPLOY_TAG
script:
- - WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked |
- tee output.log
+ - WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked
- sccache -s
- after_script:
- - echo "___Collecting warnings for check_warnings job___"
- - awk '/^warning:/,/^$/ { print }' output.log > ${CI_COMMIT_SHORT_SHA}_warnings.log
- artifacts:
- name: $CI_COMMIT_SHORT_SHA
- expire_in: 3 days
- paths:
- - ${CI_COMMIT_SHORT_SHA}_warnings.log
-
-test-dependency-rules:
- stage: test
- <<: *docker-env
- except:
- variables:
- - $DEPLOY_TAG
- script:
- - .maintain/ensure-deps.sh
unleash-check:
stage: test
@@ -199,9 +215,11 @@ unleash-check:
- cargo unleash check ${CARGO_UNLEASH_PKG_DEF}
test-frame-staking:
+ # into one job
stage: test
<<: *docker-env
variables:
+ <<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
@@ -211,13 +229,34 @@ test-frame-staking:
- $DEPLOY_TAG
script:
- cd frame/staking/
- - WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features std
+ - WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features "std"
+ - sccache -s
+
+test-frame-examples-compile-to-wasm:
+ # into one job
+ stage: test
+ <<: *docker-env
+ variables:
+ <<: *default-vars
+ # Enable debug assertions since we are running optimized builds for testing
+ # but still want to have debug assertions.
+ RUSTFLAGS: -Cdebug-assertions=y
+ RUST_BACKTRACE: 1
+ except:
+ variables:
+ - $DEPLOY_TAG
+ script:
+ - cd frame/example-offchain-worker/
+ - cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
+ - cd ../example
+ - cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
- sccache -s
test-wasmtime:
stage: test
<<: *docker-env
variables:
+ <<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
@@ -230,6 +269,24 @@ test-wasmtime:
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features wasmtime
- sccache -s
+test-runtime-benchmarks:
+ # into one job
+ stage: test
+ <<: *docker-env
+ variables:
+ <<: *default-vars
+ # Enable debug assertions since we are running optimized builds for testing
+ # but still want to have debug assertions.
+ RUSTFLAGS: -Cdebug-assertions=y
+ RUST_BACKTRACE: 1
+ except:
+ variables:
+ - $DEPLOY_TAG
+ script:
+ - cd bin/node/cli
+ - WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features runtime-benchmarks
+ - sccache -s
+
test-linux-stable-int:
<<: *test-linux
except:
@@ -240,7 +297,8 @@ test-linux-stable-int:
script:
- echo "___Logs will be partly shown at the end in case of failure.___"
- echo "___Full log will be saved to the job artifacts only in case of failure.___"
- - WASM_BUILD_NO_COLOR=1 RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
+ - WASM_BUILD_NO_COLOR=1
+ RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
time cargo test -p node-cli --release --verbose --locked -- --ignored
&> ${CI_COMMIT_SHORT_SHA}_int_failure.log
- sccache -s
@@ -253,7 +311,6 @@ test-linux-stable-int:
paths:
- ${CI_COMMIT_SHORT_SHA}_int_failure.log
-
check-web-wasm:
stage: test
<<: *docker-env
@@ -265,19 +322,19 @@ check-web-wasm:
- time cargo build --target=wasm32-unknown-unknown -p sp-io
- time cargo build --target=wasm32-unknown-unknown -p sp-runtime
- time cargo build --target=wasm32-unknown-unknown -p sp-std
- - time cargo build --target=wasm32-unknown-unknown -p sc-client
- time cargo build --target=wasm32-unknown-unknown -p sc-consensus-aura
- time cargo build --target=wasm32-unknown-unknown -p sc-consensus-babe
- time cargo build --target=wasm32-unknown-unknown -p sp-consensus
- time cargo build --target=wasm32-unknown-unknown -p sc-telemetry
# Note: the command below is a bit weird because several Cargo issues prevent us from compiling the node in a more straight-forward way.
- - time cargo build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown
+ - time cargo +nightly build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features browser --target=wasm32-unknown-unknown -Z features=itarget
- sccache -s
test-full-crypto-feature:
stage: test
<<: *docker-env
variables:
+ <<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
@@ -292,14 +349,59 @@ test-full-crypto-feature:
- time cargo +nightly build --verbose --no-default-features --features full_crypto
- sccache -s
+cargo-check-macos:
+ stage: test
+ # shell runner on mac ignores the image set in *docker-env
+ <<: *docker-env
+ script:
+ - BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
+ - sccache -s
+ tags:
+ - osx
#### stage: build
+check-polkadot-companion-status:
+ stage: build
+ image: paritytech/tools:latest
+ <<: *kubernetes-build
+ only:
+ - /^[0-9]+$/ # PRs
+ script:
+ - ./.maintain/gitlab/check_polkadot_companion_status.sh
+
+check-polkadot-companion-build:
+ stage: build
+ <<: *docker-env
+ needs:
+ - job: test-linux-stable-int
+ artifacts: false
+ script:
+ - ./.maintain/gitlab/check_polkadot_companion_build.sh
+ allow_failure: true
+
+test-browser-node:
+ stage: build
+ <<: *docker-env
+ needs:
+ - job: check-web-wasm
+ artifacts: false
+ variables:
+ <<: *default-vars
+ CHROMEDRIVER_ARGS: "--log-level=INFO --whitelisted-ips=127.0.0.1"
+ CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER: "wasm-bindgen-test-runner"
+ WASM_BINDGEN_TEST_TIMEOUT: 120
+ script:
+ - cargo +nightly test --target wasm32-unknown-unknown -p node-browser-testing -Z features=itarget
+
build-linux-substrate: &build-binary
stage: build
<<: *collect-artifacts
<<: *docker-env
<<: *build-only
+ needs:
+ - job: test-linux-stable
+ artifacts: false
before_script:
- mkdir -p ./artifacts/substrate/
except:
@@ -313,8 +415,8 @@ build-linux-substrate: &build-binary
echo "${CI_COMMIT_TAG}" | tee ./artifacts/substrate/VERSION;
else
./artifacts/substrate/substrate --version |
- sed -n -r 's/^substrate ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p' |
- tee ./artifacts/substrate/VERSION;
+ sed -n -E 's/^substrate ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p' |
+ tee ./artifacts/substrate/VERSION;
fi
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
- printf '\n# building node-template\n\n'
@@ -322,8 +424,12 @@ build-linux-substrate: &build-binary
- cp -r .maintain/docker/substrate.Dockerfile ./artifacts/substrate/
- sccache -s
-build-linux-subkey:
+
+build-linux-subkey: &build-subkey
<<: *build-binary
+ needs:
+ - job: cargo-check-subkey
+ artifacts: false
before_script:
- mkdir -p ./artifacts/subkey
script:
@@ -333,12 +439,20 @@ build-linux-subkey:
- mv ./target/release/subkey ./artifacts/subkey/.
- echo -n "Subkey version = "
- ./artifacts/subkey/subkey --version |
- sed -n -r 's/^subkey ([0-9.]+.*)/\1/p' |
+ sed -n -E 's/^subkey ([0-9.]+.*)/\1/p' |
tee ./artifacts/subkey/VERSION;
- sha256sum ./artifacts/subkey/subkey | tee ./artifacts/subkey/subkey.sha256
- cp -r .maintain/docker/subkey.Dockerfile ./artifacts/subkey/
- sccache -s
+build-macos-subkey:
+ <<: *build-subkey
+ only:
+ - master
+ - /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
+ tags:
+ - osx
+
build-rust-doc-release:
stage: build
<<: *docker-env
@@ -352,57 +466,16 @@ build-rust-doc-release:
<<: *build-only
script:
- rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds
- - BUILD_DUMMY_WASM_BINARY=1 RUSTDOCFLAGS="--html-in-header $(pwd)/.maintain/rustdoc-header.html" time cargo +nightly doc --release --all --verbose
+ - BUILD_DUMMY_WASM_BINARY=1 RUSTDOCFLAGS="--html-in-header $(pwd)/.maintain/rustdoc-header.html"
+ time cargo +nightly doc --release --all --verbose
- cp -R ./target/doc ./crate-docs
- echo "" > ./crate-docs/index.html
- sccache -s
-check_warnings:
- stage: build
- <<: *docker-env
- except:
- variables:
- - $DEPLOY_TAG
- variables:
- GIT_STRATEGY: none
- dependencies:
- - test-linux-stable
- script:
- - if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then
- cat ${CI_COMMIT_SHORT_SHA}_warnings.log;
- exit 1;
- else
- echo "___No warnings___";
- fi
- allow_failure: true
-
-# Nightly check whether Polkadot 'master' branch builds.
-check_polkadot:
- stage: build
- <<: *docker-env
- allow_failure: true
- only:
- - master
- - schedules
- script:
- - SUBSTRATE_PATH=$(pwd)
- # Clone the current Polkadot master branch into ./polkadot.
- - git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git
- - cd polkadot
- # Make sure we override the crates in native and wasm build
- - mkdir .cargo
- - echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config
- - mkdir -p target/debug/wbuild/.cargo
- - echo "paths = [ \"$SUBSTRATE_PATH\" ]" > target/debug/wbuild/.cargo/config
- # package, others are updated along the way.
- - cargo update
- # Check whether Polkadot 'master' branch builds with this Substrate commit.
- - time cargo check
- - cd -
- - sccache -s
+#### stage: post-build-test
trigger-contracts-ci:
- stage: publish
+ stage: post-build-test
needs:
- job: build-linux-substrate
artifacts: false
@@ -418,12 +491,19 @@ trigger-contracts-ci:
#### stage: publish
-.publish-docker-release: &publish-docker-release
+.build-push-docker-image: &build-push-docker-image
<<: *build-only
<<: *kubernetes-build
image: docker:stable
services:
- docker:dind
+ variables: &docker-build-vars
+ <<: *default-vars
+ DOCKER_HOST: tcp://localhost:2375
+ DOCKER_DRIVER: overlay2
+ GIT_STRATEGY: none
+ DOCKERFILE: $PRODUCT.Dockerfile
+ CONTAINER_IMAGE: parity/$PRODUCT
before_script:
- test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity"
|| ( echo "no docker credentials provided"; exit 1 )
@@ -445,18 +525,15 @@ trigger-contracts-ci:
publish-docker-substrate:
stage: publish
- <<: *publish-docker-release
+ <<: *build-push-docker-image
# collect VERSION artifact here to pass it on to kubernetes
<<: *collect-artifacts
- dependencies:
- - build-linux-substrate
+ needs:
+ - job: build-linux-substrate
+ artifacts: true
variables:
- DOCKER_HOST: tcp://localhost:2375
- DOCKER_DRIVER: overlay2
- GIT_STRATEGY: none
+ <<: *docker-build-vars
PRODUCT: substrate
- DOCKERFILE: $PRODUCT.Dockerfile
- CONTAINER_IMAGE: parity/$PRODUCT
after_script:
- docker logout
# only VERSION information is needed for the deployment
@@ -464,16 +541,13 @@ publish-docker-substrate:
publish-docker-subkey:
stage: publish
- <<: *publish-docker-release
- dependencies:
- - build-linux-subkey
+ <<: *build-push-docker-image
+ needs:
+ - job: build-linux-subkey
+ artifacts: true
variables:
- DOCKER_HOST: tcp://localhost:2375
- DOCKER_DRIVER: overlay2
- GIT_STRATEGY: none
+ <<: *docker-build-vars
PRODUCT: subkey
- DOCKERFILE: $PRODUCT.Dockerfile
- CONTAINER_IMAGE: parity/$PRODUCT
after_script:
- docker logout
@@ -481,10 +555,12 @@ publish-s3-release:
stage: publish
<<: *build-only
<<: *kubernetes-build
- dependencies:
- - build-linux-substrate
- - build-linux-subkey
- image: parity/awscli:latest
+ needs:
+ - job: build-linux-substrate
+ artifacts: true
+ - job: build-linux-subkey
+ artifacts: true
+ image: paritytech/awscli:latest
variables:
GIT_STRATEGY: none
BUCKET: "releases.parity.io"
@@ -500,11 +576,11 @@ publish-s3-release:
publish-s3-doc:
stage: publish
- image: parity/awscli:latest
+ image: paritytech/awscli:latest
allow_failure: true
- dependencies:
- - build-rust-doc-release
- cache: {}
+ needs:
+ - job: build-rust-doc-release
+ artifacts: true
<<: *build-only
<<: *kubernetes-build
variables:
@@ -522,74 +598,32 @@ publish-s3-doc:
- aws s3 ls s3://${BUCKET}/${PREFIX}/
--human-readable --summarize
-
-publish-gh-doc:
- stage: publish
- image: parity/tools:latest
- allow_failure: true
- dependencies:
- - build-rust-doc-release
- cache: {}
- <<: *build-only
- <<: *kubernetes-build
- variables:
- GIT_STRATEGY: none
- GITHUB_API: "https://api.github.com"
- script:
- - test -r ./crate-docs/index.html || (
- echo "./crate-docs/index.html not present, build:rust:doc:release job not complete";
- exit 1
- )
- - test "${GITHUB_USER}" -a "${GITHUB_EMAIL}" -a "${GITHUB_TOKEN}" || (
- echo "environment variables for github insufficient";
- exit 1
- )
- - |
- cat > ${HOME}/.gitconfig <&1 | sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g"
- after_script:
- - rm -vrf ${HOME}/.gitconfig
-
publish-draft-release:
stage: publish
- image: parity/tools:latest
+ image: paritytech/tools:latest
only:
- - tags
+ - /^ci-release-.*$/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- ./.maintain/gitlab/publish_draft_release.sh
- interruptible: true
allow_failure: true
publish-to-crates-io:
stage: publish
<<: *docker-env
only:
- - tags
+ - /^ci-release-.*$/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF}
- interruptible: true
allow_failure: true
.deploy-template: &deploy
stage: kubernetes
when: manual
retry: 1
- image: parity/kubetools:latest
+ image: paritytech/kubetools:latest
<<: *build-only
tags:
# this is the runner that is used to deploy it
@@ -603,18 +637,18 @@ publish-to-crates-io:
- echo "Substrate version = ${DEPLOY_TAG}"
# or use helm to render the template
- helm template
- --values ./.maintain/kubernetes/values.yaml
- --set image.tag=${DEPLOY_TAG}
- --set validator.keys=${VALIDATOR_KEYS}
- ./.maintain/kubernetes | kubectl apply -f - --dry-run=false
+ --values ./.maintain/kubernetes/values.yaml
+ --set image.tag=${DEPLOY_TAG}
+ --set validator.keys=${VALIDATOR_KEYS}
+ ./.maintain/kubernetes | kubectl apply -f - --dry-run=false
- echo "# substrate namespace ${KUBE_NAMESPACE}"
- kubectl -n ${KUBE_NAMESPACE} get all
- echo "# substrate's nodes' external ip addresses:"
- kubectl get nodes -l node=substrate
- -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range @.status.addresses[?(@.type=="ExternalIP")]}{.address}{"\n"}{end}'
+ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range @.status.addresses[?(@.type=="ExternalIP")]}{.address}{"\n"}{end}'
- echo "# substrate' nodes"
- kubectl -n ${KUBE_NAMESPACE} get pods
- -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.nodeName}{"\n"}{end}'
+ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.nodeName}{"\n"}{end}'
- echo "# wait for the rollout to complete"
- kubectl -n ${KUBE_NAMESPACE} rollout status statefulset/substrate
@@ -622,8 +656,9 @@ publish-to-crates-io:
.deploy-cibuild: &deploy-cibuild
<<: *deploy
- dependencies:
- - publish-docker-substrate
+ needs:
+ - job: publish-docker-substrate
+ artifacts: false
.deploy-tag: &deploy-tag
<<: *deploy
@@ -654,14 +689,16 @@ deploy-ue1-tag:
name: parity-prod-ue1
.validator-deploy: &validator-deploy
- # script will fail if there is no artifacts/substrate/VERSION
<<: *build-only
stage: flaming-fir
- dependencies:
- - build-linux-substrate
+ needs:
+ # script will fail if there is no artifacts/substrate/VERSION
+ - job: publish-docker-substrate
+ artifacts: true
image: parity/azure-ansible:v1
allow_failure: true
when: manual
+ interruptible: true
tags:
- linux-docker
@@ -669,14 +706,17 @@ validator 1 4:
<<: *validator-deploy
script:
- ./.maintain/flamingfir-deploy.sh flamingfir-validator1
+
validator 2 4:
<<: *validator-deploy
script:
- ./.maintain/flamingfir-deploy.sh flamingfir-validator2
+
validator 3 4:
<<: *validator-deploy
script:
- ./.maintain/flamingfir-deploy.sh flamingfir-validator3
+
validator 4 4:
<<: *validator-deploy
script:
diff --git a/.maintain/Dockerfile b/.maintain/Dockerfile
index 56bfc7a2cc48130b659ce7e0a5127d3119b59d12..21a41720f7d65ffd41a35cb1fa425e5999c9e289 100644
--- a/.maintain/Dockerfile
+++ b/.maintain/Dockerfile
@@ -20,7 +20,6 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH="$PATH:$HOME/.cargo/bin" && \
rustup toolchain install nightly && \
rustup target add wasm32-unknown-unknown --toolchain nightly && \
- rustup default nightly && \
rustup default stable && \
cargo build "--$PROFILE"
@@ -34,11 +33,16 @@ ARG PROFILE=release
RUN mv /usr/share/ca* /tmp && \
rm -rf /usr/share/* && \
mv /tmp/ca-certificates /usr/share/ && \
- mkdir -p /root/.local/share/Polkadot && \
- ln -s /root/.local/share/Polkadot /data && \
- useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate
+ useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate && \
+ mkdir -p /substrate/.local/share/substrate && \
+ chown -R substrate:substrate /substrate/.local && \
+ ln -s /substrate/.local/share/substrate /data
COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/subkey /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/node-rpc-client /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/node-template /usr/local/bin
+COPY --from=builder /substrate/target/$PROFILE/chain-spec-builder /usr/local/bin
# checks
RUN ldd /usr/local/bin/substrate && \
@@ -49,7 +53,7 @@ RUN rm -rf /usr/lib/python* && \
rm -rf /usr/bin /usr/sbin /usr/share/man
USER substrate
-EXPOSE 30333 9933 9944
+EXPOSE 30333 9933 9944 9615
VOLUME ["/data"]
CMD ["/usr/local/bin/substrate"]
diff --git a/.maintain/deny.toml b/.maintain/deny.toml
new file mode 100644
index 0000000000000000000000000000000000000000..8cc7635d5049be795e994b0ba740d9273b2f520f
--- /dev/null
+++ b/.maintain/deny.toml
@@ -0,0 +1,193 @@
+# This template contains all of the possible sections and their default values
+
+# Note that all fields that take a lint level have these possible values:
+# * deny - An error will be produced and the check will fail
+# * warn - A warning will be produced, but the check will not fail
+# * allow - No warning or error will be produced, though in some cases a note
+# will be
+
+# The values provided in this template are the default values that will be used
+# when any section or field is not specified in your own configuration
+
+# If 1 or more target triples (and optionally, target_features) are specified,
+# only the specified targets will be checked when running `cargo deny check`.
+# This means, if a particular package is only ever used as a target specific
+# dependency, such as, for example, the `nix` crate only being used via the
+# `target_family = "unix"` configuration, that only having windows targets in
+# this list would mean the nix crate, as well as any of its exclusive
+# dependencies not shared by any other crates, would be ignored, as the target
+# list here is effectively saying which targets you are building for.
+targets = [
+ # The triple can be any string, but only the target triples built in to
+ # rustc (as of 1.40) can be checked against actual config expressions
+ #{ triple = "x86_64-unknown-linux-musl" },
+ # You can also specify which target_features you promise are enabled for a
+ # particular target. target_features are currently not validated against
+ # the actual valid features supported by the target architecture.
+ #{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
+]
+
+# This section is considered when running `cargo deny check advisories`
+# More documentation for the advisories section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
+[advisories]
+# The path where the advisory database is cloned/fetched into
+db-path = "~/.cargo/advisory-db"
+# The url of the advisory database to use
+db-url = "https://github.com/rustsec/advisory-db"
+# The lint level for security vulnerabilities
+vulnerability = "deny"
+# The lint level for unmaintained crates
+unmaintained = "warn"
+# The lint level for crates that have been yanked from their source registry
+yanked = "warn"
+# The lint level for crates with security notices. Note that as of
+# 2019-12-17 there are no security notice advisories in
+# https://github.com/rustsec/advisory-db
+notice = "warn"
+# A list of advisory IDs to ignore. Note that ignored advisories will still
+# output a note when they are encountered.
+ignore = [
+ #"RUSTSEC-0000-0000",
+]
+# Threshold for security vulnerabilities, any vulnerability with a CVSS score
+# lower than the range specified will be ignored. Note that ignored advisories
+# will still output a note when they are encountered.
+# * None - CVSS Score 0.0
+# * Low - CVSS Score 0.1 - 3.9
+# * Medium - CVSS Score 4.0 - 6.9
+# * High - CVSS Score 7.0 - 8.9
+# * Critical - CVSS Score 9.0 - 10.0
+#severity-threshold =
+
+# This section is considered when running `cargo deny check licenses`
+# More documentation for the licenses section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
+[licenses]
+# The lint level for crates which do not have a detectable license
+unlicensed = "deny"
+# List of explictly allowed licenses
+# See https://spdx.org/licenses/ for list of possible licenses
+# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
+allow = [
+ #"MIT",
+ #"Apache-2.0",
+ #"Apache-2.0 WITH LLVM-exception",
+]
+# List of explictly disallowed licenses
+# See https://spdx.org/licenses/ for list of possible licenses
+# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
+deny = [
+ #"Nokia",
+]
+# Lint level for licenses considered copyleft
+copyleft = "allow"
+# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
+# * both - The license will be approved if it is both OSI-approved *AND* FSF
+# * either - The license will be approved if it is either OSI-approved *OR* FSF
+# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
+# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
+# * neither - This predicate is ignored and the default lint level is used
+allow-osi-fsf-free = "either"
+# Lint level used when no other predicates are matched
+# 1. License isn't in the allow or deny lists
+# 2. License isn't copyleft
+# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
+default = "deny"
+# The confidence threshold for detecting a license from license text.
+# The higher the value, the more closely the license text must be to the
+# canonical license text of a valid SPDX license file.
+# [possible values: any between 0.0 and 1.0].
+confidence-threshold = 0.9
+# Allow 1 or more licenses on a per-crate basis, so that particular licenses
+# aren't accepted for every possible crate as with the normal allow list
+exceptions = [
+ # Each entry is the crate and version constraint, and its specific allow
+ # list
+ #{ allow = ["Zlib"], name = "adler32", version = "*" },
+]
+
+# Some crates don't have (easily) machine readable licensing information,
+# adding a clarification entry for it allows you to manually specify the
+# licensing information
+[[licenses.clarify]]
+# The name of the crate the clarification applies to
+name = "ring"
+# THe optional version constraint for the crate
+#version = "*"
+# The SPDX expression for the license requirements of the crate
+expression = "OpenSSL"
+# One or more files in the crate's source used as the "source of truth" for
+# the license expression. If the contents match, the clarification will be used
+# when running the license check, otherwise the clarification will be ignored
+# and the crate will be checked normally, which may produce warnings or errors
+# depending on the rest of your configuration
+license-files = [
+ # Each entry is a crate relative path, and the (opaque) hash of its contents
+ { path = "LICENSE", hash = 0xbd0eed23 }
+]
+[[licenses.clarify]]
+name = "webpki"
+expression = "ISC"
+license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]
+
+[licenses.private]
+# If true, ignores workspace crates that aren't published, or are only
+# published to private registries
+ignore = false
+# One or more private registries that you might publish crates to, if a crate
+# is only published to private registries, and ignore is true, the crate will
+# not have its license(s) checked
+registries = [
+ #"https://sekretz.com/registry
+]
+
+# This section is considered when running `cargo deny check bans`.
+# More documentation about the 'bans' section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
+[bans]
+# Lint level for when multiple versions of the same crate are detected
+multiple-versions = "warn"
+# The graph highlighting used when creating dotgraphs for crates
+# with multiple versions
+# * lowest-version - The path to the lowest versioned duplicate is highlighted
+# * simplest-path - The path to the version with the fewest edges is highlighted
+# * all - Both lowest-version and simplest-path are used
+highlight = "lowest-version"
+# List of crates that are allowed. Use with care!
+allow = [
+ #{ name = "ansi_term", version = "=0.11.0" },
+]
+# List of crates to deny
+deny = [
+ { name = "parity-util-mem", version = "<0.6" }
+ # Each entry the name of a crate and a version range. If version is
+ # not specified, all versions will be matched.
+]
+# Certain crates/versions that will be skipped when doing duplicate detection.
+skip = [
+ #{ name = "ansi_term", version = "=0.11.0" },
+]
+# Similarly to `skip` allows you to skip certain crates during duplicate
+# detection. Unlike skip, it also includes the entire tree of transitive
+# dependencies starting at the specified crate, up to a certain depth, which is
+# by default infinite
+skip-tree = [
+ #{ name = "ansi_term", version = "=0.11.0", depth = 20 },
+]
+
+# This section is considered when running `cargo deny check sources`.
+# More documentation about the 'sources' section can be found here:
+# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
+[sources]
+# Lint level for what to happen when a crate from a crate registry that is not
+# in the allow list is encountered
+unknown-registry = "deny"
+# Lint level for what to happen when a crate from a git repository that is not
+# in the allow list is encountered
+unknown-git = "warn"
+# List of URLs for allowed crate registries. Defaults to the crates.io index
+# if not specified. If it is specified but empty, no registries are allowed.
+allow-registry = ["https://github.com/rust-lang/crates.io-index"]
+# List of URLs for allowed Git repositories
+allow-git = []
diff --git a/.maintain/github/check_gitlab_pipeline.sh b/.maintain/github/check_gitlab_pipeline.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4e02dfdb2a428cda4a4a6dc224d69b383693e4ce
--- /dev/null
+++ b/.maintain/github/check_gitlab_pipeline.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+SUBSTRATE_API_BASEURL="https://gitlab.parity.io/api/v4/projects/145"
+
+TAG_NAME=$(echo "$GITHUB_REF" | sed -E 's_refs/tags/(.*)_\1_')
+PIPELINE_ID=$(curl -s $SUBSTRATE_API_BASEURL/pipelines | jq -r "map(select(.ref==\"$TAG_NAME\")) | .[0] | .id")
+if [ "$PIPELINE_ID" == "null" ]; then
+ echo "[!] Pipeline for $TAG_NAME not found. Exiting."
+ exit 1
+fi
+
+echo "[+] Pipeline path: https://gitlab.parity.io/parity/substrate/pipelines/$PIPELINE_ID"
+
+# 130 minute job max
+for (( c=0; c < 180; c++ )); do
+ out=$(curl -s "$SUBSTRATE_API_BASEURL/pipelines/$PIPELINE_ID" | jq -r .status)
+ case $out in
+ "success")
+ echo "[+] Pipeline $PIPELINE_ID for $TAG_NAME succeeded!"
+ exit 0
+ ;;
+ "failed")
+ echo "[!] Pipeline $PIPELINE_ID for $TAG_NAME failed. Cannot proceed. Check job output on gitlab!"
+ exit 1
+ ;;
+ "cancelled")
+ echo "[!] Pipeline $PIPELINE_ID for $TAG_NAME was cancelled. Cannot proceed!"
+ exit 1
+ ;;
+ "running")
+ echo "[-] Pipeline $PIPELINE_ID for $TAG_NAME still in progress..."
+ esac
+ sleep 60
+done
+# If we reach here, we timed out after 30 minutes
+echo "[!] Pipeline $PIPELINE_ID for $TAG_NAME timed out! Cannot proceed"
+echo "::set-output name=pipeline_status::timedout"
+exit 1
diff --git a/.maintain/gitlab/check_line_width.sh b/.maintain/gitlab/check_line_width.sh
index f382d630b183c6396115cc1e76e77dfab4c20047..85092260b6a649187de6d03c0936cb0d54fc751e 100755
--- a/.maintain/gitlab/check_line_width.sh
+++ b/.maintain/gitlab/check_line_width.sh
@@ -2,47 +2,49 @@
#
# check if line width of rust source files is not beyond x characters
#
+set -e
+set -o pipefail
+BASE_ORIGIN="origin"
+BASE_BRANCH_NAME="master"
+LINE_WIDTH="120"
+GOOD_LINE_WIDTH="100"
+BASE_BRANCH="${BASE_ORIGIN}/${BASE_BRANCH_NAME}"
-BASE_BRANCH="origin/master"
-LINE_WIDTH="121"
-GOOD_LINE_WIDTH="101"
-
-
-git diff --name-only ${BASE_BRANCH}...${CI_COMMIT_SHA} \*.rs | ( while read file
+git fetch ${BASE_ORIGIN} ${BASE_BRANCH_NAME} --depth 1
+git diff --name-only ${BASE_BRANCH} -- \*.rs | ( while read file
do
if [ ! -f ${file} ];
then
echo "Skipping removed file."
- elif git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} | grep -q "^+.\{${LINE_WIDTH}\}"
+ elif git diff ${BASE_BRANCH} -- ${file} | grep -q "^+.\{$(( $LINE_WIDTH + 1 ))\}"
then
if [ -z "${FAIL}" ]
then
- echo "| warning!"
- echo "| Lines should not be longer than 120 characters."
+ echo "| error!"
+ echo "| Lines must not be longer than ${LINE_WIDTH} characters."
echo "| "
echo "| see more https://wiki.parity.io/Substrate-Style-Guide"
echo "|"
FAIL="true"
fi
echo "| file: ${file}"
- git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} \
- | grep -n "^+.\{${LINE_WIDTH}\}"
+ git diff ${BASE_BRANCH} -- ${file} \
+ | grep -n "^+.\{$(( $LINE_WIDTH + 1))\}"
echo "|"
else
- if git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} | grep -q "^+.\{${GOOD_LINE_WIDTH}\}"
+ if git diff ${BASE_BRANCH} -- ${file} | grep -q "^+.\{$(( $GOOD_LINE_WIDTH + 1 ))\}"
then
if [ -z "${FAIL}" ]
then
echo "| warning!"
- echo "| Lines should be longer than 100 characters only in exceptional circumstances!"
+ echo "| Lines should be longer than ${GOOD_LINE_WIDTH} characters only in exceptional circumstances!"
echo "| "
echo "| see more https://wiki.parity.io/Substrate-Style-Guide"
echo "|"
fi
echo "| file: ${file}"
- git diff ${BASE_BRANCH}...${CI_COMMIT_SHA} ${file} \
- | grep -n "^+.\{${LINE_WIDTH}\}"
+ git diff ${BASE_BRANCH} -- ${file} | grep -n "^+.\{$(( $GOOD_LINE_WIDTH + 1 ))\}"
echo "|"
fi
fi
diff --git a/.maintain/gitlab/check_polkadot_companion_build.sh b/.maintain/gitlab/check_polkadot_companion_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..281fa8e1e8d4621a253fb4bdf0815a1859564dcb
--- /dev/null
+++ b/.maintain/gitlab/check_polkadot_companion_build.sh
@@ -0,0 +1,119 @@
+#!/bin/sh
+#
+# check if a pr is compatible with polkadot companion pr or master if not
+# available
+#
+# to override one that was just mentioned mark companion pr in the body of the
+# polkadot pr like
+#
+# polkadot companion: paritytech/polkadot#567
+#
+
+
+github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls"
+# use github api v3 in order to access the data without authentication
+github_header="Authorization: token ${GITHUB_PR_TOKEN}"
+
+boldprint () { printf "|\n| \033[1m${@}\033[0m\n|\n" ; }
+boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; done; printf "|\n" ; }
+
+
+
+boldcat <<-EOT
+
+
+check_polkadot_companion_build
+==============================
+
+this job checks if there is a string in the description of the pr like
+
+polkadot companion: paritytech/polkadot#567
+
+
+it will then run cargo check from this polkadot's branch with substrate code
+from this pull request. in absence of that string it will check if a polkadot
+pr is mentioned and will use the last one instead. if none of the above can be
+found it will check if polkadot has a branch of the exact same name than the
+substrate's branch. if it can't find anything, it will uses master instead
+
+
+EOT
+
+# Set the user name and email to make merging work
+git config --global user.name 'CI system'
+git config --global user.email '<>'
+
+SUBSTRATE_PATH=$(pwd)
+
+# Merge master into our branch before building Polkadot to make sure we don't miss
+# any commits that are required by Polkadot.
+git merge origin/master
+
+# Clone the current Polkadot master branch into ./polkadot.
+git clone --depth 1 https://github.com/paritytech/polkadot.git
+
+cd polkadot
+
+# either it's a pull request then check for a companion otherwise use
+# polkadot:master
+if expr match "${CI_COMMIT_REF_NAME}" '^[0-9]\+$' >/dev/null
+then
+ boldprint "this is pull request no ${CI_COMMIT_REF_NAME}"
+
+ pr_data_file="$(mktemp)"
+ # get the last reference to a pr in polkadot
+ curl -sSL -H "${github_header}" -o "${pr_data_file}" \
+ "${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME}"
+
+ pr_body="$(sed -n -r 's/^[[:space:]]+"body": (".*")[^"]+$/\1/p' "${pr_data_file}")"
+
+ pr_companion="$(echo "${pr_body}" | sed -n -r \
+ -e 's;^.*polkadot companion: paritytech/polkadot#([0-9]+).*$;\1;p' \
+ -e 's;^.*polkadot companion: https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+
+ if [ -z "${pr_companion}" ]
+ then
+ pr_companion="$(echo "${pr_body}" | sed -n -r \
+ -e 's;^.*paritytech/polkadot/#([0-9]+).*$;\1;p' \
+ -e 's;^.*https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+ fi
+
+ if [ "${pr_companion}" ]
+ then
+ boldprint "companion pr specified/detected: #${pr_companion}"
+ git fetch origin refs/pull/${pr_companion}/head:pr/${pr_companion}
+ git checkout pr/${pr_companion}
+ git merge origin/master
+ else
+ pr_ref="$(grep -Po '"ref"\s*:\s*"\K(?!master)[^"]*' "${pr_data_file}")"
+ if git fetch origin "$pr_ref":branch/"$pr_ref" 2>/dev/null
+ then
+ boldprint "companion branch detected: $pr_ref"
+ git checkout branch/"$pr_ref"
+ git merge origin/master
+ else
+ boldprint "no companion branch found - building polkadot:master"
+ fi
+ fi
+ rm -f "${pr_data_file}"
+else
+ boldprint "this is not a pull request - building polkadot:master"
+fi
+
+# Make sure we override the crates in native and wasm build
+# patching the git path as described in the link below did not test correctly
+# https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html
+mkdir .cargo
+echo "paths = [ \"$SUBSTRATE_PATH\" ]" > .cargo/config
+
+mkdir -p target/debug/wbuild/.cargo
+cp .cargo/config target/debug/wbuild/.cargo/config
+
+# package, others are updated along the way.
+cargo update
+
+# Test Polkadot pr or master branch with this Substrate commit.
+time cargo test --all --release --verbose
+
diff --git a/.maintain/gitlab/check_polkadot_companion_status.sh b/.maintain/gitlab/check_polkadot_companion_status.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b781831055b6d500d133425fe7c0860a807938cb
--- /dev/null
+++ b/.maintain/gitlab/check_polkadot_companion_status.sh
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# check for a polkadot companion pr and ensure it has approvals and is
+# mergeable
+#
+
+github_api_substrate_pull_url="https://api.github.com/repos/paritytech/substrate/pulls"
+github_api_polkadot_pull_url="https://api.github.com/repos/paritytech/polkadot/pulls"
+# use github api v3 in order to access the data without authentication
+github_header="Authorization: token ${GITHUB_PR_TOKEN}"
+
+boldprint () { printf "|\n| \033[1m${@}\033[0m\n|\n" ; }
+boldcat () { printf "|\n"; while read l; do printf "| \033[1m${l}\033[0m\n"; done; printf "|\n" ; }
+
+
+
+boldcat <<-EOT
+
+
+check_polkadot_companion_status
+===============================
+
+this job checks if there is a string in the description of the pr like
+
+polkadot companion: paritytech/polkadot#567
+
+or any other polkadot pr is mentioned in this pr's description and checks its
+status.
+
+
+EOT
+
+
+if ! [ "${CI_COMMIT_REF_NAME}" -gt 0 2>/dev/null ]
+then
+ boldprint "this doesn't seem to be a pull request"
+ exit 1
+fi
+
+boldprint "this is pull request no ${CI_COMMIT_REF_NAME}"
+
+pr_body="$(curl -H "${github_header}" -s ${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME} \
+ | sed -n -r 's/^[[:space:]]+"body": (".*")[^"]+$/\1/p')"
+
+# get companion if explicitly specified
+pr_companion="$(echo "${pr_body}" | sed -n -r \
+ -e 's;^.*polkadot companion: paritytech/polkadot#([0-9]+).*$;\1;p' \
+ -e 's;^.*polkadot companion: https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+
+# get companion mentioned in the description
+if [ -z "${pr_companion}" ]
+then
+ pr_companion="$(echo "${pr_body}" | sed -n -r \
+ 's;^.*https://github.com/paritytech/polkadot/pull/([0-9]+).*$;\1;p' \
+ | tail -n 1)"
+fi
+
+if [ -z "${pr_companion}" ]
+then
+ boldprint "no companion pr found"
+ exit 0
+fi
+
+boldprint "companion pr: #${pr_companion}"
+
+# check the status of that pull request - needs to be
+# mergable and approved
+
+curl -H "${github_header}" -sS -o companion_pr.json \
+ ${github_api_polkadot_pull_url}/${pr_companion}
+
+if jq -e .merged < companion_pr.json >/dev/null
+then
+ boldprint "polkadot pr #${pr_companion} already merged"
+ exit 0
+fi
+
+if jq -e '.mergeable' < companion_pr.json >/dev/null
+then
+ boldprint "polkadot pr #${pr_companion} mergeable"
+else
+ boldprint "polkadot pr #${pr_companion} not mergeable"
+ exit 1
+fi
+
+curl -H "${github_header}" -sS -o companion_pr_reviews.json \
+ ${github_api_polkadot_pull_url}/${pr_companion}/reviews
+
+if [ -n "$(jq -r -e '.[].state | select(. == "CHANGES_REQUESTED")' < companion_pr_reviews.json)" ] && \
+ [ -z "$(jq -r -e '.[].state | select(. == "APPROVED")' < companion_pr_reviews.json)" ]
+then
+ boldprint "polkadot pr #${pr_companion} not APPROVED"
+ exit 1
+fi
+
+boldprint "polkadot pr #${pr_companion} state APPROVED"
+exit 0
+
+
diff --git a/.maintain/gitlab/check_runtime.sh b/.maintain/gitlab/check_runtime.sh
index 8c0720843803b61e2e2c71649c531f3d858eb57b..5b7e25e3afc4eabef01d984047a98d675ab09757 100755
--- a/.maintain/gitlab/check_runtime.sh
+++ b/.maintain/gitlab/check_runtime.sh
@@ -30,8 +30,11 @@ github_label () {
boldprint "latest 10 commits of ${CI_COMMIT_REF_NAME}"
git log --graph --oneline --decorate=short -n 10
-boldprint "make sure the master branch is available in shallow clones"
+boldprint "make sure the master branch and release tag are available in shallow clones"
git fetch --depth=${GIT_DEPTH:-100} origin master
+git fetch --depth=${GIT_DEPTH:-100} origin release
+git tag -f release FETCH_HEAD
+git log -n1 release
boldprint "check if the wasm sources changed"
@@ -54,9 +57,9 @@ fi
# consensus-critical logic that has changed. the runtime wasm blobs must be
# rebuilt.
-add_spec_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
+add_spec_version="$(git diff tags/release...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
| sed -n -r "s/^\+[[:space:]]+spec_version: +([0-9]+),$/\1/p")"
-sub_spec_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
+sub_spec_version="$(git diff tags/release...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
| sed -n -r "s/^\-[[:space:]]+spec_version: +([0-9]+),$/\1/p")"
@@ -79,9 +82,9 @@ else
# check for impl_version updates: if only the impl versions changed, we assume
# there is no consensus-critical logic that has changed.
- add_impl_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
+ add_impl_version="$(git diff tags/release...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
| sed -n -r 's/^\+[[:space:]]+impl_version: +([0-9]+),$/\1/p')"
- sub_impl_version="$(git diff origin/master...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
+ sub_impl_version="$(git diff tags/release...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
| sed -n -r 's/^\-[[:space:]]+impl_version: +([0-9]+),$/\1/p')"
diff --git a/.maintain/gitlab/generate_changelog.sh b/.maintain/gitlab/generate_changelog.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ba2a507e4cac694f918aa2c88cf1585991faa373
--- /dev/null
+++ b/.maintain/gitlab/generate_changelog.sh
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+
+# shellcheck source=lib.sh
+source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
+
+version="$2"
+last_version="$1"
+
+all_changes="$(sanitised_git_logs "$last_version" "$version")"
+runtime_changes=""
+api_changes=""
+client_changes=""
+changes=""
+
+while IFS= read -r line; do
+ pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/')
+
+ # Skip if the PR has the silent label - this allows us to skip a few requests
+ if has_label 'paritytech/substrate' "$pr_id" 'B0-silent'; then
+ continue
+ fi
+ if has_label 'paritytech/substrate' "$pr_id" 'B1-runtimenoteworthy'; then
+ runtime_changes="$runtime_changes
+$line"
+ fi
+ if has_label 'paritytech/substrate' "$pr_id" 'B1-clientnoteworthy'; then
+ client_changes="$client_changes
+$line"
+ fi
+ if has_label 'paritytech/substrate' "$pr_id" 'B1-apinoteworthy' ; then
+ api_changes="$api_changes
+$line"
+ continue
+ fi
+done <<< "$all_changes"
+
+# Make the substrate section if there are any substrate changes
+if [ -n "$runtime_changes" ] ||
+ [ -n "$api_changes" ] ||
+ [ -n "$client_changes" ]; then
+ changes=$(cat << EOF
+Substrate changes
+-----------------
+
+EOF
+)
+ if [ -n "$runtime_changes" ]; then
+ changes="$changes
+
+Runtime
+-------
+$runtime_changes"
+ fi
+ if [ -n "$client_changes" ]; then
+ changes="$changes
+
+Client
+------
+$client_changes"
+ fi
+ if [ -n "$api_changes" ]; then
+ changes="$changes
+
+API
+---
+$api_changes"
+ fi
+ release_text="$release_text
+
+$changes"
+fi
+
+echo "$changes"
diff --git a/.maintain/gitlab/lib.sh b/.maintain/gitlab/lib.sh
index bc0e06a6d46c4e7c407bef6998accab50586f366..ecc9a5f54288cd4636a05cb7f2a2d0535e40ebe9 100755
--- a/.maintain/gitlab/lib.sh
+++ b/.maintain/gitlab/lib.sh
@@ -14,6 +14,26 @@ sanitised_git_logs(){
sed 's/^/* /g'
}
+# Returns the last published release on github
+# Note: we can't just use /latest because that ignores prereleases
+# repo: 'organization/repo'
+# Usage: last_github_release "$repo"
+last_github_release(){
+ i=0
+ # Iterate over releases until we find the last release that's not just a draft
+ while [ $i -lt 29 ]; do
+ out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$1/releases" | jq ".[$i]")
+ echo "$out"
+ # Ugh when echoing to jq, we need to translate newlines into spaces :/
+ if [ "$(echo "$out" | tr '\r\n' ' ' | jq '.draft')" = "false" ]; then
+ echo "$out" | tr '\r\n' ' ' | jq '.tag_name'
+ return
+ else
+ i=$((i + 1))
+ fi
+ done
+}
+
# Checks whether a tag on github has been verified
# repo: 'organization/repo'
# tagver: 'v1.2.3'
diff --git a/.maintain/gitlab/publish_draft_release.sh b/.maintain/gitlab/publish_draft_release.sh
index 8566827a0992087b9096f4ab1aa432ed24bb38da..c5813718a69f27636b2729d8bc2cc7fbf05561fa 100755
--- a/.maintain/gitlab/publish_draft_release.sh
+++ b/.maintain/gitlab/publish_draft_release.sh
@@ -3,43 +3,13 @@
# shellcheck source=lib.sh
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
-# Substrate labels for PRs we want to include in the release notes
-labels=(
- 'B1-runtimenoteworthy'
- 'B1-clientnoteworthy'
- 'B1-apinoteworthy'
-)
-
version="$CI_COMMIT_TAG"
-last_version=$(git tag -l | sort -V | grep -B 1 -x "$version" | head -n 1)
-echo "[+] Version: $version; Previous version: $last_version"
-
-all_changes="$(sanitised_git_logs "$last_version" "$version")"
-labelled_changes=""
-echo "[+] Iterating through $(wc -l <<< "$all_changes") changes to find labelled PRs"
-while IFS= read -r line; do
- pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/')
-
- # Skip if the PR has the silent label - this allows us to skip a few requests
- if has_label 'paritytech/substrate' "$pr_id" 'B0-silent'; then
- continue
- fi
- for label in "${labels[@]}"; do
- if has_label 'paritytech/substrate' "$pr_id" "$label"; then
- labelled_changes="$labelled_changes
-$line"
- fi
- done
-done <<< "$all_changes"
+# Note that this is not the last *tagged* version, but the last *published* version
+last_version=$(last_github_release 'paritytech/substrate')
-release_text="Substrate $version
------------------
-$labelled_changes"
+release_text="$(./generate_release_text.sh "$last_version" "$version")"
-echo "[+] Release text generated: "
-echo "$release_text"
-exit
echo "[+] Pushing release to github"
# Create release on github
release_name="Substrate $version"
@@ -79,6 +49,6 @@ formatted_msg_body=$(cat <= 100
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ message: 'The node {{ $labels.instance }} has a CPU usage higher than 100% for more than 5 minutes'
+
+ ##############################################################################
+ # Block production
+ ##############################################################################
+
+ - alert: LowNumberOfNewBlocks
+ annotations:
+ message: 'Less than one new block per minute on instance {{ $labels.instance }}.'
+ expr: increase(polkadot_block_height{status="best"}[1m]) < 1
+ for: 3m
+ labels:
+ severity: warning
+ - alert: LowNumberOfNewBlocks
+ annotations:
+ message: 'Less than one new block per minute on instance {{ $labels.instance }}.'
+ expr: increase(polkadot_block_height{status="best"}[1m]) < 1
+ for: 10m
+ labels:
+ severity: critical
+
+ ##############################################################################
+ # Block finalization
+ ##############################################################################
+
+ - alert: BlockFinalizationSlow
+ expr: increase(polkadot_block_height{status="finalized"}[1m]) < 1
+ for: 3m
+ labels:
+ severity: warning
+ annotations:
+ message: 'Finalized block on instance {{ $labels.instance }} increases by less than 1 per minute.'
+ - alert: BlockFinalizationSlow
+ expr: increase(polkadot_block_height{status="finalized"}[1m]) < 1
+ for: 10m
+ labels:
+ severity: critical
+ annotations:
+ message: 'Finalized block on instance {{ $labels.instance }} increases by less than 1 per minute.'
+ - alert: BlockFinalizationLaggingBehind
+ # Under the assumption of an average block production of 6 seconds,
+ # "best" and "finalized" being more than 10 blocks apart would imply
+ # more than a 1 minute delay between block production and finalization.
+ expr: (polkadot_block_height_number{status="best"} - ignoring(status) polkadot_block_height_number{status="finalized"}) > 10
+ for: 8m
+ labels:
+ severity: critical
+ annotations:
+ message: "Block finalization on instance {{ $labels.instance }} is behind block production by {{ $value }} for more than 8m"
+
+ ##############################################################################
+ # Transaction queue
+ ##############################################################################
+
+ - alert: TransactionQueueSize
+ expr: polkadot_sub_txpool_validations_scheduled - polkadot_sub_txpool_validations_finished > 10
+ for: 10m
+ labels:
+ severity: warning
+ annotations:
+ message: 'The node {{ $labels.instance }} has more than 10 transactions in the queue for more than 10 minutes'
+ - alert: TransactionQueueSize
+ expr: polkadot_sub_txpool_validations_scheduled - polkadot_sub_txpool_validations_finished > 10
+ for: 30m
+ labels:
+ severity: critical
+ annotations:
+ message: 'The node {{ $labels.instance }} has more than 10 transactions in the queue for more than 30 minutes'
+
+ ##############################################################################
+ # Networking
+ ##############################################################################
+
+ - alert: LowNumberOfPeers
+ expr: polkadot_sub_libp2p_peers_count < 3
+ for: 3m
+ labels:
+ severity: warning
+ annotations:
+ message: 'The node {{ $labels.instance }} has less than 3 peers for more than 3 minutes'
+ - alert: LowNumberOfPeers
+ expr: polkadot_sub_libp2p_peers_count < 3
+ for: 15m
+ labels:
+ severity: critical
+ annotations:
+ message: 'The node {{ $labels.instance }} has less than 3 peers for more than 15 minutes'
+
+ ##############################################################################
+ # Others
+ ##############################################################################
+
+ - alert: AuthorityDiscoveryHighDiscoveryFailure
+ expr: polkadot_authority_discovery_handle_value_found_event_failure / ignoring(name) polkadot_authority_discovery_dht_event_received{name="value_found"} > 0.5
+ for: 2h
+ labels:
+ severity: warning
+ annotations:
+ message: "Authority discovery on node {{ $labels.instance }} fails to process more than 50 % of the values found on the DHT."
diff --git a/.maintain/monitoring/grafana-dashboards/README_dashboard.md b/.maintain/monitoring/grafana-dashboards/README_dashboard.md
new file mode 100644
index 0000000000000000000000000000000000000000..37bebc6f8eaae0e9430a612d7bc9676ac666e648
--- /dev/null
+++ b/.maintain/monitoring/grafana-dashboards/README_dashboard.md
@@ -0,0 +1,14 @@
+## Substrate Dashboard
+
+Shared templated Grafana dashboards.
+
+To import the dashboards follow the [Grafana
+documentation](https://grafana.com/docs/grafana/latest/reference/export_import/).
+You can see an example setup [here](../../../.maintain/sentry-node).
+
+#### Required labels on Prometheus metrics
+
+- `instance` referring to a single scrape target (see [Prometheus docs for
+ details](https://prometheus.io/docs/concepts/jobs_instances/)).
+
+- `network` referring to the Blockchain network e.g. Kusama.
diff --git a/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json b/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json
new file mode 100644
index 0000000000000000000000000000000000000000..629b22617b22a970eb1f439179f62711d1bac9b4
--- /dev/null
+++ b/.maintain/monitoring/grafana-dashboards/substrate-dashboard.json
@@ -0,0 +1,1650 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "$$hashKey": "object:15",
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "iteration": 1586424254170,
+ "links": [
+ {
+ "icon": "external link",
+ "tags": [],
+ "targetBlank": true,
+ "title": "With love from ColmenaLabs",
+ "tooltip": "",
+ "type": "link",
+ "url": "https://colmenalabs.org"
+ },
+ {
+ "icon": "external link",
+ "tags": [],
+ "targetBlank": true,
+ "title": "Polkastats.io",
+ "tooltip": "",
+ "type": "link",
+ "url": "https://polkastats.io"
+ }
+ ],
+ "panels": [
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 0,
+ "y": 0
+ },
+ "hiddenSeries": false,
+ "id": 8,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "rate([[metric_namespace]]_block_height{status=\"finalized\",instance=\"[[instance]]\",network=\"[[network]]\"}[10m])/rate([[metric_namespace]]_block_height{status=\"finalized\",instance=\"[[instance]]\",network=\"[[network]]\"}[1m])",
+ "intervalFactor": 1,
+ "legendFormat": "rate[10m] / rate[1m]",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Relative Block Production Speed",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 6,
+ "y": 0
+ },
+ "hiddenSeries": false,
+ "id": 15,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_peers_count{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Peers count",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "cacheTimeout": null,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 12,
+ "y": 0
+ },
+ "hiddenSeries": false,
+ "id": 17,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pluginVersion": "6.4.1",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "scalar([[metric_namespace]]_block_height{status=\"best\",instance=\"[[instance]]\",network=\"[[network]]\"})-scalar([[metric_namespace]]_block_height{status=\"finalized\",instance=\"[[instance]]\",network=\"[[network]]\"})",
+ "intervalFactor": 2,
+ "legendFormat": "[[hostname]]",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Diff -> ( Best Block - Finalized )",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "cacheTimeout": null,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 18,
+ "y": 0
+ },
+ "hiddenSeries": false,
+ "id": 18,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "rate([[metric_namespace]]_block_height{status=\"finalized\",instance=\"[[instance]]\",network=\"[[network]]\"}[10m])*60",
+ "intervalFactor": 10,
+ "legendFormat": "{{instance}} Blocks / minute",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Block rate",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 0,
+ "y": 6
+ },
+ "hiddenSeries": false,
+ "id": 10,
+ "interval": "",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "increase([[metric_namespace]]_block_height{instance=\"[[instance]]\",network=\"[[network]]\",status=~\"finalized|sync_target\"}[1m])",
+ "intervalFactor": 5,
+ "legendFormat": "{{status}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Blocks Av per min",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 6,
+ "y": 6
+ },
+ "hiddenSeries": false,
+ "id": 14,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_block_height{instance=\"[[instance]]\",network=\"[[network]]\",status=~\"finalized|sync_target\"}",
+ "legendFormat": "{{instance}} {{status}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Block Finalized",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 12,
+ "y": 6
+ },
+ "hiddenSeries": false,
+ "id": 13,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_block_height{status=\"best\",instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Block height",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "Prometheus",
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 18,
+ "y": 6
+ },
+ "hiddenSeries": false,
+ "id": 20,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "data": "",
+ "expr": "[[metric_namespace]]_ready_transactions_number{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "hide": false,
+ "legendFormat": "{{instance}}",
+ "refId": "A",
+ "target": "txcount",
+ "type": "timeseries"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "TXs Count",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 0,
+ "y": 12
+ },
+ "hiddenSeries": false,
+ "id": 23,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sync_extra_finality_proofs_active{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} active",
+ "refId": "A"
+ },
+ {
+ "expr": "[[metric_namespace]]_sync_extra_finality_proofs_failed{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} failed",
+ "refId": "B"
+ },
+ {
+ "expr": "[[metric_namespace]]_sync_extra_finality_proofs_importing{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} importing",
+ "refId": "C"
+ },
+ {
+ "expr": "[[metric_namespace]]_sync_extra_finality_proofs_pending{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} pending",
+ "refId": "D"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Sync Proof",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 6,
+ "y": 12
+ },
+ "hiddenSeries": false,
+ "id": 22,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sync_extra_justifications_active{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} active",
+ "refId": "A"
+ },
+ {
+ "expr": "[[metric_namespace]]_sync_extra_justifications_failed{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} failed",
+ "refId": "B"
+ },
+ {
+ "expr": "[[metric_namespace]]_sync_extra_justifications_importing{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} importing",
+ "refId": "C"
+ },
+ {
+ "expr": "[[metric_namespace]]_sync_extra_justifications_pending{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} pending",
+ "refId": "D"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Sync justifications",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 12,
+ "y": 12
+ },
+ "hiddenSeries": false,
+ "id": 24,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_connections{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} connections",
+ "refId": "A"
+ },
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_is_major_syncing{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} syncing",
+ "refId": "B"
+ },
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_kbuckets_num_nodes{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} num_nodes",
+ "refId": "C"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "sub_libp2p",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 18,
+ "y": 12
+ },
+ "hiddenSeries": false,
+ "id": 26,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_notifications_total{instance=\"[[instance]]\",network=\"[[network]]\",protocol=\"FRNK\",direction=\"in\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} FRNK in",
+ "refId": "A"
+ },
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_notifications_total{instance=\"[[instance]]\",network=\"[[network]]\",protocol=\"FRNK\",direction=\"out\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} FRNK out",
+ "refId": "B"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "libp2p_notifications",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 0,
+ "y": 18
+ },
+ "hiddenSeries": false,
+ "id": 28,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_cpu_usage_percentage{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "CPU usage %",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 6,
+ "y": 18
+ },
+ "hiddenSeries": false,
+ "id": 27,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_memory_usage_bytes{instance=\"[[instance]]\",network=\"[[network]]\"}",
+ "legendFormat": "{{instance}} Mem bytes",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Memory",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "decimals": 2,
+ "format": "bytes",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 12,
+ "y": 18
+ },
+ "hiddenSeries": false,
+ "id": 25,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_network_per_sec_bytes",
+ "hide": false,
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ },
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_notifications_total",
+ "hide": true,
+ "legendFormat": "{{instance}}",
+ "refId": "B"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "libp2p_network_per_sec_bytes",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "cacheTimeout": null,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": null,
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 6,
+ "x": 18,
+ "y": 18
+ },
+ "hiddenSeries": false,
+ "id": 29,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pluginVersion": "6.5.2",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_notifications_total{instance=\"[[instance]]\",network=\"[[network]]\",protocol=\"dot1\",direction=\"in\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} dot1 in",
+ "refId": "B"
+ },
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_notifications_total{instance=\"[[instance]]\",network=\"[[network]]\",protocol=\"dot2\",direction=\"in\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} dot2 in",
+ "refId": "C"
+ },
+ {
+ "expr": "[[metric_namespace]]_sub_libp2p_notifications_total{instance=\"[[instance]]\",network=\"[[network]]\",protocol=\"dot2\",direction=\"out\"}",
+ "hide": false,
+ "legendFormat": "{{instance}} dot2 out",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "libp2p_notifications",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ }
+ ],
+ "refresh": "5s",
+ "schemaVersion": 22,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "allValue": null,
+ "current": {
+ "selected": true,
+ "text": "substrate",
+ "value": "substrate"
+ },
+ "hide": 0,
+ "includeAll": false,
+ "label": null,
+ "multi": false,
+ "name": "metric_namespace",
+ "options": [
+ {
+ "selected": true,
+ "text": "substrate",
+ "value": "substrate"
+ },
+ {
+ "selected": false,
+ "text": "polkadot",
+ "value": "polkadot"
+ }
+ ],
+ "query": "substrate, polkadot",
+ "skipUrlSync": false,
+ "type": "custom"
+ },
+ {
+ "allValue": null,
+ "current": {
+ "selected": true,
+ "text": "dev",
+ "value": "dev"
+ },
+ "datasource": "Prometheus",
+ "definition": "label_values(network)",
+ "hide": 0,
+ "includeAll": false,
+ "index": -1,
+ "label": null,
+ "multi": false,
+ "name": "network",
+ "options": [],
+ "query": "label_values(network)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {
+ "selected": false,
+ "text": "validator-a:9615",
+ "value": "validator-a:9615"
+ },
+ "datasource": "Prometheus",
+ "definition": "label_values(instance)",
+ "hide": 0,
+ "includeAll": false,
+ "index": -1,
+ "label": null,
+ "multi": false,
+ "name": "instance",
+ "options": [],
+ "query": "label_values(instance)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ }
+ ]
+ },
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "timepicker": {
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ]
+ },
+ "timezone": "",
+ "title": "Substrate Dashboard",
+ "uid": "ColmenaLabs",
+ "variables": {
+ "list": []
+ },
+ "version": 2
+}
diff --git a/.maintain/monitoring/grafana-dashboards/substrate-networking.json b/.maintain/monitoring/grafana-dashboards/substrate-networking.json
new file mode 100644
index 0000000000000000000000000000000000000000..f18ca66c13a0774eca86ceef42795cf4b36a35d3
--- /dev/null
+++ b/.maintain/monitoring/grafana-dashboards/substrate-networking.json
@@ -0,0 +1,2722 @@
+{
+ "__inputs": [
+ {
+ "name": "VAR_METRIC_NAMESPACE",
+ "type": "constant",
+ "label": "Prefix of the metrics",
+ "value": "polkadot",
+ "description": ""
+ }
+ ],
+ "__requires": [
+ {
+ "type": "grafana",
+ "id": "grafana",
+ "name": "Grafana",
+ "version": "6.7.3"
+ },
+ {
+ "type": "panel",
+ "id": "graph",
+ "name": "Graph",
+ "version": ""
+ },
+ {
+ "type": "panel",
+ "id": "heatmap",
+ "name": "Heatmap",
+ "version": ""
+ },
+ {
+ "type": "datasource",
+ "id": "prometheus",
+ "name": "Prometheus",
+ "version": "1.0.0"
+ }
+ ],
+ "annotations": {
+ "list": [
+ {
+ "$$hashKey": "object:821",
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "limit": 100,
+ "name": "Annotations & Alerts",
+ "showIn": 0,
+ "type": "dashboard"
+ },
+ {
+ "$$hashKey": "object:822",
+ "datasource": "$data_source",
+ "enable": true,
+ "expr": "count(count(${metric_namespace}_sub_libp2p_connections / max_over_time(${metric_namespace}_sub_libp2p_connections[1h]) < 0.1) >= count(${metric_namespace}_sub_libp2p_connections) / 10)",
+ "hide": false,
+ "iconColor": "#C4162A",
+ "limit": 100,
+ "name": "Connection losses events",
+ "showIn": 0,
+ "step": "5m",
+ "tags": [],
+ "titleFormat": "Network-wide connectivity loss",
+ "type": "tags"
+ }
+ ]
+ },
+ "description": "Information related to the networking layer of Substrate",
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "id": null,
+ "iteration": 1590742405831,
+ "links": [],
+ "panels": [
+ {
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 167,
+ "title": "Sync",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 5,
+ "w": 24,
+ "x": 0,
+ "y": 1
+ },
+ "hiddenSeries": false,
+ "id": 101,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "connected",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": true,
+ "targets": [
+ {
+ "expr": "1 - (${metric_namespace}_sub_libp2p_peerset_num_requested{instance=~\"${nodename}\"} - ${metric_namespace}_sub_libp2p_peers_count{instance=~\"${nodename}\"}) / ${metric_namespace}_sub_libp2p_peerset_num_requested{instance=~\"${nodename}\"}",
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Number of peer slots filled",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "$$hashKey": "object:1044",
+ "format": "percentunit",
+ "label": null,
+ "logBase": 1,
+ "max": "1.0",
+ "min": null,
+ "show": true
+ },
+ {
+ "$$hashKey": "object:1045",
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 6
+ },
+ "id": 29,
+ "panels": [],
+ "repeat": "request_protocol",
+ "title": "Requests (${request_protocol})",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 0,
+ "y": 7
+ },
+ "hiddenSeries": false,
+ "id": 148,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "irate(${metric_namespace}_sub_libp2p_requests_out_started_total{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])",
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Requests emitted per second",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "reqps",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 12,
+ "y": 7
+ },
+ "hiddenSeries": false,
+ "id": 151,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "irate(${metric_namespace}_sub_libp2p_requests_in_total_count{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])",
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Requests served per second",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "reqps",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 0,
+ "y": 11
+ },
+ "hiddenSeries": false,
+ "id": 146,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "histogram_quantile(0.5, sum(rate(${metric_namespace}_sub_libp2p_requests_out_finished_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le)) > 0",
+ "instant": false,
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Median request answer time",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "$$hashKey": "object:1230",
+ "format": "s",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "$$hashKey": "object:1231",
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 12,
+ "y": 11
+ },
+ "hiddenSeries": false,
+ "id": 145,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "histogram_quantile(0.5, sum(rate(${metric_namespace}_sub_libp2p_requests_in_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le))",
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Median request serving time",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "s",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 0,
+ "y": 15
+ },
+ "hiddenSeries": false,
+ "id": 150,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_requests_out_finished_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le)) > 0",
+ "instant": false,
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "99th percentile request answer time",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "s",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 12,
+ "y": 15
+ },
+ "hiddenSeries": false,
+ "id": 149,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_requests_in_total_bucket{instance=~\"${nodename}\", protocol=\"${request_protocol}\"}[5m])) by (instance, le))",
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "99th percentile request serving time",
+ "tooltip": {
+ "shared": false,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "s",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 185
+ },
+ "id": 23,
+ "panels": [],
+ "repeat": "notif_protocol",
+ "title": "Notifications (${notif_protocol})",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 186
+ },
+ "hiddenSeries": false,
+ "id": 31,
+ "interval": "1m",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "rightSide": true,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "maxPerRow": 2,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [
+ {
+ "$$hashKey": "object:850",
+ "alias": "/(in)/",
+ "color": "#73BF69"
+ },
+ {
+ "$$hashKey": "object:851",
+ "alias": "/(out)/",
+ "color": "#F2495C"
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg by (direction) (irate(${metric_namespace}_sub_libp2p_notifications_sizes_count{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[$__interval]))",
+ "interval": "",
+ "legendFormat": "{{direction}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Average network notifications per second",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "$$hashKey": "object:874",
+ "format": "cps",
+ "label": "Notifs/sec",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "$$hashKey": "object:875",
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 186
+ },
+ "hiddenSeries": false,
+ "id": 37,
+ "interval": "1m",
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": false,
+ "hideEmpty": false,
+ "hideZero": false,
+ "max": false,
+ "min": false,
+ "rightSide": true,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "maxPerRow": 2,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [
+ {
+ "$$hashKey": "object:942",
+ "alias": "/(in)/",
+ "color": "#73BF69"
+ },
+ {
+ "$$hashKey": "object:943",
+ "alias": "/(out)/",
+ "color": "#F2495C"
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(irate(${metric_namespace}_sub_libp2p_notifications_sizes_sum{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[$__interval])) by (direction)",
+ "instant": false,
+ "interval": "",
+ "legendFormat": "{{direction}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Average bandwidth used by notifications",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "$$hashKey": "object:966",
+ "format": "Bps",
+ "label": "Bandwidth",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "$$hashKey": "object:967",
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 193
+ },
+ "hiddenSeries": false,
+ "id": 16,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "max(${metric_namespace}_sub_libp2p_out_events_notifications_sizes{instance=~\"${nodename}\", protocol=\"${notif_protocol}\", action=\"sent\"} - ignoring(action) ${metric_namespace}_sub_libp2p_out_events_notifications_sizes{instance=~\"${nodename}\", protocol=\"${notif_protocol}\", action=\"received\"}) by (instance) > 0",
+ "interval": "",
+ "legendFormat": "{{instance}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Total sizes of notifications waiting to be delivered to the rest of Substrate",
+ "tooltip": {
+ "shared": false,
+ "sort": 1,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "bytes",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 1,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 193
+ },
+ "hiddenSeries": false,
+ "id": 21,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pluginVersion": "6.4.5",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "sum(rate(${metric_namespace}_sub_libp2p_notifications_sizes_sum{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[5m])) by (direction, protocol) / sum(rate(${metric_namespace}_sub_libp2p_notifications_sizes_count{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[5m])) by (direction, protocol)",
+ "format": "time_series",
+ "interval": "",
+ "legendFormat": "{{direction}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Average size of sent and received notifications in the past 5 minutes",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "$$hashKey": "object:2050",
+ "format": "bytes",
+ "label": "Max. notification size",
+ "logBase": 10,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "$$hashKey": "object:2051",
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "description": "99.9% of the time, the output queue size for this protocol is below the given value",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 0,
+ "y": 201
+ },
+ "hiddenSeries": false,
+ "id": 14,
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": true,
+ "hideEmpty": false,
+ "hideZero": true,
+ "max": true,
+ "min": false,
+ "rightSide": true,
+ "show": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "alias": "max",
+ "fill": 1,
+ "linewidth": 0
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_notifications_queues_size_bucket{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[2m])) by (le, instance))",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "{{protocol}}",
+ "refId": "A"
+ },
+ {
+ "expr": "max(histogram_quantile(0.99, sum(rate(${metric_namespace}_sub_libp2p_notifications_queues_size_bucket{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[2m])) by (le, instance)))",
+ "interval": "",
+ "legendFormat": "max",
+ "refId": "B"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "99th percentile of queues sizes",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": "300",
+ "min": "0",
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 1,
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 12,
+ "y": 201
+ },
+ "hiddenSeries": false,
+ "id": 134,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pluginVersion": "6.4.5",
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "histogram_quantile(1.0, sum(rate(${metric_namespace}_sub_libp2p_notifications_sizes_bucket{instance=~\"${nodename}\", protocol=\"${notif_protocol}\"}[5m])) by (direction, le))",
+ "format": "time_series",
+ "interval": "",
+ "legendFormat": "{{direction}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Maximum size of sent and received notifications in the past 5 minutes",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "$$hashKey": "object:1524",
+ "format": "bytes",
+ "label": "Max. notification size",
+ "logBase": 10,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "$$hashKey": "object:1525",
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 1853
+ },
+ "id": 27,
+ "panels": [],
+ "title": "Transport",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 24,
+ "x": 0,
+ "y": 1854
+ },
+ "hiddenSeries": false,
+ "id": 19,
+ "interval": "1m",
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": false,
+ "hideEmpty": false,
+ "max": false,
+ "min": false,
+ "rightSide": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": false,
+ "linewidth": 1,
+ "maxPerRow": 2,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [
+ {
+ "alias": "established (in)",
+ "color": "#37872D"
+ },
+ {
+ "alias": "established (out)",
+ "color": "#C4162A"
+ },
+ {
+ "alias": "pending (out)",
+ "color": "#FF7383"
+ },
+ {
+ "alias": "closed-recently",
+ "color": "#FADE2A",
+ "steppedLine": true
+ }
+ ],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(sum(${metric_namespace}_sub_libp2p_connections_opened_total{direction=\"in\", instance=~\"${nodename}\"}) by (instance) - sum(${metric_namespace}_sub_libp2p_connections_closed_total{direction=\"in\", instance=~\"${nodename}\"}) by (instance))",
+ "format": "time_series",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "established (in)",
+ "refId": "A"
+ },
+ {
+ "expr": "avg(sum(${metric_namespace}_sub_libp2p_connections_opened_total{direction=\"out\", instance=~\"${nodename}\"}) by (instance) - sum(${metric_namespace}_sub_libp2p_connections_closed_total{direction=\"out\", instance=~\"${nodename}\"}) by (instance))",
+ "hide": false,
+ "instant": false,
+ "interval": "",
+ "legendFormat": "established (out)",
+ "refId": "C"
+ },
+ {
+ "expr": "avg(sum by (instance) (${metric_namespace}_sub_libp2p_pending_connections{instance=~\"${nodename}\"}))",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "pending (out)",
+ "refId": "B"
+ },
+ {
+ "expr": "avg(sum by(instance) (increase(${metric_namespace}_sub_libp2p_connections_closed_total{instance=~\"${nodename}\"}[$__interval])))",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "closed-recently",
+ "refId": "D"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Average transport-level (TCP, QUIC, ...) connections per node",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": "Connections",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 0,
+ "y": 1860
+ },
+ "hiddenSeries": false,
+ "id": 39,
+ "interval": "1m",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": false,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "alias": "/.*/",
+ "color": "#FF780A"
+ }
+ ],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(increase(${metric_namespace}_sub_libp2p_incoming_connections_handshake_errors_total{instance=~\"${nodename}\"}[$__interval])) by (reason)",
+ "interval": "",
+ "legendFormat": "{{reason}}",
+ "refId": "A"
+ },
+ {
+ "expr": "avg(increase(${metric_namespace}_sub_libp2p_listeners_errors_total{instance=~\"${nodename}\"}[$__interval]))",
+ "interval": "",
+ "legendFormat": "pre-handshake",
+ "refId": "B"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Number of incoming connection errors, averaged by node",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": "Errors",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "cards": {
+ "cardPadding": null,
+ "cardRound": null
+ },
+ "color": {
+ "cardColor": "#b4ff00",
+ "colorScale": "sqrt",
+ "colorScheme": "interpolateOranges",
+ "exponent": 0.5,
+ "max": 100,
+ "min": 0,
+ "mode": "spectrum"
+ },
+ "dataFormat": "timeseries",
+ "datasource": "$data_source",
+ "description": "Each bucket represent a certain number of nodes using a certain bandwidth range.",
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 12,
+ "y": 1860
+ },
+ "heatmap": {},
+ "hideZeroBuckets": false,
+ "highlightCards": true,
+ "id": 4,
+ "legend": {
+ "show": false
+ },
+ "reverseYBuckets": false,
+ "targets": [
+ {
+ "expr": "${metric_namespace}_network_per_sec_bytes{instance=~\"${nodename}\"}",
+ "format": "time_series",
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Heatmap of network bandwidth",
+ "tooltip": {
+ "show": true,
+ "showHistogram": false
+ },
+ "type": "heatmap",
+ "xAxis": {
+ "show": true
+ },
+ "xBucketNumber": null,
+ "xBucketSize": "2.5m",
+ "yAxis": {
+ "decimals": null,
+ "format": "Bps",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true,
+ "splitFactor": null
+ },
+ "yBucketBound": "auto",
+ "yBucketNumber": null,
+ "yBucketSize": null
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 1866
+ },
+ "hiddenSeries": false,
+ "id": 81,
+ "interval": "1m",
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": false,
+ "hideEmpty": true,
+ "hideZero": true,
+ "max": false,
+ "min": false,
+ "rightSide": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": false,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(increase(${metric_namespace}_sub_libp2p_pending_connections_errors_total{instance=~\"${nodename}\"}[$__interval])) by (reason)",
+ "interval": "",
+ "legendFormat": "{{reason}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Dialing attempt errors, averaged per node",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 1866
+ },
+ "hiddenSeries": false,
+ "id": 46,
+ "interval": "1m",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": false,
+ "linewidth": 1,
+ "maxPerRow": 2,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(increase(${metric_namespace}_sub_libp2p_connections_closed_total{instance=~\"${nodename}\"}[$__interval])) by (reason)",
+ "interval": "",
+ "legendFormat": "{{reason}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Disconnects, averaged per node",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "decimals": null,
+ "format": "short",
+ "label": "Disconnects",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 1873
+ },
+ "id": 52,
+ "panels": [],
+ "title": "GrandPa",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 24,
+ "x": 0,
+ "y": 1874
+ },
+ "hiddenSeries": false,
+ "id": 54,
+ "interval": "1m",
+ "legend": {
+ "alignAsTable": true,
+ "avg": false,
+ "current": false,
+ "hideEmpty": true,
+ "hideZero": true,
+ "max": false,
+ "min": false,
+ "rightSide": true,
+ "show": true,
+ "total": true,
+ "values": true
+ },
+ "lines": false,
+ "linewidth": 1,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [
+ {
+ "alias": "/discard/",
+ "color": "#FA6400",
+ "zindex": -2
+ },
+ {
+ "alias": "/keep/",
+ "color": "#73BF69",
+ "zindex": 2
+ },
+ {
+ "alias": "/process_and_discard/",
+ "color": "#5794F2"
+ }
+ ],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(increase(${metric_namespace}_finality_grandpa_communication_gossip_validator_messages{instance=~\"${nodename}\"}[$__interval])) by (action, message)",
+ "interval": "",
+ "legendFormat": "{{message}} => {{action}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "GrandPa messages received from the network, and action",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 1880
+ },
+ "id": 25,
+ "panels": [],
+ "repeat": null,
+ "title": "Kademlia",
+ "type": "row"
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "description": "",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 0,
+ "y": 1881
+ },
+ "hiddenSeries": false,
+ "id": 33,
+ "legend": {
+ "alignAsTable": false,
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": false,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "alias": "/.*/",
+ "color": "#B877D9"
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "${metric_namespace}_sub_libp2p_kbuckets_num_nodes{instance=~\"${nodename}\"}",
+ "format": "time_series",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "Number nodes in all kbuckets",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Distribution over number of entries in k-buckets",
+ "tooltip": {
+ "shared": false,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "max": 0,
+ "min": null,
+ "mode": "histogram",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 7,
+ "fillGradient": 7,
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 12,
+ "y": 1881
+ },
+ "hiddenSeries": false,
+ "id": 35,
+ "interval": "1m",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 2,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "60 * sum(irate(${metric_namespace}_sub_libp2p_random_kademalia_queries_total{instance=~\"${nodename}\"}[$__interval]))",
+ "interval": "",
+ "legendFormat": "Number of Kademlia random queries started per minute on all nodes",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Number of Kademlia discovery queries per minute on all nodes combined",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "cpm",
+ "label": "Queries per minute",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 0,
+ "y": 1887
+ },
+ "hiddenSeries": false,
+ "id": 111,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "alias": "max",
+ "fillBelowTo": "min",
+ "lines": false
+ },
+ {
+ "alias": "min",
+ "lines": false
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(${metric_namespace}_sub_libp2p_kademlia_records_count{instance=~\"${nodename}\"})",
+ "interval": "",
+ "legendFormat": "avg",
+ "refId": "A"
+ },
+ {
+ "expr": "min(${metric_namespace}_sub_libp2p_kademlia_records_count{instance=~\"${nodename}\"})",
+ "interval": "",
+ "legendFormat": "min",
+ "refId": "B"
+ },
+ {
+ "expr": "max(${metric_namespace}_sub_libp2p_kademlia_records_count{instance=~\"${nodename}\"})",
+ "interval": "",
+ "legendFormat": "max",
+ "refId": "C"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Number of Kademlia records (average/min/max per node)",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 0,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 12,
+ "y": 1887
+ },
+ "hiddenSeries": false,
+ "id": 112,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "alias": "max",
+ "fillBelowTo": "min",
+ "lines": false
+ },
+ {
+ "alias": "min",
+ "lines": false
+ }
+ ],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(${metric_namespace}_sub_libp2p_kademlia_records_sizes_total{instance=~\"${nodename}\"})",
+ "interval": "",
+ "legendFormat": "avg",
+ "refId": "A"
+ },
+ {
+ "expr": "min(${metric_namespace}_sub_libp2p_kademlia_records_sizes_total{instance=~\"${nodename}\"})",
+ "interval": "",
+ "legendFormat": "min",
+ "refId": "B"
+ },
+ {
+ "expr": "max(${metric_namespace}_sub_libp2p_kademlia_records_sizes_total{instance=~\"${nodename}\"})",
+ "interval": "",
+ "legendFormat": "max",
+ "refId": "C"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Total size of Kademlia records (average/min/max per node)",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "bytes",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 5,
+ "w": 24,
+ "x": 0,
+ "y": 1891
+ },
+ "hiddenSeries": false,
+ "id": 68,
+ "interval": "1m",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": false,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "connected",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(\n # The amount of inflight Kademlia queries per node.\r\n sum by (instance) (\r\n # The total amount of Kademlia GET_VALUE queries started.\r\n ${metric_namespace}_authority_discovery_authority_addresses_requested_total{instance=~\"${nodename}\"}\r\n \r\n # The total amount of Kademlia PUT_VALUE queries started.\r\n + ${metric_namespace}_authority_discovery_times_published_total{instance=~\"${nodename}\"}\r\n )\r\n - sum by (instance) (\r\n # The total amount of Kademlia queries (both GET_VALUE and PUT_VALUE) finished.\r\n ${metric_namespace}_authority_discovery_dht_event_received{instance=~\"${nodename}\"}\r\n )\n)",
+ "interval": "",
+ "legendFormat": "in-progress",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Authority discovery Kademlia queries in progress, averaged per node",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": true,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$data_source",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 4,
+ "w": 24,
+ "x": 0,
+ "y": 1896
+ },
+ "hiddenSeries": false,
+ "id": 72,
+ "interval": "1m",
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": false,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "repeat": null,
+ "repeatDirection": "v",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "avg(sum without(instance) (delta(${metric_namespace}_authority_discovery_times_published_total{instance=~\"${nodename}\"}[$__interval])))",
+ "interval": "",
+ "legendFormat": "publications",
+ "refId": "A"
+ },
+ {
+ "expr": "avg(sum without(instance) (delta(${metric_namespace}_authority_discovery_dht_event_received{instance=~\"${nodename}\", name=\"value_put\"}[$__interval])))",
+ "interval": "",
+ "legendFormat": "successes",
+ "refId": "B"
+ },
+ {
+ "expr": "avg(sum without(instance) (delta(${metric_namespace}_authority_discovery_dht_event_received{instance=~\"${nodename}\", name=\"value_put_failed\"}[$__interval])))",
+ "interval": "",
+ "legendFormat": "failures",
+ "refId": "C"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Authority discovery publications, averaged per node",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ }
+ ],
+ "refresh": "1m",
+ "schemaVersion": 22,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "$data_source",
+ "definition": "${metric_namespace}_cpu_usage_percentage",
+ "hide": 0,
+ "includeAll": true,
+ "index": -1,
+ "label": "Instance name filter",
+ "multi": true,
+ "name": "nodename",
+ "options": [],
+ "query": "${metric_namespace}_cpu_usage_percentage",
+ "refresh": 1,
+ "regex": "/instance=\"(.*?)\"/",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "$data_source",
+ "definition": "${metric_namespace}_sub_libp2p_notifications_sizes_count",
+ "hide": 2,
+ "includeAll": true,
+ "index": -1,
+ "label": null,
+ "multi": false,
+ "name": "notif_protocol",
+ "options": [],
+ "query": "${metric_namespace}_sub_libp2p_notifications_sizes_count",
+ "refresh": 1,
+ "regex": "/protocol=\"(.*?)\"/",
+ "skipUrlSync": false,
+ "sort": 5,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "$data_source",
+ "definition": "${metric_namespace}_sub_libp2p_requests_out_started_total",
+ "hide": 2,
+ "includeAll": true,
+ "index": -1,
+ "label": null,
+ "multi": false,
+ "name": "request_protocol",
+ "options": [],
+ "query": "${metric_namespace}_sub_libp2p_requests_out_started_total",
+ "refresh": 1,
+ "regex": "/protocol=\"(.*?)\"/",
+ "skipUrlSync": false,
+ "sort": 5,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "current": {
+ "selected": false,
+ "tags": [],
+ "text": "prometheus.parity-mgmt",
+ "value": "prometheus.parity-mgmt"
+ },
+ "hide": 0,
+ "includeAll": false,
+ "label": "Source of data",
+ "multi": false,
+ "name": "data_source",
+ "options": [],
+ "query": "prometheus",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "type": "datasource"
+ },
+ {
+ "current": {
+ "value": "${VAR_METRIC_NAMESPACE}",
+ "text": "${VAR_METRIC_NAMESPACE}"
+ },
+ "hide": 2,
+ "label": "Prefix of the metrics",
+ "name": "metric_namespace",
+ "options": [
+ {
+ "value": "${VAR_METRIC_NAMESPACE}",
+ "text": "${VAR_METRIC_NAMESPACE}"
+ }
+ ],
+ "query": "${VAR_METRIC_NAMESPACE}",
+ "skipUrlSync": false,
+ "type": "constant"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-6h",
+ "to": "now"
+ },
+ "timepicker": {
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ]
+ },
+ "timezone": "",
+ "title": "Substrate Networking",
+ "uid": "vKVuiD9Zk",
+ "variables": {
+ "list": []
+ },
+ "version": 103
+}
\ No newline at end of file
diff --git a/.maintain/node-template-release/Cargo.toml b/.maintain/node-template-release/Cargo.toml
index 606def19bb99f1002058d1d868181cbc9c0fbb56..dd3166d58ddf463580474a02ea70efdcdbf00228 100644
--- a/.maintain/node-template-release/Cargo.toml
+++ b/.maintain/node-template-release/Cargo.toml
@@ -16,3 +16,6 @@ git2 = "0.8"
flate2 = "1.0"
[workspace]
+
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
diff --git a/.maintain/sentry-node/docker-compose.yml b/.maintain/sentry-node/docker-compose.yml
index 0ca42613b4576e4405d14c78e154fc8ed6b614b1..376538dde5786e15d1524dc8f75072aa4c1cb59d 100644
--- a/.maintain/sentry-node/docker-compose.yml
+++ b/.maintain/sentry-node/docker-compose.yml
@@ -19,6 +19,9 @@
# - validator-a: localhost:9944
# - validator-b: localhost:9945
# - sentry-a: localhost:9946
+# - grafana: localhost:3001
+# - prometheus: localhost:9090
+
version: "3.7"
services:
@@ -26,6 +29,7 @@ services:
validator-a:
ports:
- "9944:9944"
+ - "9615:9615"
volumes:
- ../../target/release/substrate:/usr/local/bin/substrate
image: parity/substrate
@@ -58,6 +62,7 @@ services:
- "--no-telemetry"
- "--rpc-cors"
- "all"
+ - "--prometheus-external"
sentry-a:
image: parity/substrate
@@ -77,13 +82,12 @@ services:
- "--chain=local"
- "--port"
- "30333"
- - "--charlie"
- - "--bootnodes"
+ - "--sentry"
- "/dns4/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
- - "--bootnodes"
- - "/dns4/validator-b/tcp/30333/p2p/QmSVnNf9HwVMT1Y4cK1P6aoJcEZjmoTXpjKBmAABLMnZEk"
- "--reserved-nodes"
- "/dns4/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
+ - "--bootnodes"
+ - "/dns4/validator-b/tcp/30333/p2p/QmSVnNf9HwVMT1Y4cK1P6aoJcEZjmoTXpjKBmAABLMnZEk"
- "--no-telemetry"
- "--rpc-cors"
- "all"
@@ -92,7 +96,7 @@ services:
- "--unsafe-rpc-external"
- "--log"
- "sub-authority-discovery=trace"
- - "--sentry"
+ - "--prometheus-external"
validator-b:
image: parity/substrate
@@ -125,12 +129,43 @@ services:
- "--unsafe-rpc-external"
- "--log"
- "sub-authority-discovery=trace"
+ - "--prometheus-external"
ui:
image: polkadot-js/apps
ports:
- "3000:80"
+ prometheus:
+ image: prom/prometheus
+ networks:
+ - network-a
+ - internet
+ ports:
+ - "9090:9090"
+ links:
+ - validator-a:validator-a
+ - sentry-a:sentry-a
+ - validator-b:validator-b
+ volumes:
+ - ./prometheus/:/etc/prometheus/
+ restart: always
+
+ grafana:
+ image: grafana/grafana
+ user: "104"
+ depends_on:
+ - prometheus
+ networks:
+ - network-a
+ - internet
+ ports:
+ - 3001:3000
+ volumes:
+ - ./grafana/provisioning/:/etc/grafana/provisioning
+ - ../monitoring/grafana-dashboards/:/etc/grafana/provisioning/dashboard-definitions
+ restart: always
+
networks:
network-a:
internet:
diff --git a/.maintain/sentry-node/grafana/provisioning/dashboards/dashboards.yml b/.maintain/sentry-node/grafana/provisioning/dashboards/dashboards.yml
new file mode 100644
index 0000000000000000000000000000000000000000..ad9164fd8ea01023a2b5736fdea9bfc0259f1eed
--- /dev/null
+++ b/.maintain/sentry-node/grafana/provisioning/dashboards/dashboards.yml
@@ -0,0 +1,11 @@
+apiVersion: 1
+
+providers:
+- name: 'Prometheus'
+ orgId: 1
+ folder: ''
+ type: file
+ disableDeletion: false
+ editable: false
+ options:
+ path: /etc/grafana/provisioning/dashboard-definitions
diff --git a/.maintain/sentry-node/grafana/provisioning/datasources/datasource.yml b/.maintain/sentry-node/grafana/provisioning/datasources/datasource.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c02bb38b3d378112480b0772855e79b0f02cb02f
--- /dev/null
+++ b/.maintain/sentry-node/grafana/provisioning/datasources/datasource.yml
@@ -0,0 +1,50 @@
+# config file version
+apiVersion: 1
+
+# list of datasources that should be deleted from the database
+deleteDatasources:
+ - name: Prometheus
+ orgId: 1
+
+# list of datasources to insert/update depending
+# whats available in the database
+datasources:
+ # name of the datasource. Required
+- name: Prometheus
+ # datasource type. Required
+ type: prometheus
+ # access mode. direct or proxy. Required
+ access: proxy
+ # org id. will default to orgId 1 if not specified
+ orgId: 1
+ # url
+ url: http://prometheus:9090
+ # database password, if used
+ password:
+ # database user, if used
+ user:
+ # database name, if used
+ database:
+ # enable/disable basic auth
+ basicAuth: false
+ # basic auth username, if used
+ basicAuthUser:
+ # basic auth password, if used
+ basicAuthPassword:
+ # enable/disable with credentials headers
+ withCredentials:
+ # mark as default datasource. Max one per org
+ isDefault: true
+ #