Skip to content

Commit e919e40

Browse files
authored
Chainspec fixes; replace kusama with polkadot + fix chain-id of ajuna-paseo (need to move de chain-db before deployment) (#38)
1 parent 7a47443 commit e919e40

File tree

5 files changed

+34
-25
lines changed

5 files changed

+34
-25
lines changed

node/src/chain_spec_utils.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ impl AjunaKeys {
105105
}
106106

107107
pub enum RelayChain {
108-
Kusama,
108+
Polkadot,
109109
Paseo,
110110
Westend,
111-
KusamaLocal,
111+
PolkadotLocal,
112112
PaseoLocal,
113113
RococoLocal,
114114
WestendLocal,
@@ -117,10 +117,10 @@ pub enum RelayChain {
117117
impl RelayChain {
118118
pub fn id(&self) -> &'static str {
119119
match self {
120-
RelayChain::Kusama => "kusama",
120+
RelayChain::Polkadot => "polkadot",
121121
RelayChain::Paseo => "paseo",
122122
RelayChain::Westend => "westend",
123-
RelayChain::KusamaLocal => "kusama-local",
123+
RelayChain::PolkadotLocal => "polkadot-local",
124124
RelayChain::PaseoLocal => "paseo-local",
125125
RelayChain::RococoLocal => "rococo-local",
126126
RelayChain::WestendLocal => "westend-local",
@@ -129,10 +129,10 @@ impl RelayChain {
129129

130130
pub fn name(&self) -> &'static str {
131131
match self {
132-
RelayChain::Kusama => "Kusama",
132+
RelayChain::Polkadot => "Polkadot",
133133
RelayChain::Paseo => "Paseo",
134134
RelayChain::Westend => "Westend",
135-
RelayChain::KusamaLocal => "Kusama-local",
135+
RelayChain::PolkadotLocal => "Polkadot-local",
136136
RelayChain::PaseoLocal => "Paseo-local",
137137
RelayChain::RococoLocal => "Rococo-local",
138138
RelayChain::WestendLocal => "Westend-local",
@@ -141,21 +141,21 @@ impl RelayChain {
141141

142142
pub(crate) fn chain_type(&self) -> ChainType {
143143
match self {
144-
RelayChain::Kusama => ChainType::Live,
144+
RelayChain::Polkadot => ChainType::Live,
145145
RelayChain::Paseo => ChainType::Live,
146146
RelayChain::Westend => ChainType::Live,
147-
RelayChain::KusamaLocal => ChainType::Local,
147+
RelayChain::PolkadotLocal => ChainType::Local,
148148
RelayChain::PaseoLocal => ChainType::Local,
149149
RelayChain::RococoLocal => ChainType::Local,
150150
RelayChain::WestendLocal => ChainType::Local,
151151
}
152152
}
153153
pub(crate) fn protocol_id(&self) -> &str {
154154
match self {
155-
RelayChain::Kusama => "ajuna-k",
155+
RelayChain::Polkadot => "ajuna-k",
156156
RelayChain::Paseo => "ajuna-pas",
157157
RelayChain::Westend => "ajuna-w",
158-
RelayChain::KusamaLocal => "ajuna-kl",
158+
RelayChain::PolkadotLocal => "ajuna-kl",
159159
RelayChain::PaseoLocal => "ajuna-pasl",
160160
RelayChain::RococoLocal => "ajuna-rl",
161161
RelayChain::WestendLocal => "ajuna-wl",

node/src/command.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ const LOCAL_PARA_ID: u32 = 2051;
8585
fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
8686
Ok(match id {
8787
// live configs
88-
"ajuna-kusama" => Box::new(ajuna_config()?),
88+
"ajuna-polkadot" => Box::new(ajuna_config()?),
8989
"ajuna-paseo" => Box::new(ajuna_paseo_config()?),
9090
"ajuna-westend" => Box::new(ajuna_westend_config()?),
9191

9292
// fresh production/testnet chain-specs based on the current rust code
93-
"ajuna-kusama-fresh" => Box::new(ajuna_chain_spec(POLKADOT_PARA_ID.into(), GenesisKeys::Ajuna, RelayChain::Kusama)),
93+
"ajuna-polkadot-fresh" => Box::new(ajuna_chain_spec(POLKADOT_PARA_ID.into(), GenesisKeys::Ajuna, RelayChain::Polkadot)),
9494
"ajuna-paseo-fresh" => Box::new(ajuna_chain_spec(PASEO_PARA_ID.into(), GenesisKeys::TestnetDev, RelayChain::Paseo)),
9595
"ajuna-westend-fresh" => Box::new(ajuna_chain_spec(WESTEND_PARA_ID.into(), GenesisKeys::TestnetDev, RelayChain::Westend)),
9696

9797
// rust code based configs for a local setup
98-
"ajuna-kusama-local" => Box::new(ajuna_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::KusamaLocal)),
98+
"ajuna-polkadot-local" => Box::new(ajuna_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::PolkadotLocal)),
9999
"ajuna-paseo-local" => Box::new(ajuna_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::PaseoLocal)),
100100
"ajuna-westend-local" => Box::new(ajuna_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::WestendLocal)),
101101
"" | "ajuna-rococo-local" => Box::new(ajuna_chain_spec(LOCAL_PARA_ID.into(), GenesisKeys::WellKnown, RelayChain::RococoLocal)),

resources/ajuna/paseo/ajuna-paseo-raw-unsorted.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "Ajuna Paseo",
3-
"id": "ajuna-ajuna-westend",
3+
"id": "ajuna-paseo",
44
"chainType": "Live",
5-
"bootNodes": [],
5+
"bootNodes": [
6+
"/ip4/95.217.105.80/tcp/23804/p2p/p2p/12D3KooWFR6k9RLLRUJDhS8R4a2s7c8Tc1t2Rf7d7WGn9K2XpNsB",
7+
"/ip4/135.181.240.254/tcp/23804/p2p/p2p/12D3KooWLRzxpDsfbgZPVM3719JQ1Xct5jg3En7ANJZ2ntRfYo7x"
8+
],
69
"telemetryEndpoints": null,
7-
"protocolId": "ajuna-w",
10+
"protocolId": "ajuna-pas",
811
"properties": {
912
"ss58Format": 1328,
1013
"tokenDecimals": 12,
1114
"tokenSymbol": "AJUN"
1215
},
13-
"relay_chain": "ajuna-westend",
16+
"relay_chain": "paseo",
1417
"para_id": 2051,
1518
"codeSubstitutes": {},
1619
"genesis": {

resources/ajuna/paseo/ajuna-paseo-raw.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
"bootNodes": [],
2+
"bootNodes": [
3+
"/ip4/95.217.105.80/tcp/23804/p2p/p2p/12D3KooWFR6k9RLLRUJDhS8R4a2s7c8Tc1t2Rf7d7WGn9K2XpNsB",
4+
"/ip4/135.181.240.254/tcp/23804/p2p/p2p/12D3KooWLRzxpDsfbgZPVM3719JQ1Xct5jg3En7ANJZ2ntRfYo7x"
5+
],
36
"chainType": "Live",
47
"codeSubstitutes": {},
58
"genesis": {
@@ -75,15 +78,15 @@
7578
}
7679
}
7780
},
78-
"id": "ajuna-ajuna-westend",
81+
"id": "ajuna-paseo",
7982
"name": "Ajuna Paseo",
8083
"para_id": 2051,
8184
"properties": {
8285
"ss58Format": 1328,
8386
"tokenDecimals": 12,
8487
"tokenSymbol": "AJUN"
8588
},
86-
"protocolId": "ajuna-w",
87-
"relay_chain": "ajuna-westend",
89+
"protocolId": "ajuna-pas",
90+
"relay_chain": "paseo",
8891
"telemetryEndpoints": null
8992
}

resources/ajuna/paseo/ajuna-paseo.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "Ajuna Paseo",
3-
"id": "ajuna-ajuna-westend",
3+
"id": "ajuna-paseo",
44
"chainType": "Live",
5-
"bootNodes": [],
5+
"bootNodes": [
6+
"/ip4/95.217.105.80/tcp/23804/p2p/12D3KooWFR6k9RLLRUJDhS8R4a2s7c8Tc1t2Rf7d7WGn9K2XpNsB",
7+
"/ip4/135.181.240.254/tcp/23804/p2p/12D3KooWLRzxpDsfbgZPVM3719JQ1Xct5jg3En7ANJZ2ntRfYo7x"
8+
],
69
"telemetryEndpoints": null,
7-
"protocolId": "ajuna-w",
10+
"protocolId": "ajuna-pas",
811
"properties": {
912
"ss58Format": 1328,
1013
"tokenDecimals": 12,
1114
"tokenSymbol": "AJUN"
1215
},
13-
"relay_chain": "ajuna-westend",
16+
"relay_chain": "paseo",
1417
"para_id": 2051,
1518
"codeSubstitutes": {},
1619
"genesis": {

0 commit comments

Comments
 (0)