Skip to content

Commit 98896db

Browse files
author
Max Gravitt
committed
updates to chain spec and github action
1 parent 0c957c9 commit 98896db

File tree

6 files changed

+20
-133
lines changed

6 files changed

+20
-133
lines changed

.github/workflows/check.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ name: Check Set-Up & Build
44
on:
55
# Triggers the workflow on push or pull request events but only for the master branch
66
push:
7-
branches: [ master ]
7+
branches: [ master, develop ]
88
pull_request:
9-
branches: [ master ]
9+
branches: [ master, develop ]
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
@@ -38,7 +38,7 @@ jobs:
3838
run: |
3939
SKIP_WASM_BUILD=1 cargo check --release
4040
41-
- name: Check Build for Benchmarking
42-
run: >
43-
pushd node &&
44-
cargo check --features=runtime-benchmarks --release
41+
# - name: Check Build for Benchmarking
42+
# run: >
43+
# pushd node &&
44+
# cargo check --features=runtime-benchmarks --release

collator/src/chain_spec/hashed.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
use sc_service::ChainType;
22
use sp_core::sr25519;
3+
use hex_literal::hex;
34

45
use super::{
56
get_account_id_from_seed, get_collator_keys_from_seed, session_keys, SAFE_XCM_VERSION, Extensions,
67
};
78

89
use cumulus_primitives_core::ParaId;
9-
use hashed_parachain_runtime::{AccountId, AuraId, EXISTENTIAL_DEPOSIT};
10+
use hashed_parachain_runtime::{AccountId, AuraId, SudoConfig, EXISTENTIAL_DEPOSIT};
1011

1112
/// Specialized `ChainSpec` for Hashed Network
1213
pub type HashedChainSpec =
@@ -53,6 +54,7 @@ pub fn get_chain_spec() -> HashedChainSpec {
5354
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
5455
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
5556
],
57+
hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(),
5658
1000.into(),
5759
)
5860
},
@@ -71,6 +73,7 @@ pub fn get_chain_spec() -> HashedChainSpec {
7173
fn hashed_genesis(
7274
invulnerables: Vec<(AccountId, AuraId)>,
7375
endowed_accounts: Vec<AccountId>,
76+
root_key: AccountId,
7477
id: ParaId,
7578
) -> hashed_parachain_runtime::GenesisConfig {
7679
hashed_parachain_runtime::GenesisConfig {
@@ -82,6 +85,7 @@ fn hashed_genesis(
8285
balances: hashed_parachain_runtime::BalancesConfig {
8386
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
8487
},
88+
sudo: SudoConfig { key: Some(root_key) },
8589
council: Default::default(),
8690
treasury: Default::default(),
8791
parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id },

collator/src/chain_spec/luhn.rs

Lines changed: 0 additions & 115 deletions
This file was deleted.

collator/src/chain_spec/md5.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use super::{
77
};
88

99
use cumulus_primitives_core::ParaId;
10-
use hashed_parachain_runtime::{AccountId, AuraId, Balance, CouncilConfig, SudoConfig, EXISTENTIAL_DEPOSIT, constants::DOLLARS};
10+
use hashed_parachain_runtime::{AccountId, AuraId, CouncilConfig, SudoConfig, EXISTENTIAL_DEPOSIT};
1111

1212
/// Specialized `ChainSpec` for MD5 Network.
1313
pub type Md5ChainSpec =
@@ -82,11 +82,6 @@ fn md5_genesis(
8282
id: ParaId,
8383
) -> hashed_parachain_runtime::GenesisConfig {
8484

85-
let num_endowed_accounts = endowed_accounts.len();
86-
87-
const ENDOWMENT: Balance = 10_000_000 * DOLLARS;
88-
const STASH: Balance = ENDOWMENT / 1000;
89-
9085
hashed_parachain_runtime::GenesisConfig {
9186
system: hashed_parachain_runtime::SystemConfig {
9287
code: hashed_parachain_runtime::WASM_BINARY
@@ -100,8 +95,8 @@ fn md5_genesis(
10095
treasury: Default::default(),
10196
council: CouncilConfig {
10297
members: vec![
103-
get_account_id_from_seed::<sr25519::Public>("Alice"),
104-
get_account_id_from_seed::<sr25519::Public>("Bob"),
98+
hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(),
99+
hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].into(),
105100
],
106101
phantom: Default::default(),
107102
},

collator/src/chain_spec/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ use cumulus_primitives_core::ParaId;
22
use serde::{Deserialize, Serialize};
33
use sp_core::{sr25519, Pair, Public};
44

5-
use hashed_parachain_runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT};
5+
use hashed_parachain_runtime::{AccountId, AuraId, Signature, SudoConfig, EXISTENTIAL_DEPOSIT};
66
use sc_chain_spec::{ChainSpecExtension};
77
use sc_service::ChainType;
88
use sp_runtime::traits::{IdentifyAccount, Verify};
99

1010
pub mod hashed;
11-
pub mod luhn;
1211
pub mod md5;
1312

1413
/// Specialized `ChainSpec` for the normal parachain runtime.
@@ -116,6 +115,7 @@ pub fn development_config() -> ChainSpec {
116115
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
117116
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
118117
],
118+
get_account_id_from_seed::<sr25519::Public>("Alice"),
119119
1000.into(),
120120
)
121121
},
@@ -171,6 +171,7 @@ pub fn local_testnet_config() -> ChainSpec {
171171
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
172172
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
173173
],
174+
get_account_id_from_seed::<sr25519::Public>("Alice"),
174175
1000.into(),
175176
)
176177
},
@@ -195,6 +196,7 @@ pub fn local_testnet_config() -> ChainSpec {
195196
fn testnet_genesis(
196197
invulnerables: Vec<(AccountId, AuraId)>,
197198
endowed_accounts: Vec<AccountId>,
199+
root_key: AccountId,
198200
id: ParaId,
199201
) -> hashed_parachain_runtime::GenesisConfig {
200202
hashed_parachain_runtime::GenesisConfig {
@@ -206,6 +208,7 @@ fn testnet_genesis(
206208
balances: hashed_parachain_runtime::BalancesConfig {
207209
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
208210
},
211+
sudo: SudoConfig { key: Some(root_key) },
209212
council: Default::default(),
210213
treasury: Default::default(),
211214
parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id },

collator/src/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
2727
Ok(match id {
2828
"dev" => Box::new(chain_spec::development_config()),
2929
"hashed" => Box::new(chain_spec::hashed::get_chain_spec()),
30-
"luhn" => Box::new(chain_spec::luhn::get_chain_spec()),
30+
// "luhn" => Box::new(chain_spec::luhn::get_chain_spec()),
3131
"md5" => Box::new(chain_spec::md5::get_chain_spec()),
3232
"" | "local" => Box::new(chain_spec::local_testnet_config()),
3333
path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),

0 commit comments

Comments
 (0)