Skip to content

Commit

Permalink
trivial: move ExecutedChunk to internal of executor where it belongs to
Browse files Browse the repository at this point in the history
  • Loading branch information
msmouse committed Oct 9, 2024
1 parent 3bc0a0f commit 42a0234
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 15 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion execution/executor-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ rust-version = { workspace = true }
[dependencies]
anyhow = { workspace = true }
aptos-crypto = { workspace = true }
aptos-drop-helper = { workspace = true }
aptos-scratchpad = { workspace = true }
aptos-secure-net = { workspace = true }
aptos-storage-interface = { workspace = true }
Expand Down
2 changes: 0 additions & 2 deletions execution/executor-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use aptos_types::{
write_set::WriteSet,
};
pub use error::{ExecutorError, ExecutorResult};
pub use executed_chunk::ExecutedChunk;
pub use ledger_update_output::LedgerUpdateOutput;
pub use parsed_transaction_output::ParsedTransactionOutput;
use serde::{Deserialize, Serialize};
Expand All @@ -44,7 +43,6 @@ use std::{
};

mod error;
mod executed_chunk;
mod ledger_update_output;
pub mod parsed_transaction_output;
pub mod state_checkpoint_output;
Expand Down
5 changes: 3 additions & 2 deletions execution/executor/src/chunk_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use crate::{
apply_chunk_output::{ensure_no_discard, ensure_no_retry, ApplyChunkOutput},
chunk_commit_queue::{ChunkCommitQueue, ChunkToUpdateLedger},
chunk_output::ChunkOutput,
executed_chunk::ExecutedChunk,
transaction_chunk::TransactionChunkWithProof,
},
logging::{LogEntry, LogSchema},
Expand All @@ -18,8 +19,8 @@ use anyhow::{ensure, Result};
use aptos_crypto::HashValue;
use aptos_drop_helper::DEFAULT_DROPPER;
use aptos_executor_types::{
ChunkCommitNotification, ChunkExecutorTrait, ExecutedChunk, ParsedTransactionOutput,
TransactionReplayer, VerifyExecutionMode,
ChunkCommitNotification, ChunkExecutorTrait, ParsedTransactionOutput, TransactionReplayer,
VerifyExecutionMode,
};
use aptos_experimental_runtimes::thread_manager::THREAD_MANAGER;
use aptos_infallible::{Mutex, RwLock};
Expand Down
3 changes: 2 additions & 1 deletion execution/executor/src/components/apply_chunk_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use crate::{
components::{
chunk_output::{update_counters_for_processed_chunk, ChunkOutput},
executed_chunk::ExecutedChunk,
in_memory_state_calculator_v2::InMemoryStateCalculatorV2,
},
metrics::{EXECUTOR_ERRORS, OTHER_TIMERS},
Expand All @@ -17,7 +18,7 @@ use aptos_executor_types::{
parsed_transaction_output::TransactionsWithParsedOutput,
should_forward_to_subscription_service,
state_checkpoint_output::{StateCheckpointOutput, TransactionsByStatus},
ExecutedChunk, LedgerUpdateOutput, ParsedTransactionOutput,
LedgerUpdateOutput, ParsedTransactionOutput,
};
use aptos_experimental_runtimes::thread_manager::optimal_min_len;
use aptos_logger::error;
Expand Down
3 changes: 2 additions & 1 deletion execution/executor/src/components/chunk_commit_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

#![forbid(unsafe_code)]

use crate::components::executed_chunk::ExecutedChunk;
use anyhow::{anyhow, ensure, Result};
use aptos_executor_types::{state_checkpoint_output::StateCheckpointOutput, ExecutedChunk};
use aptos_executor_types::state_checkpoint_output::StateCheckpointOutput;
use aptos_storage_interface::{state_delta::StateDelta, DbReader, ExecutedTrees};
use aptos_types::{
epoch_state::EpochState,
Expand Down
7 changes: 5 additions & 2 deletions execution/executor/src/components/chunk_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

#![forbid(unsafe_code)]

use crate::{components::apply_chunk_output::ApplyChunkOutput, metrics};
use crate::{
components::{apply_chunk_output::ApplyChunkOutput, executed_chunk::ExecutedChunk},
metrics,
};
use anyhow::Result;
use aptos_crypto::HashValue;
use aptos_executor_service::{
local_executor_helper::SHARDED_BLOCK_EXECUTOR,
remote_executor_client::{get_remote_addresses, REMOTE_SHARDED_BLOCK_EXECUTOR},
};
use aptos_executor_types::{state_checkpoint_output::StateCheckpointOutput, ExecutedChunk};
use aptos_executor_types::state_checkpoint_output::StateCheckpointOutput;
use aptos_logger::{sample, sample::SampleRate, warn};
use aptos_storage_interface::{
cached_state_view::{CachedStateView, StateCache},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

#![forbid(unsafe_code)]

use crate::{should_forward_to_subscription_service, ChunkCommitNotification, LedgerUpdateOutput};
use aptos_drop_helper::DEFAULT_DROPPER;
use aptos_executor_types::{
should_forward_to_subscription_service, ChunkCommitNotification, LedgerUpdateOutput,
};
use aptos_storage_interface::{state_delta::StateDelta, ExecutedTrees};
#[cfg(test)]
use aptos_types::account_config::NewEpochEvent;
Expand Down
1 change: 1 addition & 0 deletions execution/executor/src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ pub mod chunk_commit_queue;
pub mod chunk_output;
pub mod in_memory_state_calculator_v2;

pub mod executed_chunk;
pub mod transaction_chunk;
3 changes: 1 addition & 2 deletions execution/executor/src/db_bootstrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

#![forbid(unsafe_code)]

use crate::components::chunk_output::ChunkOutput;
use crate::components::{chunk_output::ChunkOutput, executed_chunk::ExecutedChunk};
use anyhow::{anyhow, ensure, format_err, Result};
use aptos_crypto::HashValue;
use aptos_executor_types::ExecutedChunk;
use aptos_logger::prelude::*;
use aptos_storage_interface::{
async_proof_fetcher::AsyncProofFetcher, cached_state_view::CachedStateView, DbReaderWriter,
Expand Down
4 changes: 2 additions & 2 deletions execution/executor/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use crate::{
block_executor::BlockExecutor,
components::chunk_output::ChunkOutput,
components::{chunk_output::ChunkOutput, executed_chunk::ExecutedChunk},
db_bootstrapper::{generate_waypoint, maybe_bootstrap},
mock_vm::{
encode_mint_transaction, encode_reconfiguration_transaction, encode_transfer_transaction,
Expand All @@ -14,7 +14,7 @@ use crate::{
use aptos_crypto::{ed25519::Ed25519PrivateKey, HashValue, PrivateKey, SigningKey, Uniform};
use aptos_db::AptosDB;
use aptos_executor_types::{
BlockExecutorTrait, ExecutedChunk, LedgerUpdateOutput, TransactionReplayer, VerifyExecutionMode,
BlockExecutorTrait, LedgerUpdateOutput, TransactionReplayer, VerifyExecutionMode,
};
use aptos_storage_interface::{
async_proof_fetcher::AsyncProofFetcher, DbReaderWriter, ExecutedTrees, Result,
Expand Down

0 comments on commit 42a0234

Please sign in to comment.