From b5e63c3d76ecc50955c669401110e537c72f1ea2 Mon Sep 17 00:00:00 2001 From: Phi Date: Wed, 4 Dec 2024 11:09:34 +0100 Subject: [PATCH] chore: remove the nv25-dev feature flag chore: remove the nv25-dev feature flag --- fvm/CHANGELOG.md | 2 ++ fvm/Cargo.toml | 1 - fvm/src/gas/price_list.rs | 10 +++++----- fvm/src/machine/default.rs | 5 ----- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/fvm/CHANGELOG.md b/fvm/CHANGELOG.md index 47d8dc81d..db2e9225a 100644 --- a/fvm/CHANGELOG.md +++ b/fvm/CHANGELOG.md @@ -4,6 +4,8 @@ Changes to the reference FVM implementation. ## [Unreleased] +- chore: remove the nv25-dev feature flag [#2093](https://github.com/filecoin-project/ref-fvm/pull/2093) + ## 4.5.2 [2024-11-21] - feat: add `nv25-dev` feature flag [#2076](https://github.com/filecoin-project/ref-fvm/pull/2076) diff --git a/fvm/Cargo.toml b/fvm/Cargo.toml index 8670e24dc..04833a631 100644 --- a/fvm/Cargo.toml +++ b/fvm/Cargo.toml @@ -61,4 +61,3 @@ gas_calibration = [] # The current implementation keeps it by default for backward compatibility reason. # See verify-signature = [] -nv25-dev = [] diff --git a/fvm/src/gas/price_list.rs b/fvm/src/gas/price_list.rs index 5768c67cd..e64c30d6e 100644 --- a/fvm/src/gas/price_list.rs +++ b/fvm/src/gas/price_list.rs @@ -1001,11 +1001,11 @@ impl PriceList { /// Returns gas price list by NetworkVersion for gas consumption. pub fn price_list_by_network_version(network_version: NetworkVersion) -> &'static PriceList { match network_version { - NetworkVersion::V21 | NetworkVersion::V22 | NetworkVersion::V23 | NetworkVersion::V24 => { - &WATERMELON_PRICES - } - #[cfg(feature = "nv25-dev")] - NetworkVersion::V25 => &WATERMELON_PRICES, + NetworkVersion::V21 + | NetworkVersion::V22 + | NetworkVersion::V23 + | NetworkVersion::V24 + | NetworkVersion::V25 => &WATERMELON_PRICES, _ => panic!("network version {nv} not supported", nv = network_version), } } diff --git a/fvm/src/machine/default.rs b/fvm/src/machine/default.rs index 7f79927c0..c451f8074 100644 --- a/fvm/src/machine/default.rs +++ b/fvm/src/machine/default.rs @@ -51,11 +51,6 @@ where /// * `blockstore`: The underlying [blockstore][`Blockstore`] for reading/writing state. /// * `externs`: Client-provided ["external"][`Externs`] methods for accessing chain state. pub fn new(context: &MachineContext, blockstore: B, externs: E) -> anyhow::Result { - #[cfg(not(feature = "nv25-dev"))] - const SUPPORTED_VERSIONS: RangeInclusive = - NetworkVersion::V21..=NetworkVersion::V24; - - #[cfg(feature = "nv25-dev")] const SUPPORTED_VERSIONS: RangeInclusive = NetworkVersion::V21..=NetworkVersion::V25;