A Garnet (or Redstone) node is an OP Stack node. For more information about running OP Stack nodes, see the Optimism documentation.
The Docker images provided by Optimism include the software for Redstone's data availability model. We can use them to run a node using docker compose
.
Make sure you have docker compose
installed.
Clone the GitHub repository and enter the directory.
git clone https://github.com/latticexyz/redstone-node.git
cd redstone-node/docker-compose/
Edit .env
to have an L1_URL
parameter with a URL to access the L1 blockchain (Ethereum Holesky).
L1_URL=https:// <node provider address here>
Download the snapshot. You need about 70 GB of free space.
mkdir data
cd data
wget -c https://pub-b17471e3fbff42cc9f1ed12b36844067.r2.dev/geth-latest.tar.gz
tar xvzf geth-latest.tar.gz
rm geth-latest.tar.gz
cd ..
Run the node and wait for it to synchronize.
docker compose -f garnet-compose.yml up -d
Note that synchronization is a slow process.
First, op-node
takes time to figure out exactly where the rollup started, so for a few hours you might not see the block number progress beyond zero.
Then, the process appears stuck because in the early days input commitments were five hours apart, and later an hour apart.
Synchronization for a snapshot is much faster but still starts with a period of about an hour during which there is no visible progress except for the logs.
Subscribe to the mailing list to be informed when you need to change rollup.json
or one of the other files.
docker compose -f garnet-compose.yml up -d
Will start the node in a detatched shell (-d
), meaning the node will continue to run in the background.
docker compose -f garnet-compose.yml logs -f --tail 10
To view logs of all containers.
docker compose -f garnet-compose.yml logs <CONTAINER_NAME> -f --tail 10
To view logs for a specific container. There are two containers:
op-geth
op-node
docker compose -f garnet-compose.yml down
Will shut down the node without wiping any data. You can safely run this command and then restart the node again.
docker compose -f garnet-compose.yml restart
Will restart the node safely with minimal downtime.
The files used by op-node
and op-geth
are stored under redstone-node/docker-compose/data
.
You can view and delete them there.