Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nv25-skeleton #2076

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions fvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ gas_calibration = []
# The current implementation keeps it by default for backward compatibility reason.
# See <https://github.com/filecoin-project/ref-fvm/issues/2001>
verify-signature = []
nv25-dev = []
2 changes: 2 additions & 0 deletions fvm/src/gas/price_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,8 @@ pub fn price_list_by_network_version(network_version: NetworkVersion) -> &'stati
NetworkVersion::V21 | NetworkVersion::V22 | NetworkVersion::V23 | NetworkVersion::V24 => {
&WATERMELON_PRICES
}
#[cfg(feature = "nv25-dev")]
NetworkVersion::V25 => &WATERMELON_PRICES,
_ => panic!("network version {nv} not supported", nv = network_version),
}
}
Expand Down
5 changes: 5 additions & 0 deletions fvm/src/machine/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ 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<Self> {
#[cfg(not(feature = "nv25-dev"))]
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
NetworkVersion::V21..=NetworkVersion::V24;

#[cfg(feature = "nv25-dev")]
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
NetworkVersion::V21..=NetworkVersion::V25;

debug!(
"initializing a new machine, epoch={}, base_fee={}, nv={:?}, root={}",
context.epoch, &context.base_fee, context.network_version, context.initial_state_root
Expand Down
4 changes: 3 additions & 1 deletion shared/src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ impl NetworkVersion {
pub const V22: Self = Self(22);
/// Waffle (builtin-actors v14)
pub const V23: Self = Self(23);
/// TBD (builtin-actors v15)
/// TukTuk (builtin-actors v15)
pub const V24: Self = Self(24);
/// TBD (builtin-actors v16)
pub const V25: Self = Self(25);

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

Expand Down
Loading