From d7ba15cde81c2fb6bc451c1abb523cd4c73685b8 Mon Sep 17 00:00:00 2001 From: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com> Date: Wed, 18 Aug 2021 11:38:44 -0500 Subject: [PATCH] Update block max cost limit to fix performance regession (#19276) * increase block_cost_max by 10 times to accommodate updated account read and write costs; Otherwise during performace test, banking_stage will start reject and retry transactions in next block, result regressed performance. * fix typo --- ledger/src/block_cost_limits.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ledger/src/block_cost_limits.rs b/ledger/src/block_cost_limits.rs index dad5976a51..b4967b8622 100644 --- a/ledger/src/block_cost_limits.rs +++ b/ledger/src/block_cost_limits.rs @@ -15,7 +15,7 @@ pub const fn max_instructions_per_block() -> u64 { } pub const fn block_cost_max() -> u64 { - MAX_INSTRUCTION_COST * max_instructions_per_block() + MAX_INSTRUCTION_COST * max_instructions_per_block() * 10 } pub const fn account_cost_max() -> u64 { @@ -23,7 +23,7 @@ pub const fn account_cost_max() -> u64 { } pub const fn compute_unit_to_us_ratio() -> u64 { - block_cost_max() / MAX_BLOCK_TIME_US + (MAX_INSTRUCTION_COST / AVG_INSTRUCTION_TIME_US) * SYSTEM_PARALLELISM } pub const fn signature_cost() -> u64 {