Skip to content

Commit

Permalink
Update fuel-vm to 0.59.0
Browse files Browse the repository at this point in the history
  • Loading branch information
acerone85 committed Dec 4, 2024
1 parent ba070e2 commit 83d9641
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 46 deletions.
98 changes: 62 additions & 36 deletions Cargo.lock

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

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fuel-core-xtask = { version = "0.0.0", path = "./xtask" }
fuel-gas-price-algorithm = { version = "0.40.0", path = "crates/fuel-gas-price-algorithm" }

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

# Common dependencies
anyhow = "1.0"
Expand Down Expand Up @@ -143,6 +143,3 @@ itertools = { version = "0.12", default-features = false }
insta = "1.8"
tempfile = "3.4"
tikv-jemallocator = "0.5"

[patch.crates-io]
fuel-vm = { git = "https://github.com/fuelLabs/fuel-vm" }
3 changes: 2 additions & 1 deletion benches/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ impl TryFrom<VmBench> for VmBenchPrepared {
}
let storage_diff = vm.storage_diff();
let mut vm = vm.remove_recording();
let mut diff = start_vm.diff(&vm);
// TODO: Check if this is the intended use of rollback_to.
let mut diff = start_vm.rollback_to(&vm);
diff += storage_diff;
let diff: diff::Diff<diff::InitialVmState> = diff.into();
vm.reset_vm_state(&diff);
Expand Down
4 changes: 3 additions & 1 deletion crates/fuel-core/src/schema/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ impl GasCosts {
GasCostsValues::V1(_)
| GasCostsValues::V2(_)
| GasCostsValues::V3(_)
| GasCostsValues::V4(_) => GasCostsVersion::V1,
| GasCostsValues::V4(_)
//TODO: Handle new GasCostsValues variant properly
| GasCostsValues::V5(_) => GasCostsVersion::V1,
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/fuel-core/src/schema/dap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl ConcreteStorage {
let fee_params = params.fee_params();

let ready_tx = checked_tx
.into_ready(GAS_PRICE, gas_costs, fee_params)
.into_ready(GAS_PRICE, gas_costs, fee_params, None)
.map_err(|e| {
anyhow!("Failed to apply dynamic values to checked tx: {:?}", e)
})?;
Expand Down Expand Up @@ -176,7 +176,7 @@ impl ConcreteStorage {
let fee_params = params.fee_params();

let ready_tx = checked_tx
.into_ready(GAS_PRICE, gas_costs, fee_params)
.into_ready(GAS_PRICE, gas_costs, fee_params, None)
.map_err(|e| {
anyhow!("Failed to apply dynamic values to checked tx: {:?}", e)
})?;
Expand Down Expand Up @@ -456,7 +456,7 @@ impl DapMutation {
match checked_tx {
CheckedTransaction::Script(script) => {
let ready_tx = script
.into_ready(GAS_PRICE, gas_costs, fee_params)
.into_ready(GAS_PRICE, gas_costs, fee_params, None)
.map_err(|e| {
anyhow!("Failed to apply dynamic values to checked tx: {:?}", e)
})?;
Expand Down
2 changes: 1 addition & 1 deletion crates/services/executor/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ where
.iter()
.map(|input| input.predicate_gas_used())
.collect();
let ready_tx = checked_tx.into_ready(gas_price, gas_costs, fee_params)?;
let ready_tx = checked_tx.into_ready(gas_price, gas_costs, fee_params, None)?;

let mut vm = Interpreter::with_storage(
memory,
Expand Down

0 comments on commit 83d9641

Please sign in to comment.