Skip to content

Commit 3eff557

Browse files
casperlabs-bors-ng[bot]Michał Papierski
and
Michał Papierski
authored
Merge #4008
4008: Updates toolchain to a more recent 2023-03-25 r=mpapierski a=mpapierski This bumps a toolchain for contract API to more recent 2023-03-25. This is not the most recent, as the current nightly appears to produce non-mvp WebAssembly opcodes which are not supported on our platform. Apparently this version update also decerases gas cost on average in our tests. See also upstream compiler issue here: rust-lang/rust#109807 Co-authored-by: Michał Papierski <[email protected]>
2 parents 0afe337 + 2666794 commit 3eff557

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

execution_engine_testing/tests/src/test/explorer/faucet.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,13 @@ fn faucet_costs() {
841841
// This test will fail if execution costs vary. The expected costs should not be updated
842842
// without understanding why the cost has changed. If the costs do change, it should be
843843
// reflected in the "Costs by Entry Point" section of the faucet crate's README.md.
844-
const EXPECTED_FAUCET_INSTALL_COST: u64 = 71_691_403_720;
845-
const EXPECTED_FAUCET_SET_VARIABLES_COST: u64 = 623_279_550;
846-
const EXPECTED_FAUCET_CALL_BY_INSTALLER_COST: u64 = 3_101_326_690;
847-
const EXPECTED_FAUCET_CALL_BY_USER_COST: u64 = 3_350_546_610;
844+
const EXPECTED_FAUCET_INSTALL_COST: u64 = 75_226_865_930;
845+
const EXPECTED_FAUCET_SET_VARIABLES_COST: u64 = 579_464_060;
846+
const EXPECTED_FAUCET_CALL_BY_INSTALLER_COST: u64 = 3_040_141_320;
847+
const EXPECTED_FAUCET_CALL_BY_USER_COST: u64 = 3_242_199_690;
848848

849849
let installer_account = AccountHash::new([1u8; 32]);
850-
let user_account = AccountHash::new([2u8; 32]);
850+
let user_account: AccountHash = AccountHash::new([2u8; 32]);
851851

852852
let mut builder = InMemoryWasmTestBuilder::default();
853853
builder.run_genesis(&PRODUCTION_RUN_GENESIS_REQUEST);

execution_engine_testing/tests/src/test/regression/host_function_metrics_size_and_gas_cost.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const CONTRACT_TRANSFER_TO_ACCOUNT_U512: &str = "transfer_to_account_u512.wasm";
2222
// This value is not systemic, as code is added the size of WASM will increase,
2323
// you can change this value to reflect the increase in WASM size.
2424
const HOST_FUNCTION_METRICS_STANDARD_SIZE: usize = 97_569;
25-
const HOST_FUNCTION_METRICS_STANDARD_GAS_COST: u64 = 375_298_466_170;
25+
const HOST_FUNCTION_METRICS_STANDARD_GAS_COST: u64 = 347_080_271_020;
2626

2727
/// Acceptable size regression/improvement in percentage.
2828
const SIZE_MARGIN: usize = 5;

smart_contracts/contracts/explorer/faucet/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If you try to invoke the contract before these variables are set, then you'll ge
3535

3636
| feature | cost |
3737
|---------|------------------|
38-
| faucet install | `71_691_403_720` |
39-
| faucet set variables | `623_279_550` |
40-
| faucet call by installer | `3_101_326_690` |
41-
| faucet call by user | `3_350_546_610` |
38+
| faucet install | `75_226_865_930` |
39+
| faucet set variables | `579_464_060` |
40+
| faucet call by installer | `3_040_141_320` |
41+
| faucet call by user | `3_242_199_690` |

smart_contracts/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2022-08-03
1+
nightly-2023-03-25

0 commit comments

Comments
 (0)