mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Authorship works again (#50)
* provide through inherent-data when authoring * remove unneeded codec round-trip in proposer * refactor polkadot-consensus service architecture * integrate block authorship into polkadot service * remove unused extern substrate-network crate in service * write wrapper for unifying errors in consensus proposer * extend wrapper further * switch temporarily to macro-changing branch * runtime compiles * implement `inherent_extrinsics` for runtime * block authorship works * add GRANDPA to polkadot runtime * get everything compiling * use substrate master branch again * remove some unneeded params * update WASM * parse only extrinsics when pruning availability store * update recent deps * runtime almost compiles * need to expose trait type in build : I had to put phantomdata manually. * finish updating authorship to latest GRANDPA and Aura * fix tests * update wasm
This commit is contained in:
committed by
GitHub
parent
f17258c14d
commit
19095168ce
@@ -17,8 +17,10 @@
|
||||
//! Polkadot chain configurations.
|
||||
|
||||
use primitives::{AuthorityId, ed25519};
|
||||
use polkadot_runtime::{GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig,
|
||||
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill, CouncilVotingConfig};
|
||||
use polkadot_runtime::{
|
||||
GenesisConfig, ConsensusConfig, CouncilSeatsConfig, DemocracyConfig,
|
||||
SessionConfig, StakingConfig, TimestampConfig, BalancesConfig, Perbill, CouncilVotingConfig, GrandpaConfig
|
||||
};
|
||||
|
||||
const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
|
||||
const DEFAULT_PROTOCOL_ID: &str = "dot";
|
||||
@@ -44,7 +46,6 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||
consensus: Some(ConsensusConfig {
|
||||
code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(), // TODO change
|
||||
authorities: initial_authorities.clone(),
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
system: None,
|
||||
balances: Some(BalancesConfig {
|
||||
@@ -55,12 +56,10 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||
creation_fee: 0,
|
||||
reclaim_rebate: 0,
|
||||
balances: endowed_accounts.iter().map(|&k|(k, 1u128 << 60)).collect(),
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
session: Some(SessionConfig {
|
||||
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
|
||||
session_length: 60, // that's 5 minutes per session.
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
staking: Some(StakingConfig {
|
||||
current_era: 0,
|
||||
@@ -74,13 +73,15 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||
bonding_duration: 24 * 60 * 12, // 1 day per bond.
|
||||
offline_slash_grace: 4,
|
||||
minimum_validator_count: 4,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
democracy: Some(DemocracyConfig {
|
||||
launch_period: 12 * 60 * 24, // 1 day per public referendum
|
||||
voting_period: 12 * 60 * 24 * 3, // 3 days to discuss & vote on an active referendum
|
||||
minimum_deposit: 5000, // 12000 as the minimum deposit for a referendum
|
||||
_genesis_phantom_data: Default::default(),
|
||||
public_delay: 0,
|
||||
}),
|
||||
grandpa: Some(GrandpaConfig {
|
||||
authorities: initial_authorities.clone().into_iter().map(|k| (k, 1)).collect(),
|
||||
}),
|
||||
council_seats: Some(CouncilSeatsConfig {
|
||||
active_council: vec![],
|
||||
@@ -93,17 +94,15 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||
term_duration: 12 * 60 * 24 * 24, // 24 day term duration for the council.
|
||||
desired_seats: 0, // start with no council: we'll raise this once the stake has been dispersed a bit.
|
||||
inactive_grace_period: 1, // one addition vote should go by before an inactive voter can be reaped.
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
council_voting: Some(CouncilVotingConfig {
|
||||
cooloff_period: 75,
|
||||
voting_period: 20,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
enact_delay_period: 0,
|
||||
}),
|
||||
parachains: Some(Default::default()),
|
||||
timestamp: Some(TimestampConfig {
|
||||
period: 5, // 5 second block time.
|
||||
_genesis_phantom_data: Default::default(),
|
||||
period: 2, // 2*2=4 second block time.
|
||||
}),
|
||||
treasury: Some(Default::default()),
|
||||
}
|
||||
@@ -137,7 +136,6 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>) -> GenesisConfig {
|
||||
consensus: Some(ConsensusConfig {
|
||||
code: include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm").to_vec(),
|
||||
authorities: initial_authorities.clone(),
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
system: None,
|
||||
balances: Some(BalancesConfig {
|
||||
@@ -148,12 +146,10 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>) -> GenesisConfig {
|
||||
creation_fee: 0,
|
||||
reclaim_rebate: 0,
|
||||
balances: endowed_accounts.iter().map(|&k|(k, (1u128 << 60))).collect(),
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
session: Some(SessionConfig {
|
||||
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
|
||||
session_length: 10,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
staking: Some(StakingConfig {
|
||||
current_era: 0,
|
||||
@@ -167,13 +163,15 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>) -> GenesisConfig {
|
||||
current_offline_slash: 0,
|
||||
current_session_reward: 0,
|
||||
offline_slash_grace: 0,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
democracy: Some(DemocracyConfig {
|
||||
launch_period: 9,
|
||||
voting_period: 18,
|
||||
minimum_deposit: 10,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
public_delay: 0,
|
||||
}),
|
||||
grandpa: Some(GrandpaConfig {
|
||||
authorities: initial_authorities.clone().into_iter().map(|k| (k, 1)).collect(),
|
||||
}),
|
||||
council_seats: Some(CouncilSeatsConfig {
|
||||
active_council: endowed_accounts.iter().filter(|a| initial_authorities.iter().find(|&b| a[..] == b.0).is_none()).map(|a| (a.clone(), 1000000)).collect(),
|
||||
@@ -186,17 +184,15 @@ fn testnet_genesis(initial_authorities: Vec<AuthorityId>) -> GenesisConfig {
|
||||
term_duration: 1000000,
|
||||
desired_seats: (endowed_accounts.len() - initial_authorities.len()) as u32,
|
||||
inactive_grace_period: 1,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
}),
|
||||
council_voting: Some(CouncilVotingConfig {
|
||||
cooloff_period: 75,
|
||||
voting_period: 20,
|
||||
_genesis_phantom_data: Default::default(),
|
||||
enact_delay_period: 0,
|
||||
}),
|
||||
parachains: Some(Default::default()),
|
||||
timestamp: Some(TimestampConfig {
|
||||
period: 5, // 5 second block time.
|
||||
_genesis_phantom_data: Default::default(),
|
||||
period: 2, // 2*2=4 second block time.
|
||||
}),
|
||||
treasury: Some(Default::default()),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user