Skip to content

Commit 6adad6f

Browse files
0xmovsesmusitdev
andauthored
0xmovses/feature upgrade e2e (#1294)
Co-authored-by: musitdev <[email protected]>
1 parent 97431f1 commit 6adad6f

File tree

4 files changed

+64
-78
lines changed

4 files changed

+64
-78
lines changed

Cargo.toml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ members = [
4444
"protocol-units/execution/maptos/framework/migrations/*",
4545
"protocol-units/da-sequencer/config",
4646
"protocol-units/da-sequencer/client",
47-
"protocol-units/da-sequencer/node"
47+
"protocol-units/da-sequencer/node",
4848
]
4949

5050
[workspace.package]
@@ -170,7 +170,7 @@ aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core",
170170
aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "1d1cdbbd7fabb80dcb95ba5e23213faa072fab67" }
171171
aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "1d1cdbbd7fabb80dcb95ba5e23213faa072fab67" }
172172
aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "1d1cdbbd7fabb80dcb95ba5e23213faa072fab67", features = [
173-
"cloneable-private-keys",
173+
"cloneable-private-keys",
174174
] }
175175

176176
aptos-crypto-derive = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "1d1cdbbd7fabb80dcb95ba5e23213faa072fab67" }
@@ -226,9 +226,9 @@ move-table-extension = { git = "https://github.com/diem/move" }
226226
move-core-types = { git = "https://github.com/diem/move" }
227227

228228
secp256k1 = { version = "0.27", default-features = false, features = [
229-
"global-context",
230-
"rand-std",
231-
"recovery",
229+
"global-context",
230+
"rand-std",
231+
"recovery",
232232
] }
233233

234234
## Celestia Dependencies
@@ -238,15 +238,15 @@ celestia-types = { git = "https://github.com/eigerco/lumina", rev = "c6e5b7f5e3a
238238
# External Dependencies
239239

240240
alloy = { git = "https://github.com/alloy-rs/alloy.git", package = "alloy", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2", features = [
241-
"node-bindings",
242-
"rpc-types-trace",
243-
"json-rpc",
244-
"json-abi",
245-
"rpc-client",
246-
"signers",
247-
"signer-yubihsm",
248-
"pubsub",
249-
"providers",
241+
"node-bindings",
242+
"rpc-types-trace",
243+
"json-rpc",
244+
"json-abi",
245+
"rpc-client",
246+
"signers",
247+
"signer-yubihsm",
248+
"pubsub",
249+
"providers",
250250
] }
251251
alloy-rpc-types-eth = "0.1.3"
252252
alloy-eips = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
@@ -255,15 +255,15 @@ alloy-network = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b17
255255
alloy-primitives = { version = "0.7.2", default-features = false }
256256
alloy-consensus = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
257257
alloy-provider = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2", features = [
258-
"ws",
258+
"ws",
259259
] }
260260
alloy-rlp = "0.3.5"
261261
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
262262
alloy-sol-types = { version = "0.7.2", features = ["json"] }
263263
alloy-signer = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
264264
alloy-transport = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
265265
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2", features = [
266-
"reqwest-rustls-tls",
266+
"reqwest-rustls-tls",
267267
] }
268268
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
269269

@@ -288,8 +288,8 @@ fail = "0.5.1"
288288
futures = "0.3.17"
289289
hashbrown = "0.14.3"
290290
hex = { version = "0.4.3", default-features = false, features = [
291-
"alloc",
292-
"serde",
291+
"alloc",
292+
"serde",
293293
] }
294294
ics23 = { version = "0.11.0" }
295295
k256 = { version = "0.13.3" }
@@ -316,10 +316,10 @@ reqwest = "0.12.4"
316316
risc0-build = "0.20"
317317
risc0-zkvm = { version = "0.21", features = ["std", "getrandom"] }
318318
rocksdb = { version = "0.22.0", features = [
319-
"snappy",
320-
"lz4",
321-
"zstd",
322-
"zlib",
319+
"snappy",
320+
"lz4",
321+
"zstd",
322+
"zlib",
323323
], default-features = false }
324324
schemars = { version = "0.8.16", features = ["derive"] }
325325
serde_with = "3.7.0"

