From c4f9719158a95318d917d1c5c47544d34e8a8ec7 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 3 Sep 2024 20:02:49 +0200 Subject: [PATCH] Updates gas limits --- crates/sdk/src/lib.rs | 1 - crates/tests/src/integration/masp.rs | 17 +++++++---------- genesis/hardware/parameters.toml | 4 ++-- genesis/localnet/parameters.toml | 5 ++--- genesis/starter/parameters.toml | 4 ++-- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/crates/sdk/src/lib.rs b/crates/sdk/src/lib.rs index 55c14d52754..517f160611f 100644 --- a/crates/sdk/src/lib.rs +++ b/crates/sdk/src/lib.rs @@ -82,7 +82,6 @@ use tx::{ use wallet::{Wallet, WalletIo, WalletStorage}; /// Default gas-limit -// FIXME: lower pub const DEFAULT_GAS_LIMIT: u64 = 200_000; #[allow(missing_docs)] diff --git a/crates/tests/src/integration/masp.rs b/crates/tests/src/integration/masp.rs index 644bf7c8827..aa2fea0ef2c 100644 --- a/crates/tests/src/integration/masp.rs +++ b/crates/tests/src/integration/masp.rs @@ -685,9 +685,8 @@ fn masp_incentives() -> Result<()> { CHRISTEL, "--token", NAM, - // FIXME: lower if possible "--gas-limit", - "300000", + "250000", "--amount", "1.451732", "--signing-keys", @@ -2903,7 +2902,7 @@ fn masp_fee_payment_with_custom_spending_key() -> Result<()> { "--token", NAM, "--amount", - "300000", + "250000", "--ledger-address", validator_one_rpc, ], @@ -2953,7 +2952,7 @@ fn masp_fee_payment_with_custom_spending_key() -> Result<()> { ) }); assert!(captured.result.is_ok()); - assert!(captured.contains("nam: 300000")); + assert!(captured.contains("nam: 250000")); // Masp fee payment with custom gas payer let captured = CapturedOutput::of(|| { @@ -2970,9 +2969,8 @@ fn masp_fee_payment_with_custom_spending_key() -> Result<()> { NAM, "--amount", "9000", - // FIXME: lower "--gas-limit", - "300000", + "250000", "--gas-price", "1", "--gas-spending-key", @@ -3151,7 +3149,7 @@ fn masp_fee_payment_with_different_token() -> Result<()> { "--token", BTC, "--amount", - "300000", + "250000", "--gas-payer", ALBERT_KEY, "--ledger-address", @@ -3220,7 +3218,7 @@ fn masp_fee_payment_with_different_token() -> Result<()> { ) }); assert!(captured.result.is_ok()); - assert!(captured.contains("btc: 300000")); + assert!(captured.contains("btc: 250000")); // Masp fee payment with custom token and gas payer let captured = CapturedOutput::of(|| { @@ -3239,9 +3237,8 @@ fn masp_fee_payment_with_different_token() -> Result<()> { "1", "--gas-token", BTC, - // FIXME: reduce this "--gas-limit", - "300000", + "250000", "--gas-price", "1", "--gas-spending-key", diff --git a/genesis/hardware/parameters.toml b/genesis/hardware/parameters.toml index 60eda654c77..584a4b5258e 100644 --- a/genesis/hardware/parameters.toml +++ b/genesis/hardware/parameters.toml @@ -19,9 +19,9 @@ epochs_per_year = 31_536_000 # The multiplier for masp epochs masp_epoch_multiplier = 2 # Max gas for block -max_block_gas = 15_000_000 +max_block_gas = 20_000_000 # Masp fee payment gas limit -masp_fee_payment_gas_limit = 300_000 +masp_fee_payment_gas_limit = 200_000 # Gas scale gas_scale = 10_000 diff --git a/genesis/localnet/parameters.toml b/genesis/localnet/parameters.toml index b6f91a135a4..60f780cc1bc 100644 --- a/genesis/localnet/parameters.toml +++ b/genesis/localnet/parameters.toml @@ -19,10 +19,9 @@ epochs_per_year = 31_536_000 # The multiplier for masp epochs masp_epoch_multiplier = 2 # Max gas for block -max_block_gas = 15_000_000 +max_block_gas = 20_000_000 # Masp fee payment gas limit -# FIXME: lower -masp_fee_payment_gas_limit = 300_000 +masp_fee_payment_gas_limit = 200_000 # Gas scale gas_scale = 10_000 diff --git a/genesis/starter/parameters.toml b/genesis/starter/parameters.toml index fd088caa759..ad8f91eaf4c 100644 --- a/genesis/starter/parameters.toml +++ b/genesis/starter/parameters.toml @@ -19,9 +19,9 @@ epochs_per_year = 31_536_000 # The multiplier for masp epochs masp_epoch_multiplier = 2 # Max gas for block -max_block_gas = 15_000_000 +max_block_gas = 20_000_000 # Masp fee payment gas limit -masp_fee_payment_gas_limit = 300_000 +masp_fee_payment_gas_limit = 200_000 # Gas scale gas_scale = 10_000