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:
+15
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user