process-compose/movement-full-node/process-compose.test-migrate-biarritz-rc1-to-pre-l1-merge.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ processes:
1616
condition: process_healthy
1717
movement-faucet:
1818
condition: process_healthy
19+
20+
movement-tests-load-tests:
21+
command: |
22+
LOADTEST_NUMBER_SCENARIOS=10 LOADTEST_SCENARIOS_PER_CLIENT=5 movement-tests-e2e-load-alice-bob
23+
depends_on:
24+
test-migrate-biarritz-rc1-to-pre-l1-merge:
25+
condition: process_completed_successfully
26+
availability:
27+
exit_on_end: true

protocol-units/execution/maptos/framework/releases/README.md

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The feature comparission between MVT Network and Aptos Network gives these featu
4141
| 78 | TRANSACTION_SIMULATION_ENHANCEMENT | DISABLE | ENABLE | ENABLE |
4242
| 79 | COLLECTION_OWNER | DISABLE | ENABLE | ENABLE |
4343
| 80 | NATIVE_MEMORY_OPERATIONS | DISABLE | ENABLE | ENABLE |
44-
| 81 | _ENABLE_LOADER_V2 | DISABLE | ENABLE | ENABLE |
44+
| 81 | _ENABLE_LOADER_V2 | DISABLE | ENABLE | ENABLE |
4545
| 82 | DISALLOW_INIT_MODULE_TO_PUBLISH_MODULES | DISABLE | ENABLE | ENABLE |
4646
| 90 | NEW_ACCOUNTS_DEFAULT_TO_FA_STORE | DISABLE | ENABLE | ENABLE |
4747
| 91 | DEFAULT_ACCOUNT_RESOURCE | DISABLE | ENABLE | ENABLE |
@@ -51,12 +51,9 @@ The feature comparission between MVT Network and Aptos Network gives these featu
5151
### 4 APTOS_STD_CHAIN_ID_NATIVES
5252
Activate this function `native public fun get(): u8;` which allow to access the chain Id inside Move code.
5353

54-
Enable in Movement network and disable in Aptos. Value after migration ?
55-
5654
### 6 PERIODICAL_REWARD_RATE_DECREASE
5755
Enables scheduled reductions in validator/staker reward rates over epochs.
5856

59-
Disable in Movement network and enable in Aptos. Value after migration ?
6057
### 17 PARTIAL_GOVERNANCE_VOTING
6158
Changes how governance proposals are resolved when not all validators vote
6259

@@ -68,8 +65,6 @@ When this feature is enabled:
6865
- The proposal outcome only considers the validators who actually voted.
6966
- Abstention is no longer equivalent to a "no" vote.
7067

71-
Disable in Movement network and enable in Aptos. Value after migration ?
72-
7368
### 21 DELEGATION_POOL_PARTIAL_GOVERNANCE_VOTING
7469
Allows partial vote counting for delegated stake within validator delegation pools
7570

@@ -83,9 +78,6 @@ With this feature enabled:
8378

8479
Without this feature, if a validator has 100 delegated tokens but only 30 are used to vote, the system assumes the other 70 abstained — and still counts them against quorum or majority thresholds
8580

86-
Disable in Movement network and enable in Aptos. Value after migration ?
87-
88-
8981
### 64 NEW_ACCOUNTS_DEFAULT_TO_FA_APT_STORE
9082
Changes the default storage model for APT coins in new accounts.
9183
When NEW_ACCOUNTS_DEFAULT_TO_FA_APT_STORE is enabled:
@@ -101,8 +93,6 @@ Without this feature :
10193
- Less concurrency for transfers
10294
- Less optimized for high-throughput workloads
10395

104-
Disable in Movement network and enable in Aptos. Value after migration ?
105-
10696
### 67 CONCURRENT_FUNGIBLE_BALANCE
10797
Enables a new implementation of CoinStore optimized for concurrency and performance
10898

@@ -113,13 +103,10 @@ When CONCURRENT_FUNGIBLE_BALANCE is enabled, Aptos switches the underlying CoinS
113103
- Reduced gas costs for coin transfers
114104
- Concurrent writes to many CoinStores
115105

