diff --git a/apps/src/lib/cli.rs b/apps/src/lib/cli.rs index 2e6409953e8..40a0a1c94f3 100644 --- a/apps/src/lib/cli.rs +++ b/apps/src/lib/cli.rs @@ -1842,7 +1842,7 @@ pub mod args { pub const DONT_PREFETCH_WASM: ArgFlag = flag("dont-prefetch-wasm"); pub const FEE_AMOUNT: ArgOpt = arg_opt("fee-amount"); pub const GAS_LIMIT: ArgDefault = - 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 = arg_default_from_ctx("fee-token", DefaultFn(|| "NAM".into())); pub const GENESIS_PATH: Arg = arg("genesis-path"); diff --git a/genesis/e2e-tests-single-node.toml b/genesis/e2e-tests-single-node.toml index 8e5c74d9085..77d1b7a6807 100644 --- a/genesis/e2e-tests-single-node.toml +++ b/genesis/e2e-tests-single-node.toml @@ -29,8 +29,9 @@ 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 @@ -38,7 +39,7 @@ Christel = 1000000 Daewon = 1000000 faucet = 9223372036 "faucet.public_key" = 100 -"validator-0.public_key" = 100 +"validator-0.public_key" = 200 [token.BTC] address = "atest1v4ehgw36xdzryve5gsc52veeg5cnsv2yx5eygvp38qcrvd29xy6rys6p8yc5xvp4xfpy2v694wgwcp" @@ -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 diff --git a/tests/src/e2e/ibc_tests.rs b/tests/src/e2e/ibc_tests.rs index 46505919ee9..23733376128 100644 --- a/tests/src/e2e/ibc_tests.rs +++ b/tests/src/e2e/ibc_tests.rs @@ -779,8 +779,6 @@ fn transfer_received_token( &sub_prefix, "--amount", "50000", - "--gas-limit", - "50", "--fee-token", NAM, "--node", @@ -994,8 +992,6 @@ fn submit_ibc_tx( &data_path, "--signer", signer, - "--gas-limit", - "40", "--fee-token", NAM, "--node", @@ -1040,8 +1036,6 @@ fn transfer( &channel_id, "--port-id", &port_id, - "--gas-limit", - "100", "--node", &rpc, ]; diff --git a/tests/src/e2e/ledger_tests.rs b/tests/src/e2e/ledger_tests.rs index 895e3fccde3..12f4285f494 100644 --- a/tests/src/e2e/ledger_tests.rs +++ b/tests/src/e2e/ledger_tests.rs @@ -122,8 +122,6 @@ fn test_node_connectivity_and_consensus() -> Result<()> { NAM, "--amount", "10.1", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -392,8 +390,6 @@ fn ledger_txs_and_queries() -> Result<()> { NAM, "--amount", "10.1", - "--gas-limit", - "40", "--node", &validator_one_rpc, ], @@ -408,8 +404,6 @@ fn ledger_txs_and_queries() -> Result<()> { NAM, "--amount", "10.1", - "--gas-limit", - "40", "--node", &validator_one_rpc, ], @@ -417,12 +411,10 @@ fn ledger_txs_and_queries() -> Result<()> { // predicate vec![ "update", - "--address", - BERTHA, - "--code-path", - VP_USER_WASM, - "--gas-limit", - "40", + "--address", + BERTHA, + "--code-path", + VP_USER_WASM, "--node", &validator_one_rpc, ], @@ -435,10 +427,8 @@ fn ledger_txs_and_queries() -> Result<()> { TX_TRANSFER_WASM, "--data-path", &tx_data_path, - "--gas-limit", - "40", "--node", - &validator_one_rpc + &validator_one_rpc, ], // 5. Submit a tx to initialize a new account vec![ @@ -452,31 +442,27 @@ fn ledger_txs_and_queries() -> Result<()> { VP_USER_WASM, "--alias", "Test-Account", - "--gas-limit", - "40", - "--node", - &validator_one_rpc, - ], - // 6. Submit a tx to withdraw from faucet account (requires PoW challenge - // solution) - vec![ - "transfer", - "--source", - "faucet", - "--target", - ALBERT, - "--token", - NAM, - "--amount", - "10.1", - // Faucet withdrawal requires an explicit signer - "--signer", - ALBERT, - "--gas-limit", - "40", "--node", &validator_one_rpc, ], + // 6. Submit a tx to withdraw from faucet account (requires PoW challenge + // solution) + vec![ + "transfer", + "--source", + "faucet", + "--target", + ALBERT, + "--token", + NAM, + "--amount", + "10.1", + // Faucet withdrawal requires an explicit signer + "--signer", + ALBERT, + "--node", + &validator_one_rpc, + ], ]; for tx_args in &txs_args { @@ -743,8 +729,6 @@ fn wrapper_fee_unshielding() -> Result<()> { NAM, "--amount", "50000", - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ], @@ -752,6 +736,7 @@ fn wrapper_fee_unshielding() -> Result<()> { ), // 2. Invalid unshielding ( + //FIXME: should force this? vec![ "transfer", "--source", @@ -762,8 +747,6 @@ fn wrapper_fee_unshielding() -> Result<()> { NAM, "--amount", "1", - "--gas-limit", - "100", "--fee-spending-key", B_SPENDING_KEY, "--ledger-address", @@ -773,6 +756,7 @@ fn wrapper_fee_unshielding() -> Result<()> { ), // 3. Valid unshielding ( + //FIXME: it appears like it doesn't actually attach the unshielding operation vec![ "transfer", "--source", @@ -783,8 +767,6 @@ fn wrapper_fee_unshielding() -> Result<()> { NAM, "--amount", "1", - "--gas-limit", - "40", "--fee-spending-key", A_SPENDING_KEY, "--ledger-address", @@ -872,8 +854,6 @@ fn masp_txs_and_queries() -> Result<()> { NAM, "--amount", "100000", - "--gas-limit", - "20", "--node", &validator_one_rpc, ], @@ -891,8 +871,6 @@ fn masp_txs_and_queries() -> Result<()> { BTC, "--amount", "10", - "--gas-limit", - "1", "--node", &validator_one_rpc, ], @@ -910,8 +888,6 @@ fn masp_txs_and_queries() -> Result<()> { BTC, "--amount", "15", - "--gas-limit", - "1", "--node", &validator_one_rpc, ], @@ -929,8 +905,6 @@ fn masp_txs_and_queries() -> Result<()> { BTC, "--amount", "20", - "--gas-limit", - "100", "--node", &validator_one_rpc, ], @@ -950,8 +924,6 @@ fn masp_txs_and_queries() -> Result<()> { "10", "--signer", ALBERT, - "--gas-limit", - "20", "--node", &validator_one_rpc, ], @@ -971,8 +943,6 @@ fn masp_txs_and_queries() -> Result<()> { "7", "--signer", ALBERT, - "--gas-limit", - "100", "--node", &validator_one_rpc, ], @@ -992,8 +962,6 @@ fn masp_txs_and_queries() -> Result<()> { "7", "--signer", ALBERT, - "--gas-limit", - "100", "--node", &validator_one_rpc, ], @@ -1013,8 +981,6 @@ fn masp_txs_and_queries() -> Result<()> { "7", "--signer", ALBERT, - "--gas-limit", - "30", "--node", &validator_one_rpc, ], @@ -1034,8 +1000,6 @@ fn masp_txs_and_queries() -> Result<()> { "6", "--signer", ALBERT, - "--gas-limit", - "100", "--node", &validator_one_rpc, ], @@ -1092,8 +1056,6 @@ fn masp_txs_and_queries() -> Result<()> { "20", "--signer", BERTHA, - "--gas-limit", - "150", "--node", &validator_one_rpc, ], @@ -1217,8 +1179,6 @@ fn masp_pinned_txs() -> Result<()> { BTC, "--amount", "20", - "--gas-limit", - "100", "--node", &validator_one_rpc ], @@ -1344,8 +1304,6 @@ fn masp_incentives() -> Result<()> { BTC, "--amount", "20", - "--gas-limit", - "150", "--signer", ALBERT, "--node", @@ -1540,8 +1498,6 @@ fn masp_incentives() -> Result<()> { ETH, "--amount", "30", - "--gas-limit", - "150", "--signer", ALBERT, "--node", @@ -1672,8 +1628,6 @@ fn masp_incentives() -> Result<()> { "30", "--signer", BERTHA, - "--gas-limit", - "150", "--node", &validator_one_rpc ], @@ -1766,8 +1720,6 @@ fn masp_incentives() -> Result<()> { "20", "--signer", ALBERT, - "--gas-limit", - "150", "--node", &validator_one_rpc ], @@ -1926,8 +1878,6 @@ fn masp_incentives() -> Result<()> { &((amt30 * masp_rewards[ð()]).0 * (ep5.0 - ep3.0)).to_string(), "--signer", BERTHA, - "--gas-limit", - "150", "--node", &validator_one_rpc ], @@ -1955,8 +1905,6 @@ fn masp_incentives() -> Result<()> { &((amt20 * masp_rewards[&btc()]).0 * (ep6.0 - ep0.0)).to_string(), "--signer", ALBERT, - "--gas-limit", - "150", "--node", &validator_one_rpc ], @@ -2056,8 +2004,6 @@ fn invalid_transactions() -> Result<()> { NAM, "--amount", "1", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2110,7 +2056,7 @@ fn invalid_transactions() -> Result<()> { "--amount", "1_000_000.1", "--gas-limit", - "100", + "10000000", // Force to ignore client check that fails on the balance check of the // source address "--force", @@ -2182,8 +2128,6 @@ fn pos_bonds() -> Result<()> { "validator-0", "--amount", "10000.0", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2201,8 +2145,6 @@ fn pos_bonds() -> Result<()> { BERTHA, "--amount", "5000.0", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2217,8 +2159,6 @@ fn pos_bonds() -> Result<()> { "validator-0", "--amount", "5100.0", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2236,8 +2176,6 @@ fn pos_bonds() -> Result<()> { BERTHA, "--amount", "3200.", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2276,8 +2214,6 @@ fn pos_bonds() -> Result<()> { "withdraw", "--validator", "validator-0", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2293,8 +2229,6 @@ fn pos_bonds() -> Result<()> { "validator-0", "--source", BERTHA, - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2687,8 +2621,6 @@ fn pos_init_validator() -> Result<()> { "--source", BERTHA, "--unsafe-dont-encrypt", - "--gas-limit", - "100", "--commission-rate", "0.05", "--max-commission-rate-change", @@ -2712,8 +2644,6 @@ fn pos_init_validator() -> Result<()> { NAM, "--amount", "10000.5", - "--gas-limit", - "100", "--node", &non_validator_rpc, ]; @@ -2731,8 +2661,6 @@ fn pos_init_validator() -> Result<()> { BERTHA, "--amount", delegation_str, - "--gas-limit", - "100", "--node", &non_validator_rpc, ]; @@ -2752,8 +2680,6 @@ fn pos_init_validator() -> Result<()> { NAM, "--amount", validator_stake_str, - "--gas-limit", - "100", "--node", &non_validator_rpc, ]; @@ -2768,8 +2694,6 @@ fn pos_init_validator() -> Result<()> { new_validator, "--amount", validator_stake_str, - "--gas-limit", - "100", "--node", &non_validator_rpc, ]; @@ -2854,18 +2778,8 @@ fn ledger_many_txs_in_a_block() -> Result<()> { // A token transfer tx args let tx_args = Arc::new(vec![ - "transfer", - "--source", - BERTHA, - "--target", - ALBERT, - "--token", - NAM, - "--amount", - "1.01", - "--gas-limit", - "100", - "--node", + "transfer", "--source", BERTHA, "--target", ALBERT, "--token", NAM, + "--amount", "1.01", "--node", ]); // 2. Spawn threads each submitting token transfer tx @@ -2957,8 +2871,6 @@ fn proposal_submission() -> Result<()> { BERTHA, "--amount", "900", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -2984,8 +2896,6 @@ fn proposal_submission() -> Result<()> { "init-proposal", "--data-path", valid_proposal_json_path.to_str().unwrap(), - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -3087,8 +2997,6 @@ fn proposal_submission() -> Result<()> { "init-proposal", "--data-path", invalid_proposal_json_path.to_str().unwrap(), - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -3143,8 +3051,6 @@ fn proposal_submission() -> Result<()> { "yay", "--signer", "validator-0", - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -3167,8 +3073,6 @@ fn proposal_submission() -> Result<()> { "nay", "--signer", BERTHA, - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -3187,8 +3091,6 @@ fn proposal_submission() -> Result<()> { "yay", "--signer", ALBERT, - "--gas-limit", - "100", "--node", &validator_one_rpc, ]; @@ -3317,8 +3219,6 @@ fn eth_governance_proposal() -> Result<()> { BERTHA, "--amount", "900", - "--gas-limit", - "100", "--ledger-address", &validator_one_rpc, ]; @@ -3336,8 +3236,6 @@ fn eth_governance_proposal() -> Result<()> { "init-proposal", "--data-path", valid_proposal_json_path.to_str().unwrap(), - "--gas-limit", - "100", "--ledger-address", &validator_one_rpc, ]; @@ -3416,8 +3314,6 @@ fn eth_governance_proposal() -> Result<()> { &vote_arg, "--signer", BERTHA, - "--gas-limit", - "100", "--ledger-address", &validator_one_rpc, ]; @@ -3439,8 +3335,6 @@ fn eth_governance_proposal() -> Result<()> { &vote_arg, "--signer", "validator-0", - "--gas-limit", - "100", "--ledger-address", &validator_one_rpc, ]; @@ -3545,8 +3439,6 @@ fn pgf_governance_proposal() -> Result<()> { BERTHA, "--amount", "900", - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ]; @@ -3564,8 +3456,6 @@ fn pgf_governance_proposal() -> Result<()> { "init-proposal", "--data-path", valid_proposal_json_path.to_str().unwrap(), - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ]; @@ -3582,8 +3472,6 @@ fn pgf_governance_proposal() -> Result<()> { "init-proposal", "--data-path", valid_proposal_json_path.to_str().unwrap(), - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ]; @@ -3666,8 +3554,6 @@ fn pgf_governance_proposal() -> Result<()> { &arg_vote, "--signer", "validator-0", - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ]; @@ -3694,8 +3580,6 @@ fn pgf_governance_proposal() -> Result<()> { &different_vote, "--signer", BERTHA, - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ]; @@ -3715,8 +3599,6 @@ fn pgf_governance_proposal() -> Result<()> { &different_vote, "--signer", BERTHA, - "--gas-limit", - "40", "--ledger-address", &validator_one_rpc, ]; @@ -3826,8 +3708,6 @@ fn proposal_offline() -> Result<()> { ALBERT, "--amount", "900", - "--gas-limit", - "1", "--node", &validator_one_rpc, ]; @@ -3873,8 +3753,6 @@ fn proposal_offline() -> Result<()> { "--data-path", valid_proposal_json_path.to_str().unwrap(), "--offline", - "--gas-limit", - "1", "--node", &validator_one_rpc, ]; @@ -3900,8 +3778,6 @@ fn proposal_offline() -> Result<()> { "yay", "--signer", ALBERT, - "--gas-limit", - "1", "--offline", "--node", &validator_one_rpc, @@ -4299,8 +4175,6 @@ fn test_genesis_validators() -> Result<()> { NAM, "--amount", "10.1", - "--gas-limit", - "100", "--node", &validator_one_rpc, ];