Skip to content

Commit 490cd42

Browse files
authored
feat: add nv24-skeleton (#2029)
* add n24 skeleton * rustfmt
1 parent 844d34a commit 490cd42

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

fvm/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ gas_calibration = []
6161
# The current implementation keeps it by default for backward compatibility reason.
6262
# See <https://github.com/filecoin-project/ref-fvm/issues/2001>
6363
verify-signature = []
64+
nv24-dev = []

fvm/src/gas/price_list.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,8 @@ impl PriceList {
10021002
pub fn price_list_by_network_version(network_version: NetworkVersion) -> &'static PriceList {
10031003
match network_version {
10041004
NetworkVersion::V21 | NetworkVersion::V22 | NetworkVersion::V23 => &WATERMELON_PRICES,
1005+
#[cfg(feature = "nv24-dev")]
1006+
NetworkVersion::V24 => &WATERMELON_PRICES,
10051007
_ => panic!("network version {nv} not supported", nv = network_version),
10061008
}
10071009
}

fvm/src/machine/default.rs

+5
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ where
5151
/// * `blockstore`: The underlying [blockstore][`Blockstore`] for reading/writing state.
5252
/// * `externs`: Client-provided ["external"][`Externs`] methods for accessing chain state.
5353
pub fn new(context: &MachineContext, blockstore: B, externs: E) -> anyhow::Result<Self> {
54+
#[cfg(not(feature = "nv24-dev"))]
5455
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
5556
NetworkVersion::V21..=NetworkVersion::V23;
5657

58+
#[cfg(feature = "nv24-dev")]
59+
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
60+
NetworkVersion::V21..=NetworkVersion::V24;
61+
5762
debug!(
5863
"initializing a new machine, epoch={}, base_fee={}, nv={:?}, root={}",
5964
context.epoch, &context.base_fee, context.network_version, context.initial_state_root

shared/src/version/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ impl NetworkVersion {
6161
pub const V22: Self = Self(22);
6262
/// Waffle (builtin-actors v14)
6363
pub const V23: Self = Self(23);
64+
/// TBD (builtin-actors v15)
65+
pub const V24: Self = Self(24);
6466

6567
pub const MAX: Self = Self(u32::MAX);
6668

0 commit comments

Comments
 (0)