Strata full node operator guide¶
Prerequisites¶
Before you begin, ensure you have met the following requirements:
- Docker: Make sure Docker is installed on your machine. You can download it from here.
- Docker Compose: Ensure Docker Compose is installed. It typically comes bundled with Docker Desktop.
- Git: To clone the repository. Download from here.
Installation¶
Follow these steps to set up and run the project.
1. Clone the strata
repository¶
Info
Only fullnode
directory contents can be copied separately if it is not
required to build the images from source. Adjust docker-compose.yaml
file
accordingly.
2. Configure environment variables¶
Create a .env
file in the docker/fullnode
directory of the repository with
the following contents:
Devnet .env
Content:
Warning
Fullnode must use the provided .env
to connect to and sync from strata
devnet chain.
3. Configure parameters¶
Create a params.json
file in the docker/fullnode/configs
directory with the
following contents.
Warning
Fullnode must use the provided params.json to be in consensus with the strata devnet chain.
4. Generate keys¶
Run the script to generate the necessary keys.
Note
Ensure the script has execute permissions. You can set this using:
The script will generate a jwt.hex
file in the configs
directory which is used
for authentication between strata-reth and strata-client for engine-api auth-rpc.
5. Build images¶
Note
this step is optional. The images can be run directly from prebuilt images in ecr.
Build images for strata-client
and strata-reth
Info
Image for signet
can be built from the
alpenlabs/bitcoin_signet
repo.
Running the services¶
Once you have configured the environment and generated the necessary keys, you can start the services using Docker Compose.
Initial sync can take several hours based on network latency and machine load.
The sync status can be checked using an rpc call to strata_syncStatus
method:
Troubleshooting¶
-
Service fails to start:
-
Ensure all environment variables in
.env
are correctly set. - Verify that
params.json
is correctly placed in theconfigs
directory. -
Check Docker logs for more details:
-
Ports already in use:
-
If any of the specified ports are already in use, either stop the conflicting service or modify the port mappings in the
docker-compose.yml
file. -
Key Generation Issues:
-
Ensure you have the necessary permissions to execute
genkeys.sh
. -
Verify that the scripts are correctly generating the
jwt.hex
file in theconfigs
directory. -
Initial Sync does not make progress or fails
- Check that the urls provided in
.env
are accessible from the machine. - If
tip_height
reported fromstrata_syncStatus
rpc call has not caught up to strata devnet and does not update over multiple calls, increaseSYNC_THROTTLE_MS
env instrata-client
service in docker-compose.yaml and restart. - If
FATAL ERROR: block not found:
is seen in thestrata-client
logs after restart, delete.data/reth
and.data/client
directories and restart.