Show domains in pool status

This commit is contained in:
2026-08-18 02:53:40 +03:00
parent a1fa90c66a
commit eb5f4cbf5a
12 changed files with 517 additions and 141 deletions
+27 -2
View File
@@ -1,6 +1,10 @@
import { FileHelper, z } from '@start9labs/start-sdk'
import { sdk } from '../sdk'
import { defaultStratumPort, defaultStratumTlsPort } from '../utils'
import {
defaultStratumPort,
defaultStratumPublicTlsPort,
defaultStratumTlsPort,
} from '../utils'
/**
* Persisted service settings (the 0.4.0 replacement for the 0.3.x
@@ -25,13 +29,25 @@ export const storeJson = FileHelper.json(
* ckpool and never orphans a binding.
*/
stratumPort: z.number().int().min(1).max(65535).catch(defaultStratumPort),
/** EXTERNAL port for TLS stratum (only used when tlsEnabled). */
/** EXTERNAL port for TLS stratum with the self-signed (local) certificate. */
stratumTlsPort: z
.number()
.int()
.min(1)
.max(65535)
.catch(defaultStratumTlsPort),
/**
* EXTERNAL port for TLS stratum with a CA-issued certificate, terminated
* by StartOS. Separate from stratumTlsPort because the two endpoints are
* terminated by different things — the OS owns this one, stunnel owns the
* other — and a single external port cannot be handed to both.
*/
stratumPublicTlsPort: z
.number()
.int()
.min(1)
.max(65535)
.catch(defaultStratumPublicTlsPort),
/** Short string embedded in the coinbase transaction of solved blocks (ckpool btcsig). */
coinbaseTag: z.string().catch('/Kamado/'),
/** Initial vardiff target for new miner connections. */
@@ -53,5 +69,14 @@ export const storeJson = FileHelper.json(
* links. null -> use the public mempool.space.
*/
mempoolExplorerUrl: z.string().nullable().catch(null),
/**
* Internal state, not a config field: signature of the port assignment the
* user was last warned about (see portAssignmentSignature). Lets main warn
* once per distinct outcome instead of on every start, and re-warn if the
* assignment later changes. main must never read this reactively — it is
* written from main, and a reactive read would restart the service in a
* loop.
*/
notifiedPortAssignment: z.string().nullable().catch(null),
}),
)