-
Notifications
You must be signed in to change notification settings - Fork 5
Launch tutorial
Set up and launch your Solana node according to the official Solana documentation.
Download the latest RocksDB backup.
Download the .env
example file from GitHub and update it with the correct configuration settings for each microservice as needed.
Use the docker-compose.yaml
file directly from GitHub.
Update the file with your PostgreSQL credentials to ensure that both the username and password are set properly for secure access.
You can start the ingester
service using one of the methods:
Option 1: Run the following Docker Compose command:
docker compose -f docker-compose.yaml up -d ingester
Option 2: Use the Makefile to start the service:
Download the Makefile
from GitHub and run:
make start
To verify that the ingester
service has started correctly, you have these options:
Option 1: Manually verify the metrics:
-
Check the value of
ingester_buffers{name="buffer_transactions"}
is 0 using:curl -s localhost:9091/metrics | grep 'ingester_buffers{name="buffer_transactions"}' | awk '{print $2}'
-
Check that the value of
ingester_processed_total{name="accounts_dynamic_merge_with_batch",status="SUCCESS"}
is increasing over time using:curl -s localhost:9091/metrics | grep 'ingester_processed_total{name="accounts_dynamic_merge_with_batch",status="SUCCESS"}' | awk '{print $2}'
Option 2: Use the Makefile to automate verification:
make check-ingester
The process will complete with the message "Container ingester has successfully started and is operating correctly."
Copy the most recent files from the Solana node snapshot directory:
- incremental-snapshot-*.tar.zs
- snapshot-*.tar.zst
Run the ETL service to process the snapshots and RocksDB backups:
docker run -it --rm -d --name solana-snapshot-etl -p 5000:5000 -v /path/to/snapshots:/snapshots -e TCP_PORT=5000 ghcr.io/metaplex-foundation/digital-asset-validator-plugin/solana-snapshot-etl:latest
Wait for the ETL process to complete. Success is indicated by the message:
All snapshot files processed successfully.
You can start the synchronizer using one of the methods:
Option 1: Run the following Docker Compose command:
docker compose -f docker-compose.yaml up -d synchronizer
Option 2: Use the Makefile to start the service:
make start-synchronizer
Option 1: Manually check the synchronization status:
Use the following command to continuously check the synchronization status until the slot difference is below the threshold:
INGESTER_RPC_HOST=$(docker exec ingester env | grep INGESTER_RPC_HOST | cut -d "=" -f2)
docker exec -it synchronizer sh -c '
while true; do
solana_slot=$(curl -s -X POST -H "Content-Type: application/json" -d '''{"jsonrpc": "2.0","id": 1,"method": "getSlot","params": [{"commitment": "processed"}]}''' $INGESTER_RPC_HOST | grep -oP "(?<=\"result\":)[0-9]+");
synchronizer_slot=$(curl -s localhost:$SYNCHRONIZER_METRICS_PORT/metrics | grep "synchronizer_last_synchronized_slot{name=\"last_synchronized_slot\"}" | awk '''{print $2}''');
difference=$((solana_slot - synchronizer_slot));
echo "Solana slot: $solana_slot";
echo "Synchronizer last synchronized slot: $synchronizer_slot";
echo "Difference: $difference slots";
if [ "$difference" -lt 50 ]; then
echo "Slot difference is below threshold";
break;
fi;
sleep 5;
done'
Option 2: Use the Makefile to check the synchronization status. This should complete with the message "Slot difference is below threshold":
make check-synchronizer
You can start the das-api
service using one of the methods:
Option 1: Run the following Docker Compose command:
docker compose -f docker-compose.yaml up -d das-api
Option 2: Use the Makefile to start the service:
make start-api
Use this command to verify the status of the das-api
service:
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id": 1,"method": "health"}' http://api_address:api_server_port
Make sure the service returns a healthy status before proceeding.