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] #3038: Re-enable multisigs #3043

Merged
merged 2 commits into from
Jan 19, 2023
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
2 changes: 1 addition & 1 deletion cli/src/torii/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub(crate) async fn handle_instructions(
#[allow(clippy::map_err_ignore)]
queue
.push(transaction, &sumeragi.wsv_mutex_access())
.map_err(|(tx, err)| {
.map_err(|queue::Failure { tx, err }| {
Erigara marked this conversation as resolved.
Show resolved Hide resolved
iroha_logger::warn!(
tx_hash=%tx.hash(), ?err,
"Failed to push into queue"
Expand Down
1 change: 0 additions & 1 deletion client/tests/integration/multisignature_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use test_network::*;
use super::Configuration;

#[allow(clippy::too_many_lines)]
#[ignore = "Multisignature is not working for now. See #2595"]
Erigara marked this conversation as resolved.
Show resolved Hide resolved
#[test]
fn multisignature_transactions_should_wait_for_all_signatures() {
let (_rt, network, _) = <Network>::start_test_with_runtime(4, 1, None);
Expand Down
1 change: 1 addition & 0 deletions config/iroha_test_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"QUEUE": {
"MAXIMUM_TRANSACTIONS_IN_BLOCK": 8192,
"MAXIMUM_TRANSACTIONS_IN_QUEUE": 65536,
"MAXIMUM_TRANSACTIONS_IN_SIGNATURE_BUFFER": 65536,
"TRANSACTION_TIME_TO_LIVE_MS": 86400000,
"FUTURE_THRESHOLD_MS": 1000
},
Expand Down
9 changes: 8 additions & 1 deletion config/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};

const DEFAULT_MAXIMUM_TRANSACTIONS_IN_BLOCK: u32 = 2_u32.pow(9);
const DEFAULT_MAXIMUM_TRANSACTIONS_IN_QUEUE: u32 = 2_u32.pow(16);
const DEFAULT_MAXIMUM_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 @@ -18,6 +19,8 @@ pub struct Configuration {
pub maximum_transactions_in_block: u32,
/// The upper limit of the number of transactions waiting in the queue.
pub maximum_transactions_in_queue: u32,
/// The upper limit of the number of transactions waiting for more signatures.
pub maximum_transactions_in_signature_buffer: u32,
mversic marked this conversation as resolved.
Show resolved Hide resolved
/// 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 @@ -29,6 +32,9 @@ impl Default for ConfigurationProxy {
Self {
maximum_transactions_in_block: Some(DEFAULT_MAXIMUM_TRANSACTIONS_IN_BLOCK),
maximum_transactions_in_queue: Some(DEFAULT_MAXIMUM_TRANSACTIONS_IN_QUEUE),
maximum_transactions_in_signature_buffer: Some(
DEFAULT_MAXIMUM_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 @@ -46,11 +52,12 @@ pub mod tests {
(
maximum_transactions_in_block in prop::option::of(Just(DEFAULT_MAXIMUM_TRANSACTIONS_IN_BLOCK)),
maximum_transactions_in_queue in prop::option::of(Just(DEFAULT_MAXIMUM_TRANSACTIONS_IN_QUEUE)),
maximum_transactions_in_signature_buffer in prop::option::of(Just(DEFAULT_MAXIMUM_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 { maximum_transactions_in_block, maximum_transactions_in_queue, transaction_time_to_live_ms, future_threshold_ms }
ConfigurationProxy { maximum_transactions_in_block, maximum_transactions_in_queue, maximum_transactions_in_signature_buffer, transaction_time_to_live_ms, future_threshold_ms }
}
}
}
1 change: 1 addition & 0 deletions configs/peer/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"QUEUE": {
"MAXIMUM_TRANSACTIONS_IN_BLOCK": 512,
"MAXIMUM_TRANSACTIONS_IN_QUEUE": 65536,
"MAXIMUM_TRANSACTIONS_IN_SIGNATURE_BUFFER": 65536,
"TRANSACTION_TIME_TO_LIVE_MS": 86400000,
"FUTURE_THRESHOLD_MS": 1000
},
Expand Down
Loading