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

[move] Rewrite verifier metering #19036

Merged
merged 23 commits into from
Aug 22, 2024
Merged
Prev Previous commit
Next Next commit
limits
  • Loading branch information
tnowacki committed Aug 21, 2024
commit 28d184210372163377166c5c58757f684c137ac7
9 changes: 5 additions & 4 deletions crates/sui-protocol-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2736,12 +2736,13 @@ impl ProtocolConfig {
}
}

/// MeterConfig for metering packages during signing. It is NOT safe to use during execution.
/// MeterConfig for metering packages during signing. It is NOT stable between binaries and
/// cannot used during execution.
pub fn meter_config_for_signing(&self) -> MeterConfig {
MeterConfig {
max_per_fun_meter_units: Some(1_000_000),
max_per_mod_meter_units: Some(1_000_000),
max_per_pkg_meter_units: Some(1_000_000),
max_per_fun_meter_units: Some(2_200_000),
max_per_mod_meter_units: Some(2_200_000),
max_per_pkg_meter_units: Some(2_200_000),
}
}

Expand Down
6 changes: 3 additions & 3 deletions external-crates/move/crates/move-vm-config/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ impl Default for VerifierConfig {
impl Default for MeterConfig {
fn default() -> Self {
Self {
max_per_fun_meter_units: Some(1_000_000),
max_per_mod_meter_units: Some(1_000_000),
max_per_pkg_meter_units: Some(1_000_000),
max_per_fun_meter_units: Some(2_200_000),
max_per_mod_meter_units: Some(2_200_000),
max_per_pkg_meter_units: Some(2_200_000),
}
}
}
Expand Down