From 6994b39dc907afe3507c767bc01d214ee5a92b3f Mon Sep 17 00:00:00 2001 From: satoshi Date: Sat, 23 May 2026 03:13:50 +0300 Subject: [PATCH] Move ZMQ setting to top level and make advanced fields optional ZMQ block notifications are important enough to be visible without expanding Advanced. Advanced fields no longer show a required asterisk since they all have sane defaults and the entrypoint already falls back to them via yq. --- docker_entrypoint.sh | 2 +- scripts/procedures/getConfig.ts | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docker_entrypoint.sh b/docker_entrypoint.sh index 058223d..b0f75a0 100755 --- a/docker_entrypoint.sh +++ b/docker_entrypoint.sh @@ -47,7 +47,7 @@ export MINDIFF=$(q '.advanced.mindiff // 1000') export MAXDIFF=$(q '.advanced.maxdiff // 0') export DROPIDLE=$(q '.advanced.dropidle // 0') LOG_LEVEL=$(q '.advanced.log-level // "info"') -ZMQ_ENABLED=$(q '.advanced.zmq-enabled // true') +ZMQ_ENABLED=$(q '.zmq-enabled // true') TLS_ENABLED=$(q '.tls.enabled // "disabled"') TLS_PORT=$(q '.tls.port // 3334') diff --git a/scripts/procedures/getConfig.ts b/scripts/procedures/getConfig.ts index fc9773b..09a50be 100644 --- a/scripts/procedures/getConfig.ts +++ b/scripts/procedures/getConfig.ts @@ -104,18 +104,25 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ }, }, }, + "zmq-enabled": { + "type": "boolean", + "name": "Enable ZMQ Block Notifications", + "description": + "Subscribe to Bitcoin Core's hashblock ZMQ topic for sub-second block detection on the dashboard. Requires zmqpubhashblock enabled on bitcoind.", + "default": true, + }, "advanced": { "type": "object", "name": "Advanced", "description": - "Fine-tuning knobs for vardiff, logging, and block notifications. Safe to ignore — the defaults work well for Bitaxe-class miners.", + "Fine-tuning knobs for vardiff, logging, and block explorer links. Safe to ignore — the defaults work well for Bitaxe-class miners.", "spec": { "pool-identifier": { "type": "string", "name": "Coinbase Tag", "description": "Short string embedded in the coinbase transaction of solved blocks.", - "nullable": false, + "nullable": true, "default": "/Kamado/", "masked": false, "copyable": false, @@ -125,7 +132,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ "name": "Starting Difficulty", "description": "Initial vardiff target for new miner connections. Bitaxe-class miners typically land around 16384.", - "nullable": false, + "nullable": true, "default": 16384, "range": "[1,*)", "integral": true, @@ -134,7 +141,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ "type": "number", "name": "Minimum Difficulty", "description": "Floor for the vardiff algorithm.", - "nullable": false, + "nullable": true, "default": 1000, "range": "[1,*)", "integral": true, @@ -144,7 +151,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ "name": "Maximum Difficulty", "description": "Ceiling for the vardiff algorithm. 0 means no cap.", - "nullable": false, + "nullable": true, "default": 0, "range": "[0,*)", "integral": true, @@ -154,18 +161,11 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ "name": "Drop Idle (seconds)", "description": "Disconnect clients that have not submitted a share in this many seconds. 0 disables the idle disconnect.", - "nullable": false, + "nullable": true, "default": 0, "range": "[0,*)", "integral": true, }, - "zmq-enabled": { - "type": "boolean", - "name": "Enable ZMQ Block Notifications", - "description": - "Subscribe to Bitcoin Core's hashblock ZMQ topic for sub-second chain refresh on the dashboard. Requires zmqpubhashblock on bitcoind.", - "default": true, - }, "log-level": { "type": "enum", "name": "Log Level", @@ -202,7 +202,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({ "name": "URL (e.g. your own Mempool instance's address)", "description": "Base URL of your mempool instance, e.g. https://mempool.example.com. Kamado will append /address/ and /block/ to it, so the instance must follow the standard mempool.space URL layout.", - "nullable": false, + "nullable": true, "default": "", "pattern": "^https?://[^\\s]+$", "pattern-description":