|
2 | 2 |
|
3 | 3 | This guide is intended for setting up archive nodes on **Mina Devnet** only. Do not use this guide for Mina Mainnet
|
4 | 4 |
|
| 5 | +## Archive Mode Configuration |
| 6 | + |
| 7 | +We start archive mode in openmina by setting one of the following flags along with their associated environment variables: |
| 8 | + |
| 9 | +### Archiver Process (`--archive-archiver-process`) |
| 10 | + |
| 11 | +Stores blocks in a database by receiving them directly from the openmina node |
| 12 | + |
| 13 | +**Required Environment Variables**: |
| 14 | +- `OPENMINA_ARCHIVE_ADDRESS`: Network address for the archiver service |
| 15 | + |
| 16 | +### Local Storage (`--archive-local-storage`) |
| 17 | + |
| 18 | +Stores blocks in the local filesystem |
| 19 | + |
| 20 | +**Required Environment Variables**: |
| 21 | +- (None) |
| 22 | + |
| 23 | +**Optional Environment Variables**: |
| 24 | +- `OPENMINA_ARCHIVE_LOCAL_STORAGE_PATH`: Custom path for block storage (default: ~/.openmina/archive-precomputed) |
| 25 | + |
| 26 | +### GCP Storage (`--archive-gcp-storage`) |
| 27 | + |
| 28 | +Uploads blocks to a Google Cloud Platform bucket |
| 29 | + |
| 30 | +**Required Environment Variables**: |
| 31 | +- `GCP_CREDENTIALS_JSON`: Service account credentials JSON |
| 32 | +- `GCP_BUCKET_NAME`: Target storage bucket name |
| 33 | + |
| 34 | +### AWS Storage (`--archive-aws-storage`) |
| 35 | + |
| 36 | +Uploads blocks to an AWS S3 bucket |
| 37 | + |
| 38 | +**Required Environment Variables**: |
| 39 | +- `AWS_ACCESS_KEY_ID`: IAM user access key |
| 40 | +- `AWS_SECRET_ACCESS_KEY`: IAM user secret key |
| 41 | +- `AWS_DEFAULT_REGION`: AWS region name |
| 42 | +- `AWS_SESSION_TOKEN`: Temporary session token for temporary credentials |
| 43 | +- `OPENMINA_AWS_BUCKET_NAME`: Target S3 bucket name |
| 44 | + |
| 45 | +## Redundancy |
| 46 | + |
| 47 | +The archive mode is designed to be redundant. We can combine the flags to have multiple options running simultaneously. |
| 48 | + |
5 | 49 | ## Prerequisites
|
6 | 50 |
|
7 | 51 | Ensure Docker and Docker Compose are installed on your system - [Docker Installation Guide](./docker-installation.md)
|
8 | 52 |
|
9 |
| -## Docker compose setup |
| 53 | +## Docker compose setup (with archiver process) |
| 54 | + |
| 55 | +The compose file sets up a PG database, the archiver process and the openmina node. The archiver process is responsible for storing the blocks in the database by receiving the blocks from the openmina node. |
10 | 56 |
|
11 |
| -The compose file sets up a PG database, the archiver process and the openmina node. The archiver process is responsible for storing the blocks in the database by receiving the blocks from the openmina node. We start the archive mode in openmina by setting the `--archive-mode` flag to the address fo archiver process. See [docker-compose.archive.devnet.yml](../docker-compose.archive.devnet.yml) for more details. |
| 57 | +See [docker-compose.archive.devnet.yml](../docker-compose.archive.devnet.yml) for more details. |
12 | 58 |
|
13 |
| -## Starting the setup |
| 59 | +### Starting the setup |
14 | 60 |
|
15 | 61 | ```bash
|
16 | 62 | docker compose -f docker-compose.archive.devnet.yml up -d
|
|
0 commit comments