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/auto-label-prs.yml b/.github/workflows/auto-label-prs.yml
new file mode 100644
index 0000000000000000000000000000000000000000..f0b8e9b343e29ce7eb25bfb41a3f56277b4d7558
--- /dev/null
+++ b/.github/workflows/auto-label-prs.yml
@@ -0,0 +1,21 @@
+name: Label PRs
+on:
+ pull_request:
+ types: [opened,ready_for_review]
+
+jobs:
+ label-new-prs:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Label drafts
+ uses: andymckay/labeler@master
+ if: github.event.pull_request.draft == true
+ with:
+ add-labels: 'A3-inprogress'
+ remove-labels: 'A0-pleasereview'
+ - name: Label PRs
+ uses: andymckay/labeler@master
+ if: github.event.pull_request.draft == false && ! contains(github.event.pull_request.labels.*.name, 'A2-insubstantial')
+ with:
+ add-labels: 'A0-pleasereview'
+ remove-labels: 'A3-inprogress'
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/polkadot-companion-labels.yml b/.github/workflows/polkadot-companion-labels.yml
new file mode 100644
index 0000000000000000000000000000000000000000..20aaa98a239cd9b9124172b29d3d56b086607d7f
--- /dev/null
+++ b/.github/workflows/polkadot-companion-labels.yml
@@ -0,0 +1,31 @@
+name: Check Polkadot Companion and Label
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+
+jobs:
+ check_status:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Monitor the status of the gitlab-check-companion-build job
+ uses: s3krit/await-status-action@v1.0.1
+ id: 'check-companion-status'
+ with:
+ authToken: ${{ secrets.GITHUB_TOKEN }}
+ ref: ${{ github.event.pull_request.head.sha }}
+ contexts: 'continuous-integration/gitlab-check-polkadot-companion-build'
+ timeout: 1800
+ notPresentTimeout: 3600 # It can take quite a while before the job starts...
+ failedStates: failure
+ interruptedStates: error # Error = job was probably cancelled. We don't want to label the PR in that case
+ - name: Label success
+ uses: andymckay/labeler@master
+ if: steps.check-companion-status.outputs.result == 'success'
+ with:
+ remove-labels: 'A7-needspolkadotpr'
+ - name: Label failure
+ uses: andymckay/labeler@master
+ if: steps.check-companion-status.outputs.result == 'failure'
+ with:
+ add-labels: 'A7-needspolkadotpr'
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 6398c09fe796278130978c2a8598ee9270399388..353d49df28f34b896567b0aa91bb08e056a5832c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@ rls*.log
.local
**/hfuzz_target/
**/hfuzz_workspace/
+.cargo/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 12baa3978a8531136b7f0b4d60ccbe34dd88092d..594c9d1dded4fb6401aaa903873a999651dc1bd7 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.10"
- CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder sp-arithmetic-fuzzer"
+ CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder"
+default:
+ cache: {}
.collect-artifacts: &collect-artifacts
artifacts:
@@ -55,9 +56,10 @@ variables:
- kubernetes-parity-build
environment:
name: parity-build
+ interruptible: true
.docker-env: &docker-env
- image: parity/rust-builder:latest
+ image: paritytech/ci-linux:production
before_script:
- rustup show
- cargo --version
@@ -74,7 +76,6 @@ variables:
- runner_system_failure
- unknown_failure
- api_failure
- dependencies: []
interruptible: true
tags:
- linux-docker
@@ -86,55 +87,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
-
-check-polkadot:
- stage: build
- <<: *docker-env
+test-dependency-rules:
+ stage: check
+ image: paritytech/tools:latest
+ <<: *kubernetes-build
+ except:
+ variables:
+ - $DEPLOY_TAG
script:
- - ./.maintain/gitlab/check_polkadot.sh
- interruptible: true
- allow_failure: true
+ - .maintain/ensure-deps.sh
+#### stage: test
cargo-audit:
stage: test
@@ -165,9 +175,10 @@ cargo-check-benches:
<<: *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
@@ -178,38 +189,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
@@ -222,9 +216,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
@@ -234,13 +230,15 @@ 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
@@ -259,6 +257,7 @@ 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
@@ -272,9 +271,11 @@ test-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
@@ -284,7 +285,7 @@ test-runtime-benchmarks:
- $DEPLOY_TAG
script:
- cd bin/node/cli
- - BUILD_DUMMY_WASM_BINARY=1 time cargo check --verbose --features runtime-benchmarks
+ - WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features runtime-benchmarks
- sccache -s
test-linux-stable-int:
@@ -297,7 +298,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
@@ -310,7 +312,6 @@ test-linux-stable-int:
paths:
- ${CI_COMMIT_SHORT_SHA}_int_failure.log
-
check-web-wasm:
stage: test
<<: *docker-env
@@ -322,19 +323,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
@@ -349,14 +350,67 @@ 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
+
+test-prometheus-alerting-rules:
+ stage: test
+ image: paritytech/tools:latest
+ <<: *kubernetes-build
+ script:
+ - promtool check rules .maintain/monitoring/alerting-rules/alerting-rules.yaml
+ - cat .maintain/monitoring/alerting-rules/alerting-rules.yaml | promtool test rules .maintain/monitoring/alerting-rules/alerting-rule-tests.yaml
#### 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:
@@ -370,8 +424,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'
@@ -379,8 +433,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:
@@ -390,12 +448,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
@@ -409,33 +475,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
- needs:
- - job: test-linux-stable
- artifacts: true
- script:
- - if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then
- cat ${CI_COMMIT_SHORT_SHA}_warnings.log;
- exit 1;
- else
- echo "___No warnings___";
- fi
-
+#### stage: post-build-test
trigger-contracts-ci:
- stage: publish
+ stage: post-build-test
needs:
- job: build-linux-substrate
artifacts: false
@@ -451,12 +500,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 )
@@ -478,18 +534,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
@@ -497,16 +550,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
@@ -514,10 +564,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"
@@ -533,11 +585,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:
@@ -555,74 +607,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
@@ -636,18 +646,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
@@ -655,8 +665,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
@@ -687,14 +698,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
@@ -702,15 +715,29 @@ 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:
- ./.maintain/flamingfir-deploy.sh flamingfir-validator4
+
+#### stage: .post
+
+check-labels:
+ stage: .post
+ image: paritytech/tools:latest
+ <<: *kubernetes-build
+ only:
+ - /^[0-9]+$/
+ script:
+ - ./.maintain/gitlab/check_labels.sh
diff --git a/.maintain/flamingfir-deploy.sh b/.maintain/flamingfir-deploy.sh
index 596bb04ece091cd03f3c993d655f5d45770362ea..8f0fb3a2bc016067d0bf11ae993a3bfa1636280f 100755
--- a/.maintain/flamingfir-deploy.sh
+++ b/.maintain/flamingfir-deploy.sh
@@ -5,7 +5,7 @@ RETRY_ATTEMPT=0
SLEEP_TIME=15
TARGET_HOST="$1"
COMMIT=$(cat artifacts/substrate/VERSION)
-DOWNLOAD_URL="https://releases.parity.io/substrate/x86_64-debian:stretch/${COMMIT}/substrate"
+DOWNLOAD_URL="https://releases.parity.io/substrate/x86_64-debian:stretch/${COMMIT}/substrate/substrate"
POST_DATA='{"extra_vars":{"artifact_path":"'${DOWNLOAD_URL}'","target_host":"'${TARGET_HOST}'"}}'
JOB_ID=$(wget -O - --header "Authorization: Bearer ${AWX_TOKEN}" --header "Content-type: application/json" --post-data "${POST_DATA}" https://ansible-awx.parity.io/api/v2/job_templates/32/launch/ | jq .job)
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_labels.sh b/.maintain/gitlab/check_labels.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5ab099b38291cc66b6f370430b8f06e6b2f5c24f
--- /dev/null
+++ b/.maintain/gitlab/check_labels.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+#shellcheck source=lib.sh
+source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
+
+ensure_labels() {
+ for label in "$@"; do
+ if has_label 'paritytech/substrate' "$CI_COMMIT_BRANCH" "$label"; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+# Must have one of the following labels
+releasenotes_labels=(
+ 'B0-silent'
+ 'B3-apinoteworthy'
+ 'B5-clientnoteworthy'
+ 'B7-runtimenoteworthy'
+)
+
+criticality_labels=(
+ 'C1-low'
+ 'C3-medium'
+ 'C7-high'
+ 'C9-critical'
+)
+
+echo "[+] Checking release notes (B) labels for $CI_COMMIT_BRANCH"
+if ensure_labels "${releasenotes_labels[@]}"; then
+ echo "[+] Release notes label detected. All is well."
+else
+ echo "[!] Release notes label not detected. Please add one of: ${releasenotes_labels[*]}"
+ exit 1
+fi
+
+echo "[+] Checking release criticality (C) labels for $CI_COMMIT_BRANCH"
+if ensure_labels "${criticality_labels[@]}"; then
+ echo "[+] Release criticality label detected. All is well."
+else
+ echo "[!] Release criticality label not detected. Please add one of: ${criticality_labels[*]}"
+ exit 1
+fi
+
+exit 0
diff --git a/.maintain/gitlab/check_line_width.sh b/.maintain/gitlab/check_line_width.sh
index f382d630b183c6396115cc1e76e77dfab4c20047..611d3ae2681e2ef145753a0f774c5183fc9df7d9 100755
--- a/.maintain/gitlab/check_line_width.sh
+++ b/.maintain/gitlab/check_line_width.sh
@@ -2,47 +2,50 @@
#
# 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}"
+git fetch ${BASE_ORIGIN} ${BASE_BRANCH_NAME} --depth 100
+BASE_HASH=$(git merge-base ${BASE_BRANCH} HEAD)
-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 diff --name-only ${BASE_HASH} -- \*.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_HASH} -- ${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_HASH} -- ${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_HASH} -- ${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_HASH} -- ${file} | grep -n "^+.\{$(( $GOOD_LINE_WIDTH + 1 ))\}"
echo "|"
fi
fi
diff --git a/.maintain/gitlab/check_polkadot.sh b/.maintain/gitlab/check_polkadot.sh
deleted file mode 100755
index 6087d86cdea475dcb5ac703879b22d91ea25e212..0000000000000000000000000000000000000000
--- a/.maintain/gitlab/check_polkadot.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-#
-# check if a pr is compatible with polkadot companion pr or master if not
-# available
-#
-# 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="Accept: application/vnd.github.v3+json"
-
-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
-==============
-
-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.
-
-
-EOT
-
-
-
-SUBSTRATE_PATH=$(pwd)
-
-# 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}"
- # get the last reference to a pr in polkadot
- comppr="$(curl -H "${github_header}" -s ${github_api_substrate_pull_url}/${CI_COMMIT_REF_NAME} \
- | sed -n -r 's;^[[:space:]]+"body":[[:space:]]+".*polkadot companion: paritytech/polkadot#([0-9]+).*"[^"]+$;\1;p;$!d')"
- if [ "${comppr}" ]
- then
- boldprint "companion pr specified: #${comppr}"
- git fetch --depth 1 origin refs/pull/${comppr}/head:pr/${comppr}
- git checkout pr/${comppr}
- else
- boldprint "no companion pr declared - building polkadot:master"
- fi
-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_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 5b7e25e3afc4eabef01d984047a98d675ab09757..6d009c5aafc6a8907fb9d8e598e8870854af8db7 100755
--- a/.maintain/gitlab/check_runtime.sh
+++ b/.maintain/gitlab/check_runtime.sh
@@ -67,7 +67,7 @@ sub_spec_version="$(git diff tags/release...${CI_COMMIT_SHA} ${VERSIONS_FILE} \
if [ "${add_spec_version}" != "${sub_spec_version}" ]
then
- github_label "B2-breaksapi"
+ github_label "D2-breaksapi"
boldcat <<-EOT
diff --git a/.maintain/gitlab/lib.sh b/.maintain/gitlab/lib.sh
index ecc9a5f54288cd4636a05cb7f2a2d0535e40ebe9..a7a83baaea7464d30583cc93b1eab090102db3da 100755
--- a/.maintain/gitlab/lib.sh
+++ b/.maintain/gitlab/lib.sh
@@ -66,8 +66,12 @@ has_label(){
repo="$1"
pr_id="$2"
label="$3"
- out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
- [ -n "$(echo "$out" | jq ".labels | .[] | select(.name==\"$label\")")" ]
+ if [ -n "$GITHUB_RELEASE_TOKEN" ]; then
+ out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
+ else
+ out=$(curl -H "Authorization: token $GITHUB_PR_TOKEN" -s "$api_base/$repo/pulls/$pr_id")
+ fi
+ [ -n "$(echo "$out" | tr -d '\r\n' | jq ".labels | .[] | select(.name==\"$label\")")" ]
}
# Formats a message into a JSON string for posting to Matrix
diff --git a/.maintain/gitlab/skip_if_draft.sh b/.maintain/gitlab/skip_if_draft.sh
new file mode 100755
index 0000000000000000000000000000000000000000..cf6ea6a5b31155da9d6ac0c09079f4dffcec2dfa
--- /dev/null
+++ b/.maintain/gitlab/skip_if_draft.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+url="https://api.github.com/repos/paritytech/substrate/pulls/${CI_COMMIT_REF_NAME}"
+echo "[+] API URL: $url"
+
+draft_state=$(curl -H "Authorization: token ${GITHUB_PR_TOKEN}" "$url" | jq -r .draft)
+echo "[+] Draft state: $draft_state"
+
+if [ "$draft_state" = 'true' ]; then
+ echo "[!] PR is currently a draft, stopping pipeline"
+ exit 1
+else
+ echo "[+] PR is not a draft. Proceeding with CI pipeline"
+ exit 0
+fi
diff --git a/.maintain/monitoring/alerting-rules/alerting-rule-tests.yaml b/.maintain/monitoring/alerting-rules/alerting-rule-tests.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..069cfaf977b502d917220fec887b2a5b1185ca92
--- /dev/null
+++ b/.maintain/monitoring/alerting-rules/alerting-rule-tests.yaml
@@ -0,0 +1,239 @@
+rule_files:
+ - /dev/stdin
+
+evaluation_interval: 1m
+
+tests:
+ - interval: 1m
+ input_series:
+ - series: 'polkadot_sub_libp2p_peers_count{
+ job="polkadot",
+ pod="polkadot-abcdef01234-abcdef",
+ instance="polkadot-abcdef01234-abcdef",
+ }'
+ values: '3 2+0x4 1+0x9' # 3 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+
+ - series: 'polkadot_sub_txpool_validations_scheduled{
+ job="polkadot",
+ pod="polkadot-abcdef01234-abcdef",
+ instance="polkadot-abcdef01234-abcdef",
+ }'
+ values: '10+1x30' # 10 11 12 13 .. 40
+
+ - series: 'polkadot_sub_txpool_validations_finished{
+ job="polkadot",
+ pod="polkadot-abcdef01234-abcdef",
+ instance="polkadot-abcdef01234-abcdef",
+ }'
+ values: '0x30' # 0 0 0 0 .. 0
+
+ - series: 'polkadot_block_height{
+ status="best", job="polkadot",
+ pod="polkadot-abcdef01234-abcdef",
+ instance="polkadot-abcdef01234-abcdef",
+ }'
+ values: '1+1x3 4+0x13' # 1 2 3 4 4 4 4 4 4 4 4 4 ...
+
+ - series: 'polkadot_block_height{
+ status="finalized",
+ job="polkadot",
+ pod="polkadot-abcdef01234-abcdef",
+ instance="polkadot-abcdef01234-abcdef",
+ }'
+ values: '1+1x3 4+0x13' # 1 2 3 4 4 4 4 4 4 4 4 4 ...
+
+ - series: 'polkadot_cpu_usage_percentage{
+ job="polkadot",
+ pod="polkadot-abcdef01234-abcdef",
+ instance="polkadot-abcdef01234-abcdef",
+ }'
+ values: '0+20x5 100+0x5' # 0 20 40 60 80 100 100 100 100 100 100
+
+ alert_rule_test:
+
+ ######################################################################
+ # Resource usage
+ ######################################################################
+
+ - eval_time: 9m
+ alertname: HighCPUUsage
+ exp_alerts:
+ - eval_time: 10m
+ alertname: HighCPUUsage
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has a CPU
+ usage higher than 100% for more than 5 minutes"
+
+ ######################################################################
+ # Block production
+ ######################################################################
+
+ - eval_time: 6m
+ alertname: LowNumberOfNewBlocks
+ exp_alerts:
+ - eval_time: 7m
+ alertname: LowNumberOfNewBlocks
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ status: best
+ exp_annotations:
+ message: "Less than one new block per minute on instance
+ polkadot-abcdef01234-abcdef."
+
+ - eval_time: 14m
+ alertname: LowNumberOfNewBlocks
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ status: best
+ exp_annotations:
+ message: "Less than one new block per minute on instance
+ polkadot-abcdef01234-abcdef."
+ - exp_labels:
+ severity: critical
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ status: best
+ exp_annotations:
+ message: "Less than one new block per minute on instance
+ polkadot-abcdef01234-abcdef."
+
+ ######################################################################
+ # Block finalization
+ ######################################################################
+
+ - eval_time: 6m
+ alertname: BlockFinalizationSlow
+ exp_alerts:
+ - eval_time: 7m
+ alertname: BlockFinalizationSlow
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ status: finalized
+ exp_annotations:
+ message: "Finalized block on instance
+ polkadot-abcdef01234-abcdef increases by less than 1 per
+ minute."
+
+ - eval_time: 14m
+ alertname: BlockFinalizationSlow
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ status: finalized
+ exp_annotations:
+ message: "Finalized block on instance
+ polkadot-abcdef01234-abcdef increases by less than 1 per
+ minute."
+ - exp_labels:
+ severity: critical
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ status: finalized
+ exp_annotations:
+ message: "Finalized block on instance
+ polkadot-abcdef01234-abcdef increases by less than 1 per
+ minute."
+
+ ######################################################################
+ # Transaction queue
+ ######################################################################
+
+ - eval_time: 10m
+ alertname: TransactionQueueSize
+ exp_alerts:
+ - eval_time: 11m
+ alertname: TransactionQueueSize
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has more
+ than 10 transactions in the queue for more than 10
+ minutes"
+
+ - eval_time: 31m
+ alertname: TransactionQueueSize
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has more
+ than 10 transactions in the queue for more than 10
+ minutes"
+ - exp_labels:
+ severity: critical
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has more
+ than 10 transactions in the queue for more than 30
+ minutes"
+
+ ######################################################################
+ # Networking
+ ######################################################################
+
+ - eval_time: 3m # Values: 3 2 2
+ alertname: LowNumberOfPeers
+ exp_alerts:
+ - eval_time: 4m # Values: 2 2 2
+ alertname: LowNumberOfPeers
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has less
+ than 3 peers for more than 3 minutes"
+
+ - eval_time: 16m # Values: 3 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1
+ alertname: LowNumberOfPeers
+ exp_alerts:
+ - exp_labels:
+ severity: warning
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has less
+ than 3 peers for more than 3 minutes"
+ - exp_labels:
+ severity: critical
+ pod: polkadot-abcdef01234-abcdef
+ instance: polkadot-abcdef01234-abcdef
+ job: polkadot
+ exp_annotations:
+ message: "The node polkadot-abcdef01234-abcdef has less
+ than 3 peers for more than 15 minutes"
diff --git a/.maintain/monitoring/alerting-rules/alerting-rules.yaml b/.maintain/monitoring/alerting-rules/alerting-rules.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..06d204f7afa412fc3ba94a71ef612b86d26358bf
--- /dev/null
+++ b/.maintain/monitoring/alerting-rules/alerting-rules.yaml
@@ -0,0 +1,129 @@
+groups:
+- name: polkadot.rules
+ rules:
+
+ ##############################################################################
+ # Resource usage
+ ##############################################################################
+
+ - alert: HighCPUUsage
+ expr: polkadot_cpu_usage_percentage >= 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/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh
index 5d873d26cdfca69db389ae569b6be534d142af1d..01d559448438b3cb857d1b46af2f8bc544232066 100755
--- a/.maintain/rename-crates-for-2.0.sh
+++ b/.maintain/rename-crates-for-2.0.sh
@@ -64,7 +64,7 @@ TO_RENAME=(
"substrate-keyring sp-keyring"
"substrate-offchain-primitives sp-offchain"
"substrate-panic-handler sp-panic-handler"
- "substrate-phragmen sp-phragmen"
+ "substrate-phragmen sp-npos-elections"
"substrate-rpc-primitives sp-rpc"
"substrate-runtime-interface sp-runtime-interface"
"substrate-runtime-interface-proc-macro sp-runtime-interface-proc-macro"
diff --git a/.maintain/sentry-node/docker-compose.yml b/.maintain/sentry-node/docker-compose.yml
index db835b057969642c9da77a4bde57c3178745bbd3..235f2c49630a17b6bfda719b513e4567990f41dd 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:
@@ -44,9 +47,9 @@ services:
- "--validator"
- "--alice"
- "--sentry-nodes"
- - "/dns4/sentry-a/tcp/30333/p2p/QmV7EhW6J6KgmNdr558RH1mPx2xGGznW7At4BhXzntRFsi"
+ - "/dns/sentry-a/tcp/30333/p2p/QmV7EhW6J6KgmNdr558RH1mPx2xGGznW7At4BhXzntRFsi"
- "--reserved-nodes"
- - "/dns4/sentry-a/tcp/30333/p2p/QmV7EhW6J6KgmNdr558RH1mPx2xGGznW7At4BhXzntRFsi"
+ - "/dns/sentry-a/tcp/30333/p2p/QmV7EhW6J6KgmNdr558RH1mPx2xGGznW7At4BhXzntRFsi"
# Not only bind to localhost.
- "--unsafe-ws-external"
- "--unsafe-rpc-external"
@@ -79,13 +82,12 @@ services:
- "--chain=local"
- "--port"
- "30333"
- - "--charlie"
- - "--bootnodes"
- - "/dns4/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
- - "--bootnodes"
- - "/dns4/validator-b/tcp/30333/p2p/QmSVnNf9HwVMT1Y4cK1P6aoJcEZjmoTXpjKBmAABLMnZEk"
+ - "--sentry"
+ - "/dns/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
- "--reserved-nodes"
- - "/dns4/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
+ - "/dns/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
+ - "--bootnodes"
+ - "/dns/validator-b/tcp/30333/p2p/QmSVnNf9HwVMT1Y4cK1P6aoJcEZjmoTXpjKBmAABLMnZEk"
- "--no-telemetry"
- "--rpc-cors"
- "all"
@@ -94,7 +96,7 @@ services:
- "--unsafe-rpc-external"
- "--log"
- "sub-authority-discovery=trace"
- - "--sentry"
+ - "--prometheus-external"
validator-b:
image: parity/substrate
@@ -116,9 +118,9 @@ services:
- "--validator"
- "--bob"
- "--bootnodes"
- - "/dns4/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
+ - "/dns/validator-a/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR"
- "--bootnodes"
- - "/dns4/sentry-a/tcp/30333/p2p/QmV7EhW6J6KgmNdr558RH1mPx2xGGznW7At4BhXzntRFsi"
+ - "/dns/sentry-a/tcp/30333/p2p/QmV7EhW6J6KgmNdr558RH1mPx2xGGznW7At4BhXzntRFsi"
- "--no-telemetry"
- "--rpc-cors"
- "all"
@@ -127,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
+ #