Skip to content

Commit

Permalink
gas price and budget max
Browse files Browse the repository at this point in the history
  • Loading branch information
dariorussi committed Jan 10, 2025
1 parent 139a2b9 commit 460d557
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions crates/sui-protocol-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ const MAX_PROTOCOL_VERSION: u64 = 72;
// Improve gas/wall time efficiency of some Move stdlib vector functions
// Version 71: [SIP-45] Enable consensus amplification.
// Version 72: Fix issue where `convert_type_argument_error` wasn't being used in all cases.
// Max gas budget moved to 50_000 SUI
// Max gas price moved to 100 SUI

#[derive(Copy, Clone, Debug, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct ProtocolVersion(u64);
Expand Down Expand Up @@ -3130,6 +3132,10 @@ impl ProtocolConfig {
}
72 => {
cfg.feature_flags.convert_type_argument_error = true;
// max gas budget is in MIST and an absolute value 50_000 SUI
cfg.max_tx_gas = Some(50_000_000_000_000);
// max gas price is in MIST and an absolute value 100 SUI
cfg.max_gas_price = Some(100_000_000_000);
}
// Use this template when making changes:
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ binary_friend_decls: 100
max_move_object_size: 256000
max_move_package_size: 102400
max_publish_or_upgrade_per_ptb: 5
max_tx_gas: 50000000000
max_gas_price: 100000
max_tx_gas: 50000000000000
max_gas_price: 100000000000
max_gas_computation_bucket: 5000000
gas_rounding_step: 1000
max_loop_depth: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ binary_friend_decls: 100
max_move_object_size: 256000
max_move_package_size: 102400
max_publish_or_upgrade_per_ptb: 5
max_tx_gas: 50000000000
max_gas_price: 100000
max_tx_gas: 50000000000000
max_gas_price: 100000000000
max_gas_computation_bucket: 5000000
gas_rounding_step: 1000
max_loop_depth: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ binary_friend_decls: 100
max_move_object_size: 256000
max_move_package_size: 102400
max_publish_or_upgrade_per_ptb: 5
max_tx_gas: 50000000000
max_gas_price: 100000
max_tx_gas: 50000000000000
max_gas_price: 100000000000
max_gas_computation_bucket: 5000000
gas_rounding_step: 1000
max_loop_depth: 5
Expand Down

0 comments on commit 460d557

Please sign in to comment.