Skip to content

Commit

Permalink
Updates masp gas costs
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed May 17, 2024
1 parent 4953253 commit b4d49d1
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions crates/gas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,28 @@ pub const IBC_ACTION_EXECUTE_GAS: u64 = 3_678_745;
/// The cost to execute an ibc transaction TODO: remove once ibc tx goes back to
/// wasm
pub const IBC_TX_GAS: u64 = 111_825_500;
// FIXME: update costs
/// The cost of masp sig verification
pub const MASP_VERIFY_SIG_GAS: u64 = 1;
pub const MASP_VERIFY_SIG_GAS: u64 = 5_443_000;
/// The fixed cost of spend note verification
pub const MASP_FIXED_SPEND_GAS: u64 = 1;
pub const MASP_FIXED_SPEND_GAS: u64 = 87_866_000;
/// The variable cost of spend note verification
pub const MASP_VARIABLE_SPEND_GAS: u64 = 1;
pub const MASP_VARIABLE_SPEND_GAS: u64 = 14_384_000;
/// The fixed cost of convert note verification
pub const MASP_FIXED_CONVERT_GAS: u64 = 1;
pub const MASP_FIXED_CONVERT_GAS: u64 = 70_308_000;
/// The variable cost of convert note verification
pub const MASP_VARIABLE_CONVERT_GAS: u64 = 1;
pub const MASP_VARIABLE_CONVERT_GAS: u64 = 12_664_000;
/// The fixed cost of output note verification
pub const MASP_FIXED_OUTPUT_GAS: u64 = 1;
pub const MASP_FIXED_OUTPUT_GAS: u64 = 78_203_000;
/// The variable cost of output note verification
pub const MASP_VARIABLE_OUTPUT_GAS: u64 = 1;
pub const MASP_VARIABLE_OUTPUT_GAS: u64 = 14_586_000;
/// The cost to process a masp spend note in the bundle
pub const MASP_SPEND_CHECK_GAS: u64 = 1;
pub const MASP_SPEND_CHECK_GAS: u64 = 479_730;
/// The cost to process a masp convert note in the bundle
pub const MASP_CONVERT_CHECK_GAS: u64 = 1;
pub const MASP_CONVERT_CHECK_GAS: u64 = 173_570;
/// The cost to process a masp output note in the bundle
pub const MASP_OUTPUT_CHECK_GAS: u64 = 1;
pub const MASP_OUTPUT_CHECK_GAS: u64 = 310_260;
/// The cost to run the final masp check in the bundle
pub const MASP_FINAL_CHECK_GAS: u64 = 1;
pub const MASP_FINAL_CHECK_GAS: u64 = 44;
/// Gas divider specific for the masp vp. Only allocates half of the cores to
/// the masp vp since we can expect the other half to be busy with other vps
pub const MASP_PARALLEL_GAS_DIVIDER: u64 = PARALLEL_GAS_DIVIDER / 2;
Expand Down

0 comments on commit b4d49d1

Please sign in to comment.