Skip to content

Commit

Permalink
chore: use fuel-core 0.28.0 (#1420)
Browse files Browse the repository at this point in the history
Co-authored-by: MujkicA <[email protected]>
Co-authored-by: Oleksii Filonenko <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent d8b201f commit 35c3be4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
CARGO_TERM_COLOR: always
DASEL_VERSION: https://github.com/TomWright/dasel/releases/download/v2.3.6/dasel_linux_amd64
RUSTFLAGS: "-D warnings"
FUEL_CORE_VERSION: 0.27.0
FUEL_CORE_VERSION: 0.28.0
FUEL_CORE_PATCH_BRANCH:
RUST_VERSION: 1.76.0
FORC_VERSION: 0.60.0
Expand Down
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@ which = { version = "6.0.0", default-features = false }
zeroize = "1.7.0"

# Dependencies from the `fuel-core` repository:
fuel-core = { version = "0.27.0", default-features = false }
fuel-core-chain-config = { version = "0.27.0", default-features = false }
fuel-core-client = { version = "0.27.0", default-features = false }
fuel-core-poa = { version = "0.27.0", default-features = false }
fuel-core-services = { version = "0.27.0", default-features = false }
fuel-core-types = { version = "0.27.0", default-features = false }
fuel-core = { version = "0.28.0", default-features = false }
fuel-core-chain-config = { version = "0.28.0", default-features = false }
fuel-core-client = { version = "0.28.0", default-features = false }
fuel-core-poa = { version = "0.28.0", default-features = false }
fuel-core-services = { version = "0.28.0", default-features = false }
fuel-core-types = { version = "0.28.0", default-features = false }

# Dependencies from the `fuel-vm` repository:
fuel-asm = { version = "0.50.0" }
fuel-crypto = { version = "0.50.0" }
fuel-merkle = { version = "0.50.0" }
fuel-storage = { version = "0.50.0" }
fuel-tx = { version = "0.50.0" }
fuel-types = { version = "0.50.0" }
fuel-vm = { version = "0.50.0" }
fuel-asm = { version = "0.52.0" }
fuel-crypto = { version = "0.52.0" }
fuel-merkle = { version = "0.52.0" }
fuel-storage = { version = "0.52.0" }
fuel-tx = { version = "0.52.0" }
fuel-types = { version = "0.52.0" }
fuel-vm = { version = "0.52.0" }

# Workspace projects
fuels = { version = "0.63.1", path = "./packages/fuels", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions examples/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ mod tests {
.await?;
// ANCHOR_END: contract_call_cost_estimation

let expected_gas = 2606;
let expected_gas = 2613;

assert_eq!(transaction_cost.gas_used, expected_gas);

Expand Down Expand Up @@ -611,7 +611,7 @@ mod tests {
.await?;
// ANCHOR_END: multi_call_cost_estimation

let expected_gas = 4051;
let expected_gas = 4063;

assert_eq!(transaction_cost.gas_used, expected_gas);

Expand Down
2 changes: 1 addition & 1 deletion packages/fuels-accounts/src/provider/retryable_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl RetryableClient {
tx: &[Transaction],
utxo_validation: Option<bool>,
) -> RequestResult<Vec<TransactionExecutionStatus>> {
self.wrap(|| self.client.dry_run_opt(tx, utxo_validation))
self.wrap(|| self.client.dry_run_opt(tx, utxo_validation, None))
.await
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub const SUPPORTED_FUEL_CORE_VERSION: semver::Version = semver::Version::new(0, 27, 0);
pub const SUPPORTED_FUEL_CORE_VERSION: semver::Version = semver::Version::new(0, 28, 0);
15 changes: 10 additions & 5 deletions packages/fuels-core/src/types/wrappers/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ impl TxPolicies {
}

use fuel_tx::field::{BytecodeWitnessIndex, Salt, StorageSlots};
use fuel_vm::prelude::MemoryInstance;

use crate::types::coin_type_id::CoinTypeId;

Expand Down Expand Up @@ -368,7 +369,7 @@ macro_rules! impl_tx_wrapper {
.tx
.into_checked(block_height.into(), consensus_parameters)?;
let check_predicates_parameters: CheckPredicateParams = consensus_parameters.into();
checked.check_predicates(&check_predicates_parameters)?;
checked.check_predicates(&check_predicates_parameters, MemoryInstance::new())?;

Ok(())
}
Expand Down Expand Up @@ -513,23 +514,26 @@ impl_tx_wrapper!(UpgradeTransaction, Upgrade);

impl EstimablePredicates for UploadTransaction {
fn estimate_predicates(&mut self, consensus_parameters: &ConsensusParameters) -> Result<()> {
self.tx.estimate_predicates(&consensus_parameters.into())?;
self.tx
.estimate_predicates(&consensus_parameters.into(), MemoryInstance::new())?;

Ok(())
}
}

impl EstimablePredicates for UpgradeTransaction {
fn estimate_predicates(&mut self, consensus_parameters: &ConsensusParameters) -> Result<()> {
self.tx.estimate_predicates(&consensus_parameters.into())?;
self.tx
.estimate_predicates(&consensus_parameters.into(), MemoryInstance::new())?;

Ok(())
}
}

impl EstimablePredicates for CreateTransaction {
fn estimate_predicates(&mut self, consensus_parameters: &ConsensusParameters) -> Result<()> {
self.tx.estimate_predicates(&consensus_parameters.into())?;
self.tx
.estimate_predicates(&consensus_parameters.into(), MemoryInstance::new())?;

Ok(())
}
Expand All @@ -551,7 +555,8 @@ impl CreateTransaction {

impl EstimablePredicates for ScriptTransaction {
fn estimate_predicates(&mut self, consensus_parameters: &ConsensusParameters) -> Result<()> {
self.tx.estimate_predicates(&consensus_parameters.into())?;
self.tx
.estimate_predicates(&consensus_parameters.into(), MemoryInstance::new())?;

Ok(())
}
Expand Down
1 change: 0 additions & 1 deletion packages/fuels-test-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fuel-core-chain-config = { workspace = true, features = ["test-helpers"] }
fuel-core-client = { workspace = true }
fuel-core-poa = { workspace = true }
fuel-core-services = { workspace = true }
fuel-core-types = { workspace = true }
fuel-crypto = { workspace = true }
fuel-tx = { workspace = true }
fuel-types = { workspace = true, features = ["random"] }
Expand Down
6 changes: 0 additions & 6 deletions packages/fuels-test-helpers/src/fuel_bin_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{
use fuel_core_chain_config::{ChainConfig, SnapshotWriter, StateConfig};
use fuel_core_client::client::FuelClient;
use fuel_core_services::State;
use fuel_core_types::blockchain::header::LATEST_STATE_TRANSITION_VERSION;
use fuels_core::{error, types::errors::Result as FuelResult};
use portpicker::{is_free, pick_unused_port};
use tempfile::{tempdir, TempDir};
Expand Down Expand Up @@ -74,11 +73,6 @@ impl ExtendedConfig {
}
};

let latest_state_transition_version = LATEST_STATE_TRANSITION_VERSION - 1;
args.push(format!(
"--native-executor-version={latest_state_transition_version}"
));

args.extend(
[
(self.node_config.vm_backtrace, "--vm-backtrace"),
Expand Down

0 comments on commit 35c3be4

Please sign in to comment.