Bump substrate/polkadot/cumulus (#1962)

* Bump substrate/polkadot/cumulus

* sp_finality_grandpa - >sp_consensus_grandpa

* sp_beefy -> sp_consensus_beefy

* pallet_randomness_collective_flip -> pallet_insecure_randomness_collective_flip

* fix

* Cumulus parachain stuff

* Cumulus parachain stuff one more

* Millau/Rialto runtimes

* Removed pallet_insecure_randomness_collective_flip

* Millau node

* Removed session historial

* TMP: just try disable all fetches

* Docs in gitlab.yml
This commit is contained in:
Branislav Kontur
2023-03-14 13:03:40 +01:00
committed by Bastian Köcher
parent a1c6502d9a
commit 874ab44e00
38 changed files with 184 additions and 157 deletions
@@ -45,6 +45,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master"}
@@ -38,11 +38,12 @@ use cumulus_client_service::{
prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
};
use cumulus_primitives_core::ParaId;
use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface};
use cumulus_relay_chain_interface::RelayChainInterface;
use sc_consensus::ImportQueue;
// Substrate Imports
use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch};
use sc_network::{NetworkBlock, NetworkService};
use sc_network::NetworkBlock;
use sc_network_sync::SyncingService;
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sp_api::ConstructRuntimeApi;
@@ -54,7 +55,6 @@ use substrate_prometheus_endpoint::Registry;
type BlockNumber = u32;
type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;
type Hash = sp_core::H256;
type ParachainClient<RuntimeApi> =
TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<ParachainRuntimeExecutor>>;
@@ -236,7 +236,7 @@ where
&TaskManager,
Arc<dyn RelayChainInterface>,
Arc<sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>>,
Arc<NetworkService<Block, Hash>>,
Arc<SyncingService<Block>>,
SyncCryptoStorePtr,
bool,
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
@@ -257,10 +257,7 @@ where
None,
)
.await
.map_err(|e| match e {
RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x,
s => s.to_string().into(),
})?;
.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
let client = params.client.clone();
let backend = params.backend.clone();
@@ -272,7 +269,7 @@ where
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();
let (network, system_rpc_tx, tx_handler_controller, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
@@ -282,7 +279,7 @@ where
block_announce_validator_builder: Some(Box::new(|_| {
Box::new(block_announce_validator)
})),
warp_sync: None,
warp_sync_params: None,
})?;
let rpc_client = client.clone();
@@ -300,18 +297,23 @@ where
keystore: params.keystore_container.sync_keystore(),
backend: backend.clone(),
network: network.clone(),
sync_service: sync_service.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: telemetry.as_mut(),
})?;
let announce_block = {
let network = network.clone();
Arc::new(move |hash, data| network.announce_block(hash, data))
let sync_service = sync_service.clone();
Arc::new(move |hash, data| sync_service.announce_block(hash, data))
};
let relay_chain_slot_duration = Duration::from_secs(6);
let overseer_handle = relay_chain_interface
.overseer_handle()
.map_err(|e| sc_service::Error::Application(Box::new(e)))?;
if validator {
let parachain_consensus = build_consensus(
client.clone(),
@@ -321,7 +323,7 @@ where
&task_manager,
relay_chain_interface.clone(),
transaction_pool,
network,
sync_service,
params.keystore_container.sync_keystore(),
force_authoring,
)?;
@@ -340,6 +342,7 @@ where
import_queue: import_queue_service,
collator_key: collator_key.expect("Command line arguments do not allow this. qed"),
relay_chain_slot_duration,
recovery_handle: Box::new(overseer_handle),
};
start_collator(params).await?;
@@ -352,6 +355,7 @@ where
relay_chain_interface,
relay_chain_slot_duration,
import_queue: import_queue_service,
recovery_handle: Box::new(overseer_handle),
};
start_full_node(params)?;
@@ -52,7 +52,6 @@ frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate"
## Substrate Pallet Dependencies
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
@@ -116,7 +115,6 @@ std = [
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-relayers/std",
"pallet-randomness-collective-flip/std",
"pallet-timestamp/std",
"pallet-sudo/std",
"pallet-transaction-payment/std",
@@ -302,8 +302,6 @@ impl parachain_info::Config for Runtime {}
impl cumulus_pallet_aura_ext::Config for Runtime {}
impl pallet_randomness_collective_flip::Config for Runtime {}
parameter_types! {
pub const RelayLocation: MultiLocation = MultiLocation::parent();
pub const RelayNetwork: NetworkId = CustomNetworkId::Rialto.as_network_id();
@@ -588,7 +586,6 @@ construct_runtime!(
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Storage, Inherent, Event<T>} = 20,