Skip to content

Commit

Permalink
Updates gas limits
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Sep 3, 2024
1 parent d3dce1d commit c4f9719
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion crates/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
17 changes: 7 additions & 10 deletions crates/tests/src/integration/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,8 @@ fn masp_incentives() -> Result<()> {
CHRISTEL,
"--token",
NAM,
// FIXME: lower if possible
"--gas-limit",
"300000",
"250000",
"--amount",
"1.451732",
"--signing-keys",
Expand Down Expand Up @@ -2903,7 +2902,7 @@ fn masp_fee_payment_with_custom_spending_key() -> Result<()> {
"--token",
NAM,
"--amount",
"300000",
"250000",
"--ledger-address",
validator_one_rpc,
],
Expand Down Expand Up @@ -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(|| {
Expand All @@ -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",
Expand Down Expand Up @@ -3151,7 +3149,7 @@ fn masp_fee_payment_with_different_token() -> Result<()> {
"--token",
BTC,
"--amount",
"300000",
"250000",
"--gas-payer",
ALBERT_KEY,
"--ledger-address",
Expand Down Expand Up @@ -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(|| {
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions genesis/hardware/parameters.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions genesis/localnet/parameters.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions genesis/starter/parameters.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c4f9719

Please sign in to comment.