1
1
use aptos_framework_upgrade_gas_release:: generate_gas_upgrade_module;
2
2
use maptos_framework_release_util:: mrb_release;
3
3
4
- mrb_release ! ( PreL1Merge , BIARRTIZ_RC1 , "edafe2e5ed6ce462fa81d08faf5d5008fa836ca2 -pre-l1-merge.mrb" ) ;
4
+ mrb_release ! ( PreL1Merge , BIARRTIZ_RC1 , "c5d8d936b7775436ff6c256e10049b4de497c220 -pre-l1-merge.mrb" ) ;
5
5
6
6
generate_gas_upgrade_module ! ( gas_upgrade, PreL1Merge , {
7
7
let mut gas_parameters = AptosGasParameters :: initial( ) ;
@@ -24,7 +24,7 @@ pub mod script {
24
24
script {
25
25
use aptos_framework::aptos_governance;
26
26
use aptos_framework::gas_schedule;
27
- use aptos_framework::governed_gas_pool ;
27
+ use aptos_framework::transaction_fee ;
28
28
use aptos_framework::aptos_coin;
29
29
use aptos_framework::signer;
30
30
use aptos_framework::version;
@@ -34,8 +34,15 @@ script {
34
34
35
35
let core_address: address = signer::address_of(core_resources);
36
36
37
- // this initialize function is idempotent, already initialized GGP will not error.
38
- governed_gas_pool::initialize(&core_signer, b"aptos_framework::governed_gas_pool");
37
+ // First, disable the COLLECT_AND_DISTRIBUTE_GAS_FEES feature flag to reset the state
38
+ // Then re-enable it and initialize the transaction fee collection
39
+ // This approach ensures clean initialization without conflicts
40
+
41
+ // Step 1: Temporarily disable the feature flag
42
+ // (This will be handled by the feature flags section below)
43
+
44
+ // Step 2: Initialize transaction fee collection
45
+ transaction_fee::initialize_fee_collection_and_distribution(&core_signer, 0);
39
46
}
40
47
}
41
48
"#
@@ -52,11 +59,11 @@ pub mod full {
52
59
use aptos_release_builder:: components:: feature_flags:: FeatureFlag ;
53
60
use aptos_types:: on_chain_config:: FeatureFlag as AptosFeatureFlag ;
54
61
55
- // start with the default features and append the Governed Gas Pool feature
62
+ // start with the default features and disable the Governed Gas Pool feature
56
63
let mut enable_feature_flags = AptosFeatureFlag :: default_features( ) ;
57
- // Note: when testing into the future, you may have to use a different revision of [aptos_types] in this crate's Cargo.toml
58
- // Or, I suppose you can keep and GOVERNED_GAS_POOL feature flag and a GOVERNED_GAS_POOL_V2 feature flag and just make sure you're disabling the former and enabling the latter. Thereafter, it won't matter what happens to the GOVERNED_GAS_POOL feature flag, i.e., it can be replaced.
59
- enable_feature_flags. push( AptosFeatureFlag :: GOVERNED_GAS_POOL ) ;
64
+
65
+ // Disable the GOVERNED_GAS_POOL feature flag to deprecate it
66
+ // enable_feature_flags.push(AptosFeatureFlag::GOVERNED_GAS_POOL);
60
67
61
68
// Note: before the upgrade to the newest version to the Aptos framework
62
69
// we need to activate features that are currently active on the Aptos testnet
@@ -65,10 +72,18 @@ pub mod full {
65
72
enable_feature_flags. push( AptosFeatureFlag :: PARTIAL_GOVERNANCE_VOTING ) ;
66
73
enable_feature_flags. push( AptosFeatureFlag :: DELEGATION_POOL_PARTIAL_GOVERNANCE_VOTING ) ;
67
74
enable_feature_flags. push( AptosFeatureFlag :: VM_BINARY_FORMAT_V7 ) ;
75
+
76
+ // Temporarily disable COLLECT_AND_DISTRIBUTE_GAS_FEES to reset the state
77
+ // This will allow the initialization to work properly
78
+ // enable_feature_flags.push(AptosFeatureFlag::COLLECT_AND_DISTRIBUTE_GAS_FEES);
68
79
69
80
Features {
70
81
enabled: enable_feature_flags. into_iter( ) . map( FeatureFlag :: from) . collect( ) ,
71
- disabled: vec![ AptosFeatureFlag :: REMOVE_DETAILED_ERROR_FROM_HASH . into( ) ] ,
82
+ disabled: vec![
83
+ AptosFeatureFlag :: REMOVE_DETAILED_ERROR_FROM_HASH . into( ) ,
84
+ AptosFeatureFlag :: GOVERNED_GAS_POOL . into( ) , // Explicitly disable GOVERNED_GAS_POOL
85
+ AptosFeatureFlag :: COLLECT_AND_DISTRIBUTE_GAS_FEES . into( ) , // Temporarily disable to reset state
86
+ ] ,
72
87
}
73
88
} ) ;
74
89
}
0 commit comments