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

[Gas] Correct the gas schedule version for a recently added native function #5985

Merged
merged 4 commits into from
Dec 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions aptos-move/aptos-gas/src/aptos_framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ crate::natives::define_gas_parameters_for_natives!(GasParameters, "aptos_framewo
// Using SHA2-256's cost
[.hash.ripemd160.base, { 4.. => "hash.ripemd160.base" }, 3000],
[.hash.ripemd160.per_byte, { 4.. => "hash.ripemd160.per_byte" }, 50],
[.hash.blake2b_256.base, { 4.. => "hash.blake2b_256.base" }, 1750],
[.hash.blake2b_256.per_byte, { 4.. => "hash.blake2b_256.per_byte" }, 15],
[.hash.blake2b_256.base, { 6.. => "hash.blake2b_256.base" }, 1750],
[.hash.blake2b_256.per_byte, { 6.. => "hash.blake2b_256.per_byte" }, 15],

[.util.from_bytes.base, "util.from_bytes.base", 300 * MUL],
[.util.from_bytes.per_byte, "util.from_bytes.per_byte", 5 * MUL],
Expand Down
4 changes: 3 additions & 1 deletion aptos-move/aptos-gas/src/gas_meter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ use move_vm_types::{
use std::collections::BTreeMap;

// Change log:
// - V6
// - Added a new native function - blake2b_256.
// - V5
// - u16, u32, u256
davidiw marked this conversation as resolved.
Show resolved Hide resolved
// - free_write_bytes_quota
Expand All @@ -46,7 +48,7 @@ use std::collections::BTreeMap;
// global operations.
// - V1
// - TBA
pub const LATEST_GAS_FEATURE_VERSION: u64 = 5;
pub const LATEST_GAS_FEATURE_VERSION: u64 = 6;
davidiw marked this conversation as resolved.
Show resolved Hide resolved

pub(crate) const EXECUTION_GAS_MULTIPLIER: u64 = 20;

Expand Down