Skip to content

Commit

Permalink
Fix gas costs
Browse files Browse the repository at this point in the history
  • Loading branch information
birchmd committed Nov 3, 2022
1 parent 49a7594 commit eb26323
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion engine-precompiles/src/promise_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub mod costs {
use crate::prelude::types::EthGas;

/// This cost is always charged for calling this precompile.
pub const PROMISE_RESULT_BASE_COST: EthGas = EthGas::new(125);
pub const PROMISE_RESULT_BASE_COST: EthGas = EthGas::new(105);
/// This is the cost per byte of promise result data.
pub const PROMISE_RESULT_BYTE_COST: EthGas = EthGas::new(1);
}
Expand Down
10 changes: 5 additions & 5 deletions engine-tests/src/tests/repro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn repro_GdASJ3KESs() {
block_timestamp: 1645717564644206730,
input_path: "src/tests/res/input_GdASJ3KESs.hex",
evm_gas_used: 706713,
near_gas_used: 130,
near_gas_used: 131,
});
}

Expand All @@ -52,7 +52,7 @@ fn repro_8ru7VEA() {
block_timestamp: 1648829935343349589,
input_path: "src/tests/res/input_8ru7VEA.hex",
evm_gas_used: 1732181,
near_gas_used: 237,
near_gas_used: 239,
});
}

Expand All @@ -72,7 +72,7 @@ fn repro_FRcorNv() {
block_timestamp: 1650960438774745116,
input_path: "src/tests/res/input_FRcorNv.hex",
evm_gas_used: 1239721,
near_gas_used: 192,
near_gas_used: 194,
});
}

Expand All @@ -89,7 +89,7 @@ fn repro_5bEgfRQ() {
block_timestamp: 1651073772931594646,
input_path: "src/tests/res/input_5bEgfRQ.hex",
evm_gas_used: 6_414_105,
near_gas_used: 698,
near_gas_used: 701,
});
}

Expand All @@ -107,7 +107,7 @@ fn repro_D98vwmi() {
block_timestamp: 1651753443421003245,
input_path: "src/tests/res/input_D98vwmi.hex",
evm_gas_used: 1_035_348,
near_gas_used: 193,
near_gas_used: 195,
});
}

Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/uniswap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn test_uniswap_input_multihop() {

let (_amount_out, _evm_gas, profile) = context.exact_input(&tokens, INPUT_AMOUNT.into());

assert_eq!(121, profile.all_gas() / 1_000_000_000_000);
assert_eq!(122, profile.all_gas() / 1_000_000_000_000);
}

#[test]
Expand Down

0 comments on commit eb26323

Please sign in to comment.