-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vm): Allow switching between VMs for latest protocol version (#2508
) ## What ❔ - Allows using old (latest) VM by default, new VM only or old + new VM in a shadow mode in the `MainBatchExecutor`. - Allows configuring this mode for a new `VmRunner`-powered component, VM playground. ## Why ❔ A separate component seems a relatively safe place to start integration from.
- Loading branch information
Showing
51 changed files
with
992 additions
and
190 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//! Basic VM types that shared widely enough to not put them in the `multivm` crate. | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, Clone, Copy)] | ||
pub enum VmVersion { | ||
M5WithoutRefunds, | ||
M5WithRefunds, | ||
M6Initial, | ||
M6BugWithCompressionFixed, | ||
Vm1_3_2, | ||
VmVirtualBlocks, | ||
VmVirtualBlocksRefundsEnhancement, | ||
VmBoojumIntegration, | ||
Vm1_4_1, | ||
Vm1_4_2, | ||
Vm1_5_0SmallBootloaderMemory, | ||
Vm1_5_0IncreasedBootloaderMemory, | ||
} | ||
|
||
impl VmVersion { | ||
/// Returns the latest supported VM version. | ||
pub const fn latest() -> VmVersion { | ||
Self::Vm1_5_0IncreasedBootloaderMemory | ||
} | ||
} | ||
|
||
/// Mode in which to run the new fast VM implementation. | ||
#[derive(Debug, Clone, Copy, Default, PartialEq, Serialize, Deserialize)] | ||
#[serde(rename_all = "snake_case")] | ||
pub enum FastVmMode { | ||
/// Run only the old VM. | ||
#[default] | ||
Old, | ||
/// Run only the new Vm. | ||
New, | ||
/// Run both the new and old VM and compare their outputs for each transaction execution. | ||
Shadow, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.