Skip to content

Commit

Permalink
Update block max cost limit to fix performance regession (solana-labs…
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-stones committed Sep 29, 2021
1 parent e1af026 commit 691be0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ledger/src/block_cost_limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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 {
MAX_INSTRUCTION_COST * max_instructions_per_block()
}

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 {
Expand Down

0 comments on commit 691be0d

Please sign in to comment.