Skip to content

Commit f4b1620

Browse files
committed
fix: diesel deps.
1 parent 1c0c82a commit f4b1620

File tree

17 files changed

+472
-56
lines changed

17 files changed

+472
-56
lines changed

Cargo.lock

Lines changed: 116 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ portpicker = "0.1.0"
103103

104104

105105
# movement
106-
maptos-opt-executor = { git = "https://github.com/movementlabsxyz/movement.git", rev = "8f820a5c23ce2b632200043acdabb3e6582c078a" }
107-
movement-client = { git = "https://github.com/movementlabsxyz/movement.git", rev = "8f820a5c23ce2b632200043acdabb3e6582c078a" }
108-
syncador = { git = "https://github.com/movementlabsxyz/movement.git", rev = "8f820a5c23ce2b632200043acdabb3e6582c078a" }
109-
movement-types = { git = "https://github.com/movementlabsxyz/movement.git", rev = "8f820a5c23ce2b632200043acdabb3e6582c078a" }
110-
maptos-execution-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "8f820a5c23ce2b632200043acdabb3e6582c078a" }
111-
movement-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "8f820a5c23ce2b632200043acdabb3e6582c078a" }
106+
maptos-opt-executor = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
107+
movement-client = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
108+
syncador = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
109+
movement-types = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
110+
maptos-execution-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
111+
movement-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
112+
aptos-framework-pre-l1-merge-release = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
112113

113114

114115
# aptos-core
@@ -168,8 +169,11 @@ mtma-track-dev = { path = "migration/cli/track-dev" }
168169
mtma-core = { path = "migration/core/mtma" }
169170
mtma-null-core = { path = "migration/core/mtma-null" }
170171
mtma-node-replay-core = { path = "migration/core/node/mtma-replay" }
172+
171173
#### migrator
172174
mtma-migrator-null-core = { path = "migration/core/migrator/mtma-null" }
175+
mtma-migrator-pre-l1-merge-core = { path = "migration/core/migrator/pre-l1-merge" }
176+
mtma-migrate-chain-core = { path = "migration/core/mtma-migrate-chain" }
173177

174178
#### node
175179
mtma-node-null-core = { path = "migration/core/node/mtma-null" }
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#[cfg(test)]
2+
pub mod test {
3+
4+
use mtma_migrator_test_types::check::checked_migration;
5+
use mtma_migrator_types::migrator::MovementMigrator;
6+
use mtma_node_null_core::config::Config as MtmaNullConfig;
7+
use mtma_node_test_types::prelude::Prelude;
8+
9+
#[tokio::test]
10+
#[tracing_test::traced_test]
11+
async fn test_pre_l1_merge() -> Result<(), anyhow::Error> {
12+
// Form the migrator.
13+
let mut movement_migrator = MovementMigrator::try_temp()?;
14+
15+
// Start the migrator so that it's running in the background.
16+
// In the future, some migrators may be for already running nodes.
17+
let movement_migrator_for_task = movement_migrator.clone();
18+
let movement_migrator_task = kestrel::task(async move {
19+
movement_migrator_for_task.run().await?;
20+
Ok::<_, anyhow::Error>(())
21+
});
22+
23+
// Form the prelude.
24+
// todo: this needs to be updated to use the prelude generator
25+
let prelude = Prelude::new_empty();
26+
27+
// Form the migration.
28+
let migration_config = MtmaNullConfig::default();
29+
let migration = migration_config.build()?;
30+
31+
// Run the checked migration.
32+
checked_migration(&mut movement_migrator, &prelude, &migration, vec![]).await?;
33+
34+
// WITHIN THE CRITERION, you'd be able to do similar background startup and processing to the above. The [Migrationish] trait will give you a [MovementAptosMigrator] which can spawn the runner in the background.
35+
//
36+
// Note: WITHIN THE CRITERION, you'll be able to do something like the below.
37+
// let movement_aptos_migrator_for_task = movement_aptos_migrator.clone();
38+
// let movement_aptos_migrator_task = kestrel::task(async move {
39+
// movement_aptos_migrator_for_task.run().await?;
40+
// Ok::<_, anyhow::Error>(())
41+
// });
42+
// // TODO: SOMETHING
43+
// kestrel::end!(movement_aptos_migrator_task)?;
44+
45+
// end the running migrators
46+
kestrel::end!(movement_migrator_task)?;
47+
48+
Ok(())
49+
}
50+
}

