v0.0.9.2
Build Service / BuildPackage (push) Has been cancelled

This commit is contained in:
2026-05-24 19:10:21 -04:00
parent b308d0ceaa
commit 70b8aab0f3
10 changed files with 169 additions and 45 deletions
+42 -28
View File
@@ -56,6 +56,8 @@ export const main = sdk.setupMain(async ({ effects }) => {
const { password: APP_PASSWORD, btcAuth, dbAuth, spacedAuth } = store
const enableExplorer = store.enableExplorer === true
const enableSubspaces = store.enableSubspaces === true
// subs-prover is independently gated and defaults OFF (null/undefined => false).
const enableSubsProver = store.enableSubsProver === true
const spacedEnv = {
SPACED_CHAIN,
@@ -262,8 +264,8 @@ export const main = sdk.setupMain(async ({ effects }) => {
// Appends the Subspaces chain (fetch → build → wallet ensure → subs-prover →
// subs daemon) to any existing chain. `as any` because the chain's TS type
// depends on prior IDs and we can't easily express the union here.
const withSubspaces = (chain: any): any =>
chain
const withSubspaces = (chain: any): any => {
let c = chain
.addOneshot('subspaces-dirs', {
subcontainer: subspacesSub,
exec: {
@@ -278,32 +280,6 @@ export const main = sdk.setupMain(async ({ effects }) => {
},
requires: [],
})
.addDaemon('subs-prover', {
subcontainer: subspacesSub,
exec: {
command: [
'sh',
'-c',
`cd ${SUBSPACES_PROVER_DIR} && exec ${SUBSPACES_PROVER_BIN} --server --server-port ${SUBSPACES_PROVER_PORT}`,
],
env: proverEnv,
// Run as root: the horologger/subs image declares USER subs, but our
// /data volume + subdirs are root-owned, so the non-root user can't
// traverse/write them. Root sidesteps the ownership mismatch.
user: 'root',
},
ready: {
display: i18n('Subspaces Prover'),
fn: () =>
sdk.healthCheck.checkPortListening(effects, SUBSPACES_PROVER_PORT, {
successMessage: i18n('subs-prover is ready'),
errorMessage: i18n('subs-prover is not ready'),
}),
gracePeriod: 60_000,
trigger: sdk.trigger.cooldownTrigger(30_000),
},
requires: ['subspaces-dirs'],
})
.addDaemon('subs-registry', {
subcontainer: subspacesSub,
exec: {
@@ -349,6 +325,44 @@ export const main = sdk.setupMain(async ({ effects }) => {
requires: ['subspaces-dirs', 'spaced', 'subs-registry'],
})
// subs-prover is opt-in and DISABLED BY DEFAULT (toggle via the "Enable
// Subspaces Prover" action). Its interface (8888) stays registered either
// way (see interfaces.ts), but the daemon only starts when enabled. It's
// added LAST and depends on every other subspaces daemon; it runs lengthy
// timing tests on boot and NOTHING depends on it, so its slow startup never
// blocks anything else.
if (enableSubsProver) {
c = c.addDaemon('subs-prover', {
subcontainer: subspacesSub,
exec: {
command: [
'sh',
'-c',
`cd ${SUBSPACES_PROVER_DIR} && exec ${SUBSPACES_PROVER_BIN} --server --server-port ${SUBSPACES_PROVER_PORT}`,
],
env: proverEnv,
// Run as root: the horologger/subs image declares USER subs, but our
// /data volume + subdirs are root-owned, so the non-root user can't
// traverse/write them. Root sidesteps the ownership mismatch.
user: 'root',
},
ready: {
display: i18n('Subspaces Prover'),
fn: () =>
sdk.healthCheck.checkPortListening(effects, SUBSPACES_PROVER_PORT, {
successMessage: i18n('subs-prover is ready'),
errorMessage: i18n('subs-prover is not ready'),
}),
gracePeriod: 60_000,
trigger: sdk.trigger.cooldownTrigger(30_000),
},
requires: ['subspaces-dirs', 'subs-registry', 'subs'],
})
}
return c
}
if (!enableExplorer) {
// Spaces-only mode: spaced + gotty terminal. No PostgreSQL, no indexer.
// User can flip the toggle via the Enable Embedded Explorer action;