diff --git a/config/iroha_test_config.json b/config/iroha_test_config.json index ad415a54587..f6b1a900a08 100644 --- a/config/iroha_test_config.json +++ b/config/iroha_test_config.json @@ -32,8 +32,8 @@ "public_key": "ed01208E351A70B6A603ED285D666B8D689B680865913BA03CE29FB7D13A166C4E7F1F" } ], - "COMMIT_TIME_LIMIT_MS": 2000, - "MAX_TRANSACTIONS_IN_BLOCK": 8192, + "COMMIT_TIME_LIMIT_MS": 120000, + "MAX_TRANSACTIONS_IN_BLOCK": 20, "ACTOR_CHANNEL_CAPACITY": 100, "GOSSIP_BATCH_SIZE": 500, "GOSSIP_PERIOD_MS": 1000, @@ -47,7 +47,7 @@ "FETCH_SIZE": 10 }, "BLOCK_SYNC": { - "GOSSIP_PERIOD_MS": 10000, + "GOSSIP_PERIOD_MS": 1000, "BLOCK_BATCH_SIZE": 4, "ACTOR_CHANNEL_CAPACITY": 100 }, diff --git a/config/src/block_sync.rs b/config/src/block_sync.rs index 6802fcce9c9..24771aba681 100644 --- a/config/src/block_sync.rs +++ b/config/src/block_sync.rs @@ -3,7 +3,7 @@ use iroha_config_base::derive::{Documented, Proxy}; use serde::{Deserialize, Serialize}; const DEFAULT_BLOCK_BATCH_SIZE: u32 = 4; -const DEFAULT_GOSSIP_PERIOD_MS: u64 = 10000; +const DEFAULT_GOSSIP_PERIOD_MS: u64 = 1000; const DEFAULT_ACTOR_CHANNEL_CAPACITY: u32 = 100; /// Configuration for `BlockSynchronizer`. diff --git a/config/src/sumeragi.rs b/config/src/sumeragi.rs index c6929d441d6..f76df6dc6b2 100644 --- a/config/src/sumeragi.rs +++ b/config/src/sumeragi.rs @@ -13,9 +13,9 @@ use self::default::*; /// Module with a set of default values. pub mod default { /// Default number of miliseconds the peer waits for transactions before creating a block. - pub const DEFAULT_BLOCK_TIME_MS: u64 = 2000; + pub const DEFAULT_BLOCK_TIME_MS: u64 = 1000; /// Default amount of time allocated for voting on a block before a peer can ask for a view change. - pub const DEFAULT_COMMIT_TIME_LIMIT_MS: u64 = 4000; + pub const DEFAULT_COMMIT_TIME_LIMIT_MS: u64 = 120000; /// Unused const. Should be removed in the future. pub const DEFAULT_ACTOR_CHANNEL_CAPACITY: u32 = 100; /// Default duration in ms between every transaction gossip. @@ -23,7 +23,7 @@ pub mod default { /// Default maximum number of transactions sent in single gossip message. pub const DEFAULT_GOSSIP_BATCH_SIZE: u32 = 500; /// Default maximum number of transactions in block. - pub const DEFAULT_MAX_TRANSACTIONS_IN_BLOCK: u32 = 2_u32.pow(9); + pub const DEFAULT_MAX_TRANSACTIONS_IN_BLOCK: u32 = 20; /// Default estimation of consensus duration. #[allow(clippy::integer_division)] diff --git a/configs/peer/config.json b/configs/peer/config.json index 02211ed3072..89d4668bac1 100644 --- a/configs/peer/config.json +++ b/configs/peer/config.json @@ -12,10 +12,10 @@ "SUMERAGI": { "KEY_PAIR": null, "PEER_ID": null, - "BLOCK_TIME_MS": 2000, + "BLOCK_TIME_MS": 1000, "TRUSTED_PEERS": null, - "COMMIT_TIME_LIMIT_MS": 4000, - "MAX_TRANSACTIONS_IN_BLOCK": 512, + "COMMIT_TIME_LIMIT_MS": 120000, + "MAX_TRANSACTIONS_IN_BLOCK": 20, "ACTOR_CHANNEL_CAPACITY": 100, "GOSSIP_BATCH_SIZE": 500, "GOSSIP_PERIOD_MS": 1000 @@ -28,7 +28,7 @@ "FETCH_SIZE": 10 }, "BLOCK_SYNC": { - "GOSSIP_PERIOD_MS": 10000, + "GOSSIP_PERIOD_MS": 1000, "BLOCK_BATCH_SIZE": 4, "ACTOR_CHANNEL_CAPACITY": 100 }, diff --git a/docs/source/references/config.md b/docs/source/references/config.md index a3f4468ca4b..2b720df29b3 100644 --- a/docs/source/references/config.md +++ b/docs/source/references/config.md @@ -43,10 +43,10 @@ The following is the default configuration used by Iroha. "SUMERAGI": { "KEY_PAIR": null, "PEER_ID": null, - "BLOCK_TIME_MS": 2000, + "BLOCK_TIME_MS": 1000, "TRUSTED_PEERS": null, - "COMMIT_TIME_LIMIT_MS": 4000, - "MAX_TRANSACTIONS_IN_BLOCK": 512, + "COMMIT_TIME_LIMIT_MS": 120000, + "MAX_TRANSACTIONS_IN_BLOCK": 20, "ACTOR_CHANNEL_CAPACITY": 100, "GOSSIP_BATCH_SIZE": 500, "GOSSIP_PERIOD_MS": 1000 @@ -59,7 +59,7 @@ The following is the default configuration used by Iroha. "FETCH_SIZE": 10 }, "BLOCK_SYNC": { - "GOSSIP_PERIOD_MS": 10000, + "GOSSIP_PERIOD_MS": 1000, "BLOCK_BATCH_SIZE": 4, "ACTOR_CHANNEL_CAPACITY": 100 }, @@ -141,7 +141,7 @@ Has type `Option`[^1]. Can be configured via env { "ACTOR_CHANNEL_CAPACITY": 100, "BLOCK_BATCH_SIZE": 4, - "GOSSIP_PERIOD_MS": 10000 + "GOSSIP_PERIOD_MS": 1000 } ``` @@ -172,7 +172,7 @@ The period of time to wait between sending requests for the latest block. Has type `Option`[^1]. Can be configured via environment variable `BLOCK_SYNC_GOSSIP_PERIOD_MS` ```json -10000 +1000 ``` ## `disable_panic_terminal_colors` @@ -522,12 +522,12 @@ Has type `Option>`[^1]. Can be configured via ```json { "ACTOR_CHANNEL_CAPACITY": 100, - "BLOCK_TIME_MS": 2000, - "COMMIT_TIME_LIMIT_MS": 4000, + "BLOCK_TIME_MS": 1000, + "COMMIT_TIME_LIMIT_MS": 120000, "GOSSIP_BATCH_SIZE": 500, "GOSSIP_PERIOD_MS": 1000, "KEY_PAIR": null, - "MAX_TRANSACTIONS_IN_BLOCK": 512, + "MAX_TRANSACTIONS_IN_BLOCK": 20, "PEER_ID": null, "TRUSTED_PEERS": null } @@ -550,7 +550,7 @@ The period of time a peer waits for the `CreatedBlock` message after getting a ` Has type `Option`[^1]. Can be configured via environment variable `SUMERAGI_BLOCK_TIME_MS` ```json -2000 +1000 ``` ### `sumeragi.commit_time_limit_ms` @@ -560,7 +560,7 @@ The period of time a peer waits for `CommitMessage` from the proxy tail. Has type `Option`[^1]. Can be configured via environment variable `SUMERAGI_COMMIT_TIME_LIMIT_MS` ```json -4000 +120000 ``` ### `sumeragi.gossip_batch_size` @@ -600,7 +600,7 @@ The upper limit of the number of transactions per block. Has type `Option`[^1]. Can be configured via environment variable `SUMERAGI_MAX_TRANSACTIONS_IN_BLOCK` ```json -512 +20 ``` ### `sumeragi.peer_id`