migration/cli/migrate-chain-dev/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ anyhow = { workspace = true }
1717
clap-markdown-ext = { workspace = true }
1818
orfile = { workspace = true }
1919
mtma-core = { workspace = true }
20+
mtma-migrate-chain-core = { workspace = true }
2021
jemallocator = { workspace = true }
2122
mtma-node-null-core = { workspace = true }
2223
mtma-node-test-global-storage-injective-criterion = { workspace = true }

migration/cli/migrate-chain-dev/docs/cli/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,16 @@ Migrate from Movement to MovementAptos
103103

104104
Run migrate with all parameters passed explicitly as CLI flags. See Orfile documentation for more details: <https://github.com/movementlabsxyz/orfile>
105105

106-
**Usage:** `mtma-migrate-chain-dev migrate where --movement-state-db-path <MOVEMENT_STATE_DB_PATH> --movement-aptos-state-db-path <MOVEMENT_APTOS_STATE_DB_PATH>`
106+
**Usage:** `mtma-migrate-chain-dev migrate where --from <FROM> --to <TO> --maptos-signer <MAPTOS_SIGNER> --da-signer <DA_SIGNER> --mcr-signer <MCR_SIGNER> --movement-args <MOVEMENT_ARGS>`
107107

108108
###### **Options:**
109109

110-
* `--movement-state-db-path <MOVEMENT_STATE_DB_PATH>` — The path to the input Movement state database
111-
* `--movement-aptos-state-db-path <MOVEMENT_APTOS_STATE_DB_PATH>` — The path to the output MovementAptos state database
110+
* `--from <FROM>` — The known release you are migrating from, eg elsa or biarritz-rc1
111+
* `--to <TO>` — The known release you are migrating to, eg biarritz-rc1 or pre-l1-merge
112+
* `--maptos-signer <MAPTOS_SIGNER>` — The canonical string for the Maptos signer used in the migration
113+
* `--da-signer <DA_SIGNER>` — The canonical string for the DA signer used in the migration
114+
* `--mcr-signer <MCR_SIGNER>` — The canonical string for the MCR signer used in the migration
115+
* `--movement-args <MOVEMENT_ARGS>` — Movement configuration arguments
112116

113117

114118

migration/cli/migrate-chain-dev/src/cli/migrate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clap::Parser;
2-
use mtma_core::Config;
2+
use mtma_migrate_chain_core::Config;
33
use orfile::Orfile;
44
use serde::{Deserialize, Serialize};
55

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[package]
2+
name = "mtma-migrator-pre-l1-merge-core"
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
license = { workspace = true }
6+
authors = { workspace = true }
7+
homepage = { workspace = true }
8+
publish = { workspace = true }
9+
rust-version = { workspace = true }
10+
11+
[dependencies]
12+
tokio = { workspace = true }
13+
serde = { workspace = true, features = ["derive"] }
14+
clap = { workspace = true, features = ["derive"] }
15+
dotenv = { workspace = true }
16+
anyhow = { workspace = true }
17+
clap-markdown-ext = { workspace = true }
18+
thiserror = { workspace = true }
19+
orfile = { workspace = true }
20+
mtma-node-types = { workspace = true }
21+
mtma-migrator-types = { workspace = true }
22+
mtma-node-null-core = { workspace = true }
23+
aptos-db = { workspace = true }
24+
aptos-storage-interface = { workspace = true }
25+
aptos-config = { workspace = true }
26+
aptos-executor = { workspace = true }
27+
aptos-vm = { workspace = true }
28+
chrono = { workspace = true }
29+
walkdir = { workspace = true }
30+
uuid = { workspace = true }
31+
tracing = { workspace = true }
32+
aptos-framework-pre-l1-merge-release = { workspace = true }
33+
34+
[lints]
35+
workspace = true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# `mtma-migrator-pre-l1-merge`
2+
Use the [`pre-l1-merge`](https://github.com/movementlabsxyz/movement/tree/main/protocol-units/execution/maptos/framework/releases/pre-l1-merge) release from `movement` to perform the over the wire framework migration. Additionally, runs the [`mtma-node-null-core`](/migration/core/node/null/README.md) migration.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod migrate;
2+
pub use migrate::*;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/// Contains the configuration structs and logic for the migration.
2+
pub mod config;
3+
/// Contains the logic for the migration.
4+
pub mod migrate;
5+
6+
pub use config::*;
7+
pub use migrate::*;

0 commit comments

Comments
 (0)