Remove Block Broadcast Fallback config
Companion to KamadoPool's df5e65d. The fallback submitter has been scrapped — primary bitcoind remains the sole submission target, with upstream's indefinite-retry behavior preserved. Drops the block-broadcast-fallback union from advanced config and the BACKUP_RPC_URLS / PENDING_BLOCKS_DIR / PENDING_BLOCKS_GRACE exports from docker_entrypoint.
This commit is contained in:
@@ -63,30 +63,6 @@ else
|
|||||||
fi
|
fi
|
||||||
export MEMPOOL_BASE_URL
|
export MEMPOOL_BASE_URL
|
||||||
|
|
||||||
# Block-broadcast fallback: if the user enabled the safety-net
|
|
||||||
# broadcaster AND provided at least one backup RPC URL, point
|
|
||||||
# kamado-api at the patched-ckpool sidecar dir and feed the URL list
|
|
||||||
# through. Empty PENDING_BLOCKS_DIR disables the watcher entirely.
|
|
||||||
FALLBACK_ENABLED=$(q '.advanced.block-broadcast-fallback.enabled // false')
|
|
||||||
if [[ "${FALLBACK_ENABLED}" == "true" ]]; then
|
|
||||||
# Newline-joined list — matches kamado-api's parser. q strips
|
|
||||||
# quotes via -r, and yq emits one entry per line for [] expansion.
|
|
||||||
BACKUP_RPC_URLS=$(q '.advanced.block-broadcast-fallback.backup-rpcs[]' 2>/dev/null || true)
|
|
||||||
if [[ -z "${BACKUP_RPC_URLS}" ]]; then
|
|
||||||
echo "Block-broadcast fallback enabled but no backup RPC URLs listed — disabling." >&2
|
|
||||||
export PENDING_BLOCKS_DIR=""
|
|
||||||
export BACKUP_RPC_URLS=""
|
|
||||||
else
|
|
||||||
# ckpool's patch writes hex files to <logdir>/pending-blocks.
|
|
||||||
export PENDING_BLOCKS_DIR="${LOGDIR}/pending-blocks"
|
|
||||||
export BACKUP_RPC_URLS
|
|
||||||
export PENDING_BLOCKS_GRACE=$(q '.advanced.block-broadcast-fallback.grace-seconds // 30')s
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
export PENDING_BLOCKS_DIR=""
|
|
||||||
export BACKUP_RPC_URLS=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# CKPool-solo uses the worker's stratum username as the payout
|
# CKPool-solo uses the worker's stratum username as the payout
|
||||||
# address and refuses to authenticate workers whose username is not
|
# address and refuses to authenticate workers whose username is not
|
||||||
# a valid address on the active network. The conf `btcaddress` is
|
# a valid address on the active network. The conf `btcaddress` is
|
||||||
|
|||||||
@@ -213,48 +213,6 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"block-broadcast-fallback": {
|
|
||||||
"type": "object",
|
|
||||||
"name": "Block Broadcast Fallback",
|
|
||||||
"description":
|
|
||||||
"Safety net for the moment a share meets network difficulty. ckpool always submits the block to its primary bitcoind first; if that fails (bitcoind crashed, RPC saturated, peering broken), kamado-api re-broadcasts the raw block to one or more backup RPC URLs you list here. A block is only re-submitted if it hasn't been accepted within the grace window — well-behaved primaries are never disturbed.",
|
|
||||||
"spec": {
|
|
||||||
"enabled": {
|
|
||||||
"type": "boolean",
|
|
||||||
"name": "Enable fallback broadcaster",
|
|
||||||
"description":
|
|
||||||
"Off by default. Turning on requires at least one Backup RPC URL — without one we'd just log warnings about pending blocks we can't help with.",
|
|
||||||
"default": false,
|
|
||||||
},
|
|
||||||
"grace-seconds": {
|
|
||||||
"type": "number",
|
|
||||||
"name": "Grace period (seconds)",
|
|
||||||
"description":
|
|
||||||
"How long a block waits before kamado-api considers ckpool's submission attempt failed and broadcasts via fallback. The patched ckpool returns from submit within ~3s rather than spinning indefinitely on a dead primary, so 3s is the right default — fast enough that fallback work happens while the block is still novel, long enough that a slow round-trip on a healthy primary doesn't trigger a spurious fallback.",
|
|
||||||
"nullable": false,
|
|
||||||
"range": "[1,600]",
|
|
||||||
"integral": true,
|
|
||||||
"units": "seconds",
|
|
||||||
"default": 3,
|
|
||||||
},
|
|
||||||
"backup-rpcs": {
|
|
||||||
"type": "list",
|
|
||||||
"name": "Backup Bitcoin RPC URLs",
|
|
||||||
"description":
|
|
||||||
"Each entry is a full bitcoind RPC URL, optionally with credentials inline (https://user:pass@host:8332/). Used in order. Anything that speaks the standard JSON-RPC submitblock method works — a second self-hosted bitcoind, an authenticated public RPC service (Quicknode, GetBlock.io, Allnodes, etc.), or a peer node you trust. Leaving this empty disables the broadcaster.",
|
|
||||||
"subtype": "string",
|
|
||||||
"spec": {
|
|
||||||
"pattern": "^https?://[^\\s]+$",
|
|
||||||
"pattern-description":
|
|
||||||
"Must be an http:// or https:// URL with no whitespace.",
|
|
||||||
"masked": false,
|
|
||||||
"copyable": false,
|
|
||||||
},
|
|
||||||
"default": [],
|
|
||||||
"range": "[0,10]",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user