Skip to content

Commit e0c13d8

Browse files
committed
docs: explain strategies, environments, and migrations.
1 parent 62da4ce commit e0c13d8

File tree

2 files changed

+118
-6
lines changed

2 files changed

+118
-6
lines changed

README.md

Lines changed: 117 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
<div align="center">
22
<pre>
3-
MOVEMENT => MAPTOS
3+
MOVEMENT => MOVEMENT APTOS
44
</pre>
55
</div>
66

77
# `movement-to-movement-aptos`
88

9-
Logic and validation of migration from [`movement`](https://github.com/movementlabsxyz/movement) state to [`movement-aptos`](https://github.com/movementlabsxyz/movement-aptos-core).
9+
`movement-to-movement-aptos` herein abbreviated as `mtma` is the logic and validation of migration from [`movement`](https://github.com/movementlabsxyz/movement) to [`movement-aptos`](https://github.com/movementlabsxyz/movement-aptos-core).
1010

1111
## Getting started
1212
To run or work with existing migration tools check the [CLI documentation](./docs/cli/README.md).
1313

14-
We otherwise recommend reading the [checks](./checks/README.md) and working down into the migration from there.
14+
To get an initial grounding, we recommend spending 10-15 minutes reading the [checks](./checks/README.md) and working down into various elements of the API from there. This should provide you with a sense of both the high-level requirements against which we are attempting to implement and validate as well as the approaches we are taking to perform the migration.
15+
16+
Once you have completed the above, review the following:
17+
18+
- **[Strategies](#strategies):** describes the different layers of abstraction against which the migration is performed and validated, as well as the reason for each.
19+
- **[Environments](#environments):** describes the different contexts (resp.) in which migration and check logic is run. These are usually wrapped up under the enum for a given **[Strategy](#strategies)**. All **[Migrations](#migrations)** should be available in in all **[Environments](#environments)**.
20+
- **[Migrations](#migrations):** describes the available migrations which have been implemented under the **[Strategies](#strategies)** above.
21+
- **[Contexts](#contexts):** describes the different contexts (resp.) in which a **[Check](#checks)** can be run. Not all **[Checks](#checks)** make sense in all contexts. For example, some **[Checks](#checks)** only make sense in the `tracking` context.
22+
- **[Checks](#checks):** describes the available checks for migration correctness. These are often implemented for a specific **[Strategy](#strategies)** but unified under the [`migrator`](#migrator) strategy.
1523

1624
## Contributing
1725

@@ -26,12 +34,116 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md) file for additional contribution g
2634
## Strategies
2735
The migration is organized into passes, which are categorized as follows:
2836

29-
- [`node`](/migration/core/node) for migration passes that take place with access to node processes, memory, and disk.
30-
- [`migrator`](migration/core/migrator) for migration passes that take place with direct or indirect access to all other levels of abstraction--everything that is needed to migrate.
37+
### [`node`](/migration/core/node)
38+
Migration passes that take place with access to node processes, memory, and disk.
39+
40+
### [`migrator`](migration/core/migrator)
41+
Migration passes that take place with direct or indirect access to all other levels of abstraction--everything that is needed to migrate.
3142

3243
> [!NOTE]
3344
> An additional class of strategies `chain` and `transaction` have been suggested but not broken out for all over-the-wire/transaction-based migration passes. Simply use the `migrator` instead.
3445
46+
## Environments
47+
48+
> [!WARNING]
49+
> Currently, this and its subcategories are suggestive. All **[Strategies](#strategies)**, **[Migrations](#migrations)**, and **[Checks](#checks)** have been written ad hoc and are mostly concerned with a local testing environment.
50+
>
51+
> Whether or not there is sufficient complexity to realize these Environments in types remains to be seen.
52+
53+
### `testing`
54+
An environment intended for local `cargo`-based testing of the **[Migrations](#migrations)** and **[Checks](#checks)**.
55+
56+
### `box`
57+
An environment intended for running **[Migrations](#migrations)** and **[Checks](#checks)** on a node which is participating in the migration and on which the appropriate signing keys are available.
58+
59+
### `provisioner`
60+
An environment intended for running **[Migrations](#migrations)** and **[Checks](#checks)** from a node which shall provision the new network.
61+
62+
## Migrations
63+
64+
Migrations are subdivided by **[Strategy](#strategies)**.
65+
66+
> [!WARNING]
67+
> This section is a **WIP** in progress. Its contents are intended as aspirational. However, links below to CLIs and documentation should ultimately be valid and currently link to informative material.
68+
69+
> [!INFO]
70+
> Multiple CLI paths are often shared for usability. Owing to the compositional approach this repository uses to CLI development, the logic should assumed be the same at each CLI path unless otherwise noted below or in the CLI documentation itself.
71+
72+
### [`node`](./migration/core/node)
73+
At the time of writing, we have planned or developed the following `node` migrations.
74+
75+
#### [`mtma-node-null`](./migration/core/node/mtma-null/)
76+
- **CLI**
77+
- [`mtma-node-dev migrate null`](./migration/cli/migrate-node-dev/docs/cli/README.md)
78+
- [`mtma-node migrate null`](./migration/cli/migrate-node/docs/cli/README.md)
79+
- [`mtma migration node migrate null`](./migration/cli/mtma/docs/cli/README.md)
80+
- [`mtma migration node migrate select --null`](./migration/cli/mtma/docs/cli/README.md)
81+
- [`mtma checked-migration migrate select --node-null`](./migration/cli/mtma/docs/cli/README.md)
82+
83+
`mtma-node-null` is a migration that does not attempt to make any changes to the the existing databases. It is a copying of node state files.
84+
85+
### [`mtma-node-replay`](./migration/core/node/mtma-replay)
86+
- **CLI**
87+
- [`mtma-node-dev migrate replay`](./migration/cli/migrate-node-dev/docs/cli/README.md)
88+
- [`mtma-node migrate replay`](./migration/cli/migrate-node/docs/cli/README.md)
89+
- [`mtma migration node migrate replay`](./migration/cli/mtma/docs/cli/README.md)
90+
- [`mtma migration node migrate select --replay`](./migration/cli/mtma/docs/cli/README.md)
91+
- [`mtma checked-migration migrate select --node-replay`](./migration/cli/mtma/docs/cli/README.md)
92+
93+
`mtma-node-replay` is a migration which replays transactions from `movement` on a `movement-aptos` executor to derive the intended state.
94+
95+
> [!WARNING]
96+
> Currently, this migration is not passing on any **[Checks](#checks)** because of an issue with regenesis which prevents appropriately reading the execution config after replaying on the new `movement-aptos` executor.
97+
98+
### [`migrator`](./migration/core/migrator/)
99+
At the time of writing, we have planned or developed the following `migrator` migrations.
100+
101+
#### [`mtma-migrator-null`](./migration/core/migrator/mtma-null/README.md)
102+
- **CLI**
103+
- [`mtma-migrator-dev migrate null`](./migration/cli/migrate-migrator-dev/docs/cli/README.md)
104+
- [`mtma-migrator migrate null`](./migration/cli/migrate-migrator/docs/cli/README.md)
105+
- [`mtma migration migrator migrate null`](./migration/cli/mtma/docs/cli/README.md)
106+
- [`mtma migration migrator migrate select --null`](./migration/cli/mtma/docs/cli/README.md)
107+
- [`mtma checked-migration migrate select --migrator-null`](./migration/cli/mtma/docs/cli/README.md)
108+
109+
Rewraps the [`mtma-node-null`](#mtma-node-null) migration for the `migrator`.
110+
111+
#### [`mtma-migrator-pre-l1-merge`](./migration/core/migrator/mtma-pre-l1-merge/README.md)
112+
- **CLI**
113+
- [`mtma-migrator-dev migrate pre-l1-merge`](./migration/cli/migrate-migrator-dev/docs/cli/README.md)
114+
- [`mtma-migrator migrate pre-l1-merge`](./migration/cli/migrate-migrator/docs/cli/README.md)
115+
- [`mtma migration migrator migrate pre-l1-merge`](./migration/cli/mtma/docs/cli/README.md)
116+
- [`mtma migration migrator migrate select --pre-l1-merge`](./migration/cli/mtma/docs/cli/README.md)
117+
- [`mtma checked-migration migrate select --migrator-pre-l1-merge`](./migration/cli/mtma/docs/cli/README.md)
118+
119+
Runs the [`pre-l1-merge`](https://github.com/movementlabsxyz/movement-migration/pull/102) OTA framework migration.
120+
121+
> [!WARNING]
122+
> This is currently not available on this branch.
123+
124+
#### [`mtma-migrator-post-l1-merge`](./migration/core/migrator/mtma-post-l1-merge/README.md)
125+
- **CLI**
126+
- [`mtma-migrator-dev migrate post-l1-merge`](./migration/cli/migrate-migrator-dev/docs/cli/README.md)
127+
- [`mtma-migrator migrate post-l1-merge`](./migration/cli/migrate-migrator/docs/cli/README.md)
128+
- [`mtma migration migrator migrate post-l1-merge`](./migration/cli/mtma/docs/cli/README.md)
129+
- [`mtma migration migrator migrate select --post-l1-merge`](./migration/cli/mtma/docs/cli/README.md)
130+
- [`mtma checked-migration migrate select --migrator-post-l1-merge`](./migration/cli/mtma/docs/cli/README.md)
131+
132+
Runs the [`post-l1-merge`](https://github.com/movementlabsxyz/movement-migration/issues/48#issuecomment-2828043486) OTA framework migration.
133+
134+
> [!WARNING]
135+
> This is currently not available on this branch.
136+
137+
## Contexts
138+
139+
## Checks
140+
141+
> [!WARNING]
142+
> This section is a **WIP** in progress. Its contents are intended as aspirational. However, links below to CLIs and documentation should ultimately be valid and currently link to informative material.
143+
144+
> [!INFO]
145+
> Multiple CLI paths are often shared for usability. Owing to the compositional approach this repository uses to CLI development, the logic should assumed be the same at each CLI path unless otherwise noted below or in the CLI documentation itself.
146+
35147
## Organization
36148

37149
There are five subdirectories which progressively build on one another for node logic.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
chmod +x $(pwd)/.git/hooks/pre-commit
136136
137137
cat <<'EOF'
138-
MOVEMENT => MAPTOS
138+
MOVEMENT => MOVEMENT APTOS
139139
EOF
140140
141141
echo "Migrates Movement to Movement Aptos."

0 commit comments

Comments
 (0)