Skip to content

Commit

Permalink
Paseo chain spec (#277)
Browse files Browse the repository at this point in the history
* new chain spec for paseo

* bump 1.9.4

* fix CI tagging

* change paseo paraid to 2015

* regenesis paseo chain spec

* add CI artifact creation for paseo

* specify relay in chain name for unambiguity

* add paseo bootnodes

* unmistakeable Testnet naming
  • Loading branch information
brenzi authored Mar 22, 2024
1 parent 6f2713b commit 41804b8
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-dev'
- '[0-9]+.[0-9]+.[0-9]+-dev*'
pull_request:
branches: [master]
workflow_dispatch:
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
fail-fast: false
matrix:
chain: [integritee]
config: [rococo, westend, kusama, polkadot, moonbase]
config: [rococo, westend, kusama, polkadot, moonbase, paseo]
include:
- chain: shell
config: kusama-lease2
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion polkadot-parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "integritee-collator"
description = "The Integritee parachain collator binary"
# align major.minor revision with the runtimes. bump patch revision ad lib. make this the github release tag
version = "1.9.3"
version = "1.9.4"
authors = ["Integritee AG <[email protected]>"]
homepage = "https://integritee.network/"
repository = "https://github.com/integritee-network/parachain"
Expand Down
88 changes: 88 additions & 0 deletions polkadot-parachains/chain-specs/integritee-paseo.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions polkadot-parachains/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ pub enum RelayChain {
Kusama,
Polkadot,
Moonbase,
Paseo,
}

pub fn shell_rococo_config() -> Result<ChainSpec, String> {
Expand Down Expand Up @@ -298,6 +299,10 @@ pub fn integritee_moonbase_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../chain-specs/integritee-moonbase.json")[..])
}

pub fn integritee_paseo_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../chain-specs/integritee-paseo.json")[..])
}

impl ToString for RelayChain {
fn to_string(&self) -> String {
match self {
Expand All @@ -310,6 +315,7 @@ impl ToString for RelayChain {
RelayChain::Kusama => "kusama".into(),
RelayChain::Polkadot => "polkadot".into(),
RelayChain::Moonbase => "westend_moonbase_relay_testnet".into(),
RelayChain::Paseo => "paseo".into(),
}
}
}
Expand All @@ -326,6 +332,7 @@ impl RelayChain {
RelayChain::Kusama => ChainType::Live,
RelayChain::Polkadot => ChainType::Live,
RelayChain::Moonbase => ChainType::Live,
RelayChain::Paseo => ChainType::Live,
}
}
fn protocol_id(&self) -> &str {
Expand All @@ -339,6 +346,7 @@ impl RelayChain {
RelayChain::Kusama => "teer-k",
RelayChain::Polkadot => "teer-p",
RelayChain::Moonbase => "teer-m",
RelayChain::Paseo => "teer-o",
}
}
}
10 changes: 7 additions & 3 deletions polkadot-parachains/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
use crate::{
chain_spec,
chain_spec::{
integritee_chain_spec, integritee_moonbase_config, shell_chain_spec, shell_kusama_config,
shell_kusama_lease2_config, shell_kusama_lease3_config, shell_polkadot_config,
shell_rococo_config, shell_westend_config, GenesisKeys, RelayChain,
integritee_chain_spec, integritee_moonbase_config, integritee_paseo_config,
shell_chain_spec, shell_kusama_config, shell_kusama_lease2_config,
shell_kusama_lease3_config, shell_polkadot_config, shell_rococo_config,
shell_westend_config, GenesisKeys, RelayChain,
},
cli::{Cli, RelayChainCli, Subcommand},
};
Expand All @@ -47,6 +48,7 @@ const KUSAMA_PARA_ID: u32 = 2015;
const KUSAMA_SWAP_PARA_ID: u32 = 2267;
const POLKADOT_PARA_ID: u32 = 2039;
const MOONBASE_PARA_ID: u32 = 2015;
const PASEO_PARA_ID: u32 = 2015;

trait IdentifyChain {
fn is_shell(&self) -> bool;
Expand Down Expand Up @@ -76,6 +78,7 @@ fn load_spec(
"integritee-kusama" => Box::new(shell_kusama_config()?),
"integritee-polkadot" => Box::new(shell_polkadot_config()?),
"integritee-moonbase" => Box::new(integritee_moonbase_config()?),
"integritee-paseo" => Box::new(integritee_paseo_config()?),
// chain-spec that has been registered for the next kusama slot lease
"shell-kusama-lease2" => Box::new(shell_kusama_lease2_config()?),
"shell-kusama-lease3" => Box::new(shell_kusama_lease3_config()?),
Expand All @@ -86,6 +89,7 @@ fn load_spec(
"integritee-kusama-fresh" => Box::new(shell_chain_spec(KUSAMA_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Kusama)),
"integritee-polkadot-fresh" => Box::new(shell_chain_spec(POLKADOT_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Polkadot)),
"integritee-moonbase-fresh" => Box::new(integritee_chain_spec(MOONBASE_PARA_ID.into(), GenesisKeys::IntegriteeDev, RelayChain::Moonbase)),
"integritee-paseo-fresh" => Box::new(integritee_chain_spec(PASEO_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Paseo)),
"shell-kusama-fresh" => Box::new(shell_chain_spec(KUSAMA_SWAP_PARA_ID.into(), GenesisKeys::Integritee, RelayChain::Kusama)),

// on-the-spot specs
Expand Down
1 change: 1 addition & 0 deletions scripts/update_hardcoded_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"integritee-kusama",
"integritee-polkadot",
"integritee-moonbase",
"integritee-paseo",
"shell-kusama", # enable if you want to change the data for registration.
]
COLLATOR = "target/release/integritee-collator"
Expand Down

0 comments on commit 41804b8

Please sign in to comment.