Skip to content

Rental ledger integration #4792

Description

@JSONbored

Problem: No mechanism tracks compute/time actually consumed per rented loop against what was paid or staked.

Area: gittensor economics / AMS

Proposal: Extend the miner package's existing append-only ledgers (run-state, claim, portfolio-queue, event) to record per-tenant compute consumption, rather than building a parallel billing datastore.

Deliverables:

Acceptance criteria:

  • A completed test loop produces a ledger entry with accurate elapsed compute/time.
  • A killed-mid-run test loop also produces an accurate, consistent ledger entry.

Resources:

  • The miner package's existing ledger modules.

Boundaries:


Part of #4778.


Cross-reference (added after #5669): see #5669 for the reconciliation between this issue and AMS Cloud Readiness's #4940 (Replace the local-file database abstraction with a shared datastore) and #5216 (Research spike: storage-abstraction candidates).

Acceptance-criteria dependency: this issue's ledgers are currently hand-written SQL against node:sqlite with no swap point (see lib/local-store.js) -- build this against whatever storage abstraction #4940/#5216 lands on, not raw SQLite a second time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions