From 0ac7b6e696ab2cc0862e33a918c6a4f6d9449c14 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sat, 3 Feb 2024 10:02:49 -0700 Subject: [PATCH] Optionally start chia data layer services. --- CHANGELOG.md | 2 ++ docker/dockerfile | 1 + scripts/forks/chia_launch.sh | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ece06675..d23a54c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set. ### Changed - Harvester mode will now optionally also run chia-exporter for Prometheus results. ### Updated diff --git a/docker/dockerfile b/docker/dockerfile index d62c888e..ea5ba410 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -101,6 +101,7 @@ ENV keys="/root/.chia/mnemonic.txt" ENV plots_dir="/plots" # One of fullnode, farmer, harvester, plotter, farmer+plotter, harvester+plotter. Default is fullnode ENV mode="fullnode" +ENV chia_data="false" ENV chia_exporter="false" ENV chives_masternode="false" ENV gigahorse_recompute_server="false" diff --git a/scripts/forks/chia_launch.sh b/scripts/forks/chia_launch.sh index e1681172..271a177f 100644 --- a/scripts/forks/chia_launch.sh +++ b/scripts/forks/chia_launch.sh @@ -99,6 +99,11 @@ if [[ ${mode} =~ ^fullnode.* ]]; then echo "Starting Chia Exporter service for Prometheus reporting..." sleep 20 && /usr/local/bin/chia-exporter serve 2>&1 > /root/.chia/mainnet/log/chia-exporter.log & fi + if [[ ${chia_data} == "true" ]]; then + echo "Starting Chia Data Layer services..." + sleep 20 && chia start data 2>&1 > /root/.chia/mainnet/log/chia-data.log & + sleep 20 && chia start data_layer_http 2>&1 >> /root/.chia/mainnet/log/chia-data.log & + fi if [[ ${mode} =~ .*timelord$ ]]; then if [ ! -f vdf_bench ]; then echo "Building timelord binaries..."