From c9858325cdbb8224c673a14944274d78d155c245 Mon Sep 17 00:00:00 2001 From: satoshi Date: Tue, 14 Apr 2026 17:26:42 +0300 Subject: [PATCH] Use genesis coinbase address for ckpool startup self-test ckpool-solo validates conf btcaddress once at startup to prime the coinbase-builder, then pays solves to the worker's stratum address. The conf value never sees a satoshi, so use the active network's genesis coinbase address instead of a burn placeholder. --- docker_entrypoint.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/docker_entrypoint.sh b/docker_entrypoint.sh index 5b823c1..1906771 100755 --- a/docker_entrypoint.sh +++ b/docker_entrypoint.sh @@ -21,10 +21,16 @@ case "${BITCOIND_VARIANT}" in bitcoind) export BITCOIN_RPC_HOST="bitcoind.embassy" export BITCOIN_RPC_PORT=8332 + # Satoshi's genesis block coinbase address. Used only for + # ckpool's startup coinbase-builder self-test; never credited + # a satoshi since solo mode pays the worker's stratum address. + SELFTEST_ADDRESS="1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" ;; bitcoind-testnet) export BITCOIN_RPC_HOST="bitcoind-testnet.embassy" export BITCOIN_RPC_PORT=48332 + # Testnet genesis coinbase address — valid P2PKH on testnet4. + SELFTEST_ADDRESS="mipcBbFg9gMiCh81Kj8tqqdgoZub1ZJRfn" ;; *) echo "kamado-entrypoint: unknown bitcoind variant: ${BITCOIND_VARIANT}" >&2 @@ -46,10 +52,15 @@ TLS_ENABLED=$(q '.tls.enabled // "disabled"') TLS_PORT=$(q '.tls.port // 3334') # CKPool-solo uses the worker's stratum username as the payout -# address. Kamado refuses to authenticate workers whose username is -# not a valid BTC address, so the conf `btcaddress` fallback is never -# reached. We still set it to a placeholder the conf parser accepts. -export POOL_BTCADDRESS="1BitcoinEaterAddressDontSendf59kuE" +# address and refuses to authenticate workers whose username is not +# a valid address on the active network. The conf `btcaddress` is +# only consulted once at startup, for ckpool's coinbase-builder +# self-test: it builds and validates a sample coinbase transaction +# against bitcoind before accepting any workers. Since no worker has +# connected yet at that point, we hand it the genesis block coinbase +# address for the active network — it's always valid, and solo mode +# never credits it a satoshi. +export POOL_BTCADDRESS="${SELFTEST_ADDRESS}" export LOGDIR=/var/log/ckpool export SOCKET_DIR=/run/ckpool