Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Remove deprecated batch verification #13799

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion client/service/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ where
let executor = crate::client::LocalCallExecutor::new(
backend.clone(),
executor,
spawn_handle.clone(),
config.clone(),
execution_extensions,
)?;
Expand Down
11 changes: 1 addition & 10 deletions client/service/src/client/call_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use sc_client_api::{
use sc_executor::{RuntimeVersion, RuntimeVersionOf};
use sp_api::{ProofRecorder, StorageTransactionCache};
use sp_core::{
traits::{CallContext, CodeExecutor, RuntimeCode, SpawnNamed},
traits::{CallContext, CodeExecutor, RuntimeCode},
ExecutionContext,
};
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
Expand All @@ -39,7 +39,6 @@ pub struct LocalCallExecutor<Block: BlockT, B, E> {
executor: E,
wasm_override: Arc<Option<WasmOverride>>,
wasm_substitutes: WasmSubstitutes<Block, E, B>,
spawn_handle: Box<dyn SpawnNamed>,
execution_extensions: Arc<ExecutionExtensions<Block>>,
}

Expand All @@ -52,7 +51,6 @@ where
pub fn new(
backend: Arc<B>,
executor: E,
spawn_handle: Box<dyn SpawnNamed>,
client_config: ClientConfig<Block>,
execution_extensions: ExecutionExtensions<Block>,
) -> sp_blockchain::Result<Self> {
Expand All @@ -72,7 +70,6 @@ where
backend,
executor,
wasm_override: Arc::new(wasm_override),
spawn_handle,
wasm_substitutes,
execution_extensions: Arc::new(execution_extensions),
})
Expand Down Expand Up @@ -142,7 +139,6 @@ where
backend: self.backend.clone(),
executor: self.executor.clone(),
wasm_override: self.wasm_override.clone(),
spawn_handle: self.spawn_handle.clone(),
wasm_substitutes: self.wasm_substitutes.clone(),
execution_extensions: self.execution_extensions.clone(),
}
Expand Down Expand Up @@ -196,7 +192,6 @@ where
call_data,
extensions,
&runtime_code,
self.spawn_handle.clone(),
context,
)
.set_parent_hash(at_hash);
Expand Down Expand Up @@ -256,7 +251,6 @@ where
call_data,
extensions,
&runtime_code,
self.spawn_handle.clone(),
call_context,
)
.with_storage_transaction_cache(storage_transaction_cache.as_deref_mut())
Expand All @@ -272,7 +266,6 @@ where
call_data,
extensions,
&runtime_code,
self.spawn_handle.clone(),
call_context,
)
.with_storage_transaction_cache(storage_transaction_cache.as_deref_mut())
Expand Down Expand Up @@ -313,7 +306,6 @@ where
trie_backend,
&mut Default::default(),
&self.executor,
self.spawn_handle.clone(),
method,
call_data,
&runtime_code,
Expand Down Expand Up @@ -425,7 +417,6 @@ mod tests {
backend: backend.clone(),
executor: executor.clone(),
wasm_override: Arc::new(Some(overrides)),
spawn_handle: Box::new(TaskExecutor::new()),
wasm_substitutes: WasmSubstitutes::new(
Default::default(),
executor.clone(),
Expand Down
9 changes: 2 additions & 7 deletions client/service/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,8 @@ where
sc_offchain::OffchainDb::factory_from_backend(&*backend),
);

let call_executor = LocalCallExecutor::new(
backend.clone(),
executor,
spawn_handle.clone(),
config.clone(),
extensions,
)?;
let call_executor =
LocalCallExecutor::new(backend.clone(), executor, config.clone(), extensions)?;

Client::new(
backend,
Expand Down
7 changes: 0 additions & 7 deletions client/service/test/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ fn construct_block(
let mut overlay = OverlayedChanges::default();
let backend_runtime_code = sp_state_machine::backend::BackendRuntimeCode::new(backend);
let runtime_code = backend_runtime_code.runtime_code().expect("Code is part of the backend");
let task_executor = Box::new(TaskExecutor::new());

StateMachine::new(
backend,
Expand All @@ -114,7 +113,6 @@ fn construct_block(
&header.encode(),
Default::default(),
&runtime_code,
task_executor.clone() as Box<_>,
CallContext::Onchain,
)
.execute(ExecutionStrategy::NativeElseWasm)
Expand All @@ -129,7 +127,6 @@ fn construct_block(
&tx.encode(),
Default::default(),
&runtime_code,
task_executor.clone() as Box<_>,
CallContext::Onchain,
)
.execute(ExecutionStrategy::NativeElseWasm)
Expand All @@ -144,7 +141,6 @@ fn construct_block(
&[],
Default::default(),
&runtime_code,
task_executor.clone() as Box<_>,
CallContext::Onchain,
)
.execute(ExecutionStrategy::NativeElseWasm)
Expand Down Expand Up @@ -217,7 +213,6 @@ fn construct_genesis_should_work_with_native() {
&b1data,
Default::default(),
&runtime_code,
TaskExecutor::new(),
CallContext::Onchain,
)
.execute(ExecutionStrategy::NativeElseWasm)
Expand Down Expand Up @@ -251,7 +246,6 @@ fn construct_genesis_should_work_with_wasm() {
&b1data,
Default::default(),
&runtime_code,
TaskExecutor::new(),
CallContext::Onchain,
)
.execute(ExecutionStrategy::AlwaysWasm)
Expand Down Expand Up @@ -285,7 +279,6 @@ fn construct_genesis_with_bad_transaction_should_panic() {
&b1data,
Default::default(),
&runtime_code,
TaskExecutor::new(),
CallContext::Onchain,
)
.execute(ExecutionStrategy::NativeElseWasm);
Expand Down
6 changes: 0 additions & 6 deletions frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,10 @@ where
// any initial checks
Self::initial_checks(&block);

let signature_batching = sp_runtime::SignatureBatching::start();

// execute extrinsics
let (header, extrinsics) = block.deconstruct();
Self::execute_extrinsics_with_book_keeping(extrinsics, *header.number());

if !signature_batching.verify() {
panic!("Signature verification failed.");
}

// any final checks
Self::final_checks(&header);
}
Expand Down
1 change: 0 additions & 1 deletion primitives/api/test/tests/runtime_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ fn record_proof_works() {
&backend,
&mut overlay,
&executor,
sp_core::testing::TaskExecutor::new(),
"Core_execute_block",
&block.encode(),
&runtime_code,
Expand Down
12 changes: 0 additions & 12 deletions primitives/core/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,6 @@ impl ReadRuntimeVersionExt {
}
}

sp_externalities::decl_extension! {
/// Task executor extension.
pub struct TaskExecutorExt(Box<dyn SpawnNamed>);
}

impl TaskExecutorExt {
/// New instance of task executor extension.
pub fn new(spawn_handle: impl SpawnNamed + Send + 'static) -> Self {
Self(Box::new(spawn_handle))
}
}

/// Something that can spawn tasks (blocking and non-blocking) with an assigned name
/// and optional group.
#[dyn_clonable::clonable]
Expand Down
Loading