Skip to content

Commit

Permalink
move quorum driver from its own crate to sui-core (#4611)
Browse files Browse the repository at this point in the history
  • Loading branch information
longbowlu authored Sep 14, 2022
1 parent 4c06153 commit 21d1853
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 53 deletions.
18 changes: 0 additions & 18 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ members = [
"crates/sui-node",
"crates/sui-open-rpc",
"crates/sui-open-rpc-macros",
"crates/sui-quorum-driver",
"crates/sui-sdk",
"crates/sui-simulator",
"crates/sui-storage",
Expand Down
1 change: 0 additions & 1 deletion crates/sui-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ sui-core = { path = "../sui-core" }
sui-config = { path = "../sui-config" }
sui-types = { path = "../sui-types" }
sui-sdk = { path = "../sui-sdk" }
sui-quorum-driver = { path = "../sui-quorum-driver" }
sui-node = { path = "../sui-node" }
sui-json-rpc-types = { path = "../sui-json-rpc-types" }

Expand Down
3 changes: 1 addition & 2 deletions crates/sui-benchmark/src/drivers/bench_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ use std::collections::{BTreeMap, VecDeque};
use std::sync::Arc;
use std::time::Duration;
use sui_core::authority_client::NetworkAuthorityClient;
use sui_quorum_driver::QuorumDriverHandler;
use sui_quorum_driver::QuorumDriverMetrics;
use sui_core::quorum_driver::{QuorumDriverHandler, QuorumDriverMetrics};
use sui_types::crypto::EmptySignInfo;
use sui_types::messages::{
ExecuteTransactionRequest, ExecuteTransactionRequestType, ExecuteTransactionResponse,
Expand Down
3 changes: 1 addition & 2 deletions crates/sui-benchmark/src/workloads/workload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

use async_trait::async_trait;
use std::{collections::HashMap, fmt};
use sui_core::quorum_driver::{QuorumDriverHandler, QuorumDriverMetrics};
use sui_core::{
authority_aggregator::AuthorityAggregator, authority_client::NetworkAuthorityClient,
};
use sui_quorum_driver::QuorumDriverMetrics;
use sui_types::{
base_types::{ObjectID, ObjectRef},
crypto::EmptySignInfo,
Expand All @@ -15,7 +15,6 @@ use sui_types::{
};

use futures::FutureExt;
use sui_quorum_driver::QuorumDriverHandler;
use sui_types::{
base_types::SuiAddress,
crypto::AccountKeyPair,
Expand Down
1 change: 1 addition & 0 deletions crates/sui-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod event_handler;
pub mod execution_engine;
pub mod gateway_state;
pub mod metrics;
pub mod quorum_driver;
pub mod safe_client;
pub mod streamer;
pub mod transaction_input_checker;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

mod metrics;
pub use metrics::*;

use arc_swap::ArcSwap;
use std::sync::Arc;

Expand All @@ -9,9 +12,8 @@ use tokio::task::JoinHandle;
use tracing::Instrument;
use tracing::{debug, error, warn};

pub use metrics::QuorumDriverMetrics;
use sui_core::authority_aggregator::AuthorityAggregator;
use sui_core::authority_client::AuthorityAPI;
use crate::authority_aggregator::AuthorityAggregator;
use crate::authority_client::AuthorityAPI;
use sui_types::error::{SuiError, SuiResult};
use sui_types::messages::{
CertifiedTransaction, CertifiedTransactionEffects, ExecuteTransactionRequest,
Expand All @@ -22,7 +24,6 @@ pub enum QuorumTask<A> {
ProcessCertificate(CertifiedTransaction),
UpdateCommittee(AuthorityAggregator<A>),
}
pub mod metrics;

/// A handler to wrap around QuorumDriver. This handler should be owned by the node with exclusive
/// mutability.
Expand Down
1 change: 0 additions & 1 deletion crates/sui-json-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ sui-core = { path = "../sui-core" }
sui-types = { path = "../sui-types" }
sui-json = { path = "../sui-json" }
sui-open-rpc = { path = "../sui-open-rpc" }
sui-quorum-driver = { path = "../sui-quorum-driver" }
sui-open-rpc-macros = { path = "../sui-open-rpc-macros" }
sui-json-rpc-types = { path = "../sui-json-rpc-types" }
sui-cost = { path = "../sui-cost" }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-json-rpc/src/quorum_driver_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use signature::Signature;
use std::sync::Arc;
use sui_core::authority::{AuthorityStore, ResolverWrapper};
use sui_core::authority_client::NetworkAuthorityClient;
use sui_core::quorum_driver::QuorumDriver;
use sui_json_rpc_types::SuiExecuteTransactionResponse;
use sui_open_rpc::Module;
use sui_quorum_driver::QuorumDriver;
use sui_types::crypto::SignatureScheme;
use sui_types::messages::{ExecuteTransactionRequest, ExecuteTransactionRequestType};
use sui_types::sui_serde::Base64;
Expand Down
1 change: 0 additions & 1 deletion crates/sui-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ sui-network = { path = "../sui-network" }
sui-json-rpc = { path = "../sui-json-rpc" }
sui-telemetry = { path = "../sui-telemetry" }
sui-types = { path = "../sui-types" }
sui-quorum-driver = { path = "../sui-quorum-driver" }

telemetry-subscribers = "0.1.0"
mysten-network = "0.1.0"
Expand Down
3 changes: 1 addition & 2 deletions crates/sui-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use sui_config::NodeConfig;
use sui_core::authority_active::checkpoint_driver::CheckpointMetrics;
use sui_core::authority_aggregator::{AuthAggMetrics, AuthorityAggregator};
use sui_core::authority_server::ValidatorService;
use sui_core::quorum_driver::{QuorumDriver, QuorumDriverHandler, QuorumDriverMetrics};
use sui_core::safe_client::SafeClientMetrics;
use sui_core::transaction_streamer::TransactionStreamer;
use sui_core::{
Expand All @@ -29,8 +30,6 @@ use sui_core::{
use sui_json_rpc::bcs_api::BcsApiImpl;
use sui_json_rpc::streaming_api::TransactionStreamingApiImpl;
use sui_network::api::ValidatorServer;
use sui_quorum_driver::QuorumDriverMetrics;
use sui_quorum_driver::{QuorumDriver, QuorumDriverHandler};
use sui_storage::{
event_store::{EventStoreType, SqlEventStore},
node_sync_store::NodeSyncStore,
Expand Down
18 changes: 0 additions & 18 deletions crates/sui-quorum-driver/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ typed-store-derive = "0.1.0"
jsonrpsee = { version = "0.15.1", features = ["full"] }

test-utils = { path = "../test-utils" }
sui-quorum-driver = { path = "../sui-quorum-driver" }
rand = "0.8.5"
move-package = { git = "https://github.com/move-language/move", rev = "e1e647b73dbd3652aabb2020728a4a517c26e28e" }
sui-core = { path = "../sui-core" }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/tests/quorum_driver_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use std::time::Duration;
use sui_core::authority_aggregator::AuthorityAggregator;
use sui_core::authority_client::NetworkAuthorityClient;
use sui_core::quorum_driver::{QuorumDriverHandler, QuorumDriverMetrics};
use sui_node::SuiNode;
use sui_quorum_driver::{QuorumDriverHandler, QuorumDriverMetrics};
use sui_types::base_types::SuiAddress;
use sui_types::messages::{
ExecuteTransactionRequest, ExecuteTransactionRequestType, ExecuteTransactionResponse,
Expand Down

0 comments on commit 21d1853

Please sign in to comment.