Skip to content

Proof verification of an omitted-limit query can fail when a node serves a custom page size #6238

Backlog

Description

@QuantumExplorer

Problem

When a client omits limit/count on a paged query (limit: None), the serving node applies its own page size. If a node is configured with a non-standard page size (for example 50) and more items match than fit on that page, the node proves a truncated page of 50.

The verifier's omitted-count path (verify_page_drive_proves in the proof verifier, as used for group actions) checks only an exact limit of 100 and then an unbounded exact query. With the pinned GroveDB verifier both reject the truncated custom page, because neither query reached its requested limit. Existing fixtures cover a truncated standard page and a custom page that holds every match, but not a truncated custom page.

This affects every rs-sdk-ffi query entry point that maps a 0 limit to None (most of them; dash_sdk_group_get_actions joined them in #6225).

Proposal

Align the omitted-count semantics between the Rust query layer and proof verification, so a truncated page at the node's configured size verifies without the client guessing page sizes. Add a fixture for a truncated custom-size page.

Found in review of #6225.

Activity

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