From 44bc7576b2a32a9ee3ccb1d70034ab610ba1e7fa Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Mon, 22 Sep 2025 05:41:34 +0000 Subject: [PATCH] update submodule --- blindbit/Dockerfile | 10 ++++++++++ blindbit/blindbit.toml | 18 ++++++++++++++++++ docker-compose.yml | 10 ++++++++-- scripts/healthchecks/blindbit-progress.sh | 3 ++- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 blindbit/Dockerfile create mode 100644 blindbit/blindbit.toml diff --git a/blindbit/Dockerfile b/blindbit/Dockerfile new file mode 100644 index 0000000..3e161ee --- /dev/null +++ b/blindbit/Dockerfile @@ -0,0 +1,10 @@ +# Dockerfile personnalisé pour BlindBit avec pgrep et wget +FROM git.4nkweb.com/4nk/blindbit-oracle:dev + +# Installer pgrep, wget et autres outils utiles pour les healthchecks +USER root +RUN apt-get update && apt-get install -y procps wget curl && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# Revenir à l'utilisateur par défaut +USER root diff --git a/blindbit/blindbit.toml b/blindbit/blindbit.toml new file mode 100644 index 0000000..d8091eb --- /dev/null +++ b/blindbit/blindbit.toml @@ -0,0 +1,18 @@ +# Configuration Blindbit Oracle +host = "0.0.0.0:8000" +chain = "signet" +rpc_endpoint = "http://bitcoin:38332" +cookie_path = "/home/bitcoin/.bitcoin/signet/.cookie" +rpc_user = "" +rpc_pass = "" +sync_start_height = 1 + +# Performance +max_parallel_tweak_computations = 4 +max_parallel_requests = 4 + +# Index +tweaks_only = 0 +tweaks_full_basic = 1 +tweaks_full_with_dust_filter = 1 +tweaks_cut_through_with_dust_filter = 1 diff --git a/docker-compose.yml b/docker-compose.yml index 144a8bd..e07d4f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,8 +56,14 @@ services: - ./logs/blindbit:/var/log/blindbit - ./scripts/healthchecks:/scripts/healthchecks:ro entrypoint: > - sh -c "cp /tmp/blindbit.toml /root/.blindbit-oracle/blindbit.toml && - ./main -datadir /root/.blindbit-oracle" + sh -c "mkdir -p /root/.blindbit-oracle && + if [ ! -f /root/.blindbit-oracle/blindbit.toml ]; then + cp /tmp/blindbit.toml /root/.blindbit-oracle/blindbit.toml; + fi && + echo 'Waiting for Bitcoin to be ready...' && + while ! nc -z bitcoin 38332; do sleep 2; done && + echo 'Bitcoin is ready, starting BlindBit...' && + exec ./main -datadir /root/.blindbit-oracle" networks: btcnet: aliases: diff --git a/scripts/healthchecks/blindbit-progress.sh b/scripts/healthchecks/blindbit-progress.sh index 98a754a..da568e2 100755 --- a/scripts/healthchecks/blindbit-progress.sh +++ b/scripts/healthchecks/blindbit-progress.sh @@ -3,11 +3,12 @@ # Script de test de progression pour BlindBit # Vérifier si le processus BlindBit est en cours d'exécution if pgrep main > /dev/null 2>/dev/null; then - # Vérifier l'API + # Vérifier l'API - être plus tolérant if wget -q --spider http://localhost:8000/tweaks/1 2>/dev/null; then echo 'BlindBit ready: Oracle service responding' exit 0 else + # Vérifier si le processus est en cours d'exécution (même si l'API n'est pas encore prête) echo 'BlindBit starting: Oracle service initializing' exit 1 fi