PhotonBolt Docs

Regtest Bootstrap Scripts

These scripts help PhotonBolt operators bootstrap regtest RGB Lightning nodes using one shared set of PHO and mining defaults instead of repeating them in multiple places.

1. What these scripts are

  • scripts/photon-regtest-defaults.sh: shared regtest constants for local operator scripts.
  • scripts/add-shared-rgb-node.sh: interactive installer for adding one more shared RGB Lightning node.

2. photon-regtest-defaults.sh

This file is the script-level source of truth for regtest bootstrap values that used to be repeated directly in installer scripts.

It currently defines defaults for:

  • Photon regtest Docker network name
  • issuer API base
  • bitcoind container name
  • regtest mining address
  • PHO asset contract id
  • PHO ticker and display name

3. add-shared-rgb-node.sh

This script bootstraps a new shared user node into the PhotonBolt regtest environment.

  1. start a new RGB Lightning node container
  2. initialize and unlock it
  3. discover node pubkey and IP
  4. connect the issuer node
  5. open a PHO RGB channel
  6. mine regtest blocks
  7. wait for channel readiness
  8. optionally register the node in the faucet backend registry

4. Why this was added

  • to stop PHO and mining-address drift across scripts
  • to make regtest bootstrap values easier to update safely
  • to keep the installer interactive while centralizing defaults

5. Example override

PHOTON_REGTEST_MINE_ADDRESS=bcrt1...
PHOTON_REGTEST_PHO_ASSET_ID=rgb:...
bash scripts/add-shared-rgb-node.sh

That lets operators override local values for one run without editing the tracked shared defaults file.