mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 05:41:03 +00:00
* cargo update -p parachain-info * flush * it compiles * clippy * temporary add more logging to cargo deny * Revert "temporary add more logging to cargo deny" This reverts commit 20daa88bca6d9a01dbe933579b1d57ae5c3a7bd8. * list installed Rust binaries before running cargo deny * changed prev commit * once again * try cargo update? * post-update fixes (nothing important)
This commit is contained in:
committed by
Bastian Köcher
parent
b4c7ffd3d3
commit
4d42bb22f3
@@ -16,8 +16,9 @@
|
||||
|
||||
use millau_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, BeefyConfig, BridgeRialtoMessagesConfig,
|
||||
BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GenesisConfig, GrandpaConfig,
|
||||
SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
BridgeRialtoParachainMessagesConfig, BridgeWestendGrandpaConfig, GrandpaConfig,
|
||||
RuntimeGenesisConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig,
|
||||
WASM_BINARY,
|
||||
};
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_consensus_beefy::crypto::AuthorityId as BeefyId;
|
||||
@@ -41,7 +42,7 @@ const RIALTO_MESSAGES_PALLET_OWNER: &str = "Rialto.MessagesOwner";
|
||||
const RIALTO_PARACHAIN_MESSAGES_PALLET_OWNER: &str = "RialtoParachain.MessagesOwner";
|
||||
|
||||
/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
|
||||
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>;
|
||||
pub type ChainSpec = sc_service::GenericChainSpec<RuntimeGenesisConfig>;
|
||||
|
||||
/// The chain specification option. This is expected to come in from the CLI and
|
||||
/// is little more than one of a number of alternatives which can easily be converted
|
||||
@@ -193,17 +194,18 @@ fn testnet_genesis(
|
||||
root_key: AccountId,
|
||||
endowed_accounts: Vec<AccountId>,
|
||||
_enable_println: bool,
|
||||
) -> GenesisConfig {
|
||||
GenesisConfig {
|
||||
) -> RuntimeGenesisConfig {
|
||||
RuntimeGenesisConfig {
|
||||
system: SystemConfig {
|
||||
code: WASM_BINARY.expect("Millau development WASM not available").to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
balances: BalancesConfig {
|
||||
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 50)).collect(),
|
||||
},
|
||||
aura: AuraConfig { authorities: Vec::new() },
|
||||
beefy: BeefyConfig::default(),
|
||||
grandpa: GrandpaConfig { authorities: Vec::new() },
|
||||
grandpa: GrandpaConfig { authorities: Vec::new(), ..Default::default() },
|
||||
sudo: SudoConfig { key: Some(root_key) },
|
||||
session: SessionConfig {
|
||||
keys: initial_authorities
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
};
|
||||
use frame_benchmarking_cli::BenchmarkCmd;
|
||||
use millau_runtime::{Block, RuntimeApi};
|
||||
use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli};
|
||||
use sc_cli::SubstrateCli;
|
||||
use sc_service::PartialComponents;
|
||||
|
||||
impl SubstrateCli for Cli {
|
||||
@@ -53,10 +53,6 @@ impl SubstrateCli for Cli {
|
||||
"millau-bridge-node".into()
|
||||
}
|
||||
|
||||
fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
|
||||
&millau_runtime::VERSION
|
||||
}
|
||||
|
||||
fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
Ok(Box::new(
|
||||
match id {
|
||||
@@ -83,8 +79,7 @@ pub fn run() -> sc_cli::Result<()> {
|
||||
match cmd {
|
||||
BenchmarkCmd::Pallet(cmd) =>
|
||||
if cfg!(feature = "runtime-benchmarks") {
|
||||
runner
|
||||
.sync_run(|config| cmd.run::<Block, service::ExecutorDispatch>(config))
|
||||
runner.sync_run(|config| cmd.run::<Block, ()>(config))
|
||||
} else {
|
||||
println!(
|
||||
"Benchmarking wasn't enabled when building the node. \
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
|
||||
use jsonrpsee::RpcModule;
|
||||
use millau_runtime::{self, opaque::Block, RuntimeApi};
|
||||
use sc_client_api::BlockBackend;
|
||||
use sc_client_api::{Backend, BlockBackend};
|
||||
use sc_consensus_aura::{CompatibilityMode, ImportQueueParams, SlotProportion, StartAuraParams};
|
||||
use sc_consensus_grandpa::SharedVoterState;
|
||||
pub use sc_executor::NativeElseWasmExecutor;
|
||||
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
|
||||
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||
use sc_telemetry::{Telemetry, TelemetryWorker};
|
||||
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
|
||||
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
||||
use std::{sync::Arc, time::Duration};
|
||||
|
||||
@@ -127,6 +128,7 @@ pub fn new_partial(
|
||||
|
||||
let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import(
|
||||
client.clone(),
|
||||
512,
|
||||
&client,
|
||||
select_chain.clone(),
|
||||
telemetry.as_ref().map(|x| x.handle()),
|
||||
@@ -223,6 +225,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
);
|
||||
net_config.add_request_response_protocol(beefy_req_resp_cfg);
|
||||
|
||||
let role = config.role.clone();
|
||||
let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
|
||||
backend.clone(),
|
||||
grandpa_link.shared_authority_set().clone(),
|
||||
@@ -242,15 +245,28 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
})?;
|
||||
|
||||
if config.offchain_worker.enabled {
|
||||
sc_service::build_offchain_workers(
|
||||
&config,
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
network.clone(),
|
||||
use futures::FutureExt;
|
||||
|
||||
task_manager.spawn_handle().spawn(
|
||||
"offchain-workers-runner",
|
||||
"offchain-work",
|
||||
sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
|
||||
runtime_api_provider: client.clone(),
|
||||
keystore: Some(keystore_container.keystore()),
|
||||
offchain_db: backend.offchain_storage(),
|
||||
transaction_pool: Some(OffchainTransactionPoolFactory::new(
|
||||
transaction_pool.clone(),
|
||||
)),
|
||||
network_provider: network.clone(),
|
||||
is_validator: role.is_authority(),
|
||||
enable_http_requests: false,
|
||||
custom_extensions: move |_| vec![],
|
||||
})
|
||||
.run(client.clone(), task_manager.spawn_handle())
|
||||
.boxed(),
|
||||
);
|
||||
}
|
||||
|
||||
let role = config.role.clone();
|
||||
let force_authoring = config.force_authoring;
|
||||
let backoff_authoring_blocks: Option<()> = None;
|
||||
let name = config.network.node_name.clone();
|
||||
@@ -277,7 +293,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let shared_voter_state = shared_voter_state.clone();
|
||||
|
||||
let finality_proof_provider = GrandpaFinalityProofProvider::new_for_service(
|
||||
backend,
|
||||
backend.clone(),
|
||||
Some(shared_authority_set.clone()),
|
||||
);
|
||||
|
||||
@@ -308,7 +324,16 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
.into_rpc(),
|
||||
)
|
||||
.map_err(map_err)?;
|
||||
io.merge(Mmr::new(client.clone()).into_rpc()).map_err(map_err)?;
|
||||
io.merge(
|
||||
Mmr::new(
|
||||
client.clone(),
|
||||
backend
|
||||
.offchain_storage()
|
||||
.ok_or("Backend doesn't provide the required offchain storage")?,
|
||||
)
|
||||
.into_rpc(),
|
||||
)
|
||||
.map_err(map_err)?;
|
||||
Ok(io)
|
||||
})
|
||||
};
|
||||
@@ -332,7 +357,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let proposer_factory = sc_basic_authorship::ProposerFactory::new(
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
transaction_pool,
|
||||
transaction_pool.clone(),
|
||||
prometheus_registry.as_ref(),
|
||||
telemetry.as_ref().map(|x| x.handle()),
|
||||
);
|
||||
@@ -411,7 +436,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let grandpa_config = sc_consensus_grandpa::Config {
|
||||
// FIXME #1578 make this available through chainspec
|
||||
gossip_duration: Duration::from_millis(333),
|
||||
justification_period: 512,
|
||||
justification_generation_period: 512,
|
||||
name: Some(name),
|
||||
observer_enabled: false,
|
||||
keystore,
|
||||
@@ -436,6 +461,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
prometheus_registry,
|
||||
shared_voter_state,
|
||||
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
||||
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool),
|
||||
};
|
||||
|
||||
// the GRANDPA voter task is considered infallible, i.e.
|
||||
|
||||
Reference in New Issue
Block a user