-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sharding] Refactor sharded block executor for better remote client s…
…upport (#9221)
- Loading branch information
1 parent
8a22309
commit cf1accf
Showing
39 changed files
with
1,729 additions
and
1,066 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
aptos-move/aptos-vm/src/sharded_block_executor/block_executor_client.rs
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
aptos-move/aptos-vm/src/sharded_block_executor/coordinator_client.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use crate::sharded_block_executor::ExecutorShardCommand; | ||
use aptos_state_view::StateView; | ||
use aptos_types::transaction::TransactionOutput; | ||
use move_core_types::vm_status::VMStatus; | ||
|
||
// Interface to communicate from the executor shards to the block executor coordinator. | ||
pub trait CoordinatorClient<S: StateView + Sync + Send + 'static>: Send + Sync { | ||
fn receive_execute_command(&self) -> ExecutorShardCommand<S>; | ||
|
||
fn send_execution_result(&self, result: Result<Vec<Vec<TransactionOutput>>, VMStatus>); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
aptos-move/aptos-vm/src/sharded_block_executor/executor_client.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright © Aptos Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use aptos_state_view::StateView; | ||
use aptos_types::{ | ||
block_executor::partitioner::SubBlocksForShard, | ||
transaction::{analyzed_transaction::AnalyzedTransaction, TransactionOutput}, | ||
}; | ||
use move_core_types::vm_status::VMStatus; | ||
use std::sync::Arc; | ||
|
||
// Interface to communicate from the block executor coordinator to the executor shards. | ||
pub trait ExecutorClient<S: StateView + Sync + Send + 'static>: Send + Sync { | ||
fn num_shards(&self) -> usize; | ||
|
||
// A non blocking call that sends the block to be executed by the executor shards. | ||
fn execute_block( | ||
&self, | ||
state_view: Arc<S>, | ||
block: Vec<SubBlocksForShard<AnalyzedTransaction>>, | ||
concurrency_level_per_shard: usize, | ||
maybe_block_gas_limit: Option<u64>, | ||
); | ||
|
||
// Blocking call that waits for the execution results from the executor shards. It returns the execution results | ||
// from each shard and in the sub-block order. | ||
fn get_execution_result(&self) -> Result<Vec<Vec<Vec<TransactionOutput>>>, VMStatus>; | ||
} |
Oops, something went wrong.