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.
This commit is contained in:
satoshi
2026-04-14 17:26:42 +03:00
parent a63e7256c4
commit c9858325cd
+15 -4
View File
@@ -21,10 +21,16 @@ case "${BITCOIND_VARIANT}" in
bitcoind) bitcoind)
export BITCOIN_RPC_HOST="bitcoind.embassy" export BITCOIN_RPC_HOST="bitcoind.embassy"
export BITCOIN_RPC_PORT=8332 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) bitcoind-testnet)
export BITCOIN_RPC_HOST="bitcoind-testnet.embassy" export BITCOIN_RPC_HOST="bitcoind-testnet.embassy"
export BITCOIN_RPC_PORT=48332 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 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') TLS_PORT=$(q '.tls.port // 3334')
# CKPool-solo uses the worker's stratum username as the payout # CKPool-solo uses the worker's stratum username as the payout
# address. Kamado refuses to authenticate workers whose username is # address and refuses to authenticate workers whose username is not
# not a valid BTC address, so the conf `btcaddress` fallback is never # a valid address on the active network. The conf `btcaddress` is
# reached. We still set it to a placeholder the conf parser accepts. # only consulted once at startup, for ckpool's coinbase-builder
export POOL_BTCADDRESS="1BitcoinEaterAddressDontSendf59kuE" # 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 LOGDIR=/var/log/ckpool
export SOCKET_DIR=/run/ckpool export SOCKET_DIR=/run/ckpool