Skip to content

Commit

Permalink
Adjusts default gas limit in cli. Fixes gas in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Jul 10, 2023
1 parent 686783a commit 1635e30
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 163 deletions.
2 changes: 1 addition & 1 deletion apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@ pub mod args {
pub const DONT_PREFETCH_WASM: ArgFlag = flag("dont-prefetch-wasm");
pub const FEE_AMOUNT: ArgOpt<token::Amount> = arg_opt("fee-amount");
pub const GAS_LIMIT: ArgDefault<GasLimit> =
arg_default("gas-limit", DefaultFn(|| GasLimit::from(1_000_000)));
arg_default("gas-limit", DefaultFn(|| GasLimit::from(200_000_000))); //FIXME: lower gas consumption
pub const FEE_TOKEN: ArgDefaultFromCtx<WalletAddress> =
arg_default_from_ctx("fee-token", DefaultFn(|| "NAM".into()));
pub const GENESIS_PATH: Arg<PathBuf> = arg("genesis-path");
Expand Down
6 changes: 4 additions & 2 deletions genesis/e2e-tests-single-node.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ net_address = "127.0.0.1:27656"
address = "atest1v4ehgw36x3prswzxggunzv6pxqmnvdj9xvcyzvpsggeyvs3cg9qnywf589qnwvfsg5erg3fkl09rg5"
vp = "vp_token"
[token.NAM.balances]
# FIXME: reduce these values when gas amount is adjusted
Albert = 1000000
"Albert.public_key" = 1000
"Albert.public_key" = 200
Bertha = 1000000
"Bertha.public_key" = 2000
Christel = 1000000
"Christel.public_key" = 100
Daewon = 1000000
faucet = 9223372036
"faucet.public_key" = 100
"validator-0.public_key" = 100
"validator-0.public_key" = 200

[token.BTC]
address = "atest1v4ehgw36xdzryve5gsc52veeg5cnsv2yx5eygvp38qcrvd29xy6rys6p8yc5xvp4xfpy2v694wgwcp"
Expand Down Expand Up @@ -156,6 +157,7 @@ max_expected_time_per_block = 30
# Max payload size, in bytes, for a tx batch proposal.
max_proposal_bytes = 22020096
# Max amount of gas per block
# FIXME: adjust these two values everywhere, also in the repo where the genesis for testnets lives
max_block_gas = 1000000000
# Fee unshielding gas limit
fee_unshielding_gas_limit = 1000000
Expand Down
6 changes: 0 additions & 6 deletions tests/src/e2e/ibc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,6 @@ fn transfer_received_token(
&sub_prefix,
"--amount",
"50000",
"--gas-limit",
"50",
"--fee-token",
NAM,
"--node",
Expand Down Expand Up @@ -994,8 +992,6 @@ fn submit_ibc_tx(
&data_path,
"--signer",
signer,
"--gas-limit",
"40",
"--fee-token",
NAM,
"--node",
Expand Down Expand Up @@ -1040,8 +1036,6 @@ fn transfer(
&channel_id,
"--port-id",
&port_id,
"--gas-limit",
"100",
"--node",
&rpc,
];
Expand Down
Loading

0 comments on commit 1635e30

Please sign in to comment.