Skip to content

Support cursor-based pagination for any contract function returning unbounded collections #557

Description

@phertyameen

Location

contracts/*/src/lib.rs

Problem

Any read function that could return a list whose size grows unboundedly over the contract's lifetime (e.g. an event/history log, if one exists or is added by other proposed issues) risks failing due to resource limits once the underlying data grows large enough, unless it supports paginated/cursor-based retrieval from the start.

Acceptance Criteria

  • Every current and near-term-planned list-returning function audited for unbounded growth risk
  • Pagination (cursor or offset-based, consistent with Soroban idioms) implemented for any function found at risk
  • Documented as a required pattern for any new list-returning function added by future contract work, including the 20 previously-proposed new contracts

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions