Skip to content

L-8. x/market BidFilter adapter + ProviderLeaseStatsRecord + public lease-stats query #499

@linear

Description

@linear

Add VerificationKeeper to the Keepers struct. Implement a BidFilter adapter that owns the fan-out across Audit and Verification keepers; the handler in server.go calls only the adapter. Bucketed ProviderLeaseStatsRecord (total/completed-by-tenant/terminated-by-provider/insufficient-funds) updated in OnLeaseClosed. Classify completion using existing reason ranges. See §3.6, §3.10, §4.7, §4.14.

Also expose QueryProviderLeaseStats(provider, since) on the x/market Query service so auditors, indexers, and Console can read what MarketStatsKeeper.GetProviderLeaseStats exposes internally. The keeper interface is consumed by x/verification for L3/L4 prerequisite enforcement, and the auditor CLI (L-5) plus downstream tools need the same view through the public query surface.

Depends on: L-1, L-6

DoD: Legacy bids still work when verification inactive; new verification SDL is accepted but not enforced; mixed-mode unit tests pass for legacy-only, verification-only, and mixed orders; lease stats classify owner/provider/network close reasons correctly with backfill from LeaseIndexes.Provider; QueryProviderLeaseStats returns the same values the keeper interface returns, with a regression test.

Metadata

Metadata

Assignees

No one assigned

    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