116-
Enable in Movement network and disable in Aptos. Value after migration ?
117-
118106
### 71 DISALLOW_USER_NATIVES
119107
`DISALLOW_USER_NATIVES` is a VM feature flag that forbids non-framework modules from defining Move “native” items (i.e., native fun and native struct).
120108
When this flag is enabled, the Aptos VM will reject publishing or upgrading any module that contains user-defined natives unless it belongs to the core code addresses (e.g., 0x1 AptosFramework / AptosStd / MoveStdlib).
121109

122-
Disable in Movement network and enable in Aptos. Value after migration ?
123110

124111
### 72 ALLOW_SERIALIZED_SCRIPT_ARGS
125112
The Aptos feature flag ALLOW_SERIALIZED_SCRIPT_ARGS controls whether Move script/function arguments can be passed in serialized (BCS) form instead of structured command-line input.
@@ -129,17 +116,17 @@ Use Cases
129116
- Cross-language SDKs: Rust, Python, JavaScript SDKs can encode arguments once and submit them to the chain without decoding
130117
- Batch transactions or replay systems can record + replay exact inputs
131118

132-
Disable in Movement network and enable in Aptos. Value after migration ?
133-
134119
### 74 ENABLE_ENUM_TYPES
135120
Enables the enum type system in Move (akin to Rust-style enums or sum types)
136121

137-
Disable in Movement network and enable in Aptos. Value after migration ?
138-
139122
### 76 REJECT_UNSTABLE_BYTECODE_FOR_SCRIPT
140123
Prevent scripts from using unstable VM bytecodes (e.g., Move 2 experimental opcodes).
141124

142-
Disable in Movement network and enable in Aptos. Value after migration ?
125+
### 74 ENABLE_ENUM_TYPES
126+
Enables the enum type system in Move (akin to Rust-style enums or sum types)
127+
128+
### 76 REJECT_UNSTABLE_BYTECODE_FOR_SCRIPT
129+
Prevent scripts from using unstable VM bytecodes (e.g., Move 2 experimental opcodes).
143130

144131
### 77 FEDERATED_KEYLESS
145132
Enables federated (off-chain) authentication and signing for special keyless Aptos accounts
@@ -149,16 +136,12 @@ Keyless accounts:
149136
- Instead, rely on off-chain verifiable authentication protocols (e.g., WebAuthn, federated ID systems)
150137
- Authentication and signature checks are delegated to a federated service (trusted by the network)
151138

152-
Disable in Movement network and enable in Aptos. Value after migration ?
153-
154139
### 78 TRANSACTION_SIMULATION_ENHANCEMENT
155140
Improves consistency, safety, and reliability of transaction simulations
156141

157142
### 79 COLLECTION_OWNER
158143
Enables collection ownership logic for NFTs (Token v2), giving collection creators ownership rights and management capabilities
159144

