Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fuel-vm 0.54.0 #1975

Merged
merged 6 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading