Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iota)!: TransactiondOrchestrator typo #1751

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions crates/iota-core/src/transaction_orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ use tokio::{
};
use tracing::{debug, error, error_span, info, instrument, warn, Instrument};

// Transaction Orchestrator is a Node component that utilizes Quorum Driver to
// submit transactions to validators for finality, and proactively executes
// finalized transactions locally, when possible.
use crate::authority::AuthorityState;
use crate::{
authority::authority_per_epoch_store::AuthorityPerEpochStore,
authority::{authority_per_epoch_store::AuthorityPerEpochStore, AuthorityState},
authority_aggregator::{AuthAggMetrics, AuthorityAggregator},
authority_client::{AuthorityAPI, NetworkAuthorityClient},
quorum_driver::{
Expand All @@ -61,7 +57,10 @@ const LOCAL_EXECUTION_TIMEOUT: Duration = Duration::from_secs(10);

const WAIT_FOR_FINALITY_TIMEOUT: Duration = Duration::from_secs(30);

pub struct TransactiondOrchestrator<A: Clone> {
/// Transaction Orchestrator is a Node component that utilizes Quorum Driver to
/// submit transactions to validators for finality, and proactively executes
/// finalized transactions locally, when possible.
pub struct TransactionOrchestrator<A: Clone> {
quorum_driver_handler: Arc<QuorumDriverHandler<A>>,
validator_state: Arc<AuthorityState>,
_local_executor_handle: JoinHandle<()>,
Expand All @@ -70,7 +69,7 @@ pub struct TransactiondOrchestrator<A: Clone> {
metrics: Arc<TransactionOrchestratorMetrics>,
}

impl TransactiondOrchestrator<NetworkAuthorityClient> {
impl TransactionOrchestrator<NetworkAuthorityClient> {
pub fn new_with_network_clients(
validator_state: Arc<AuthorityState>,
reconfig_channel: Receiver<IotaSystemState>,
Expand All @@ -93,7 +92,7 @@ impl TransactiondOrchestrator<NetworkAuthorityClient> {
safe_client_metrics_base,
auth_agg_metrics,
);
Ok(TransactiondOrchestrator::new(
Ok(TransactionOrchestrator::new(
Arc::new(validators),
validator_state,
parent_path,
Expand All @@ -103,7 +102,7 @@ impl TransactiondOrchestrator<NetworkAuthorityClient> {
}
}

impl<A> TransactiondOrchestrator<A>
impl<A> TransactionOrchestrator<A>
where
A: AuthorityAPI + Send + Sync + 'static + Clone,
OnsiteReconfigObserver: ReconfigObserver<A>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{sync::Arc, time::Duration};

use iota_core::{
authority::EffectsNotifyRead, authority_client::NetworkAuthorityClient,
transaction_orchestrator::TransactiondOrchestrator,
transaction_orchestrator::TransactionOrchestrator,
};
use iota_macros::sim_test;
use iota_storage::{
Expand Down Expand Up @@ -38,7 +38,7 @@ async fn test_blocking_execution() -> Result<(), anyhow::Error> {
// Start orchestrator inside container so that it will be properly shutdown.
let orchestrator = handle
.with(|node| {
TransactiondOrchestrator::new_with_network_clients(
TransactionOrchestrator::new_with_network_clients(
node.state(),
node.subscribe_to_epoch_change(),
temp_dir.path(),
Expand Down Expand Up @@ -121,7 +121,7 @@ async fn test_fullnode_wal_log() -> Result<(), anyhow::Error> {
// Start orchestrator inside container so that it will be properly shutdown.
let orchestrator = handle
.with(|node| {
TransactiondOrchestrator::new_with_network_clients(
TransactionOrchestrator::new_with_network_clients(
node.state(),
node.subscribe_to_epoch_change(),
temp_dir.path(),
Expand Down Expand Up @@ -309,7 +309,7 @@ async fn test_tx_across_epoch_boundaries() {
}

async fn execute_with_orchestrator(
orchestrator: &TransactiondOrchestrator<NetworkAuthorityClient>,
orchestrator: &TransactionOrchestrator<NetworkAuthorityClient>,
txn: Transaction,
request_type: ExecuteTransactionRequestType,
) -> Result<ExecuteTransactionResponse, QuorumDriverError> {
Expand Down
6 changes: 3 additions & 3 deletions crates/iota-json-rpc/src/transaction_execution_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use async_trait::async_trait;
use fastcrypto::{encoding::Base64, traits::ToFromBytes};
use iota_core::{
authority::AuthorityState, authority_client::NetworkAuthorityClient,
transaction_orchestrator::TransactiondOrchestrator,
transaction_orchestrator::TransactionOrchestrator,
};
use iota_json_rpc_api::{JsonRpcMetrics, WriteApiOpenRpc, WriteApiServer};
use iota_json_rpc_types::{
Expand Down Expand Up @@ -45,14 +45,14 @@ use crate::{

pub struct TransactionExecutionApi {
state: Arc<dyn StateRead>,
transaction_orchestrator: Arc<TransactiondOrchestrator<NetworkAuthorityClient>>,
transaction_orchestrator: Arc<TransactionOrchestrator<NetworkAuthorityClient>>,
metrics: Arc<JsonRpcMetrics>,
}

impl TransactionExecutionApi {
pub fn new(
state: Arc<AuthorityState>,
transaction_orchestrator: Arc<TransactiondOrchestrator<NetworkAuthorityClient>>,
transaction_orchestrator: Arc<TransactionOrchestrator<NetworkAuthorityClient>>,
metrics: Arc<JsonRpcMetrics>,
) -> Self {
Self {
Expand Down
22 changes: 10 additions & 12 deletions crates/iota-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ use iota_core::{
signature_verifier::SignatureVerifierMetrics,
state_accumulator::StateAccumulator,
storage::RocksDbStore,
transaction_orchestrator::TransactiondOrchestrator,
transaction_orchestrator::TransactionOrchestrator,
};
use iota_json_rpc::{
coin_api::CoinReadApi, governance_api::GovernanceReadApi, indexer_api::IndexerApi,
Expand Down Expand Up @@ -208,7 +208,7 @@ pub struct IotaNode {
/// experimental rest service
_http_server: Option<tokio::task::JoinHandle<()>>,
state: Arc<AuthorityState>,
transaction_orchestrator: Option<Arc<TransactiondOrchestrator<NetworkAuthorityClient>>>,
transaction_orchestrator: Option<Arc<TransactionOrchestrator<NetworkAuthorityClient>>>,
registry_service: RegistryService,
metrics: Arc<IotaNodeMetrics>,

Expand Down Expand Up @@ -655,14 +655,12 @@ impl IotaNode {
broadcast::channel(config.end_of_epoch_broadcast_channel_capacity);

let transaction_orchestrator = if is_full_node && run_with_range.is_none() {
Some(Arc::new(
TransactiondOrchestrator::new_with_network_clients(
state.clone(),
end_of_epoch_receiver,
&config.db_path(),
&prometheus_registry,
)?,
))
Some(Arc::new(TransactionOrchestrator::new_with_network_clients(
state.clone(),
end_of_epoch_receiver,
&config.db_path(),
&prometheus_registry,
)?))
} else {
None
};
Expand Down Expand Up @@ -1450,7 +1448,7 @@ impl IotaNode {

pub fn transaction_orchestrator(
&self,
) -> Option<Arc<TransactiondOrchestrator<NetworkAuthorityClient>>> {
) -> Option<Arc<TransactionOrchestrator<NetworkAuthorityClient>>> {
self.transaction_orchestrator.clone()
}

Expand Down Expand Up @@ -1889,7 +1887,7 @@ fn build_kv_store(
pub async fn build_http_server(
state: Arc<AuthorityState>,
store: RocksDbStore,
transaction_orchestrator: &Option<Arc<TransactiondOrchestrator<NetworkAuthorityClient>>>,
transaction_orchestrator: &Option<Arc<TransactionOrchestrator<NetworkAuthorityClient>>>,
config: &NodeConfig,
prometheus_registry: &Registry,
_custom_runtime: Option<Handle>,
Expand Down
Loading