Skip to content

Separate Bee nodes for production and staging environments #178

@crtahlin

Description

@crtahlin

Problem

Production (provenance-gateway.datafund.io) and staging (provenance-gateway.dev.datafund.io) both point to the same Bee node. This causes:

  1. Stamp ownership overlap — stamps purchased or adopted by one environment's pool are visible to both. A stamp acquired on staging can appear in production's pool and vice versa.
  2. Pool interference — both environments run sync_from_bee_node() against the same stamp set, potentially competing for the same stamps or double-counting reserves.
  3. Unpredictable testing — staging stamp operations (purchases, uploads, pool drains) affect production stamp availability and BZZ balance.

Proposal

Each environment should connect to its own Bee node:

Environment Bee node Purpose
Production Dedicated node (current) Live users, real data
Staging Separate node Testing, validation before production

Implementation

  1. Deploy a second Bee node for staging (or repurpose an existing test node)
  2. Set SWARM_BEE_API_URL to the staging Bee node URL in the GitHub staging environment variables
  3. Fund the staging node's wallet with enough xBZZ/xDAI for stamp purchases during testing
  4. Verify staging pool operates independently after the switch

Considerations

  • The staging Bee node doesn't need the same capacity as production — a lighter setup is fine
  • Staging wallet needs its own xBZZ funding (separate from production)
  • After the split, staging pool state should be reset (delete data/pool_state.json on staging) to avoid referencing stamps from the shared node

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions