Skip to content

run regtest on the SDK's local Spark environment - #507

Draft
JssDWt wants to merge 5 commits into
mainfrom
jssdwt-local-spark-env
Draft

JssDWt wants to merge 5 commits into
mainfrom
jssdwt-local-spark-env

Conversation

@JssDWt

@JssDWt JssDWt commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Glow can run regtest on the spark-sdk's local Spark environment (breez/spark-sdk#1152), which replaces local-regtest/. Point SPARK_CONFIG_PATH at the spark-config.json the environment writes and the dev server connects regtest to it; the README has the steps. The unilateral exit e2e suite runs on it too.

USDB's stable balance config is now set on mainnet only: from breez/spark-sdk@7afca7181 the SDK rejects it on other networks at connect time.

Draft until

  • SSP additions spark-sdk#1185 is on main. The last commit (temp:) points the README at that branch and gets dropped then.
  • An SDK release has parseSparkConfig. Until then Type Check and Unit Tests fail in CI.

The spark-sdk runs a Spark regtest network locally (regtest/local/),
with its own operators, SSP, LNURL and data-sync services and a mempool
chain API. When SPARK_CONFIG_PATH names the spark-config.json it writes,
the dev server hands the file to the app, which reads it with
parseSparkConfig and connects regtest to the environment's services.
parseSparkConfig needs an SDK release after 0.26.0.

The environment serves the esplora and mempool routes from one chain
API, so the exit's separate mempool URL goes and regtest defaults to
that API. The passkey migration connects through connectSdk as well, so
it reads the same chain.
The suite funded each wallet through local-regtest's /fund endpoint,
with whole deposit leaves. It now deposits from the environment's
Bitcoin node and lets the wallet claim through the SSP, and skips unless
the environment mines only on request. A wallet's refunds then mature
apart, each transfer of a leaf taking 100 blocks off its refund's
timelock, so each pass mines to the nearest timelock rather than a
single block.

The exit fee check reads the quoted fee, which the archive records since
#466.
The spark-sdk's local environment replaces it, and the README says how
to run Glow on it.
USDB exists on mainnet alone, and the SDK rejects a stable balance token
from another network at connect time from spark-sdk 7afca7181 on, which
aborts the whole connection on regtest. The cross-chain config is
already set the same way.
The README and the exit suite rely on three changes in
breez/spark-sdk#1185, on its jssdwt-ssp-additions branch: the
environment's block-interval command, pool trees whose nodes spend
without a timelock, and the SSP syncing its pool leaves with the
coordinator. Glow also needs an SDK newer than 0.26.0 for
parseSparkConfig, so the README builds the JavaScript package from that
branch and links it. Drop this commit once that pull request is on main
and in a release.
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
breez-glow-web Error Error Oct 1, 2026 2:53pm UTC
breez-sdk-spark-example Error Error Oct 1, 2026 2:53pm UTC
savage-glow-web Error Error Oct 1, 2026 2:53pm UTC

@JssDWt JssDWt changed the title feat: run regtest on the SDK's local Spark environment (SDK PR #1185) run regtest on the SDK's local Spark environment (SDK PR #1185) Oct 1, 2026
@JssDWt JssDWt changed the title run regtest on the SDK's local Spark environment (SDK PR #1185) run regtest on the SDK's local Spark environment Oct 1, 2026

This branch had an error being deployed

3 failed deployments
Preview – breez-sdk-spark-example — 4290ad84 Deployed Oct 1, 2026 by vercel[bot]
Preview – savage-glow-web — 4290ad84 Deployed Oct 1, 2026 by vercel[bot]
Preview – breez-glow-web — 4290ad84 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant