forked from polkadot-cloud/polkadot-staking-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Cerebellum-Network/feature/update-validat…
…or-entity-setup-guide Enable Community Section: Setup Instructions, Add Validators for Cere.
- Loading branch information
Showing
7 changed files
with
104 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ Validators can add their identity, contact information and validator list to the | |
|
||
To add your entity, submit a PR with the following changes: | ||
|
||
- **Thumbnail SVG:** Add your entity's thumbnail as an SVG file to [this folder](https://github.com/paritytech/polkadot-staking-dashboard/tree/master/src/config/validators/thumbnails). | ||
- **Entity details:** Add your entity details to the `VALIDATORS_COMMUNITY`JSON object in [this file](https://github.com/paritytech/polkadot-staking-dashboard/blob/master/src/config/validators/index.ts). | ||
- **Thumbnail SVG:** Add your entity's thumbnail as an SVG file to [this folder](https://github.com/Cerebellum-Network/staking-dashboard/tree/dev-cere/src/config/validators/thumbnails). | ||
- **Entity details:** Add your entity details to the `VALIDATORS_COMMUNITY`JSON object in [this file](https://github.com/Cerebellum-Network/staking-dashboard/blob/dev-cere/src/config/validators/index.ts). | ||
|
||
## Entity Structure | ||
|
||
|
@@ -28,29 +28,34 @@ The following table outlines the structure of a `VALIDATOR_COMMUNITY` entry: | |
At the top of `config/validators/index.ts`, import the SVG you added in the corresponding `./thumbnails` folder as a React component: | ||
|
||
``` | ||
import { ReactComponent as ValidatorCentral } from './thumbnails/validatorCentral.svg'; | ||
import { ReactComponent as Cere } from './thumbnails/cere.svg'; | ||
``` | ||
|
||
Then add your entity details to the `VALIDATOR_COMMUNITY` object. Only provide the validator(s) for the particular network(s) you are operating in. If you have no operating validators on Kusama, for example, the `kusama` key can be omitted. | ||
Then add your entity details to the `VALIDATOR_COMMUNITY` object. Only provide the validator(s) for the particular network(s) you are operating in. | ||
|
||
The following example defines 2 validators on the Polkadot network, and 1 on Kusama: | ||
The following example defines 8 validators on the Cere Network | ||
|
||
``` | ||
export const VALIDATOR_COMMUNITY = [ | ||
... | ||
{ | ||
name: 'Validator Central', | ||
Thumbnail: ValidatorCentral, | ||
bio: 'Summing up my validator identity in a sentence or so. Maximum 300 characters.', | ||
email: '[email protected]', | ||
twitter: '@ParityTech', | ||
website: 'https://parity.io', | ||
name: 'CERE', | ||
Thumbnail: Cere, | ||
bio: `Official Validators from Cere Network, the world's first Decentralized Data Cloud platform.`, | ||
email: '[email protected]', | ||
website: 'https://cere.network', | ||
twitter: '@CereNetwork', | ||
validators: { | ||
polkadot: [ | ||
'1hYiMW8KSfUYChzCQSPGXvMSyKVqmyvMXqohjKr3oU5PCXF', | ||
'14QSBoJMHF2Zn2XEoLNSeWgqBRr8XoKPy4BxToD6yLSeFFYe' | ||
cere: [ | ||
'6S4mrsCrqWoBAYrp2PKQNh7CYcCtyEtYpx5J626Kj5vszSyy', | ||
'6QhzyvZQm3dLjDmeaoUnLPXzfuTi6X1HEo6AX6gfVbC3shzD', | ||
'6RgfwDiQTLjgbkQ5CorrKtRtCaDABQKYsibk9MeyvzmKFrk2', | ||
'6TBhZAgtFc3Wr8BeNu5tdMJG1NDpxKbG2Hwf2UbVtMGyFxzN', | ||
'6Pyh9zZgp4XCP338VDG7oshK7PvsAdyuBN6S2NNm7CBoCXx8', | ||
'6S9tXQmPYoeBXYey8vKYi9BMbNMD8Zgqb62k7SYMNQLUbydZ', | ||
'6PwAv2L43zGPEwHTb1L7LyCWv7yq2Hc4dSVYHvvi1kscCR91', | ||
'6Qshjra42mLDtc9ouHzUz1bMmYXg2qasmW2xSLgendRdsYED', | ||
], | ||
kusama: ['FykhnPA3pn269LAcQ8VQKDgUQ8ieAaSLwJDhAVhu3dcokVR'], | ||
}, | ||
}, | ||
... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,139 +5,27 @@ | |
* Use upper camel-case for your SVG import, lower camel case for the svg. | ||
* import { ReactComponent as ValidatorEntityName } from './thumbnails/validatorEntityName.svg'; | ||
*/ | ||
import { ReactComponent as Amforc } from './thumbnails/amforc.svg'; | ||
import { ReactComponent as Crifferent } from './thumbnails/crifferent.svg'; | ||
import { ReactComponent as HighStake } from './thumbnails/highstake.svg'; | ||
import { ReactComponent as Polkachu } from './thumbnails/polkachu.svg'; | ||
import { ReactComponent as Polkadotters } from './thumbnails/polkadotters.svg'; | ||
import { ReactComponent as Stakerspace } from './thumbnails/stakerspace.svg'; | ||
import { ReactComponent as TurboFlakes } from './thumbnails/turboflakes.svg'; | ||
import { ReactComponent as Wojdot } from './thumbnails/wojdot.svg'; | ||
import { ReactComponent as Cere } from './thumbnails/cere.svg'; | ||
|
||
export const VALIDATOR_COMMUNITY = [ | ||
{ | ||
name: '🍁 HIGH/STAKE 🥩', | ||
Thumbnail: HighStake, | ||
bio: 'We came for the memes, we stay for the tech. Located in Switzerland with 15+ years of experience in running reliable online services. We are exclusively running our validators on dedicated hardware in datacenters across Europe.', | ||
email: '[email protected]', | ||
website: 'https://highstake.tech/', | ||
validators: { | ||
polkadot: [ | ||
'12bget8jJWnyjqYPiCwkXZjDh5tDBkta1WUcDYyndbXVDmQ1', | ||
'12Dw4SzhsxX3fpDiLUYXm9oGbfxcbg1Peq67gc5jkkEo1TKr', | ||
], | ||
kusama: [ | ||
'DbRgw96nMQcFEFZWTLd6LSPNdh8u3NBuUDfAhDmB6UU8cJC', | ||
'HQuPha82sRy91zZn73XRGJVV3ernBh5HZKftUcoDT8CSUwK', | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'Amforc', | ||
Thumbnail: Amforc, | ||
bio: 'We are a independent and experienced staking provider from Switzerland. We run our validators in a hybrid cloud setup across multiple geographical locations. Our validators run significantly above average and close to no blocks are missed as para-validator.', | ||
email: '[email protected]', | ||
twitter: '@amforcag', | ||
website: 'https://amforc.com/', | ||
validators: { | ||
polkadot: ['1y6CPLgccsysCEii3M7jQF834GZsz9A3HMcZz3w7RjGPpBL'], | ||
kusama: [ | ||
'DVUNoinHdSNfismcrFaBwdJfysxc7A48QkNvTDnTSPXPw3q', | ||
'DpLatoXXBiSAPooF17bzUZGo7huNB7USfRqd2SgL6RBy2zr', | ||
'E8zY6KdAH1vuKKMaPdHYLAziht32v2BLqXk6qBw7WtiV2Dv', | ||
'Ff3xdNrXA47svhiTJHj9uNhxLo29PYjYcJ9cUseAd9FK6iQ', | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'polkachu.com', | ||
Thumbnail: Polkachu, | ||
bio: 'Polkachu Validators helps investors compound their crypto investments with low commission and advanced support.', | ||
email: '[email protected]', | ||
twitter: '@polka_chu', | ||
website: 'https://polkachu.com/', | ||
validators: { | ||
polkadot: ['15ym3MDSG4WPABNoEtx2rAzBB1EYWJDWbWYpNg1BwuWRAQcY'], | ||
kusama: [ | ||
'CsKvJ4fdesaRALc5swo5iknFDpop7YUwKPJHdmUvBsUcMGb', | ||
'GpyTMuLmG3ADWRxhZpHQh5rqMgNpFoNUyxA1DJAXfvsQ2Ly', | ||
'CeD8Kk3QLzp2HDRSciF6YQAc2xYAPurMsHAQUGwEJgCWAf2', | ||
'GZmbAW7rRi2qkMrHYzmeG2a3fS7nTaAZpjdum8QZ7CvmM7H', | ||
'G1qbViqnm6yCZwEbfB4oE38ro8VqJx21zyvW7QN8zAJC2B7', | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'Polkadotters', | ||
Thumbnail: Polkadotters, | ||
bio: 'We are Polkadot focused node operators and community builders from Czechia.', | ||
email: '[email protected]', | ||
twitter: '@Polkadotters1', | ||
website: 'https://polkadotters.com/', | ||
validators: { | ||
polkadot: ['16A4n4UQqgxw5ndeehPjUAobDNmuX2bBoPXVKj4xTe16ktRN'], | ||
kusama: ['FVAFUJhJy9tj1X4PaEXX3tDzjaBEVsVunABAdsDMD4ZYmWA'], | ||
}, | ||
}, | ||
{ | ||
name: 'Sik | crifferent.de', | ||
Thumbnail: Crifferent, | ||
bio: 'Crifferent offers reliable and secure staking services made in Germany. Combining professionals from IT, marketing, and finance, they evaluate the best projects and offer services to its full extent.', | ||
email: '[email protected]', | ||
twitter: '@dev0_sik', | ||
website: 'https://crifferent.de/', | ||
validators: { | ||
polkadot: ['15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHddeM'], | ||
kusama: [ | ||
'HWyLYmpW68JGJYoVJcot6JQ1CJbtUQeTdxfY1kUTsvGCB1r', | ||
'GLSikJaXTVWvWtUhzB3Bj6xb5TcnhTUp6EuAkxaCohT9UBv', | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'Staker Space', | ||
Thumbnail: Stakerspace, | ||
bio: 'Hi! We are an independent and experienced staking provider. Our homebase is the Netherlands, but we have a run across multiple geographical locations dedicated hardware for our validators. We have been running Kusama and Polkadot validators since the start of the network are highly experienced in doing so. If you have any questions, please get in touch with us.', | ||
email: '[email protected]', | ||
twitter: '@stakerspace', | ||
website: 'https://staker.space', | ||
validators: { | ||
polkadot: [ | ||
'16SpacegeUTft9v3ts27CEC3tJaxgvE4uZeCctThFH3Vb24p', | ||
'14N5nJ4oR4Wj36DsBcPLh1JqjvrM2Uf23No2yc2ojjCvSC24', | ||
'1NqVmUJCyaj5yZ9jp7ZZa58hbUx2QaBZ4eSCu9bqAdZXgAm', | ||
], | ||
kusama: [ | ||
'FcjmeNzPk3vgdENm1rHeiMCxFK96beUoi2kb59FmCoZtkGF', | ||
'Eksma7JmWh8DenpNKi2uCavwaKJ9QrJJbtcnmwJr3hbHSmC', | ||
'Dm64aaAUyy5dvYCSmyzz3njGrWrVaki9F6BvUDSYjDDoqR2', | ||
'DfHkfoKa6xzNMWTNGL8SH8VyY69gajen4ijgmegeU4cZm1H', | ||
name: 'CERE', | ||
Thumbnail: Cere, | ||
bio: `Official Validators from Cere Network, the world's first Decentralized Data Cloud platform.`, | ||
email: '[email protected]', | ||
website: 'https://cere.network', | ||
twitter: '@CereNetwork', | ||
validators: { | ||
cere: [ | ||
'6S4mrsCrqWoBAYrp2PKQNh7CYcCtyEtYpx5J626Kj5vszSyy', | ||
'6QhzyvZQm3dLjDmeaoUnLPXzfuTi6X1HEo6AX6gfVbC3shzD', | ||
'6RgfwDiQTLjgbkQ5CorrKtRtCaDABQKYsibk9MeyvzmKFrk2', | ||
'6TBhZAgtFc3Wr8BeNu5tdMJG1NDpxKbG2Hwf2UbVtMGyFxzN', | ||
'6Pyh9zZgp4XCP338VDG7oshK7PvsAdyuBN6S2NNm7CBoCXx8', | ||
'6S9tXQmPYoeBXYey8vKYi9BMbNMD8Zgqb62k7SYMNQLUbydZ', | ||
'6PwAv2L43zGPEwHTb1L7LyCWv7yq2Hc4dSVYHvvi1kscCR91', | ||
'6Qshjra42mLDtc9ouHzUz1bMmYXg2qasmW2xSLgendRdsYED', | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'TurboFlakes', | ||
Thumbnail: TurboFlakes, | ||
bio: 'TurboFlakes provides validators with character running on top of dedicated and high performance servers. Raiden, Coco and Momo are our named validators serving non-stop Polkadot and Kusama. We also provide end-user tooling to help you to interact with substrate blockchain networks. Feel free to reach out.', | ||
email: '[email protected]', | ||
twitter: '@turboflakes', | ||
website: 'https://turboflakes.io', | ||
validators: { | ||
polkadot: ['12gPFmRqnsDhc9C5DuXyXBFA23io5fSGtKTSAimQtAWgueD2'], | ||
kusama: [ | ||
'FZsMKYHoQG1dAVhXBMyC7aYFYpASoBrrMYsAn1gJJUAueZX', | ||
'GA7j1FHWXpEU4kavowEte6LWR3NgZ8bkv4spWa9joiQF5R2', | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'WOJDOT ʕ •ᴥ•ʔ', | ||
Thumbnail: Wojdot, | ||
bio: 'Independent Polkadot Validator. We run our service on bare metal machines via a cloud service with the ability to spin up validator nodes in different regions within a matter of minutes.', | ||
email: '[email protected]', | ||
twitter: '@wojdot', | ||
validators: { | ||
polkadot: ['13kz33kotYa3M75u5avMS367zJY3Fx2y5ZYASEPunqfEeCjD'], | ||
}, | ||
}, | ||
]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,56 @@ | ||
// Copyright 2022 @paritytech/polkadot-staking-dashboard authors & contributors | ||
// Copyright 2023 @paritytech/polkadot-staking-dashboard authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { u8aToString, u8aUnwrapBytes } from '@polkadot/util'; | ||
|
||
export const getIdentityDisplay = (identity: any, _superIdentity: any) => { | ||
// first check identity of validator | ||
export const getIdentityDisplay = (_identity: any, _superIdentity: any) => { | ||
let displayFinal = ''; | ||
let foundSuper = false; | ||
|
||
// display.Raw | ||
let display = identity?.info?.display?.Raw ?? null; | ||
// legal.Raw | ||
display = display === null ? identity?.info?.legal.Raw ?? null : display; | ||
|
||
// check if identity has been byte encoded | ||
const displayAsBytes = u8aToString(u8aUnwrapBytes(display)); | ||
|
||
if (displayAsBytes !== '') { | ||
return displayAsBytes; | ||
} | ||
if (display !== null) { | ||
return display; | ||
} | ||
|
||
// if still null, check super identity | ||
// check super identity exists, get display.Raw if it does | ||
const superIdentity = _superIdentity?.identity ?? null; | ||
const superRaw = _superIdentity?.[1]?.Raw ?? null; | ||
const superDisplay = superIdentity?.info?.display?.Raw ?? null; | ||
|
||
// display.Raw | ||
display = superIdentity?.info?.display?.Raw ?? null; | ||
// legal.Raw | ||
display = display === null ? superIdentity?.info?.legal.Raw ?? null : display; | ||
// check if super raw has been encoded | ||
const superRawAsBytes = u8aToString(u8aUnwrapBytes(superRaw)); | ||
|
||
// check if super identity has been byte encoded | ||
const superIdentityAsBytes = u8aToString(u8aUnwrapBytes(display)); | ||
const superIdentityAsBytes = u8aToString(u8aUnwrapBytes(superDisplay)); | ||
|
||
if (superIdentityAsBytes !== '') { | ||
return superIdentityAsBytes; | ||
displayFinal = superIdentityAsBytes; | ||
foundSuper = true; | ||
} else if (superDisplay !== null) { | ||
displayFinal = superDisplay; | ||
foundSuper = true; | ||
} | ||
|
||
if (!foundSuper) { | ||
// cehck sub identity exists, get display.Raw if it does | ||
const identity = _identity?.info?.display?.Raw ?? null; | ||
|
||
// check if identity has been byte encoded | ||
const subIdentityAsBytes = u8aToString(u8aUnwrapBytes(identity)); | ||
|
||
if (subIdentityAsBytes !== '') { | ||
displayFinal = subIdentityAsBytes; | ||
} else if (identity !== null) { | ||
displayFinal = identity; | ||
} | ||
} | ||
if (display !== null) { | ||
return display; | ||
if (displayFinal === '') { | ||
return null; | ||
} | ||
|
||
return display; | ||
return ( | ||
<> | ||
{displayFinal} | ||
{superRawAsBytes !== '' ? ( | ||
<span> / {superRawAsBytes}</span> | ||
) : superRaw !== null ? ( | ||
<span> / {superRaw}</span> | ||
) : null} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters