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.
This commit is contained in:
satoshi
2026-05-23 03:13:50 +03:00
parent 83938e4aea
commit 6994b39dc9
2 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ export MINDIFF=$(q '.advanced.mindiff // 1000')
export MAXDIFF=$(q '.advanced.maxdiff // 0') export MAXDIFF=$(q '.advanced.maxdiff // 0')
export DROPIDLE=$(q '.advanced.dropidle // 0') export DROPIDLE=$(q '.advanced.dropidle // 0')
LOG_LEVEL=$(q '.advanced.log-level // "info"') 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_ENABLED=$(q '.tls.enabled // "disabled"')
TLS_PORT=$(q '.tls.port // 3334') TLS_PORT=$(q '.tls.port // 3334')
+14 -14
View File
@@ -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": { "advanced": {
"type": "object", "type": "object",
"name": "Advanced", "name": "Advanced",
"description": "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": { "spec": {
"pool-identifier": { "pool-identifier": {
"type": "string", "type": "string",
"name": "Coinbase Tag", "name": "Coinbase Tag",
"description": "description":
"Short string embedded in the coinbase transaction of solved blocks.", "Short string embedded in the coinbase transaction of solved blocks.",
"nullable": false, "nullable": true,
"default": "/Kamado/", "default": "/Kamado/",
"masked": false, "masked": false,
"copyable": false, "copyable": false,
@@ -125,7 +132,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"name": "Starting Difficulty", "name": "Starting Difficulty",
"description": "description":
"Initial vardiff target for new miner connections. Bitaxe-class miners typically land around 16384.", "Initial vardiff target for new miner connections. Bitaxe-class miners typically land around 16384.",
"nullable": false, "nullable": true,
"default": 16384, "default": 16384,
"range": "[1,*)", "range": "[1,*)",
"integral": true, "integral": true,
@@ -134,7 +141,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"type": "number", "type": "number",
"name": "Minimum Difficulty", "name": "Minimum Difficulty",
"description": "Floor for the vardiff algorithm.", "description": "Floor for the vardiff algorithm.",
"nullable": false, "nullable": true,
"default": 1000, "default": 1000,
"range": "[1,*)", "range": "[1,*)",
"integral": true, "integral": true,
@@ -144,7 +151,7 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"name": "Maximum Difficulty", "name": "Maximum Difficulty",
"description": "description":
"Ceiling for the vardiff algorithm. 0 means no cap.", "Ceiling for the vardiff algorithm. 0 means no cap.",
"nullable": false, "nullable": true,
"default": 0, "default": 0,
"range": "[0,*)", "range": "[0,*)",
"integral": true, "integral": true,
@@ -154,18 +161,11 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"name": "Drop Idle (seconds)", "name": "Drop Idle (seconds)",
"description": "description":
"Disconnect clients that have not submitted a share in this many seconds. 0 disables the idle disconnect.", "Disconnect clients that have not submitted a share in this many seconds. 0 disables the idle disconnect.",
"nullable": false, "nullable": true,
"default": 0, "default": 0,
"range": "[0,*)", "range": "[0,*)",
"integral": true, "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": { "log-level": {
"type": "enum", "type": "enum",
"name": "Log Level", "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)", "name": "URL (e.g. your own Mempool instance's address)",
"description": "description":
"Base URL of your mempool instance, e.g. https://mempool.example.com. Kamado will append /address/<addr> and /block/<hash> to it, so the instance must follow the standard mempool.space URL layout.", "Base URL of your mempool instance, e.g. https://mempool.example.com. Kamado will append /address/<addr> and /block/<hash> to it, so the instance must follow the standard mempool.space URL layout.",
"nullable": false, "nullable": true,
"default": "", "default": "",
"pattern": "^https?://[^\\s]+$", "pattern": "^https?://[^\\s]+$",
"pattern-description": "pattern-description":