diff --git a/fvm/Cargo.toml b/fvm/Cargo.toml index 026c42e28..c1bab1c52 100644 --- a/fvm/Cargo.toml +++ b/fvm/Cargo.toml @@ -60,6 +60,7 @@ gas_calibration = [] # The current implementation keeps it by default for backward compatibility reason. # See verify-signature = [] +nv28-dev = [] # Allow coverage attribute. [lints.rust] diff --git a/fvm/src/gas/price_list.rs b/fvm/src/gas/price_list.rs index 0b469905e..f18ba4d9d 100644 --- a/fvm/src/gas/price_list.rs +++ b/fvm/src/gas/price_list.rs @@ -1086,6 +1086,8 @@ pub fn price_list_by_network_version(network_version: NetworkVersion) -> &'stati &WATERMELON_PRICES } NetworkVersion::V25 | NetworkVersion::V26 | NetworkVersion::V27 => &TEEP_PRICES, + #[cfg(feature = "nv28-dev")] + NetworkVersion::V28 => &TEEP_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 3a6b23156..4c7e59025 100644 --- a/fvm/src/machine/default.rs +++ b/fvm/src/machine/default.rs @@ -51,8 +51,12 @@ 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 = "nv28-dev"))] const SUPPORTED_VERSIONS: RangeInclusive = NetworkVersion::V21..=NetworkVersion::V27; + #[cfg(feature = "nv28-dev")] + const SUPPORTED_VERSIONS: RangeInclusive = + NetworkVersion::V21..=NetworkVersion::V28; debug!( "initializing a new machine, epoch={}, base_fee={}, nv={:?}, root={}", diff --git a/shared/src/version/mod.rs b/shared/src/version/mod.rs index 91b302709..ca9db5ae9 100644 --- a/shared/src/version/mod.rs +++ b/shared/src/version/mod.rs @@ -69,6 +69,8 @@ impl NetworkVersion { pub const V26: Self = Self(26); /// TBD (TBD builtin-actor v17) pub const V27: Self = Self(27); + /// TBD (TBD builtin-actor v18) + pub const V28: Self = Self(28); pub const MAX: Self = Self(u32::MAX);