From 9b7d02d6d65d18df7f4725aafd953f7a9cc7136f Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Fri, 8 Sep 2023 15:19:48 +0200 Subject: [PATCH 1/2] add dev3 chain_spec --- node/src/chain_spec.rs | 53 ++++++++++++++++++++++++++++++++++++++++++ node/src/command.rs | 1 + 2 files changed, 54 insertions(+) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 2402b5f..b48a3eb 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -154,6 +154,59 @@ pub fn development_config2() -> Result { )) } +pub fn development_config3() -> Result { + let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; + Ok(ChainSpec::from_genesis( + // Name + "Integritee Development (Solo2)", + // ID + "integritee-solo-dev2", + ChainType::Development, + move || { + genesis_config( + wasm_binary, + // Initial PoA authorities + vec![authority_keys_from_seed("Alice")], + // Sudo account + get_account_id_from_seed::("Alice"), + // Pre-funded accounts + vec![ + (get_account_id_from_seed::("Alice"), 3_000 * TEER), + (get_account_id_from_seed::("Bob"), 3_000 * TEER), + (get_account_id_from_seed::("Charlie"), 3_000 * TEER), + (TreasuryPalletId::get().into_account_truncating(), 3_000 * TEER), + ( + multisig_account( + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + ], + 2, + ), + 1_000 * TEER, + ), + ], + true, + ) + }, + // Bootnodes + vec![], + // Telemetry + None, + // Protocol ID + Some("teer"), + // Arbitrary string. Nodes will only synchronize with other nodes that have the same value + // in their `fork_id`. This can be used in order to segregate nodes in cases when multiple + // chains have the same genesis hash. + None, + // Properties + Some(teer_properties()), + // Extensions + None, + )) +} + pub fn local_testnet_config() -> Result { let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; Ok(ChainSpec::from_genesis( diff --git a/node/src/command.rs b/node/src/command.rs index f0f4743..7917ae1 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -54,6 +54,7 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> Result, String> { Ok(match id { + "dev3" => Box::new(chain_spec::development_config3()?), "dev2" => Box::new(chain_spec::development_config2()?), "dev" => Box::new(chain_spec::development_config()?), "integritee-solo-fresh" => Box::new(chain_spec::integritee_solo_fresh_config()?), From bee619fc398e9adef5af272b32b81d97aff641ec Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Fri, 8 Sep 2023 15:21:15 +0200 Subject: [PATCH 2/2] [chain_spec] fix some 2s in dev3 chain spec. --- node/src/chain_spec.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index b48a3eb..895c865 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -158,9 +158,9 @@ pub fn development_config3() -> Result { let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; Ok(ChainSpec::from_genesis( // Name - "Integritee Development (Solo2)", + "Integritee Development (Solo3)", // ID - "integritee-solo-dev2", + "integritee-solo-dev3", ChainType::Development, move || { genesis_config(