Skip to content

Commit fe7d7f3

Browse files
authored
Use TransactionDriver 100% (#24420)
## Description Remove QuorumDriver integration in TransactionOrchestrator. Remove the logic to split traffic between QuorumDriver and TransactionDriver. Remove SIP-39 simtest which has been rolled out. ## Test plan CI
1 parent 8beeaf3 commit fe7d7f3

File tree

9 files changed

+39
-326
lines changed

9 files changed

+39
-326
lines changed

crates/sui-benchmark/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ use sui_core::{
1616
QuorumDriver, QuorumDriverHandler, QuorumDriverHandlerBuilder, QuorumDriverMetrics,
1717
reconfig_observer::ReconfigObserver,
1818
},
19-
transaction_driver::{
20-
SubmitTransactionOptions, TransactionDriver, TransactionDriverMetrics,
21-
choose_transaction_driver_percentage,
22-
},
19+
transaction_driver::{SubmitTransactionOptions, TransactionDriver, TransactionDriverMetrics},
2320
validator_client_monitor::ValidatorClientMetrics,
2421
};
2522
use sui_json_rpc_types::{
@@ -283,14 +280,13 @@ impl LocalValidatorAggregatorProxy {
283280
.with_registry(registry)
284281
.build_network_clients();
285282
let committee = genesis.committee().unwrap();
286-
let td_percentage = choose_transaction_driver_percentage(None);
287283
Self::new_impl(
288284
aggregator,
289285
registry,
290286
reconfig_fullnode_rpc_url,
291287
clients,
292288
committee,
293-
td_percentage,
289+
100,
294290
)
295291
.await
296292
}

crates/sui-core/src/quorum_driver/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ where
808808
}
809809
}
810810

811+
#[cfg(test)]
811812
pub(crate) fn with_notifier(
812813
mut self,
813814
notifier: Arc<NotifyRead<TransactionDigest, QuorumDriverResult>>,

crates/sui-core/src/transaction_driver/mod.rs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ where
9595
node_config: Option<&NodeConfig>,
9696
client_metrics: Arc<ValidatorClientMetrics>,
9797
) -> Arc<Self> {
98+
if std::env::var("TRANSACTION_DRIVER").is_ok() {
99+
tracing::warn!(
100+
"Transaction Driver is the only supported driver for transaction submission. Setting TRANSACTION_DRIVER is a no-op."
101+
);
102+
}
103+
98104
let shared_swap = Arc::new(ArcSwap::new(authority_aggregator));
99105

100106
// Extract validator client monitor config from NodeConfig or use default
@@ -486,28 +492,6 @@ where
486492
}
487493
}
488494

489-
// Chooses the percentage of transactions to be driven by TransactionDriver.
490-
pub fn choose_transaction_driver_percentage(
491-
chain_id: Option<sui_types::digests::ChainIdentifier>,
492-
) -> u8 {
493-
if let Ok(v) = std::env::var("TRANSACTION_DRIVER")
494-
&& let Ok(tx_driver_percentage) = v.parse::<u8>()
495-
&& (0..=100).contains(&tx_driver_percentage)
496-
{
497-
return tx_driver_percentage;
498-
}
499-
500-
if let Some(chain_identifier) = chain_id
501-
&& chain_identifier.chain() == sui_protocol_config::Chain::Unknown
502-
{
503-
// Kep test coverage for QD.
504-
return 50;
505-
}
506-
507-
// Default to 100% everywhere
508-
100
509-
}
510-
511495
// Inner state of TransactionDriver.
512496
struct State {
513497
tasks: JoinSet<()>,

0 commit comments

Comments
 (0)