Skip to content

Commit db7c161

Browse files
committed
docs: describe intended checks and contexts.
1 parent 7b2c89f commit db7c161

File tree

1 file changed

+95
-1
lines changed

1 file changed

+95
-1
lines changed

README.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Migration passes that take place with direct or indirect access to all other lev
4545
4646
## Environments
4747

48+
Environments are the different contexts in which **[Migrations](#migrations)** are expected to run.
49+
4850
> [!WARNING]
4951
> 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.
5052
>
@@ -82,7 +84,7 @@ At the time of writing, we have planned or developed the following `node` migrat
8284

8385
`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.
8486

85-
### [`mtma-node-replay`](./migration/core/node/mtma-replay)
87+
#### [`mtma-node-replay`](./migration/core/node/mtma-replay)
8688
- **CLI**
8789
- [`mtma-node-dev migrate replay`](./migration/cli/migrate-node-dev/docs/cli/README.md)
8890
- [`mtma-node migrate replay`](./migration/cli/migrate-node/docs/cli/README.md)
@@ -136,14 +138,106 @@ Runs the [`post-l1-merge`](https://github.com/movementlabsxyz/movement-migration
136138
137139
## Contexts
138140

141+
Contexts are the contexts in which checks are expected to run.
142+
143+
> ![WARNING]
144+
> This category and its subcategories are currently suggestive.
145+
146+
> [!ERROR]
147+
> Not all **[Checks](#checks)** are intended to run in all Contexts.
148+
149+
### `snapshot`
150+
The context wherein the migration and its checks have access to a safe version of the node which they may modify.
151+
152+
### `tracking`
153+
The context wherein the migration is presumed to already have run and the checks will continue to track a certain set of criteria against live traffic.
154+
139155
## Checks
140156

157+
Checks are the criteria for migration correctness. Ultimately, they are intended to be used under `mtma checked-migration` to ensure a performed migration satisfies correctness as defined by the criteria described in the Checks.
158+
141159
> [!WARNING]
142160
> 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.
143161
144162
> [!INFO]
145163
> 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.
146164
165+
166+
> [!INFO]
167+
> Several checks from [`primata/e2e-criteria`](https://github.com/movementlabsxyz/movement-migration/pull/47) are omitted here as they are still in fairly early development.
168+
169+
### `snapshot`
170+
171+
> [!WARNING]
172+
> We would like to pull each of these out into a separate unit-test written crate a la [`balances-equal`](./checks/migrator/checks/balances-equal/) and generally reorganize the [`checks`](./checks/) to better match the updated ontology described herein.
173+
>
174+
> The need for separate crates is driven by some awkward Tokio behavior when dropping various runtimes associated with the `movement` and `movement-aptos` embedded runners.
175+
176+
#### [`global-storage-includes`](./checks/node/citeria/global-storage-includes/)
177+
- **CLI**
178+
- [`mtma-check-dev snapshot check global-storage-includes`](./migration/cli//check/docs/cli/README.md)
179+
- [`mtma-check snapshot check global-storage-includes`](./migration/cli/migrate-migrator/docs/cli/README.md)
180+
- [`mtma checks snapshot check global-storage-includes`](./migration/cli/mtma/docs/cli/README.md)
181+
- [`mtma checks snapshot check select --global-storage-includes`](./migration/cli/mtma/docs/cli/README.md)
182+
- [`mtma checked-migration migrate select --check-global-storage-includes`](./migration/cli/mtma/docs/cli/README.md)
183+
- **Tests**
184+
- [`global-storage-includes`](./checks/node/checks/sketchpad/src/global_storage_includes.rs)
185+
186+
Checks whether the global storage from `movement` is present in `movement-aptos`.
187+
188+
#### [`global-storage-injective`](./checks/node/citeria/global-storage-injective)
189+
- **CLI**
190+
- [`mtma-check-dev snapshot check global-storage-injective`](./migration/cli//check/docs/cli/README.md)
191+
- [`mtma-check snapshot check global-storage-injective`](./migration/cli/migrate-migrator/docs/cli/README.md)
192+
- [`mtma checks snapshot check global-storage-injective`](./migration/cli/mtma/docs/cli/README.md)
193+
- [`mtma checks snapshot check select --global-storage-injective`](./migration/cli/mtma/docs/cli/README.md)
194+
- [`mtma checked-migration migrate select --check-global-storage-injective`](./migration/cli/mtma/docs/cli/README.md)
195+
- **Tests**
196+
- [`global-storage-injective`](./checks/node/checks/sketchpad/src/global_storage_injective.rs)
197+
198+
Checks whether the global storage from `movement` is injective into the codomain of `movement-aptos` state keys.
199+
200+
#### [`global-storage-not-empty`](./checks/node/citeria/global-storage-not-empty/)
201+
- **CLI**
202+
- [`mtma-check-dev snapshot check global-storage-not-empty`](./migration/cli//check/docs/cli/README.md)
203+
- [`mtma-check snapshot check global-storage-not-empty`](./migration/cli/migrate-migrator/docs/cli/README.md)
204+
- [`mtma checks snapshot check global-storage-not-empty`](./migration/cli/mtma/docs/cli/README.md)
205+
- [`mtma checks snapshot check select --global-storage-not-empty`](./migration/cli/mtma/docs/cli/README.md)
206+
- [`mtma checked-migration migrate select --check-global-storage-not-empty`](./migration/cli/mtma/docs/cli/README.md)
207+
- **Tests**
208+
- [`global-storage-not-empty`](./checks/node/checks/sketchpad/src/global_storage_not_empty.rs)
209+
210+
Checks that both `movement` and `movement-aptos` global storage are not empty.
211+
212+
#### [`accounts-equal`](./checks/migrator/citeria/accounts-equal/)
213+
- **CLI**
214+
- [`mtma-check-dev snapshot check accounts-equal`](./migration/cli//check/docs/cli/README.md)
215+
- [`mtma-check snapshot check accounts-equal`](./migration/cli/migrate-migrator/docs/cli/README.md)
216+
- [`mtma checks snapshot check accounts-equal`](./migration/cli/mtma/docs/cli/README.md)
217+
- [`mtma checks snapshot check select --accounts-equal`](./migration/cli/mtma/docs/cli/README.md)
218+
- [`mtma checked-migration migrate select --check-accounts-equal`](./migration/cli/mtma/docs/cli/README.md)
219+
- **Tests**
220+
- [`accounts-equal`](./checks/migrator/checks/sketchpad/src/accounts_equal.rs)
221+
222+
Checks that both `movement` and `movement-aptos` accounts are equivalent in `bcs` representation. Amongst other things, this should ensure that asymmetric cryptography for accounts is preserved.
223+
224+
#### [`balances-equal`](./checks/migrator/citeria/balances-equal/)
225+
- **CLI**
226+
- [`mtma-check-dev snapshot check balances-equal`](./migration/cli//check/docs/cli/README.md)
227+
- [`mtma-check snapshot check balances-equal`](./migration/cli/migrate-migrator/docs/cli/README.md)
228+
- [`mtma checks snapshot check balances-equal`](./migration/cli/mtma/docs/cli/README.md)
229+
- [`mtma checks snapshot check select --balances-equal`](./migration/cli/mtma/docs/cli/README.md)
230+
- [`mtma checked-migration migrate select --check-balances-equal`](./migration/cli/mtma/docs/cli/README.md)
231+
- **Tests**
232+
- [`balances-equal`](./checks/migrator/checks/balances-equal/src/balances_equal.rs)
233+
234+
Checks that both `movement` and `movement-aptos` balances for the native token are equal.
235+
236+
### `tracking`
237+
> [!INFO]
238+
> This category is completely suggestive. We haven't implemented anything here yet.
239+
240+
147241
## Organization
148242

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

0 commit comments

Comments
 (0)