Skip to content

Commit

Permalink
add council and democracy to consensus runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas committed Jul 26, 2024
1 parent 0a89bdb commit 9dff90b
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 9 deletions.
79 changes: 77 additions & 2 deletions Cargo.lock

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

7 changes: 5 additions & 2 deletions crates/subspace-malicious-operator/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ use sp_runtime::{BuildStorage, MultiSigner, Percent};
use std::marker::PhantomData;
use std::num::NonZeroU32;
use subspace_runtime::{
AllowAuthoringBy, DomainsConfig, EnableRewardsAt, MaxDomainBlockSize, MaxDomainBlockWeight,
RewardsConfig, RuntimeConfigsConfig, SubspaceConfig, VestingConfig,
AllowAuthoringBy, CouncilConfig, DemocracyConfig, DomainsConfig, EnableRewardsAt,
MaxDomainBlockSize, MaxDomainBlockWeight, RewardsConfig, RuntimeConfigsConfig, SubspaceConfig,
VestingConfig,
};
use subspace_runtime_primitives::{AccountId, Balance, BlockNumber, SSC};

Expand Down Expand Up @@ -236,6 +237,8 @@ fn subspace_genesis_config(
},
rewards: rewards_config,
vesting: VestingConfig { vesting },
council: CouncilConfig::default(),
democracy: DemocracyConfig::default(),
runtime_configs: RuntimeConfigsConfig {
enable_domains,
enable_dynamic_cost_of_storage,
Expand Down
9 changes: 6 additions & 3 deletions crates/subspace-node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ use std::marker::PhantomData;
use std::num::NonZeroU32;
use subspace_core_primitives::PotKey;
use subspace_runtime::{
AllowAuthoringBy, BalancesConfig, DomainsConfig, EnableRewardsAt, MaxDomainBlockSize,
MaxDomainBlockWeight, RewardsConfig, RuntimeConfigsConfig, RuntimeGenesisConfig,
SubspaceConfig, SudoConfig, SystemConfig, VestingConfig, MILLISECS_PER_BLOCK, WASM_BINARY,
AllowAuthoringBy, BalancesConfig, CouncilConfig, DemocracyConfig, DomainsConfig,
EnableRewardsAt, MaxDomainBlockSize, MaxDomainBlockWeight, RewardsConfig, RuntimeConfigsConfig,
RuntimeGenesisConfig, SubspaceConfig, SudoConfig, SystemConfig, VestingConfig,
MILLISECS_PER_BLOCK, WASM_BINARY,
};
use subspace_runtime_primitives::{AccountId, Balance, BlockNumber, SSC};

Expand Down Expand Up @@ -447,6 +448,8 @@ fn subspace_genesis_config(
},
rewards: rewards_config,
vesting: VestingConfig { vesting },
council: CouncilConfig::default(),
democracy: DemocracyConfig::default(),
runtime_configs: RuntimeConfigsConfig {
enable_domains,
enable_dynamic_cost_of_storage,
Expand Down
9 changes: 9 additions & 0 deletions crates/subspace-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ frame-system-benchmarking = { default-features = false, git = "https://github.co
frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
orml-vesting = { version = "0.9.1", default-features = false, path = "../../orml/vesting" }
pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-collective = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-democracy = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-domains = { version = "0.1.0", default-features = false, path = "../pallet-domains" }
pallet-messenger = { version = "0.1.0", path = "../../domains/pallets/messenger", default-features = false }
pallet-mmr = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-offences-subspace = { version = "0.1.0", default-features = false, path = "../pallet-offences-subspace" }
pallet-preimage = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-rewards = { version = "0.1.0", default-features = false, path = "../pallet-rewards" }
pallet-runtime-configs = { version = "0.1.0", default-features = false, path = "../pallet-runtime-configs" }
pallet-scheduler = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-subspace = { version = "0.1.0", default-features = false, features = ["serde"], path = "../pallet-subspace" }
pallet-subspace-mmr = { version = "0.1.0", default-features = false, path = "../pallet-subspace-mmr" }
pallet-sudo = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
Expand Down Expand Up @@ -87,12 +91,16 @@ std = [
"frame-system-rpc-runtime-api/std",
"orml-vesting/std",
"pallet-balances/std",
"pallet-collective/std",
"pallet-democracy/std",
"pallet-domains/std",
"pallet-messenger/std",
"pallet-mmr/std",
"pallet-offences-subspace/std",
"pallet-preimage/std",
"pallet-rewards/std",
"pallet-runtime-configs/std",
"pallet-scheduler/std",
"pallet-subspace/std",
"pallet-subspace-mmr/std",
"pallet-sudo/std",
Expand Down Expand Up @@ -138,6 +146,7 @@ runtime-benchmarks = [
"frame-system-benchmarking/runtime-benchmarks",
"orml-vesting/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-domains/runtime-benchmarks",
"pallet-mmr/runtime-benchmarks",
"pallet-rewards/runtime-benchmarks",
Expand Down
Loading

0 comments on commit 9dff90b

Please sign in to comment.