diff --git a/metadata/2026-02-06-enable-per-block-gas-limit/enable_per_block_gas_limit.json b/metadata/2026-02-06-enable-per-block-gas-limit/enable_per_block_gas_limit.json new file mode 100644 index 0000000..85e2cff --- /dev/null +++ b/metadata/2026-02-06-enable-per-block-gas-limit/enable_per_block_gas_limit.json @@ -0,0 +1,6 @@ +{ + "title": "Enable per block gas limit", + "description": "Enable per block gas limit", + "source_code_url": "https://github.com/aptos-labs/aptos-core", + "discussion_url": "https://github.com/aptos-labs/aptos-core" +} \ No newline at end of file diff --git a/sources/2026-02-06-enable-per-block-gas-limit/0-execution-config.move b/sources/2026-02-06-enable-per-block-gas-limit/0-execution-config.move new file mode 100644 index 0000000..45257dc --- /dev/null +++ b/sources/2026-02-06-enable-per-block-gas-limit/0-execution-config.move @@ -0,0 +1,43 @@ +// Script hash: 00d6f084 +// Execution config upgrade proposal + +// config: V7( +// ExecutionConfigV7 { +// transaction_shuffler_type: UseCaseAware { +// sender_spread_factor: 32, +// platform_use_case_spread_factor: 0, +// user_use_case_spread_factor: 4, +// }, +// block_gas_limit_type: ComplexLimitV1 { +// effective_block_gas_limit: 30000, +// execution_gas_effective_multiplier: 1, +// io_gas_effective_multiplier: 1, +// conflict_penalty_window: 9, +// use_granular_resource_group_conflicts: false, +// use_module_publishing_block_conflict: true, +// block_output_limit: Some( +// 5242880, +// ), +// include_user_txn_size_in_block_output: true, +// add_block_limit_outcome_onchain: true, +// }, +// enable_per_block_gas_limit: true, +// transaction_deduper_type: TxnHashAndAuthenticatorV1, +// gas_price_to_burn: 90, +// persisted_auxiliary_info_version: 1, +// }, +// ) + +script { + use aptos_framework::aptos_governance; + use aptos_framework::execution_config; + + fun main(proposal_id: u64) { + let framework_signer = aptos_governance::resolve_multi_step_proposal(proposal_id, @0x1, x""); + + let execution_blob: vector = x"070420000000000000000000000000000000040000000000000002307500000000000001000000000000000100000000000000090000000001010000500000000000010101015a0000000000000001"; + + execution_config::set_for_next_epoch(&framework_signer, execution_blob); + aptos_governance::reconfigure(&framework_signer); + } +}