Skip to content

Commit

Permalink
[refactor]: Remove additional queue for MST
Browse files Browse the repository at this point in the history
Signed-off-by: Shanin Roman <[email protected]>
  • Loading branch information
Erigara committed Jun 2, 2023
1 parent f407c99 commit 6a51c06
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 263 deletions.
1 change: 0 additions & 1 deletion config/iroha_test_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
},
"QUEUE": {
"MAX_TRANSACTIONS_IN_QUEUE": 65536,
"MAX_TRANSACTIONS_IN_SIGNATURE_BUFFER": 65536,
"TRANSACTION_TIME_TO_LIVE_MS": 86400000,
"FUTURE_THRESHOLD_MS": 1000
},
Expand Down
9 changes: 1 addition & 8 deletions config/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use iroha_config_base::derive::{Documented, Proxy};
use serde::{Deserialize, Serialize};

const DEFAULT_MAX_TRANSACTIONS_IN_QUEUE: u32 = 2_u32.pow(16);
const DEFAULT_MAX_TRANSACTIONS_IN_SIGNATURE_BUFFER: u32 = 2_u32.pow(16);
// 24 hours
const DEFAULT_TRANSACTION_TIME_TO_LIVE_MS: u64 = 24 * 60 * 60 * 1000;
const DEFAULT_FUTURE_THRESHOLD_MS: u64 = 1000;
Expand All @@ -16,8 +15,6 @@ const DEFAULT_FUTURE_THRESHOLD_MS: u64 = 1000;
pub struct Configuration {
/// The upper limit of the number of transactions waiting in the queue.
pub max_transactions_in_queue: u32,
/// The upper limit of the number of transactions waiting for more signatures.
pub max_transactions_in_signature_buffer: u32,
/// The transaction will be dropped after this time if it is still in the queue.
pub transaction_time_to_live_ms: u64,
/// The threshold to determine if a transaction has been tampered to have a future timestamp.
Expand All @@ -28,9 +25,6 @@ impl Default for ConfigurationProxy {
fn default() -> Self {
Self {
max_transactions_in_queue: Some(DEFAULT_MAX_TRANSACTIONS_IN_QUEUE),
max_transactions_in_signature_buffer: Some(
DEFAULT_MAX_TRANSACTIONS_IN_SIGNATURE_BUFFER,
),
transaction_time_to_live_ms: Some(DEFAULT_TRANSACTION_TIME_TO_LIVE_MS),
future_threshold_ms: Some(DEFAULT_FUTURE_THRESHOLD_MS),
}
Expand All @@ -47,12 +41,11 @@ pub mod tests {
pub fn arb_proxy()
(
max_transactions_in_queue in prop::option::of(Just(DEFAULT_MAX_TRANSACTIONS_IN_QUEUE)),
max_transactions_in_signature_buffer in prop::option::of(Just(DEFAULT_MAX_TRANSACTIONS_IN_SIGNATURE_BUFFER)),
transaction_time_to_live_ms in prop::option::of(Just(DEFAULT_TRANSACTION_TIME_TO_LIVE_MS)),
future_threshold_ms in prop::option::of(Just(DEFAULT_FUTURE_THRESHOLD_MS)),
)
-> ConfigurationProxy {
ConfigurationProxy { max_transactions_in_queue, max_transactions_in_signature_buffer, transaction_time_to_live_ms, future_threshold_ms }
ConfigurationProxy { max_transactions_in_queue, transaction_time_to_live_ms, future_threshold_ms }
}
}
}
1 change: 0 additions & 1 deletion configs/peer/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
},
"QUEUE": {
"MAX_TRANSACTIONS_IN_QUEUE": 65536,
"MAX_TRANSACTIONS_IN_SIGNATURE_BUFFER": 65536,
"TRANSACTION_TIME_TO_LIVE_MS": 86400000,
"FUTURE_THRESHOLD_MS": 1000
},
Expand Down
Loading

0 comments on commit 6a51c06

Please sign in to comment.