Skip to content

Commit

Permalink
bump latest gas feature version to 14
Browse files Browse the repository at this point in the history
Also be conservative and leave legacy parameters in >14 versions for
now. Need to clean up after REFUNDABLE_BYTES feature is actually enabled
on all networks.
  • Loading branch information
msmouse committed Feb 15, 2024
1 parent 3d0018d commit 976e615
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions aptos-move/aptos-gas-schedule/src/gas_schedule/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ crate::gas_schedule::macros::define_gas_parameters!(
],
[
legacy_free_event_bytes_quota: NumBytes,
{ 7..=12 => "free_event_bytes_quota", 13.. => "legacy_free_event_bytes_quota" },
{ 7..=13 => "free_event_bytes_quota", 14.. => "legacy_free_event_bytes_quota" },
1024, // 1KB free event bytes per transaction
],
[
Expand Down Expand Up @@ -155,34 +155,34 @@ crate::gas_schedule::macros::define_gas_parameters!(
],
[
legacy_storage_fee_per_state_slot_create: FeePerSlot,
{ 7..=12 => "storage_fee_per_state_slot_create", 13 => "legacy_storage_fee_per_state_slot_create" },
{ 7..=13 => "storage_fee_per_state_slot_create", 14.. => "legacy_storage_fee_per_state_slot_create" },
50000,
],
[
storage_fee_per_state_slot: FeePerSlot,
{ 13.. => "storage_fee_per_state_slot" },
{ 14.. => "storage_fee_per_state_slot" },
// 0.8 million APT for 2 billion state slots
40_000,
],
[
legacy_storage_fee_per_excess_state_byte: FeePerByte,
{ 7..=12 => "storage_fee_per_excess_state_byte", 13 => "legacy_storage_fee_per_excess_state_byte" },
{ 7..=13 => "storage_fee_per_excess_state_byte", 14.. => "legacy_storage_fee_per_excess_state_byte" },
50,
],
[
storage_fee_per_state_byte: FeePerByte,
{ 13.. => "storage_fee_per_state_byte" },
{ 14.. => "storage_fee_per_state_byte" },
// 0.8 million APT for 2 TB state bytes
40,
],
[
legacy_storage_fee_per_event_byte: FeePerByte,
{ 7..=12 => "storage_fee_per_event_byte", 13 => "legacy_storage_fee_per_event_byte" },
{ 7..=13 => "storage_fee_per_event_byte", 14.. => "legacy_storage_fee_per_event_byte" },
20,
],
[
legacy_storage_fee_per_transaction_byte: FeePerByte,
{ 7..=12 => "storage_fee_per_transaction_byte", 13 => "legacy_storage_fee_per_transaction_byte" },
{ 7..=13 => "storage_fee_per_transaction_byte", 14.. => "legacy_storage_fee_per_transaction_byte" },
20,
],
[
Expand Down
6 changes: 4 additions & 2 deletions aptos-move/aptos-gas-schedule/src/ver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
/// - Changing how gas is calculated in any way
///
/// Change log:
/// - V13
/// - V14
/// - Storage Fee: Make state bytes refundable and remove the per slot free quota, gated by flag REFUNDABLE_BYTES
/// - V13
/// (skipped due to testnet mis-operation)
/// - V12
/// - Added BN254 operations.
/// - IO gas change: 1. read bytes charged at 4KB intervals; 2. ignore free_write_bytes_quota
Expand Down Expand Up @@ -47,4 +49,4 @@
/// global operations.
/// - V1
/// - TBA
pub const LATEST_GAS_FEATURE_VERSION: u64 = 13;
pub const LATEST_GAS_FEATURE_VERSION: u64 = 14;

0 comments on commit 976e615

Please sign in to comment.