Skip to content

Implement SettlementBackendDriver interface + fake driver, per #6098's spec #7572

Description

@JSONbored

Problem

#6098 defines the settlement-backend interface at the spec level (event contract, balance query/decrement, refund/dispute hook points) but nothing has actually been implemented in code yet — there's no SettlementBackendDriver type or fake/in-memory driver the way control-plane/src/tenant-provisioning-driver.ts already has one for tenant provisioning.

Area

Platform / control-plane. Mirrors an existing, proven pattern in this same codebase.

Proposal

Implement SettlementBackendDriver (interface) + createFakeSettlementBackendDriver (in-memory implementation), directly mirroring control-plane/src/tenant-provisioning-driver.ts's shape: an interface capturing #6098's already-spec'd contract (payout-eligible event intake, balance query/decrement, refund/dispute hook), plus a fake driver with no real money movement, so #4792's ledger work and future settlement-scenario logic (#4791) can build and test against a stable interface regardless of which real backend (gittensor-owned or self-built) eventually lands behind it.

⚠️ Required pattern — read control-plane/src/tenant-provisioning-driver.ts in full before starting. The new interface + fake driver must mirror its exact shape (interface + createFake*Driver naming, in-memory Set/Map-backed state, idempotent methods). A PR with a differently-structured interface or driver factory does not satisfy this issue.

Deliverables

Resources

Boundaries

Fake driver only — no real settlement backend, wallet/hotkey material, or reward figures in this issue or its implementation. Maintainer-only for now (this epic's alignment work isn't finalized), but flagged as a fast unlock candidate once the gittensor-alignment conversation lands, since a fake/interface-only driver touches no real funds and has a clear precedent to follow — closest thing in this milestone to a "safe to unleash" task once unlocked.

Contributor-eligible. Mirror tenant-provisioning-driver.ts's exact shape — fake driver only, no real settlement backend, no wallet/hotkey material, no reward figures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions