Add Spartan network (#6105)
* add basic config, logos, endpoints, config. * update spec name, test color with gradient * Fix conflict - alphabetical order * updated custom types * fix local rpc node to wss://dev-rpc.subspace.network * Fix typo * Fix PoCEquivocationOffence tytpe Fix PoCEquivocationOffence offender as FarmerId * fix: sorted Spartan Testnet app-config locales, testing endpoints, chainLogo * update subspace spec definitions Co-authored-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
This commit is contained in:
parent
7fcf1b1a95
commit
6a417b437c
@ -87,6 +87,7 @@ import stafi from './stafi';
|
||||
import subdao from './subdao';
|
||||
import subgame from './subgame';
|
||||
import subsocial from './subsocial';
|
||||
import subspace from './subspace';
|
||||
import ternoa from './ternoa';
|
||||
import trustbase from './trustbase';
|
||||
import uart from './uart';
|
||||
@ -186,6 +187,7 @@ const spec: Record<string, OverrideBundleDefinition> = {
|
||||
nftmart,
|
||||
'node-moonbeam': moonbeam,
|
||||
'node-polkadex': polkadex,
|
||||
'node-template-spartan': subspace,
|
||||
'nodle-chain': nodle,
|
||||
'oak-testnet': oakTestnet,
|
||||
opportunity,
|
||||
|
||||
114
packages/apps-config/src/api/spec/subspace.ts
Normal file
114
packages/apps-config/src/api/spec/subspace.ts
Normal file
@ -0,0 +1,114 @@
|
||||
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
const definitions: OverrideBundleDefinition = {
|
||||
types: [
|
||||
{
|
||||
// on all versions
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
PoCKind: '[u8; 16]',
|
||||
RpcSolution: {
|
||||
public_key: '[u8; 32]',
|
||||
nonce: 'u64',
|
||||
encoding: 'Vec<u8>',
|
||||
signature: 'Vec<u8>',
|
||||
tag: '[u8; 8]'
|
||||
},
|
||||
ProposedProofOfSpaceResult: {
|
||||
slot_number: 'Slot',
|
||||
solution: 'Option<RpcSolution>',
|
||||
secret_key: 'Vec<u8>'
|
||||
},
|
||||
RpcNewSlotInfo: {
|
||||
slot_number: 'Slot',
|
||||
challenge: '[u8; 8]',
|
||||
salt: '[u8; 8]',
|
||||
next_salt: 'Option<[u8; 8]>',
|
||||
solution_range: 'u64'
|
||||
},
|
||||
PoCRandomness: '[u8; 32]',
|
||||
FarmerSignature: 'Signature',
|
||||
FarmerId: 'AccountId',
|
||||
PoCBlockWeight: 'u32',
|
||||
PoCNextEpochDescriptor: {
|
||||
randomness: 'PoCRandomness'
|
||||
},
|
||||
PoCNextConfigDescriptorV1: {
|
||||
c: '(u64, u64)'
|
||||
},
|
||||
PoCNextConfigDescriptor: {
|
||||
_enum: {
|
||||
V0: 'Null',
|
||||
V1: 'PoCNextConfigDescriptorV1'
|
||||
}
|
||||
},
|
||||
SolutionRangeDescriptor: {
|
||||
solution_range: 'u64'
|
||||
},
|
||||
SaltDescriptor: {
|
||||
salt: 'u64'
|
||||
},
|
||||
NextSolutionRangeDescriptor: {
|
||||
solution_range: 'u64'
|
||||
},
|
||||
NextSaltDescriptor: {
|
||||
salt: 'u64'
|
||||
},
|
||||
PoCEpochConfiguration: {
|
||||
c: '(u64, u64)'
|
||||
},
|
||||
ConsensusLog: {
|
||||
_enum: {
|
||||
Phantom: 'Null',
|
||||
NextEpochData: 'PoCNextEpochDescriptor',
|
||||
NextConfigData: 'PoCNextConfigDescriptor',
|
||||
SolutionRangeData: 'SolutionRangeDescriptor',
|
||||
SaltData: 'SaltDescriptor',
|
||||
NextSolutionRangeData: 'NextSolutionRangeDescriptor',
|
||||
NextSaltData: 'NextSaltDescriptor'
|
||||
}
|
||||
},
|
||||
Solution: {
|
||||
public_key: 'FarmerId',
|
||||
nonce: 'u64',
|
||||
encoding: 'Vec<u8>',
|
||||
signature: 'Vec<u8>',
|
||||
tag: '[u8; 8]'
|
||||
},
|
||||
PreDigest: {
|
||||
slot: 'Slot',
|
||||
solution: 'Solution'
|
||||
},
|
||||
EquivocationProof: {
|
||||
offender: 'FarmerId',
|
||||
slot: 'Slot',
|
||||
first_header: 'Header',
|
||||
second_header: 'Header'
|
||||
},
|
||||
PoCEquivocationOffence: {
|
||||
slot: 'Slot',
|
||||
offender: 'FarmerId'
|
||||
},
|
||||
PoCGenesisConfiguration: {
|
||||
slot_duration: 'u64',
|
||||
epoch_length: 'u64',
|
||||
c: '(u64, u64)',
|
||||
randomness: 'PoCRandomness'
|
||||
},
|
||||
Kind: 'PoCKind',
|
||||
Randomness: 'PoCRandomness',
|
||||
NextEpochDescriptor: 'PoCNextEpochDescriptor',
|
||||
NextConfigDescriptorV1: 'PoCNextConfigDescriptorV1',
|
||||
NextConfigDescriptor: 'PoCNextConfigDescriptor'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default definitions;
|
||||
@ -397,6 +397,13 @@ export function createTesting (t: TFunction, firstOnly: boolean, withSort: boole
|
||||
Soramitsu: 'wss://ws.stage.sora2.soramitsu.co.jp'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'spartan-testnet',
|
||||
text: t('rpc.test.subspace', 'Spartan testnet', { ns: 'apps-config' }),
|
||||
providers: {
|
||||
'Subspace Network': 'wss://dev-rpc.subspace.network'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'subgame',
|
||||
text: t('rpc.test.subgame', 'SubGame Staging', { ns: 'apps-config' }),
|
||||
|
||||
@ -145,6 +145,7 @@ const nodeSora = '#2D2926';
|
||||
const nodeStafi = '#00F3AB';
|
||||
const nodeSubDAO = 'linear-gradient(50deg, #F20092 0%, #FF4D5D 100%)';
|
||||
const nodeSubsocial = '#b9018c';
|
||||
const nodeSubspace = 'linear-gradient(to left, rgba(32,90,172,1) 0%, rgba(26,72,138,1) 50%, rgba(13,36,69,1) 100%)';
|
||||
const nodeTernoa = '#d622ff';
|
||||
const nodeUniarts = chainUniarts;
|
||||
const nodeUnique = chainUnique;
|
||||
@ -274,6 +275,7 @@ export const chainColors: Record<string, string> = Object.entries({
|
||||
sherpax: chainChainx,
|
||||
Shiden: chainShiden,
|
||||
Spanner: chainSpanner,
|
||||
'Spartan testnet': nodeSubspace,
|
||||
Statemine: specStatemine,
|
||||
'Statemine Test': specStatemine,
|
||||
Statemint: specStatemint,
|
||||
@ -360,6 +362,7 @@ export const nodeColors = Object.entries({
|
||||
'Riochain Staging': nodeRiochain,
|
||||
'Shiden Collator': chainShiden,
|
||||
SORA: nodeSora,
|
||||
'Spartan testnet': nodeSubspace,
|
||||
'Stafi node': nodeStafi,
|
||||
'Statemine Collator': specStatemint,
|
||||
'Statemint Collator': specStatemint,
|
||||
|
||||
@ -124,6 +124,7 @@ import nodeStatemine from './nodes/statemine.svg';
|
||||
import nodeSubDAO from './nodes/subdao.png';
|
||||
import nodeSubGame from './nodes/subgame.svg';
|
||||
import nodeSubsocial from './nodes/subsocial.svg';
|
||||
import nodeSubspace from './nodes/subspace.png';
|
||||
import nodeSubstrate from './nodes/substrate-hexagon.svg';
|
||||
import nodeTernoa from './nodes/ternoa.svg';
|
||||
import nodeTrustBase from './nodes/trustbase.png';
|
||||
@ -233,6 +234,7 @@ export const chainLogos = Object.entries({
|
||||
Shiden: chainShiden,
|
||||
SingLavender: nodeSingLavender,
|
||||
Spanner: chainSpanner,
|
||||
'Spartan Testnet': nodeSubspace,
|
||||
Statemine: nodeStatemine,
|
||||
'Statemine Test': nodeStatemine,
|
||||
Statemint: nodeStatemine,
|
||||
@ -373,6 +375,7 @@ export const nodeLogos = Object.entries({
|
||||
'Shiden Collator': chainShiden,
|
||||
'SingLavender Parachain Collator': nodeSingLavender,
|
||||
SORA: nodeSora,
|
||||
'Spartan Testnet': nodeSubspace,
|
||||
Stafi: nodeStafi,
|
||||
'Stafi Node': nodeStafi,
|
||||
'Statemine Collator': nodeStatemine,
|
||||
@ -573,6 +576,7 @@ export const namedLogos: Record<string, unknown> = {
|
||||
snakenet: chainSnakenet,
|
||||
'sora-substrate': nodeSora,
|
||||
spanner: chainSpanner,
|
||||
'spartan-testnet': nodeSubspace,
|
||||
stafi: nodeStafi,
|
||||
statemine: nodeStatemine,
|
||||
statemint: nodeStatemine,
|
||||
|
||||
BIN
packages/apps-config/src/ui/logos/nodes/subspace.png
Normal file
BIN
packages/apps-config/src/ui/logos/nodes/subspace.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@ -170,6 +170,7 @@
|
||||
"rpc.test.snowbridge": "Snowbridge",
|
||||
"rpc.test.sora-substrate-staging": "SORA-staging",
|
||||
"rpc.test.subgame": "SubGame Staging",
|
||||
"rpc.test.subspace": "Spartan testnet",
|
||||
"rpc.test.ternoa-chaos": "Ternoa Chaos",
|
||||
"rpc.test.turbulence": "Turbulence",
|
||||
"rpc.test.uniarts": "UniArts",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user