Skip to content

Commit

Permalink
Updates benchmarked gas cost values
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Mar 31, 2023
1 parent beb5dbe commit 78b0b13
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ pub mod args {
const FEE_AMOUNT: ArgDefault<token::Amount> =
arg_default("fee-amount", DefaultFn(|| token::Amount::from(0)));
const GAS_LIMIT: ArgDefault<GasLimit> =
arg_default("gas-limit", DefaultFn(|| GasLimit::from(10))); //FIXME: fix this default value
arg_default("gas-limit", DefaultFn(|| GasLimit::from(10)));
const FEE_TOKEN: ArgDefaultFromCtx<WalletAddress> =
arg_default_from_ctx("fee-token", DefaultFn(|| "NAM".into()));
const GENESIS_PATH: Arg<PathBuf> = arg("genesis-path");
Expand Down
2 changes: 1 addition & 1 deletion apps/src/lib/config/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ pub fn genesis() -> Genesis {
},
max_expected_time_per_block: namada::types::time::DurationSecs(30),
max_proposal_bytes: Default::default(),
max_block_gas: 100_000_000, //FIXME: adjust this value
max_block_gas: 100_000_000,
vp_whitelist: vec![],
tx_whitelist: vec![],
implicit_vp_code_path: vp_implicit_path.into(),
Expand Down
2 changes: 1 addition & 1 deletion core/src/ledger/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const PARALLEL_GAS_DIVIDER: u64 = 10;
/// The minimum gas cost for accessing the storage
pub const MIN_STORAGE_GAS: u64 = 1;
/// The gas cost for verifying the signature of a transaction
pub const VERIFY_TX_SIG_GAS_COST: u64 = 1_000;
pub const VERIFY_TX_SIG_GAS_COST: u64 = 10;
/// The gas cost for validating wasm vp code
pub const WASM_VALIDATION_GAS_PER_BYTE: u64 = 1;
/// The cost for writing a byte to storage
Expand Down
2 changes: 1 addition & 1 deletion genesis/dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ max_expected_time_per_block = 30
epochs_per_year = 525_600
# Max payload size, in bytes, for a tx batch proposal.
max_proposal_bytes = 22020096
# Max amount of gas per block FIXME: adjust value
# Max amount of gas per block
max_block_gas = 1000000

# Proof of stake parameters.
Expand Down
2 changes: 1 addition & 1 deletion genesis/e2e-tests-single-node.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ min_num_of_blocks = 4
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 value
# Max amount of gas per block
max_block_gas = 1000000000
# Gas table
gas_table = {}
Expand Down
6 changes: 3 additions & 3 deletions tests/src/e2e/ibc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ fn transfer_received_token(
"--fee-amount",
"0",
"--gas-limit",
"20",
"100",
"--fee-token",
NAM,
"--ledger-address",
Expand Down Expand Up @@ -1069,7 +1069,7 @@ fn submit_ibc_tx(
"--fee-amount",
"0",
"--gas-limit",
"20",
"100",
"--fee-token",
NAM,
"--ledger-address",
Expand Down Expand Up @@ -1115,7 +1115,7 @@ fn transfer(
"--port-id",
&port_id,
"--gas-limit",
"20",
"100",
"--ledger-address",
&rpc,
];
Expand Down
Loading

0 comments on commit 78b0b13

Please sign in to comment.