160-
Disable in Movement network and enable in Aptos. Value after migration ?
161-
162145
### 80 NATIVE_MEMORY_OPERATIONS
163146
Enables native (Rust-implemented) Move functions for low-level memory access or manipulation.
164147
It enable these functions:
@@ -167,8 +150,17 @@ It enable these functions:
167150
native public fun memcpy(dst: &mut vector<u8>, src: &vector<u8>, len: u64);
168151
native public fun memcmp(a: &vector<u8>, b: &vector<u8>): bool;
169152
```
153+
### ENABLE_LOADER_V2
154+
Activates Loader v2, a new Move module loading engine with improved design and performance
170155

171-
Disable in Movement network and enable in Aptos. Value after migration ?
156+
### 82 DISALLOW_INIT_MODULE_TO_PUBLISH_MODULES
157+
Prevent modules from calling move_to or publish_module during their own initialization (init_module)
158+
159+
### 90 NEW_ACCOUNTS_DEFAULT_TO_FA_STORE
160+
Makes all newly created accounts default to using FA (aggregator-based) CoinStores for any fungible token, not just APT
161+
162+
### 91 DEFAULT_ACCOUNT_RESOURCE
163+
Enables the use of the new DefaultAccount resource layout for newly created accounts
172164

173165
### ENABLE_LOADER_V2
174166
Activates Loader v2, a new Move module loading engine with improved design and performance
@@ -193,12 +185,9 @@ Disable in Movement network and enable in Aptos. Value after migration ?
193185
### GOVERNED_GAS_POOL
194186
Movement feature removed.
195187

196-
## Proposition
197-
From my understanding of the feature I propose theses changes:
198-
199-
### Features that can be enable without risk
188+
### Features that can be enabled without risk
200189

201-
CONCURRENT_FUNGIBLE_BALANCE
190+
[ x ] CONCURRENT_FUNGIBLE_BALANCE
202191
ALLOW_SERIALIZED_SCRIPT_ARGS
203192
REJECT_UNSTABLE_BYTECODE_FOR_SCRIPT
204193
TRANSACTION_SIMULATION_ENHANCEMENT
@@ -208,22 +197,5 @@ ENABLE_LOADER_V2
208197
DISALLOW_INIT_MODULE_TO_PUBLISH_MODULES
209198
DISALLOW_USER_NATIVES
210199

211-
### Features that can be disable without risk
212-
None
213-
214-
### Feature that can cause an issue where we need to decide.
215-
These feature can change the current movement network behavior is their state is changed.
216-
217-
APTOS_STD_CHAIN_ID_NATIVES: Disable in Aptos, some of our deployed smart contract can use it so it would break their execution.
218-
219-
PERIODICAL_REWARD_RATE_DECREASE: Depend on how we reward validators.
220-
221-
PARTIAL_GOVERNANCE_VOTING and DELEGATION_POOL_PARTIAL_GOVERNANCE_VOTING depends on own the new network governance should work.
222-
223-
NEW_ACCOUNTS_DEFAULT_TO_FA_APT_STORE: change how new account are created. Perhaps, it can create some incompatibilities with the current deployed smart contract.
224-
225-
ENABLE_ENUM_TYPES: I think it's related to move2 that won't be activated during the migration but after.
226200

227-
FEDERATED_KEYLESS: It's a new feature, do we support it?
228201

229-
NEW_ACCOUNTS_DEFAULT_TO_FA_STORE and DEFAULT_ACCOUNT_RESOURCE: change how account are created, it can affect existing application.

protocol-units/execution/maptos/framework/releases/pre-l1-merge/src/cached.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,28 @@ pub mod full {
5252
use aptos_release_builder::components::feature_flags::FeatureFlag;
5353
use aptos_types::on_chain_config::FeatureFlag as AptosFeatureFlag;
5454

55-
// start with the default features and append the Governed Gas Pool feature
5655
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);
6056

61-
// Note: before the upgrade to the newest version to the Aptos framework
62-
// we need to activate features that are currently active on the Aptos testnet
63-
// See: https://github.com/movementlabsxyz/movement-migration/issues/30#issuecomment-2862738427
64-
// aptos_feature_flags.push(AptosFeatureFlag::PERIODICAL_REWARD_RATE_DECREASE);
57+
//Todo update aptos core deps to be on l1-migration branch.
58+
//Add in the latest features that are not present here
59+
60+
// To Enable
61+
enable_feature_flags.push(AptosFeatureFlag::GOVERNED_GAS_POOL);
6562
enable_feature_flags.push(AptosFeatureFlag::PARTIAL_GOVERNANCE_VOTING);
6663
enable_feature_flags.push(AptosFeatureFlag::DELEGATION_POOL_PARTIAL_GOVERNANCE_VOTING);
67-
enable_feature_flags.push(AptosFeatureFlag::VM_BINARY_FORMAT_V7);
64+
enable_feature_flags.push(AptosFeatureFlag::CONCURRENT_FUNGIBLE_BALANCE);
65+
enable_feature_flags.push(AptosFeatureFlag::REJECT_UNSTABLE_BYTECODE);
6866

6967
Features {
7068
enabled: enable_feature_flags.into_iter().map(FeatureFlag::from).collect(),
71-
disabled: vec![AptosFeatureFlag::REMOVE_DETAILED_ERROR_FROM_HASH.into()],
69+
disabled: vec![
70+
FeatureFlag::RemoveDetailedError,
71+
FeatureFlag::PeriodicalRewardRateReduction,
72+
FeatureFlag::VMBinaryFormatV7,
73+
FeatureFlag::KeylessAccounts,
74+
FeatureFlag::KeylessButZklessAccounts,
75+
FeatureFlag::KeylessAccountsWithPasskeys,
76+
],
7277
}
7378
});
7479
}

0 commit comments

Comments
 (0)