Rebrand to Pezkuwichain Telemetry

- Rename PolkadotIcon to PezkuwiIcon
- Update pinned chains for Pezkuwichain
- Add pezkuwichain, bizinikiwi, pezkuwichain-js icons
- Update favicon with Pezkuwi branding
- Update package.json author to Dijital Kurdistan Tech Institute
- Update GitHub links to pezkuwichain/pezkuwi-telemetry
- Update backend Cargo.toml authors
- Rewrite README with Pezkuwichain documentation
- Add GitHub workflows (frontend-ci, backend-ci, docker, lock)
This commit is contained in:
2026-01-08 16:40:51 +03:00
parent 74def27a16
commit 2b1872f24e
22 changed files with 384 additions and 198 deletions
+91
View File
@@ -0,0 +1,91 @@
name: Backend CI
on:
push:
branches: [main, master]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
pull_request:
branches: [main, master]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
backend/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test --release
build-binaries:
runs-on: ubuntu-latest
needs: check
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
backend/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build release binaries
run: cargo build --release
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: backend-binaries
path: |
backend/target/release/telemetry_core
backend/target/release/telemetry_shard
retention-days: 7
+98
View File
@@ -0,0 +1,98 @@
name: Docker Build
on:
push:
branches: [main, master]
tags:
- 'v*'
pull_request:
branches: [main, master]
workflow_dispatch:
env:
REGISTRY: ghcr.io
BACKEND_IMAGE: ghcr.io/${{ github.repository }}-backend
FRONTEND_IMAGE: ghcr.io/${{ github.repository }}-frontend
jobs:
build-backend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.BACKEND_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- name: Build and push backend
uses: docker/build-push-action@v5
with:
context: ./backend
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-frontend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.FRONTEND_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=sha
- name: Build and push frontend
uses: docker/build-push-action@v5
with:
context: ./frontend
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
+53
View File
@@ -0,0 +1,53 @@
name: Frontend CI
on:
push:
branches: [main, master]
paths:
- 'frontend/**'
- '.github/workflows/frontend-ci.yml'
pull_request:
branches: [main, master]
paths:
- 'frontend/**'
- '.github/workflows/frontend-ci.yml'
workflow_dispatch:
jobs:
lint-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Prettier check
run: npm run pretty:check
- name: Run tests
run: npm run test -- --passWithNoTests
- name: Build
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: frontend/build/
retention-days: 7
+23
View File
@@ -0,0 +1,23 @@
name: Lock Threads
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
issue-inactive-days: 30
pr-inactive-days: 30
issue-lock-reason: resolved
pr-lock-reason: resolved
log-output: true
+69 -154
View File
@@ -1,20 +1,19 @@
![Frontend](https://github.com/paritytech/substrate-telemetry/workflows/Frontend%20CI/badge.svg)
![Backend](https://github.com/paritytech/substrate-telemetry/workflows/Backend%20CI/badge.svg)
# Polkadot Telemetry
# Pezkuwichain Telemetry
## Overview
This repository contains the backend ingestion server for Substrate Telemetry (which itself is comprised of two binaries; `telemetry_shard` and `telemetry_core`) as well as the Frontend you typically see running at [telemetry.polkadot.io](https://telemetry.polkadot.io/).
This repository contains the Telemetry server for Pezkuwichain nodes. It includes:
The backend is a Rust project and the frontend is React/Typescript project.
- **Backend**: Rust-based ingestion server (`telemetry_shard` and `telemetry_core`)
- **Frontend**: React/TypeScript dashboard for monitoring network nodes
Substrate based nodes can be connected to an arbitrary Telemetry backend using the `--telemetry-url` (see below for more complete instructions on how to get this up and running).
Pezkuwichain nodes can connect to Telemetry using the `--telemetry-url` flag.
### Messages
Depending on the configured verbosity, substrate nodes will send different types of messages to the Telemetry server. Verbosity level `0` is sufficient to provide the Telemetry server with almost all of the node information needed. Using this verbosity level will lead to the substrate node sending the following message types to Telemetry:
Nodes send telemetry messages depending on the verbosity level:
**Verbosity 0 (default):**
```
system.connected
system.interval
@@ -22,202 +21,118 @@ block.import
notify.finalized
```
Increasing the verbosity level to 1 will lead to additional "consensus info" messages being sent, one of which has the identifier:
**Verbosity 1 (includes validator address):**
```
afg.authority_set
```
Which we use to populate the "validator address" field if applicable.
Increasing the verbosity level beyond 1 is unnecessary, and will not result in any additional messages that Telemetry can handle (but other metric gathering systems might find them useful).
## Getting Started
To run the backend, you will need `cargo` to build the binary. We recommend using [`rustup`](https://rustup.rs/).
### Prerequisites
To run the frontend make sure to grab the latest stable version of node and install dependencies before doing anything:
- Rust (via rustup): https://rustup.rs/
- Node.js (LTS version)
```sh
nvm install stable
(cd frontend && npm install)
```
### Backend
### Terminal 1 & 2 - Backend
Build the backend binaries by running the following:
```
```bash
cd backend
cargo build --release
```
And then, in two different terminals, run:
```
# Terminal 1 - Core server
./target/release/telemetry_core
```
and
```
# Terminal 2 - Shard server
./target/release/telemetry_shard
```
Use `--help` on either binary to see the available options.
Default ports:
- `telemetry_core`: 127.0.0.1:8000
- `telemetry_shard`: 127.0.0.1:8001
By default, `telemetry_core` will listen on 127.0.0.1:8000, and `telemetry_shard` will listen on 127.0.0.1:8001, and expect the `telemetry_core` to be listening on its default address. To listen on different addresses, use the `--listen` option on either binary, for example `--listen 0.0.0.0:8000`. The `telemetry_shard` also needs to be told where the core is, so if the core is configured with `--listen 127.0.0.1:9090`, remember to pass `--core 127.0.0.1:9090` to the shard, too.
### Frontend
### Terminal 3 - Frontend
```sh
```bash
cd frontend
npm install
npm run start
```
Once this is running, you'll be able to navigate to [http://localhost:3000](http://localhost:3000) to view the UI.
Access the UI at http://localhost:3000
### Terminal 4 - Node
### Connect a Node
Follow up installation instructions from the [Polkadot repo](https://github.com/paritytech/polkadot)
If you started the backend binaries with their default arguments, you can connect a node to the shard by running:
```sh
polkadot --dev --telemetry-url 'ws://localhost:8001/submit 0'
```bash
pezkuwi --dev --telemetry-url 'ws://localhost:8001/submit 0'
```
**Note:** The "0" at the end of the URL is a verbosity level, and not part of the URL itself. Verbosity levels range from 0-9, with 0 denoting the lowest verbosity. The URL and this verbosity level are parts of a single argument and must therefore be surrounded in quotes (as seen above) in order to be treated as such by your shell.
Note: The "0" is the verbosity level (0-9).
## Docker
### Building images
### Build Images
To build the backend docker image, navigate into the `backend` folder of this repository and run:
```bash
# Backend
cd backend
docker build -t pezkuwichain/telemetry-backend .
```
docker build -t parity/substrate-telemetry-backend .
# Frontend
cd frontend
docker build -t pezkuwichain/telemetry-frontend .
```
The backend image contains both the `telemetry_core` and `telemetry_shard` binaries.
### Docker Compose
To build the frontend docker image, navigate into the `frontend` folder and run:
```
docker build -t parity/substrate-telemetry-frontend .
```bash
docker-compose up
```
### Run the backend and frontend using `docker-compose`
### Manual Docker Setup
The easiest way to run the backend and frontend images is to use `docker-compose`. To do this, run `docker-compose up` in the root of this repository to build and run the images. Once running, you can view the UI by navigating a browser to `http://localhost:3000`.
```bash
# Create network
docker network create telemetry
To connect a substrate node and have it send telemetry to this running instance, you have to tell it where to send telemetry by appending the argument `--telemetry-url 'ws://localhost:8001/submit 0'` (see "Terminal 4 - Node" above).
# Backend core
docker run -d --network=telemetry --name backend-core \
-p 8000:8000 --read-only \
pezkuwichain/telemetry-backend \
telemetry_core -l 0.0.0.0:8000
### Run the backend and frontend using `docker`
# Backend shard
docker run -d --network=telemetry --name backend-shard \
-p 8001:8001 --read-only \
pezkuwichain/telemetry-backend \
telemetry_shard -l 0.0.0.0:8001 -c http://backend-core:8000/shard_submit
If you'd like to get things running manually using Docker, you can do the following. This assumes that you've built the images as per the above, and have two images named `parity/substrate-telemetry-backend` and `parity/substrate-telemetry-frontend`.
1. Create a new shared network so that the various containers can communicate with eachother:
```
docker network create telemetry
```
2. Start up the backend core process. We expose port 8000 so that a UI running in a host browser can connect to the `/feed` endpoint.
```
docker run --rm -it --network=telemetry \
--name backend-core \
-p 8000:8000 \
--read-only \
parity/substrate-telemetry-backend \
telemetry_core -l 0.0.0.0:8000
```
3. In another terminal, start up the backend shard process. We tell it where it can reach the core to send messages (possible because it has been started on the same network), and we listen on and expose port 8001 so that nodes running in the host can connect and send telemetry to it.
```
docker run --rm -it --network=telemetry \
--name backend-shard \
-p 8001:8001 \
--read-only \
parity/substrate-telemetry-backend \
telemetry_shard -l 0.0.0.0:8001 -c http://backend-core:8000/shard_submit
```
4. In another terminal, start up the frontend server. We pass a `SUBSTRATE_TELEMETRY_URL` env var to tell the UI how to connect to the core process to receive telemetry. This is relative to the host machine, since that is where the browser and UI will be running.
```
docker run --rm -it --network=telemetry \
--name frontend \
-p 3000:8000 \
-e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \
parity/substrate-telemetry-frontend
```
**NOTE:** Here we used `SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed`. This will work if you test with everything running locally on your machine but NOT if your backend runs on a remote server. Keep in mind that the frontend docker image is serving a static site running your browser. The `SUBSTRATE_TELEMETRY_URL` is the WebSocket url that your browser will use to reach the backend. Say your backend runs on a remote server at `foo.example.com`, you will need to set the IP/url accordingly in `SUBSTRATE_TELEMETRY_URL` (in this case, to `ws://foo.example.com/feed`).
**NOTE:** Running the frontend container in *read-only* mode reduces attack surface that could be used to exploit
a container. It requires however a little more effort and mounting additional volumes as shown below:
```
docker run --rm -it -p 80:8000 --name frontend \
-e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \
--tmpfs /var/cache/nginx:uid=101,gid=101 \
--tmpfs /var/run:uid=101,gid=101 \
--tmpfs /app/tmp:uid=101,gid=101 \
--read-only \
parity/substrate-telemetry-frontend
```
With these running, you'll be able to navigate to [http://localhost:3000](http://localhost:3000) to view the UI. If you'd like to connect a node and have it send telemetry to your running shard, you can run the following:
```sh
docker run --rm -it --network=telemetry \
--name substrate \
-p 9944:9944 \
chevdor/substrate \
substrate --dev --telemetry-url 'ws://backend-shard:8001/submit 0'
# Frontend
docker run -d --network=telemetry --name frontend \
-p 3000:8000 \
-e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \
pezkuwichain/telemetry-frontend
```
You should now see your node showing up in your local [telemetry frontend](http://localhost:3000/):
## Configuration
![image](doc/screenshot01.png)
### Environment Variables
## Deployment
| Variable | Description | Default |
|----------|-------------|---------|
| `SUBSTRATE_TELEMETRY_URL` | WebSocket URL for frontend to connect | `ws://localhost:8000/feed` |
This section covers the internal deployment of Substrate Telemetry to our staging and live environments.
## Links
### Deployment to staging
- **Website**: https://pezkuwichain.io
- **Telemetry**: https://telemetry.pezkuwichain.io
- **Discord**: https://discord.gg/Y3VyEC6h8W
Every time new code is merged to `master`, a new version of telemetry will be automatically built and deployed to our staging environment, so there is nothing that you need to do. Roughly what will happen is:
## License
- An image tag will be generated that looks like `master-$CI_COMMIT_SHORT_SHA`, for example `master-224b1fae`.
- Docker images for the frontend and backend will be pushed to the docker repo (see https://hub.docker.com/r/parity/substrate-telemetry-backend/tags?page=1&ordering=last_updated and https://hub.docker.com/r/parity/substrate-telemetry-frontend/tags?page=1&ordering=last_updated).
- A deployment to the staging environment will be performed using these images. Go to https://github.com/paritytech/substrate-telemetry/actions to inspect the progress of such deployments.
GPL-3.0
### Deployment to live
## Credits
Once we're happy with things in staging, we can do a deployment to live as follows:
Based on [substrate-telemetry](https://github.com/paritytech/substrate-telemetry) by Parity Technologies.
1. Ensure that the PRs you'd like to deploy are merged to master.
2. Tag the commit on `master` that you'd like to deploy with the form `v1.0-a1b2c3d`.
- The version number (`1.0` here) should just be incremented from whatever the latest version found using `git tag` is. We don't use semantic versioning or anything like that; this is just a dumb "increment version number" approach so that we can see clearly what we've deployed to live and in what order.
- The suffix is a short git commit hash (which can be generated with `git rev-parse --short HEAD`), just so that it's really easy to relate the built docker images back to the corresponding code.
3. Pushing the tag (eg `git push origin v1.0-a1b2c3d`) will kick off the deployment process, which in this case will also lead to new docker images being built. You can view the progress at https://github.com/paritytech/substrate-telemetry/actions.
> [!WARNING]
> After the tag is pushed the deploy will be done to both environments (staging and production) automatically.
4. Once a deployment to staging has been successful, run whatever tests you need against the staging deployment to convince yourself that you're happy with it.
5. Confirm that things are working once the deployment has finished by visiting https://telemetry.polkadot.io/.
### Rolling back to a previous deployment
If something goes wrong running the above, we can roll back the deployment to live as follows.
1. Decide what image tag you'd like to roll back to. Push the tag to the commit you want to revert to.
2. Navigate to https://github.com/paritytech/substrate-telemetry/actions and check that the pipeline is successful.
3. Confirm that things are working once the deployment has finished by visiting https://telemetry.polkadot.io/.
4. In case of issues contact devops team.
Maintained by Dijital Kurdistan Tech Institute.
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "common"
version = "0.1.0"
authors = ["Parity Technologies Ltd. <admin@parity.io>"]
authors = ["Dijital Kurdistan Tech Institute <admin@pezkuwichain.io>"]
edition = "2021"
license = "GPL-3.0"
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "telemetry_core"
version = "0.1.0"
authors = ["Parity Technologies Ltd. <admin@parity.io>"]
authors = ["Dijital Kurdistan Tech Institute <admin@pezkuwichain.io>"]
edition = "2021"
license = "GPL-3.0"
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "telemetry_shard"
version = "0.1.0"
authors = ["Parity Technologies Ltd. <admin@parity.io>"]
authors = ["Dijital Kurdistan Tech Institute <admin@pezkuwichain.io>"]
edition = "2021"
license = "GPL-3.0"
+3 -4
View File
@@ -1,5 +1,4 @@
<svg width="278" height="278" viewBox="0 0 250 278" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M122.222 127.504L23.3996 71.0796C18.5633 68.3182 18.5334 61.3555 23.346 58.5528L122.199 0.982327C124.442 -0.3236 127.212 -0.32769 129.458 0.971606L228.12 58.0407C232.937 60.8269 232.933 67.7821 228.112 70.5624L129.42 127.488C127.194 128.772 124.454 128.778 122.222 127.504Z" fill="#E6007A"/>
<path d="M246.368 219.626L148.092 276.997C143.282 279.805 137.237 276.349 137.216 270.78L136.785 156.385C136.776 153.791 138.157 151.389 140.406 150.094L239.16 93.1846C243.981 90.4063 250.002 93.8876 250 99.4522L249.953 213.385C249.952 215.955 248.587 218.331 246.368 219.626Z" fill="#E6007A"/>
<path d="M113.198 156.338L113.745 270.133C113.771 275.702 107.756 279.21 102.923 276.443L3.63874 219.619C1.38658 218.33 -0.00209701 215.933 2.37701e-06 213.338L0.0923778 99.3597C0.0968919 93.7951 6.12245 90.3212 10.9404 93.1055L109.586 150.113C111.81 151.399 113.186 153.769 113.198 156.338Z" fill="#E6007A"/>
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="32" cy="32" r="30" fill="#0066CC"/>
<text x="32" y="42" font-size="28" fill="white" text-anchor="middle" font-weight="bold">P</text>
</svg>

Before

Width:  |  Height:  |  Size: 1013 B

After

Width:  |  Height:  |  Size: 252 B

+1 -1
View File
@@ -7,7 +7,7 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<title>Polkadot Telemetry</title>
<title>Pezkuwichain Telemetry</title>
<script type="text/javascript" src="/tmp/env-config.js"></script>
<style>
body,
+4 -4
View File
@@ -1,9 +1,9 @@
{
"name": "@dotstats/frontend",
"version": "0.2.1",
"author": "Parity Technologies Ltd. <admin@parity.io>",
"name": "@pezkuwi/telemetry-frontend",
"version": "1.0.0",
"author": "Dijital Kurdistan Tech Institute <admin@pezkuwichain.io>",
"license": "GPL-3.0",
"description": "Polkadot Telemetry frontend",
"description": "Pezkuwichain Telemetry frontend",
"scripts": {
"start": "webpack serve --mode=development",
"build": "webpack --mode=production",
+2 -2
View File
@@ -77,8 +77,8 @@ export class Chains extends React.Component<ChainsProps> {
) : null;
const githubLink = this.props.gitHash
? `https://github.com/paritytech/substrate-telemetry/tree/${this.props.gitHash}`
: 'https://github.com/paritytech/substrate-telemetry';
? `https://github.com/pezkuwichain/pezkuwi-telemetry/tree/${this.props.gitHash}`
: 'https://github.com/pezkuwichain/pezkuwi-telemetry';
return (
<div className="Chains">
@@ -20,9 +20,9 @@ import { Node } from '../../../state';
import { Tooltip, Icon } from '../../';
import icon from '../../../icons/terminal.svg';
import parityPolkadotIcon from '../../../icons/dot.svg';
import paritySubstrateIcon from '../../../icons/substrate.svg';
import polkadotJsIcon from '../../../icons/polkadot-js.svg';
import pezkuwichainIcon from '../../../icons/pezkuwichain.svg';
import bizinikiwiiIcon from '../../../icons/bizinikiwi.svg';
import pezkuwichainJsIcon from '../../../icons/pezkuwichain-js.svg';
import airalabRobonomicsIcon from '../../../icons/robonomics.svg';
import chainXIcon from '../../../icons/chainx.svg';
import edgewareIcon from '../../../icons/edgeware.svg';
@@ -43,12 +43,12 @@ import crustIcon from '../../../icons/crust.svg';
import gossamerIcon from '../../../icons/gossamer.svg';
const ICONS = {
'parity-polkadot': parityPolkadotIcon,
'Parity Polkadot': parityPolkadotIcon,
'polkadot-js': polkadotJsIcon,
'pezkuwichain': pezkuwichainIcon,
'Pezkuwichain': pezkuwichainIcon,
'pezkuwichain-js': pezkuwichainJsIcon,
'airalab-robonomics': airalabRobonomicsIcon,
'substrate-node': paritySubstrateIcon,
'Substrate Node': paritySubstrateIcon,
'bizinikiwi-node': bizinikiwiiIcon,
'Bizinikiwi Node': bizinikiwiiIcon,
'edgeware-node': edgewareIcon,
'Edgeware Node': edgewareIcon,
'joystream-node': joystreamIcon,
@@ -101,7 +101,7 @@ export class ImplementationColumn extends React.Component<ColumnProps> {
this.version = version;
const [semver] = version.match(SEMVER_PATTERN) || ['?.?.?'];
const implIcon = ICONS[implementation] || paritySubstrateIcon;
const implIcon = ICONS[implementation] || bizinikiwiiIcon;
return (
<td className="Column">
@@ -18,7 +18,7 @@ import * as React from 'react';
import { Maybe } from '../../../common';
import { ColumnProps } from './';
import { Node } from '../../../state';
import { Tooltip, PolkadotIcon, TooltipCopyCallback } from '../../';
import { Tooltip, PezkuwiIcon, TooltipCopyCallback } from '../../';
import icon from '../../../icons/shield.svg';
export class ValidatorColumn extends React.Component<ColumnProps> {
@@ -47,7 +47,7 @@ export class ValidatorColumn extends React.Component<ColumnProps> {
return (
<td className="Column" onClick={this.onClick}>
<Tooltip text={validator} copy={this.onCopy} />
<PolkadotIcon
<PezkuwiIcon
className="Column-validator"
account={validator}
size={16}
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//Column for specifying which polkadot version node is running on
//Column for specifying which Pezkuwi node version is running
import * as React from 'react';
import { ColumnProps } from './';
+2 -2
View File
@@ -21,7 +21,7 @@ import {
milliOrSecond,
secondsWithPrecision,
} from '../../utils';
import { Ago, Icon, PolkadotIcon } from '../';
import { Ago, Icon, PezkuwiIcon } from '../';
import { Node } from '../../state';
import nodeIcon from '../../icons/server.svg';
@@ -116,7 +116,7 @@ export class Location extends React.Component<LocationProps, LocationState> {
<td colSpan={5}>
{trimHash(validator, 30)}
<span className="Location-validator">
<PolkadotIcon account={validator} size={16} />
<PezkuwiIcon account={validator} size={16} />
</span>
</td>
</tr>
@@ -1,11 +1,7 @@
// Copyright 2018 Paritytech via paritytech/oo7/polkadot-identicon
// Copyright 2018 @polkadot/ui-shared authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// This has been converted from the original version that can be found at
//
// https://github.com/paritytech/oo7/blob/251ba2b7c45503b68eab4320c270b5afa9bccb60/packages/polkadot-identicon/src/index.jsx
// Pezkuwi Identicon Component
// Based on polkadot-identicon by Parity Technologies
// Copyright (C) 2024 Dijital Kurdistan Tech Institute
// Licensed under GPL-3.0
import * as React from 'react';
import { blake2AsU8a, decodeAddress } from '@polkadot/util-crypto';
import { getSVGShadowRoot, W3SVG } from '../utils';
@@ -193,7 +189,7 @@ function generate(address: string, isSixPoint = false): Circle[] {
);
}
interface PolkadotIconProps {
interface PezkuwiIconProps {
account: string;
size: number;
className?: string;
@@ -227,8 +223,8 @@ function renderShadowIcon(account: string) {
}
}
export class PolkadotIcon extends React.Component<PolkadotIconProps> {
public shouldComponentUpdate(nextProps: PolkadotIconProps) {
export class PezkuwiIcon extends React.Component<PezkuwiIconProps> {
public shouldComponentUpdate(nextProps: PezkuwiIconProps) {
return (
this.props.account !== nextProps.account ||
this.props.size !== nextProps.size
+1 -1
View File
@@ -29,4 +29,4 @@ export * from './Sparkline';
export * from './Truncate';
export * from './Tooltip';
export * from './Filter';
export * from './PolkadotIcon';
export * from './PezkuwiIcon';
+4
View File
@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="10" fill="#24CC85"/>
<text x="12" y="16" font-size="10" fill="white" text-anchor="middle" font-weight="bold">B</text>
</svg>

After

Width:  |  Height:  |  Size: 252 B

+4
View File
@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="10" fill="#FF8C00"/>
<text x="12" y="16" font-size="8" fill="white" text-anchor="middle" font-weight="bold">JS</text>
</svg>

After

Width:  |  Height:  |  Size: 252 B

+4
View File
@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="10" fill="#0066CC"/>
<text x="12" y="16" font-size="10" fill="white" text-anchor="middle" font-weight="bold">P</text>
</svg>

After

Width:  |  Height:  |  Size: 252 B

+3 -4
View File
@@ -19,10 +19,9 @@ import { Types, Maybe, SortedCollection } from './common';
import { Column } from './components/List';
export const PINNED_CHAINS = {
// Kusama
'0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe': 2,
// Polkadot
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3': 1,
// Pezkuwichain (main relay chain)
// Genesis hash will be set after mainnet launch
// '0x...': 1,
};
export function comparePinnedChains(a: string, b: string) {