Skip to content

rs-sdk: return a key's total and remaining budget from one proof #6064

Open

Description

@QuantumExplorer

Follow-up from #6054 (review thread #6054 (comment)).

Problem: A client shows a key's total budget, which comes from the key it holds, next to its remaining budget, which comes from fetchKeysRemainingBudgets / dash_sdk_identity_fetch_keys_remaining_budgets. The query returns neither the total it corresponds to nor the proof height. Right after a raise, a node one block behind can answer with the remaining budget from before the raise. A client then cannot tell that answer apart from a current one.

Effect today: a briefly stale display figure. SwiftExampleApp shows a reading only next to the total it was requested under, derives nothing from it, and signs nothing from it.

Wanted: a query, or an extension of the remaining-budgets query, that proves each key's total budget (and expiry) together with its remaining budget at one height. Clients can then show the two together, or order the answer against a raise they know of.

Activity

  1. QuantumExplorer commented on Nov 23, 2026

    @QuantumExplorer
    MemberAuthor

    Also from the #6148 review (#6148 (comment)): the remaining-budgets query takes every requested key id in one request, and the node refuses a request past max_returned_elements (100). A client listing an identity with more than 100 budgeted keys gets no remaining figures at all. Whatever replaces or extends this query should split a larger id list into bounded, proved batches in the Rust SDK, so no client hard-codes the protocol limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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