Skip to content

Commit

Permalink
cleanup pre-migration commands
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Feb 27, 2025
1 parent 975a79f commit 2e15da9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
35 changes: 28 additions & 7 deletions docs/cel2/notices/prepare-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,34 @@ __Migrating archive data is not recommended.__
Both the pre-migration and full migration must be run on full node data. If you only have Celo archive nodes, we recommend syncing a full node in preparation for the L2 hardfork. You should not migrate archive data even if you plan to run an L2 archive node. See [Running an archive node](../operators/run-node.md#running-an-archive-node) for more information.
:::

We recommend running the migration script (which includes commands for both the pre-migration and full migration) using [celo-l2-node-docker-compose](https://github.com/celo-org/celo-l2-node-docker-compose). If necessary, the script can also be run from source but the process will be more manual. // TODO(Alec) Do we even want this or should we just tell partners not to run the script from source?
We recommend running the migration script (which includes commands for both the pre-migration and full migration) using [celo-l2-node-docker-compose](https://github.com/celo-org/celo-l2-node-docker-compose). If necessary, the script can also be run from source.

// TODO(Alec) rewrite these steps
### Run pre-migration with docker

1. Stop your node.
2. Pull the latest version of [celo-l2-node-docker-compose](https://github.com/celo-org/celo-l2-node-docker-compose) and `cd` into the root of the project.

```bash
git clone https://github.com/celo-org/celo-l2-node-docker-compose.git
cd celo-l2-node-docker-compose
```

3. Run pre-migration command, where `<network>` is one of `alfajores`, `baklava`, or `mainnet`.

:::warn
Please ensure your node is stopped before running the migration tool.
:::

```bash
./migrate pre <network> <path-to-your-L1-datadir> [<L2_destination_datadir>]
```

If a destination datadir is specified, ensure the value of `DATADIR_PATH` inside `.env` is updated to match. //TODO(Alec) are we missing a step to cp the right `.env` file like we have in the instructions for running a node?

The pre-migration process will take some time to complete.

1. Stop your L1 node.
2. Pull the latest version of
[celo-l2-node-docker-compose](https://github.com/celo-org/celo-l2-node-docker-compose) and `cd`
into the root of the project.
3. Run `./migrate pre <network> <path-to-your-L1-datadir> [<l2_destination_datadir>]` where `<network>` is one of `alfajores`, `baklava`, or `mainnet`. If a destination datadir is specified, ensure that the value of `DATADIR_PATH` inside `.env` is updated to match. The pre-migration process will take at least several minutes to complete.
4. Once the pre-migration is complete, you can start your L1 node again.

### Run pre-migration from source

// TODO(Alec) Do we even want this or should we just tell partners not to run the script from source?
4 changes: 2 additions & 2 deletions docs/cel2/operators/migrate-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ To simplify migrating and running L2 nodes, Celo has created the [celo-l2-node-d
cd celo-l2-node-docker-compose
```

3. Run the full migration.
3. Run the full migration command, where `<network>` is one of `alfajores`, `baklava`, or `mainnet`.

:::warn
Please ensure your L1 node is stopped before running the migration tool.
Please ensure your node is stopped before running the migration tool.
:::

```bash
Expand Down

0 comments on commit 2e15da9

Please sign in to comment.