Skip to content

Commit e92221a

Browse files
committed
feat: nv28 skeleton
feat: nv28 skeleton
1 parent c414105 commit e92221a

4 files changed

Lines changed: 9 additions & 0 deletions

File tree

fvm/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ gas_calibration = []
6060
# The current implementation keeps it by default for backward compatibility reason.
6161
# See <https://github.com/filecoin-project/ref-fvm/issues/2001>
6262
verify-signature = []
63+
nv28-dev = []
6364

6465
# Allow coverage attribute.
6566
[lints.rust]

fvm/src/gas/price_list.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,8 @@ pub fn price_list_by_network_version(network_version: NetworkVersion) -> &'stati
10861086
&WATERMELON_PRICES
10871087
}
10881088
NetworkVersion::V25 | NetworkVersion::V26 | NetworkVersion::V27 => &TEEP_PRICES,
1089+
#[cfg(feature = "nv28-dev")]
1090+
NetworkVersion::V28 => &TEEP_PRICES,
10891091
_ => panic!("network version {nv} not supported", nv = network_version),
10901092
}
10911093
}

fvm/src/machine/default.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ 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 = "nv28-dev"))]
5455
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
5556
NetworkVersion::V21..=NetworkVersion::V27;
57+
#[cfg(feature = "nv28-dev")]
58+
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
59+
NetworkVersion::V21..=NetworkVersion::V28;
5660

5761
debug!(
5862
"initializing a new machine, epoch={}, base_fee={}, nv={:?}, root={}",

shared/src/version/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ impl NetworkVersion {
6969
pub const V26: Self = Self(26);
7070
/// TBD (TBD builtin-actor v17)
7171
pub const V27: Self = Self(27);
72+
/// TBD (TBD builtin-actor v18)
73+
pub const V28: Self = Self(28);
7274

7375
pub const MAX: Self = Self(u32::MAX);
7476

0 commit comments

Comments
 (0)