Skip to content

Commit

Permalink
Merge pull request #1632 from subspace/gemini-3e-chain-spec
Browse files Browse the repository at this point in the history
Gemini 3e chain spec
  • Loading branch information
nazar-pc authored Jun 30, 2023
2 parents 4933327 + e62e797 commit ddde072
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 3 deletions.
164 changes: 164 additions & 0 deletions crates/subspace-node/res/chain-spec-raw-gemini-3e.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions crates/subspace-node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use subspace_runtime_primitives::{AccountId, Balance, BlockNumber, SSC};

const SUBSPACE_TELEMETRY_URL: &str = "wss://telemetry.subspace.network/submit/";
const DEVNET_CHAIN_SPEC: &[u8] = include_bytes!("../res/chain-spec-raw-devnet.json");
const GEMINI_3E_CHAIN_SPEC: &[u8] = include_bytes!("../res/chain-spec-raw-gemini-3e.json");

/// List of accounts which should receive token grants, amounts are specified in SSC.
const TOKEN_GRANTS: &[(&str, u128)] = &[
Expand Down Expand Up @@ -167,8 +168,8 @@ pub fn gemini_3e_compiled() -> Result<ConsensusChainSpec<GenesisConfig>, String>
))
}

pub fn gemini_3d_config() -> Result<ConsensusChainSpec<GenesisConfig>, String> {
Err("Wrong release for Gemini 3d. Use the release prefixed with `gemini-3d`".to_string())
pub fn gemini_3e_config() -> Result<ConsensusChainSpec<GenesisConfig>, String> {
ConsensusChainSpec::from_json_bytes(GEMINI_3E_CHAIN_SPEC)
}

pub fn devnet_config() -> Result<ConsensusChainSpec<GenesisConfig>, String> {
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl SubstrateCli for Cli {
fn load_spec(&self, id: &str) -> Result<Box<dyn ChainSpec>, String> {
let mut chain_spec = match id {
"gemini-3e-compiled" => chain_spec::gemini_3e_compiled()?,
"gemini-3d" => chain_spec::gemini_3d_config()?,
"gemini-3e" => chain_spec::gemini_3e_config()?,
"devnet" => chain_spec::devnet_config()?,
"devnet-compiled" => chain_spec::devnet_config_compiled()?,
"dev" => chain_spec::dev_config()?,
Expand Down

0 comments on commit ddde072

Please sign in to comment.