Skip to content
Snippets Groups Projects
Unverified Commit 1f558d71 authored by bgallois's avatar bgallois
Browse files

update to polkadot-v1.11.0

parent 2b050e27
No related branches found
No related tags found
No related merge requests found
Pipeline #36944 failed
This diff is collapsed.
This diff is collapsed.
......@@ -63,8 +63,6 @@ try-runtime = [
"sp-distance/try-runtime",
"sp-membership/try-runtime",
"sp-runtime/try-runtime",
"try-runtime-cli",
"try-runtime-cli?/try-runtime",
]
std = [
"bs58/std",
......@@ -178,7 +176,6 @@ sp-timestamp = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-transaction-storage-proof = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
try-runtime-cli = { workspace = true, optional = true }
[build-dependencies]
substrate-build-script-utils = { workspace = true }
......
......@@ -373,10 +373,11 @@ pub fn run() -> sc_cli::Result<()> {
}
{
service::new_full::<service::runtime_executor::runtime::RuntimeApi, Executor>(
config,
cli.sealing,
)
service::new_full::<
service::runtime_executor::runtime::RuntimeApi,
Executor,
sc_network::Litep2pNetworkBackend,
>(config, cli.sealing)
.map_err(sc_cli::Error::Service)
}
})
......
......@@ -295,7 +295,11 @@ where
}
/// Builds a new service for a full client.
pub fn new_full<RuntimeApi, Executor>(
pub fn new_full<
RuntimeApi,
Executor,
N: sc_network::NetworkBackend<Block, <Block as sp_runtime::traits::Block>::Hash>,
>(
config: Configuration,
sealing: crate::cli::Sealing,
) -> Result<TaskManager, ServiceError>
......@@ -328,9 +332,19 @@ where
&config.chain_spec,
);
let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network);
let mut net_config = sc_network::config::FullNetworkConfiguration::<
Block,
<Block as sp_runtime::traits::Block>::Hash,
N,
>::new(&config.network);
let metrics = N::register_notification_metrics(config.prometheus_registry());
let peer_store_handle = net_config.peer_store_handle();
let (grandpa_protocol_config, grandpa_notification_service) =
sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone());
sc_consensus_grandpa::grandpa_peers_set_config::<_, N>(
grandpa_protocol_name.clone(),
metrics.clone(),
peer_store_handle,
);
net_config.add_notification_protocol(grandpa_protocol_config);
let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
......@@ -350,6 +364,7 @@ where
block_announce_validator_builder: None,
warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),
block_relay: None,
metrics,
})?;
let role = config.role.clone();
......@@ -374,7 +389,7 @@ where
transaction_pool.clone(),
),
),
network_provider: network.clone(),
network_provider: Arc::new(network.clone()),
is_validator: role.is_authority(),
enable_http_requests: false,
custom_extensions: move |_| vec![],
......
......@@ -221,12 +221,16 @@ macro_rules! runtime_apis {
}
}
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
frame_support::genesis_builder_helper::create_default_config::<RuntimeGenesisConfig>()
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
frame_support::genesis_builder_helper::build_state::<RuntimeGenesisConfig>(config)
}
fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
frame_support::genesis_builder_helper::build_config::<RuntimeGenesisConfig>(config)
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
frame_support::genesis_builder_helper::get_preset::<RuntimeGenesisConfig>(id, |_| None)
}
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
vec![]
}
}
......
......@@ -26,6 +26,7 @@ use pallet_identity::{RevocationPayload, REVOCATION_PAYLOAD_PREFIX};
use pallet_membership::MembershipRemovalReason;
use pallet_smith_members::{SmithMeta, SmithStatus};
use sp_core::Encode;
use sp_core::Pair;
use sp_keyring::AccountKeyring;
use sp_runtime::MultiAddress;
......@@ -883,10 +884,10 @@ fn test_smith_certification() {
fn create_dummy_session_keys() -> gdev_runtime::opaque::SessionKeys {
gdev_runtime::opaque::SessionKeys {
grandpa: sp_core::ed25519::Public([0u8; 32]).into(),
babe: sp_core::sr25519::Public([0u8; 32]).into(),
im_online: sp_core::sr25519::Public([0u8; 32]).into(),
authority_discovery: sp_core::sr25519::Public([0u8; 32]).into(),
grandpa: sp_core::ed25519::Pair::generate().0.public().into(),
babe: sp_core::sr25519::Pair::generate().0.public().into(),
im_online: sp_core::sr25519::Pair::generate().0.public().into(),
authority_discovery: sp_core::sr25519::Pair::generate().0.public().into(),
}
}
......
[toolchain]
channel = "nightly-2024-02-08"
channel = "nightly-2024-03-17"
components = [ "rustfmt", "clippy", "rust-std", "cargo", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment