Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
489 changes: 235 additions & 254 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions client/consensus/aura/src/import_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ use sc_consensus_slots::InherentDataProviderExt;
use sc_telemetry::TelemetryHandle;
use sp_api::{ApiExt, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder as BlockBuilderApi;
use sp_blockchain::{HeaderBackend, ProvideCache};
use sp_blockchain::HeaderBackend;
use sp_consensus::{CanAuthorWith, Error as ConsensusError};
use sp_consensus_aura::{digests::CompatibleDigestItem, AuraApi};
use sp_consensus_aura::AuraApi;
use sp_core::crypto::Pair;
use sp_inherents::CreateInherentDataProviders;
use sp_runtime::traits::{Block as BlockT, DigestItemFor};
use sp_runtime::traits::Block as BlockT;
use std::{fmt::Debug, hash::Hash, sync::Arc};
use substrate_prometheus_endpoint::Registry;

Expand Down Expand Up @@ -69,7 +69,6 @@ where
C: 'static
+ ProvideRuntimeApi<Block>
+ BlockOf
+ ProvideCache<Block>
+ Send
+ Sync
+ AuxStore
Expand All @@ -79,7 +78,6 @@ where
+ Send
+ Sync
+ 'static,
DigestItemFor<Block>: CompatibleDigestItem<P::Signature>,
P: Pair + Send + Sync + 'static,
P::Public: Clone + Eq + Send + Sync + Hash + Debug + Codec,
P::Signature: Codec,
Expand Down
15 changes: 3 additions & 12 deletions client/consensus/aura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use sc_consensus_slots::{BackoffAuthoringBlocksStrategy, SlotInfo};
use sc_telemetry::TelemetryHandle;
use sp_api::ProvideRuntimeApi;
use sp_application_crypto::AppPublic;
use sp_blockchain::{HeaderBackend, ProvideCache};
use sp_blockchain::HeaderBackend;
use sp_consensus::{
EnableProofRecording, Environment, ProofRecording, Proposer, SlotData, SyncOracle,
};
Expand Down Expand Up @@ -113,14 +113,8 @@ where
max_block_proposal_slot_portion: Option<SlotProportion>,
) -> Self
where
Client: ProvideRuntimeApi<B>
+ BlockOf
+ ProvideCache<B>
+ AuxStore
+ HeaderBackend<B>
+ Send
+ Sync
+ 'static,
Client:
ProvideRuntimeApi<B> + BlockOf + AuxStore + HeaderBackend<B> + Send + Sync + 'static,
Client::Api: AuraApi<B, P::Public>,
BI: BlockImport<B, Transaction = sp_api::TransactionFor<Client, B>> + Send + Sync + 'static,
SO: SyncOracle + Send + Sync + Clone + 'static,
Expand Down Expand Up @@ -286,7 +280,6 @@ where
CIDP::InherentDataProviders: InherentDataProviderExt + Send,
Client: ProvideRuntimeApi<Block>
+ BlockOf
+ ProvideCache<Block>
+ AuxStore
+ HeaderBackend<Block>
+ Send
Expand Down Expand Up @@ -367,7 +360,6 @@ where
CIDP::InherentDataProviders: InherentDataProviderExt + Send,
Client: ProvideRuntimeApi<Block>
+ BlockOf
+ ProvideCache<Block>
+ AuxStore
+ HeaderBackend<Block>
+ Send
Expand Down Expand Up @@ -447,7 +439,6 @@ where
CIDP::InherentDataProviders: InherentDataProviderExt + Send,
Client: ProvideRuntimeApi<Block>
+ BlockOf
+ ProvideCache<Block>
+ AuxStore
+ HeaderBackend<Block>
+ Send
Expand Down
9 changes: 2 additions & 7 deletions pallets/parachain-system/src/validate_block/implementation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! The actual implementation of the validate block functionality.

use frame_support::traits::{ExecuteBlock, ExtrinsicCall, Get, IsSubType};
use sp_runtime::traits::{Block as BlockT, Extrinsic, HashFor, Header as HeaderT, NumberFor};
use sp_runtime::traits::{Block as BlockT, Extrinsic, HashFor, Header as HeaderT};

use sp_io::KillStorageResult;
use sp_std::prelude::*;
Expand All @@ -32,7 +32,7 @@ use sp_trie::MemoryDB;

type TrieBackend<B> = sp_state_machine::TrieBackend<MemoryDB<HashFor<B>>, HashFor<B>>;

type Ext<'a, B> = sp_state_machine::Ext<'a, HashFor<B>, NumberFor<B>, TrieBackend<B>>;
type Ext<'a, B> = sp_state_machine::Ext<'a, HashFor<B>, TrieBackend<B>>;

fn with_externalities<F: FnOnce(&mut dyn Externalities) -> R, R>(f: F) -> R {
sp_externalities::with_externalities(f).expect("Environmental externalities not set.")
Expand Down Expand Up @@ -89,7 +89,6 @@ where
sp_io::storage::host_clear.replace_implementation(host_storage_clear),
sp_io::storage::host_root.replace_implementation(host_storage_root),
sp_io::storage::host_clear_prefix.replace_implementation(host_storage_clear_prefix),
sp_io::storage::host_changes_root.replace_implementation(host_storage_changes_root),
sp_io::storage::host_append.replace_implementation(host_storage_append),
sp_io::storage::host_next_key.replace_implementation(host_storage_next_key),
sp_io::storage::host_start_transaction
Expand Down Expand Up @@ -229,10 +228,6 @@ fn host_storage_clear_prefix(prefix: &[u8], limit: Option<u32>) -> KillStorageRe
})
}

fn host_storage_changes_root(parent_hash: &[u8]) -> Option<Vec<u8>> {
with_externalities(|ext| ext.storage_changes_root(parent_hash).ok().flatten())
}

fn host_storage_append(key: &[u8], value: Vec<u8>) {
with_externalities(|ext| ext.storage_append(key.to_vec(), value))
}
Expand Down
1 change: 0 additions & 1 deletion parachain-template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ fn testnet_genesis(
code: parachain_template_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: parachain_template_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
Expand Down
3 changes: 0 additions & 3 deletions parachain-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ where
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
import_queue: import_queue.clone(),
on_demand: None,
block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
warp_sync: None,
})?;
Expand All @@ -286,8 +285,6 @@ where
};

sc_service::spawn_tasks(sc_service::SpawnTasksParams {
on_demand: None,
remote_blockchain: None,
rpc_extensions_builder,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/parachains-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod types {
pub type Hash = sp_core::H256;

/// Digest item type.
pub type DigestItem = sp_runtime::generic::DigestItem<Hash>;
pub type DigestItem = sp_runtime::generic::DigestItem;

// Aura consensus authority.
pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;
Expand Down
5 changes: 0 additions & 5 deletions polkadot-parachains/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ fn testnet_genesis(
code: rococo_parachain_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: rococo_parachain_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
Expand All @@ -172,7 +171,6 @@ fn shell_testnet_genesis(parachain_id: ParaId) -> shell_runtime::GenesisConfig {
code: shell_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
parachain_info: shell_runtime::ParachainInfoConfig { parachain_id },
parachain_system: Default::default(),
Expand Down Expand Up @@ -322,7 +320,6 @@ fn statemint_genesis(
code: statemint_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: statemint_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, STATEMINT_ED * 4096)).collect(),
Expand Down Expand Up @@ -499,7 +496,6 @@ fn statemine_genesis(
code: statemine_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: statemine_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, STATEMINE_ED * 4096)).collect(),
Expand Down Expand Up @@ -679,7 +675,6 @@ fn westmint_genesis(
code: westmint_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: westmint_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, WESTMINT_ED * 4096)).collect(),
Expand Down
6 changes: 0 additions & 6 deletions polkadot-parachains/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ where
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
import_queue: import_queue.clone(),
on_demand: None,
block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
warp_sync: None,
})?;
Expand All @@ -354,8 +353,6 @@ where
let rpc_extensions_builder = Box::new(move |_, _| rpc_ext_builder(rpc_client.clone()));

sc_service::spawn_tasks(sc_service::SpawnTasksParams {
on_demand: None,
remote_blockchain: None,
rpc_extensions_builder,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
Expand Down Expand Up @@ -523,7 +520,6 @@ where
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
import_queue: import_queue.clone(),
on_demand: None,
block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),
warp_sync: None,
})?;
Expand All @@ -544,8 +540,6 @@ where
};

sc_service::spawn_tasks(sc_service::SpawnTasksParams {
on_demand: None,
remote_blockchain: None,
rpc_extensions_builder,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
Expand Down
3 changes: 0 additions & 3 deletions test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ where
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
import_queue: import_queue.clone(),
on_demand: None,
block_announce_validator_builder: Some(Box::new(block_announce_validator_builder)),
warp_sync: None,
})?;
Expand All @@ -243,8 +242,6 @@ where
};

let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
on_demand: None,
remote_blockchain: None,
rpc_extensions_builder,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
Expand Down