Skip to content

Commit

Permalink
Added missing dependencies, modified runtime and chain_spec conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Moldvai authored and Filip Moldvai committed Oct 27, 2023
1 parent af1b2cd commit 80f6733
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-core = { version = "21.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-consensus-babe = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true, optional = true }
sp-keystore = { workspace = true }
Expand Down
11 changes: 8 additions & 3 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,15 @@ pub mod devnet {
..Default::default()
},
transaction_payment: Default::default(),
babe: Some(BabeConfig { authorities: vec![] }),
grandpa: GrandpaConfig {
authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),
babe: BabeConfig {
authorities: vec![],
epoch_config: Some(sp_consensus_babe::BabeEpochConfiguration {
c: (1, 4),
allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,
}),
_config: std::marker::PhantomData,
},
grandpa: GrandpaConfig { authorities: vec![], _config: std::marker::PhantomData },
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions runtime/devnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ pub const UNIT: Balance = 1_000 * MILLIUNIT;

pub const EXISTENTIAL_DEPOSIT: Balance = MILLIUNIT;

// pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);

// pub const pub const BABE_GENESIS_EPOCH_CONFIG: sp_consensus_babe::BabeEpochConfiguration = sp_consensus_babe::BabeEpochConfiguration {
// c: PRIMARY_PROBABILITY,
// allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,
// };

pub const fn deposit(items: u32, bytes: u32) -> Balance {
(items as Balance * 20 * UNIT + (bytes as Balance) * 100 * MICROUNIT) / 100
}
Expand Down

0 comments on commit 80f6733

Please sign in to comment.