Update to latest substrate (#723)

* Bump substrate deps.

* Bump scale.

* Bump ethabi.

* Remove inherent from aura.

* Migrate to construct_runtime

* cargo fmt --all
This commit is contained in:
Tomasz Drwięga
2021-02-16 07:10:01 +01:00
committed by Bastian Köcher
parent 32342bf6e5
commit 7aa51f8d30
41 changed files with 198 additions and 160 deletions
-1
View File
@@ -38,7 +38,6 @@ sc-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "m
sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+5 -8
View File
@@ -35,7 +35,6 @@ pub use sc_executor::NativeExecutor;
use sc_finality_grandpa::SharedVoterState;
use sc_keystore::LocalKeystore;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
use sc_telemetry::TelemetrySpan;
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use sp_inherents::InherentDataProviders;
use std::sync::Arc;
@@ -71,7 +70,6 @@ pub fn new_partial(
AuraPair,
>,
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
Option<TelemetrySpan>,
),
>,
ServiceError,
@@ -81,7 +79,7 @@ pub fn new_partial(
}
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let (client, backend, keystore_container, task_manager, telemetry_span) =
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
let client = Arc::new(client);
@@ -89,6 +87,7 @@ pub fn new_partial(
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
config.transaction_pool.clone(),
config.role.is_authority().into(),
config.prometheus_registry(),
task_manager.spawn_handle(),
client.clone(),
@@ -120,7 +119,7 @@ pub fn new_partial(
select_chain,
transaction_pool,
inherent_data_providers,
other: (aura_block_import, grandpa_link, telemetry_span),
other: (aura_block_import, grandpa_link),
})
}
@@ -142,7 +141,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
select_chain,
transaction_pool,
inherent_data_providers,
other: (block_import, grandpa_link, telemetry_span),
other: (block_import, grandpa_link),
} = new_partial(&config)?;
if let Some(url) = &config.keystore_remote {
@@ -276,7 +275,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
network_status_sinks,
system_rpc_tx,
config,
telemetry_span,
})?;
if role.is_authority() {
@@ -356,7 +354,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
/// Builds a new service for a light client.
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
let (client, backend, keystore_container, mut task_manager, on_demand, telemetry_span) =
let (client, backend, keystore_container, mut task_manager, on_demand) =
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
config
@@ -425,7 +423,6 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
network,
network_status_sinks,
system_rpc_tx,
telemetry_span,
})?;
network_starter.start_network();
+1 -1
View File
@@ -8,7 +8,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
hex-literal = "0.3"
serde = { version = "1.0.123", optional = true, features = ["derive"] }
+1 -1
View File
@@ -373,7 +373,7 @@ construct_runtime!(
System: frame_system::{Module, Call, Config, Storage, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Aura: pallet_aura::{Module, Config<T>, Inherent},
Aura: pallet_aura::{Module, Config<T>},
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Module, Storage},
+5 -8
View File
@@ -35,7 +35,6 @@ pub use sc_executor::NativeExecutor;
use sc_finality_grandpa::SharedVoterState;
use sc_keystore::LocalKeystore;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
use sc_telemetry::TelemetrySpan;
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use sp_inherents::InherentDataProviders;
use std::sync::Arc;
@@ -71,7 +70,6 @@ pub fn new_partial(
AuraPair,
>,
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
Option<TelemetrySpan>,
),
>,
ServiceError,
@@ -81,7 +79,7 @@ pub fn new_partial(
}
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let (client, backend, keystore_container, task_manager, telemetry_span) =
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
let client = Arc::new(client);
@@ -89,6 +87,7 @@ pub fn new_partial(
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
config.transaction_pool.clone(),
config.role.is_authority().into(),
config.prometheus_registry(),
task_manager.spawn_handle(),
client.clone(),
@@ -120,7 +119,7 @@ pub fn new_partial(
select_chain,
transaction_pool,
inherent_data_providers,
other: (aura_block_import, grandpa_link, telemetry_span),
other: (aura_block_import, grandpa_link),
})
}
@@ -142,7 +141,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
select_chain,
transaction_pool,
inherent_data_providers,
other: (block_import, grandpa_link, telemetry_span),
other: (block_import, grandpa_link),
} = new_partial(&config)?;
if let Some(url) = &config.keystore_remote {
@@ -276,7 +275,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
network_status_sinks,
system_rpc_tx,
config,
telemetry_span,
})?;
if role.is_authority() {
@@ -356,7 +354,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
/// Builds a new service for a light client.
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
let (client, backend, keystore_container, mut task_manager, on_demand, telemetry_span) =
let (client, backend, keystore_container, mut task_manager, on_demand) =
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
config
@@ -425,7 +423,6 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
network,
network_status_sinks,
system_rpc_tx,
telemetry_span,
})?;
network_starter.start_network();
+1 -1
View File
@@ -8,7 +8,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
hex-literal = "0.3"
libsecp256k1 = { version = "0.3.4", optional = true, default-features = false, features = ["hmac"] }
serde = { version = "1.0.123", optional = true, features = ["derive"] }
+1 -1
View File
@@ -484,7 +484,7 @@ construct_runtime!(
System: frame_system::{Module, Call, Config, Storage, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Aura: pallet_aura::{Module, Config<T>, Inherent},
Aura: pallet_aura::{Module, Config<T>},
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Module, Storage},
+1 -1
View File
@@ -8,7 +8,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
ed25519-dalek = { version = "1.0", default-features = false, optional = true }
hash-db = { version = "0.15.2", default-features = false }