Skip to content

Commit

Permalink
remove ExecutionCorrectness
Browse files Browse the repository at this point in the history
  • Loading branch information
zekun000 authored and aptos-bot committed Apr 12, 2022
1 parent b060d39 commit b913372
Show file tree
Hide file tree
Showing 29 changed files with 16 additions and 1,207 deletions.
29 changes: 0 additions & 29 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ members = [
"devtools/x-core",
"devtools/x-lint",
"execution/db-bootstrapper",
"execution/execution-correctness",
"execution/executor",
"execution/executor-benchmark",
"execution/executor-test-helpers",
Expand Down Expand Up @@ -139,7 +138,6 @@ default-members = [
"aptos-move/framework",
"aptos-move/transaction-builder-generator",
"execution/db-bootstrapper",
"execution/execution-correctness",
"storage/backup/backup-cli",
"storage/aptossum",
"storage/inspector",
Expand Down
1 change: 0 additions & 1 deletion config/management/genesis/src/validator_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ impl ValidatorBuilder {
config.consensus.safety_rules.service = SafetyRulesService::Thread;
config.consensus.safety_rules.backend =
SecureBackend::OnDiskStorage(validator.storage_config.clone());
config.execution.backend = SecureBackend::OnDiskStorage(validator.storage_config.clone());

if index > 0 || self.randomize_first_validator_ports {
config.randomize_ports();
Expand Down
44 changes: 2 additions & 42 deletions config/src/config/execution_config.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0

use crate::config::{Error, RootPath, SecureBackend};
use crate::config::{Error, RootPath};
use aptos_types::transaction::Transaction;
use serde::{Deserialize, Serialize};
use std::{
fs::File,
io::{Read, Write},
net::SocketAddr,
path::PathBuf,
};

Expand All @@ -18,10 +17,7 @@ const GENESIS_DEFAULT: &str = "genesis.blob";
pub struct ExecutionConfig {
#[serde(skip)]
pub genesis: Option<Transaction>,
pub sign_vote_proposal: bool,
pub genesis_file_location: PathBuf,
pub service: ExecutionCorrectnessService,
pub backend: SecureBackend,
pub network_timeout_ms: u64,
}

Expand All @@ -37,13 +33,7 @@ impl std::fmt::Debug for ExecutionConfig {
f,
", genesis_file_location: {:?} ",
self.genesis_file_location
)?;
write!(
f,
", sign_vote_proposal: {:?}, service: {:?}, backend: {:?} }}",
self.sign_vote_proposal, self.service, self.backend
)?;
self.service.fmt(f)
)
}
}

Expand All @@ -52,9 +42,6 @@ impl Default for ExecutionConfig {
ExecutionConfig {
genesis: None,
genesis_file_location: PathBuf::new(),
service: ExecutionCorrectnessService::Local,
backend: SecureBackend::InMemoryStorage,
sign_vote_proposal: true,
// Default value of 30 seconds for the network timeout.
network_timeout_ms: 30_000,
}
Expand Down Expand Up @@ -89,33 +76,6 @@ impl ExecutionConfig {
}
Ok(())
}

pub fn set_data_dir(&mut self, data_dir: PathBuf) {
if let SecureBackend::OnDiskStorage(backend) = &mut self.backend {
backend.set_data_dir(data_dir);
}
}
}

/// Defines how execution correctness should be run
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
#[serde(rename_all = "snake_case", tag = "type")]
pub enum ExecutionCorrectnessService {
/// This runs execution correctness in the same thread as event processor.
Local,
/// This is the production, separate service approach
Process(RemoteExecutionService),
/// This runs safety rules in the same thread as event processor but data is passed through the
/// light weight RPC (serializer)
Serializer,
/// This creates a separate thread to run execution correctness, it is similar to a fork / exec style
Thread,
}

#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
#[serde(deny_unknown_fields)]
pub struct RemoteExecutionService {
pub server_address: SocketAddr,
}

#[cfg(test)]
Expand Down
1 change: 0 additions & 1 deletion config/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ impl NodeConfig {
pub fn set_data_dir(&mut self, data_dir: PathBuf) {
self.base.data_dir = data_dir.clone();
self.consensus.set_data_dir(data_dir.clone());
self.execution.set_data_dir(data_dir.clone());
self.storage.set_data_dir(data_dir);
}

Expand Down
1 change: 0 additions & 1 deletion consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ channel = { path = "../crates/channel" }
consensus-notifications = { path = "../state-sync/inter-component/consensus-notifications" }
consensus-types = { path = "consensus-types", default-features = false }
event-notifications = { path = "../state-sync/inter-component/event-notifications" }
execution-correctness = { path = "../execution/execution-correctness" }
executor = { path = "../execution/executor" }
executor-types = { path = "../execution/executor-types" }
fallible = { path = "../crates/fallible" }
Expand Down
4 changes: 0 additions & 4 deletions consensus/src/block_storage/block_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ use std::{sync::Arc, time::Duration};
#[path = "block_store_test.rs"]
mod block_store_test;

#[cfg(test)]
#[path = "block_store_and_lec_recovery_test.rs"]
mod block_store_and_lec_recovery_test;

#[path = "sync_manager.rs"]
pub mod sync_manager;

Expand Down
205 changes: 0 additions & 205 deletions consensus/src/block_storage/block_store_and_lec_recovery_test.rs

This file was deleted.

Loading

0 comments on commit b913372

Please sign in to comment.