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 nv22 skeleton #1929

Merged
merged 9 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion fvm/src/gas/price_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ 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 => &WATERMELON_PRICES,
NetworkVersion::V21 | NetworkVersion::V22 => &WATERMELON_PRICES,
TippyFlitsUK marked this conversation as resolved.
Show resolved Hide resolved
_ => 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 @@ -58,9 +58,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 = "nv22-dev"))]
const SUPPORTED_VERSIONS: RangeInclusive<NetworkVersion> =
NetworkVersion::V21..=NetworkVersion::V21;

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

debug!(
"initializing a new machine, epoch={}, base_fee={}, nv={:?}, root={}",
context.epoch, &context.base_fee, context.network_version, context.initial_state_root
Expand Down
2 changes: 2 additions & 0 deletions shared/src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ impl NetworkVersion {
pub const V20: Self = Self(20);
/// Watermelon (builtin-actors v12)
pub const V21: Self = Self(21);
/// TBD builtin-actors v123
TippyFlitsUK marked this conversation as resolved.
Show resolved Hide resolved
pub const V22: Self = Self(22);

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

Expand Down
Loading