Skip to content

Commit

Permalink
deprecate FairnessShuffler
Browse files Browse the repository at this point in the history
  • Loading branch information
msmouse committed Jun 14, 2024
1 parent 2823f2e commit cb35ecb
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::conflict_key::ConflictKey;
use crate::transaction_shuffler::deprecated_fairness::conflict_key::ConflictKey;
use aptos_types::transaction::{SignedTransaction, TransactionPayload};
use move_core_types::{identifier::Identifier, language_storage::ModuleId};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::conflict_key::ConflictKey;
use crate::transaction_shuffler::deprecated_fairness::conflict_key::ConflictKey;
use aptos_types::transaction::{SignedTransaction, TransactionPayload};
use move_core_types::language_storage::ModuleId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::TxnIdx;
use crate::transaction_shuffler::deprecated_fairness::TxnIdx;
use std::{collections::HashMap, hash::Hash};

pub(crate) mod entry_fun;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::conflict_key::{
use crate::transaction_shuffler::deprecated_fairness::conflict_key::{
ConflictKey, ConflictKeyId, ConflictKeyRegistry,
};
use proptest::prelude::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::conflict_key::ConflictKey;
use crate::transaction_shuffler::deprecated_fairness::conflict_key::ConflictKey;
use aptos_types::transaction::SignedTransaction;
use move_core_types::account_address::AccountAddress;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::{
use crate::transaction_shuffler::deprecated_fairness::{
conflict_key::{ConflictKeyId, ConflictKeyRegistry, MapByKeyId},
TxnIdx,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::{
fairness::{
deprecated_fairness::{
conflict_key::{
entry_fun::EntryFunKey, entry_fun_module::EntryFunModuleKey, txn_sender::TxnSenderKey,
ConflictKeyRegistry,
Expand Down Expand Up @@ -178,7 +178,7 @@ impl<'a, const NUM_CONFLICT_ZONES: usize> FairnessShufflerImpl<'a, NUM_CONFLICT_

#[cfg(test)]
mod test_utils {
use crate::transaction_shuffler::fairness::FairnessShuffler;
use crate::transaction_shuffler::deprecated_fairness::FairnessShuffler;
use proptest::prelude::*;

impl FairnessShuffler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::{
use crate::transaction_shuffler::deprecated_fairness::{
conflict_key::{ConflictKeyId, ConflictKeyRegistry, MapByKeyId},
TxnIdx,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::TxnIdx;
use crate::transaction_shuffler::deprecated_fairness::TxnIdx;

pub struct SelectionTracker {
selected_markers: Vec<bool>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::{
use crate::transaction_shuffler::deprecated_fairness::{
conflict_key::ConflictKeyRegistry, FairnessShuffler, FairnessShufflerImpl,
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

use crate::transaction_shuffler::fairness::{
use crate::transaction_shuffler::deprecated_fairness::{
conflict_key::{
test_utils::{FakeEntryFunKey, FakeEntryFunModuleKey, FakeSenderKey, FakeTxn},
ConflictKeyRegistry, MapByKeyId,
Expand Down
6 changes: 3 additions & 3 deletions consensus/src/transaction_shuffler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use aptos_types::{
use sender_aware::SenderAwareShuffler;
use std::sync::Arc;

mod fairness;
mod deprecated_fairness;
mod sender_aware;

/// Interface to shuffle transactions
Expand Down Expand Up @@ -48,7 +48,7 @@ pub fn create_transaction_shuffler(
);
Arc::new(SenderAwareShuffler::new(conflict_window_size as usize))
},
TransactionShufflerType::Fairness {
TransactionShufflerType::DeprecatedFairness {
sender_conflict_window_size,
module_conflict_window_size,
entry_fun_conflict_window_size,
Expand All @@ -59,7 +59,7 @@ pub fn create_transaction_shuffler(
module_conflict_window_size,
entry_fun_conflict_window_size
);
Arc::new(fairness::FairnessShuffler {
Arc::new(deprecated_fairness::FairnessShuffler {
sender_conflict_window_size: sender_conflict_window_size as usize,
module_conflict_window_size: module_conflict_window_size as usize,
entry_fun_conflict_window_size: entry_fun_conflict_window_size as usize,
Expand Down
2 changes: 1 addition & 1 deletion testsuite/forge-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ fn realistic_network_tuned_for_throughput_test() -> ForgeConfig {
}
OnChainExecutionConfig::V4(config_v4) => {
config_v4.block_gas_limit_type = BlockGasLimitType::NoLimit;
config_v4.transaction_shuffler_type = TransactionShufflerType::Fairness {
config_v4.transaction_shuffler_type = TransactionShufflerType::DeprecatedFairness {
sender_conflict_window_size: 256,
module_conflict_window_size: 2,
entry_fun_conflict_window_size: 3,
Expand Down
4 changes: 2 additions & 2 deletions testsuite/forge-cli/src/suites/dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn dag_realistic_env_max_load_test(
}
OnChainExecutionConfig::V4(config_v4) => {
config_v4.block_gas_limit_type = BlockGasLimitType::NoLimit;
config_v4.transaction_shuffler_type = TransactionShufflerType::Fairness {
config_v4.transaction_shuffler_type = TransactionShufflerType::DeprecatedFairness {
sender_conflict_window_size: 256,
module_conflict_window_size: 2,
entry_fun_conflict_window_size: 3,
Expand Down Expand Up @@ -211,7 +211,7 @@ fn dag_reconfig_enable_test() -> ForgeConfig {
}
OnChainExecutionConfig::V4(config_v4) => {
config_v4.block_gas_limit_type = BlockGasLimitType::NoLimit;
config_v4.transaction_shuffler_type = TransactionShufflerType::Fairness {
config_v4.transaction_shuffler_type = TransactionShufflerType::DeprecatedFairness {
sender_conflict_window_size: 256,
module_conflict_window_size: 2,
entry_fun_conflict_window_size: 3,
Expand Down
4 changes: 2 additions & 2 deletions types/src/on_chain_config/execution_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl OnChainExecutionConfig {
/// Features that are ready for deployment can be enabled here.
pub fn default_for_genesis() -> Self {
OnChainExecutionConfig::V4(ExecutionConfigV4 {
transaction_shuffler_type: TransactionShufflerType::Fairness {
transaction_shuffler_type: TransactionShufflerType::DeprecatedFairness {
sender_conflict_window_size: 32,
module_conflict_window_size: 1,
entry_fun_conflict_window_size: 2,
Expand Down Expand Up @@ -152,7 +152,7 @@ pub enum TransactionShufflerType {
NoShuffling,
DeprecatedSenderAwareV1(u32),
SenderAwareV2(u32),
Fairness {
DeprecatedFairness {
sender_conflict_window_size: u32,
module_conflict_window_size: u32,
entry_fun_conflict_window_size: u32,
Expand Down

0 comments on commit cb35ecb

Please sign in to comment.