@@ -37,7 +37,6 @@ use aptos_mvhashmap::{
37
37
use aptos_types:: {
38
38
block_executor:: config:: BlockExecutorConfig ,
39
39
error:: { code_invariant_error, expect_ok, PanicError , PanicOr } ,
40
- executable:: Executable ,
41
40
on_chain_config:: BlockGasLimitType ,
42
41
state_store:: { state_value:: StateValue , TStateView } ,
43
42
transaction:: {
@@ -72,22 +71,21 @@ use std::{
72
71
} ,
73
72
} ;
74
73
75
- pub struct BlockExecutor < T , E , S , L , X , TP > {
74
+ pub struct BlockExecutor < T , E , S , L , TP > {
76
75
// Number of active concurrent tasks, corresponding to the maximum number of rayon
77
76
// threads that may be concurrently participating in parallel execution.
78
77
config : BlockExecutorConfig ,
79
78
executor_thread_pool : Arc < rayon:: ThreadPool > ,
80
79
transaction_commit_hook : Option < L > ,
81
- phantom : PhantomData < ( T , E , S , L , X , TP ) > ,
80
+ phantom : PhantomData < ( T , E , S , L , TP ) > ,
82
81
}
83
82
84
- impl < T , E , S , L , X , TP > BlockExecutor < T , E , S , L , X , TP >
83
+ impl < T , E , S , L , TP > BlockExecutor < T , E , S , L , TP >
85
84
where
86
85
T : Transaction ,
87
86
E : ExecutorTask < Txn = T > ,
88
87
S : TStateView < Key = T :: Key > + Sync ,
89
88
L : TransactionCommitHook < Output = E :: Output > ,
90
- X : Executable + ' static ,
91
89
TP : TxnProvider < T > + Sync ,
92
90
{
93
91
/// The caller needs to ensure that concurrency_level > 1 (0 is illegal and 1 should
@@ -115,7 +113,7 @@ where
115
113
incarnation : Incarnation ,
116
114
signature_verified_block : & TP ,
117
115
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
118
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
116
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
119
117
executor : & E ,
120
118
base_view : & S ,
121
119
global_module_cache : & GlobalModuleCache <
@@ -125,7 +123,7 @@ where
125
123
AptosModuleExtension ,
126
124
> ,
127
125
runtime_environment : & RuntimeEnvironment ,
128
- parallel_state : ParallelState < T , X > ,
126
+ parallel_state : ParallelState < T > ,
129
127
) -> Result < bool , PanicOr < ParallelBlockExecutionError > > {
130
128
let _timer = TASK_EXECUTE_SECONDS . start_timer ( ) ;
131
129
let txn = signature_verified_block. get_txn ( idx_to_execute) ;
@@ -406,7 +404,7 @@ where
406
404
Module ,
407
405
AptosModuleExtension ,
408
406
> ,
409
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
407
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
410
408
scheduler : & Scheduler ,
411
409
) -> bool {
412
410
let _timer = TASK_VALIDATE_SECONDS . start_timer ( ) ;
@@ -436,7 +434,7 @@ where
436
434
fn update_transaction_on_abort (
437
435
txn_idx : TxnIndex ,
438
436
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
439
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
437
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
440
438
runtime_environment : & RuntimeEnvironment ,
441
439
) {
442
440
counters:: SPECULATIVE_ABORT_COUNT . inc ( ) ;
@@ -490,7 +488,7 @@ where
490
488
valid : bool ,
491
489
validation_wave : Wave ,
492
490
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
493
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
491
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
494
492
scheduler : & Scheduler ,
495
493
runtime_environment : & RuntimeEnvironment ,
496
494
) -> Result < SchedulerTask , PanicError > {
@@ -520,7 +518,7 @@ where
520
518
/// returns false (indicating that transaction needs to be re-executed).
521
519
fn validate_and_commit_delayed_fields (
522
520
txn_idx : TxnIndex ,
523
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
521
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
524
522
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
525
523
) -> Result < bool , PanicError > {
526
524
let read_set = last_input_output
@@ -563,7 +561,7 @@ where
563
561
& self ,
564
562
block_gas_limit_type : & BlockGasLimitType ,
565
563
scheduler : & Scheduler ,
566
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
564
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
567
565
scheduler_task : & mut SchedulerTask ,
568
566
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
569
567
shared_commit_state : & ExplicitSyncWrapper < BlockGasLimitProcessor < T > > ,
@@ -766,7 +764,7 @@ where
766
764
Module ,
767
765
AptosModuleExtension ,
768
766
> ,
769
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
767
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
770
768
scheduler : & Scheduler ,
771
769
runtime_environment : & RuntimeEnvironment ,
772
770
) -> Result < ( ) , PanicError > {
@@ -788,7 +786,7 @@ where
788
786
fn materialize_aggregator_v1_delta_writes (
789
787
txn_idx : TxnIndex ,
790
788
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
791
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
789
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
792
790
base_view : & S ,
793
791
) -> Vec < ( T :: Key , WriteOp ) > {
794
792
// Materialize all the aggregator v1 deltas.
@@ -840,7 +838,7 @@ where
840
838
fn materialize_txn_commit (
841
839
& self ,
842
840
txn_idx : TxnIndex ,
843
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
841
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
844
842
scheduler : & Scheduler ,
845
843
start_shared_counter : u32 ,
846
844
shared_counter : & AtomicU32 ,
@@ -855,7 +853,7 @@ where
855
853
runtime_environment : & RuntimeEnvironment ,
856
854
final_results : & ExplicitSyncWrapper < Vec < E :: Output > > ,
857
855
) -> Result < ( ) , PanicError > {
858
- let parallel_state = ParallelState :: < T , X > :: new (
856
+ let parallel_state = ParallelState :: < T > :: new (
859
857
versioned_cache,
860
858
scheduler,
861
859
start_shared_counter,
@@ -953,7 +951,7 @@ where
953
951
environment : & AptosEnvironment ,
954
952
block : & TP ,
955
953
last_input_output : & TxnLastInputOutput < T , E :: Output , E :: Error > ,
956
- versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , X , DelayedFieldID > ,
954
+ versioned_cache : & MVHashMap < T :: Key , T :: Tag , T :: Value , DelayedFieldID > ,
957
955
scheduler : & Scheduler ,
958
956
// TODO: should not need to pass base view.
959
957
base_view : & S ,
@@ -1386,7 +1384,7 @@ where
1386
1384
1387
1385
for idx in 0 ..num_txns {
1388
1386
let txn = signature_verified_block. get_txn ( idx as TxnIndex ) ;
1389
- let latest_view = LatestView :: < T , S , X > :: new (
1387
+ let latest_view = LatestView :: < T , S > :: new (
1390
1388
base_view,
1391
1389
module_cache_manager_guard. module_cache ( ) ,
1392
1390
runtime_environment,
0 commit comments