Update substrate & polkadot (#82)

This commit is contained in:
Cecile Tonglet
2020-04-21 12:17:50 +02:00
committed by GitHub
parent 04f93b6a1c
commit b9793bc2f6
8 changed files with 1640 additions and 1598 deletions
+1
View File
@@ -2,3 +2,4 @@
.idea .idea
.vscode .vscode
.DS_Store .DS_Store
/.cargo/config
Generated
+1628 -1589
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -411,7 +411,7 @@ mod tests {
struct DummyCollatorNetwork; struct DummyCollatorNetwork;
impl CollatorNetwork for DummyCollatorNetwork { impl CollatorNetwork for DummyCollatorNetwork {
fn checked_statements(&self, _: PHash) -> Pin<Box<dyn Stream<Item = SignedStatement>>> { fn checked_statements(&self, _: PHash) -> Pin<Box<dyn Stream<Item = SignedStatement> + Send>> {
unimplemented!("Not required in tests") unimplemented!("Not required in tests")
} }
} }
+2 -2
View File
@@ -26,7 +26,7 @@ use cumulus_primitives::{
}; };
use frame_support::{ use frame_support::{
decl_module, storage, decl_module, storage,
weights::{SimpleDispatchInfo, WeighData, Weight}, weights::{MINIMUM_WEIGHT, SimpleDispatchInfo, WeighData, Weight},
}; };
use frame_system::ensure_none; use frame_system::ensure_none;
use sp_inherents::{InherentData, InherentIdentifier, MakeFatalError, ProvideInherent}; use sp_inherents::{InherentData, InherentIdentifier, MakeFatalError, ProvideInherent};
@@ -51,7 +51,7 @@ decl_module! {
fn on_initialize() -> Weight { fn on_initialize() -> Weight {
storage::unhashed::kill(well_known_keys::UPWARD_MESSAGES); storage::unhashed::kill(well_known_keys::UPWARD_MESSAGES);
SimpleDispatchInfo::default().weigh_data(()) SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT).weigh_data(())
} }
} }
} }
+1 -1
View File
@@ -9,7 +9,7 @@ edition = "2018"
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = [ "derive" ] } codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = [ "derive" ] }
memory-db = { version = "0.18.0", default-features = false } memory-db = { version = "0.18.0", default-features = false }
hash-db = { version = "0.15.2", default-features = false } hash-db = { version = "0.15.2", default-features = false }
trie-db = { version = "0.20.0", default-features = false } trie-db = { version = "0.20.1", default-features = false }
hashbrown = "0.6.1" hashbrown = "0.6.1"
# Substrate dependencies # Substrate dependencies
+2
View File
@@ -102,6 +102,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_version: 4, spec_version: 4,
impl_version: 4, impl_version: 4,
apis: RUNTIME_API_VERSIONS, apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
}; };
pub const MILLISECS_PER_BLOCK: u64 = 6000; pub const MILLISECS_PER_BLOCK: u64 = 6000;
@@ -171,6 +172,7 @@ impl frame_system::Trait for Runtime {
type AccountData = pallet_balances::AccountData<Balance>; type AccountData = pallet_balances::AccountData<Balance>;
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = Balances; type OnKilledAccount = Balances;
type DbWeight = ();
} }
parameter_types! { parameter_types! {
+3 -3
View File
@@ -27,7 +27,6 @@ use sc_client::genesis;
use sc_network::config::TransportConfig; use sc_network::config::TransportConfig;
use sc_service::{ use sc_service::{
config::{NetworkConfiguration, NodeKeyConfig, PrometheusConfig}, config::{NetworkConfiguration, NodeKeyConfig, PrometheusConfig},
Configuration, Role as ServiceRole,
}; };
use sp_core::hexdisplay::HexDisplay; use sp_core::hexdisplay::HexDisplay;
use sp_runtime::{ use sp_runtime::{
@@ -194,6 +193,7 @@ pub fn run() -> Result<()> {
crate::service::run_collator(config, key, polkadot_config) crate::service::run_collator(config, key, polkadot_config)
}, },
parachain_runtime::VERSION,
) )
} }
} }
@@ -277,7 +277,7 @@ impl CliConfiguration for PolkadotCli {
&self, &self,
chain_spec: &Box<dyn sc_service::ChainSpec>, chain_spec: &Box<dyn sc_service::ChainSpec>,
is_dev: bool, is_dev: bool,
net_config_dir: &PathBuf, net_config_dir: PathBuf,
client_id: &str, client_id: &str,
node_name: &str, node_name: &str,
node_key: NodeKeyConfig, node_key: NodeKeyConfig,
@@ -289,7 +289,7 @@ impl CliConfiguration for PolkadotCli {
x.network_config( x.network_config(
chain_spec, chain_spec,
is_dev, is_dev,
net_config_dir, Some(net_config_dir),
client_id, client_id,
node_name, node_name,
node_key, node_key,
+2 -2
View File
@@ -49,9 +49,9 @@ macro_rules! new_full_start {
crate::service::Executor, crate::service::Executor,
>($config)? >($config)?
.with_select_chain(|_config, backend| Ok(sc_client::LongestChain::new(backend.clone())))? .with_select_chain(|_config, backend| Ok(sc_client::LongestChain::new(backend.clone())))?
.with_transaction_pool(|config, client, _| { .with_transaction_pool(|config, client, _fetcher, prometheus_registry| {
let pool_api = Arc::new(sc_transaction_pool::FullChainApi::new(client.clone())); let pool_api = Arc::new(sc_transaction_pool::FullChainApi::new(client.clone()));
let pool = sc_transaction_pool::BasicPool::new(config, pool_api); let pool = sc_transaction_pool::BasicPool::new(config, pool_api, prometheus_registry);
Ok(pool) Ok(pool)
})? })?
.with_import_queue(|_config, client, _, _| { .with_import_queue(|_config, client, _, _| {