Skip to content

Commit

Permalink
[gas] fix gas feature version for function info and dispatchable toke…
Browse files Browse the repository at this point in the history
…n gas params (#13319)
  • Loading branch information
vgao1996 authored May 17, 2024
1 parent 3631b4a commit afefa99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

//! This module defines the gas parameters for Aptos Framework & Stdlib.
use crate::{gas_schedule::NativeGasParameters, ver::gas_feature_versions::RELEASE_V1_12};
use crate::{
gas_schedule::NativeGasParameters,
ver::gas_feature_versions::{RELEASE_V1_12, RELEASE_V1_13},
};
use aptos_gas_algebra::{
InternalGas, InternalGasPerAbstractValueUnit, InternalGasPerArg, InternalGasPerByte,
};
Expand Down Expand Up @@ -242,11 +245,11 @@ crate::gas_schedule::macros::define_gas_parameters!(
[type_info_chain_id_base: InternalGas, { 4.. => "type_info.chain_id.base" }, 551],

// TODO(Gas): Fix my cost
[function_info_check_is_identifier_base: InternalGas, { RELEASE_V1_12.. => "function_info.is_identifier.base" }, 551],
[function_info_check_is_identifier_per_byte: InternalGasPerByte, { RELEASE_V1_12.. => "function_info.is_identifier.per_byte" }, 3],
[function_info_check_dispatch_type_compatibility_impl_base: InternalGas, { RELEASE_V1_12.. => "function_info.check_dispatch_type_compatibility_impl.base" }, 1002],
[function_info_load_function_base: InternalGas, { RELEASE_V1_12.. => "function_info.load_function.base" }, 551],
[dispatchable_fungible_asset_dispatch_base: InternalGas, { RELEASE_V1_12.. => "dispatchable_fungible_asset.dispatch.base" }, 551],
[function_info_check_is_identifier_base: InternalGas, { RELEASE_V1_13.. => "function_info.is_identifier.base" }, 551],
[function_info_check_is_identifier_per_byte: InternalGasPerByte, { RELEASE_V1_13.. => "function_info.is_identifier.per_byte" }, 3],
[function_info_check_dispatch_type_compatibility_impl_base: InternalGas, { RELEASE_V1_13.. => "function_info.check_dispatch_type_compatibility_impl.base" }, 1002],
[function_info_load_function_base: InternalGas, { RELEASE_V1_13.. => "function_info.load_function.base" }, 551],
[dispatchable_fungible_asset_dispatch_base: InternalGas, { RELEASE_V1_13.. => "dispatchable_fungible_asset.dispatch.base" }, 551],

// Reusing SHA2-512's cost from Ristretto
[hash_sha2_512_base: InternalGas, { 4.. => "hash.sha2_512.base" }, 11910], // 3_240 * 20
Expand Down
1 change: 1 addition & 0 deletions aptos-move/aptos-gas-schedule/src/ver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/// Change log:
/// - V18
/// - Separate limits for governance scripts
/// - Function info & dispatchable token gas params
/// - V17
/// - Gas for keyless
/// - V16
Expand Down

0 comments on commit afefa99

Please sign in to comment.