Skip to content

wallet costs fails with "No endorsed provider available" and undercounts same-provider datasets #26

Description

@nijoe1

wallet costs calls storage.prepare() without a context, which falls back to smart provider selection and pings endorsed providers — so the command hard-fails with StorageContext smartSelect failed: No endorsed provider available whenever none is reachable, even though cost estimation needs no new provider at all.

It also undercounted: datasets sharing a provider were collapsed, but every dataset has its own rail and lockup. Live check on Calibration: 1 GiB / 1 month showed 0.1058 USDFC/month; per-dataset costing gives the correct 0.1322.

Fix: build contexts from the wallet's own live, managed, non-terminating datasets (one createContext per dataset — the plural createContexts rejects same-provider datasets) and fall back to default selection only when the wallet has none.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions