FFORGE//RS
← Roadmap

blockchain / LEVEL 4

Page two came from a different chain head

EST.45 MIN
01

THEORY / RETRIEVAL

What to restore

  • Carry snapshot height inside an opaque cursor contract
  • Evaluate record visibility at that fixed height
  • Return deterministic unique ordering with bounded page size

`latest` is unstable during a multi-page read

If every page independently resolves the latest head, new blocks or reorgs can move rows between pages, causing duplicates and gaps. A cursor should bind ordering position, filters and a specific finalized or explicitly accepted snapshot.

RPC semantics need finality language

Endpoints should distinguish latest, safe and finalized data according to the chain protocol, return block identity with derived results and document reorg behavior. Pagination limits and proof/result sizes are also denial-of-service boundaries.

CHECKPOINT

What must an opaque cursor preserve to prevent page drift while new blocks are indexed?

ISOLATED RUST 1.96
src/lib.rsEDIT

02 / IMPLEMENTATION

Implement the contract

Implement snapshot-bound pagination. A record is visible when created_height <= snapshot and removed_height is absent or greater than snapshot. Limit is 1..=100; token snapshot must equal requested_snapshot; ids are unique, ascending, and strictly after token.after_id.

Initializing editor…
CLOUD SANDBOXnetwork off · 256 MB · 12 s
1 / 64 KB
OUTPUT
Runner is waiting for a submission.