Skip to content

Commit

Permalink
Use fuel-vm 0.54.0 (#1975)
Browse files Browse the repository at this point in the history
The change upgrades `fuel-vm` to `0.54.0`.

## Checklist
- [x] Breaking changes are clearly marked as such in the PR description
and changelog

### Before requesting review
- [x] I have reviewed the code myself
  • Loading branch information
xgreenx authored Jun 16, 2024
1 parent 1704464 commit 24842ea
Show file tree
Hide file tree
Showing 19 changed files with 703 additions and 556 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

### Added
- [#1975](https://github.com/FuelLabs/fuel-core/pull/1975): Added `DependentCost` benchmarks for the `cfe` and `cfei` opcodes.
- [#1975](https://github.com/FuelLabs/fuel-core/pull/1975): Added `DependentCost` for the `cfe` opcode to the `GasCosts` endpoint.
- [#1974](https://github.com/FuelLabs/fuel-core/pull/1974): Optimized the work of `InMemoryTransaction` for lookups and empty insertion.

### Changed
- [#1973](https://github.com/FuelLabs/fuel-core/pull/1973): Updated VM initialization benchmark to include many inputs and outputs.

#### Breaking
- [#1975](https://github.com/FuelLabs/fuel-core/pull/1975): Updated gas prices according to new release.
- [#1975](https://github.com/FuelLabs/fuel-core/pull/1975): Changed `GasCosts` endpoint to return `DependentCost` for the `cfei` opcode via `cfeiDependentCost`.
- [#1975](https://github.com/FuelLabs/fuel-core/pull/1975): Use `fuel-vm 0.54.0`. More information in the [release](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.54.0).

## [Version 0.29.0]

### Added
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fuel-core-wasm-executor = { version = "0.29.0", path = "./crates/services/upgrad
fuel-core-xtask = { version = "0.0.0", path = "./xtask" }

# Fuel dependencies
fuel-vm-private = { version = "0.53.0", package = "fuel-vm", default-features = false }
fuel-vm-private = { version = "0.54.0", package = "fuel-vm", default-features = false }

# Common dependencies
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion benches/benches-outputs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use fuel_core_types::fuel_tx::{
consensus_parameters::gas::GasCostsValuesV2,
consensus_parameters::gas::GasCostsValuesV3,
DependentCost,
GasCostsValues,
};
Expand Down
41 changes: 36 additions & 5 deletions benches/benches/vm_set/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::run_group_ref;

use crate::utils::{
arb_dependent_cost_values,
linear_short,
set_full_word,
};

Expand Down Expand Up @@ -47,12 +48,42 @@ pub fn run(c: &mut Criterion) {
);

let linear = arb_dependent_cost_values();
let linear_short = linear_short();

// cfe
{
let mut cfe = c.benchmark_group("cfe");

let mut cfe_linear = linear_short.clone();
cfe_linear.push(1_000_000);
cfe_linear.push(10_000_000);
cfe_linear.push(30_000_000);
cfe_linear.push(60_000_000);
for i in cfe_linear {
let bench =
VmBench::new(op::cfe(0x10)).with_prepare_script(set_full_word(0x10, i));
cfe.throughput(Throughput::Bytes(i));
run_group_ref(&mut cfe, format!("{i}"), bench);
}

cfe.finish();
}

run_group_ref(
&mut c.benchmark_group("cfei"),
"cfei",
VmBench::new(op::cfei(1)),
);
// cfei
{
let mut cfei = c.benchmark_group("cfei");

let mut cfei_linear = linear_short.clone();
cfei_linear.push(1_000_000);
cfei_linear.push(10_000_000);
for i in cfei_linear {
let bench = VmBench::new(op::cfei(i as u32));
cfei.throughput(Throughput::Bytes(i));
run_group_ref(&mut cfei, format!("{i}"), bench);
}

cfei.finish();
}

let mut mem_mcl = c.benchmark_group("mcl");
for i in &linear {
Expand Down
6 changes: 3 additions & 3 deletions benches/src/bin/collect.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use clap::Parser;
use fuel_core_types::fuel_tx::{
consensus_parameters::gas::GasCostsValuesV2,
consensus_parameters::gas::GasCostsValuesV3,
ConsensusParameters,
GasCosts,
};
Expand Down Expand Up @@ -371,7 +371,7 @@ pub const GIT: &str = ""#,
r#"";"#,
r##"
pub fn default_gas_costs() -> GasCostsValues {
GasCostsValuesV2 {"##,
GasCostsValuesV3 {"##,
r##" }.into()
}
"##,
Expand Down Expand Up @@ -495,7 +495,7 @@ impl State {
)
}

fn to_gas_costs(&self) -> GasCostsValuesV2 {
fn to_gas_costs(&self) -> GasCostsValuesV3 {
serde_yaml::from_value(self.to_yaml()).unwrap()
}

Expand Down
Loading

0 comments on commit 24842ea

Please sign in to comment.