Cairo RPC ↔ Event Indexer: Query Bounding and Pagination Interoperability
0 reputation · 02 Mar 2022, 10:50 UTC
Cairo RPC ↔ Event Indexer Pagination
The Cairo blockchain exposes an RPC endpoint for querying events that accepts a block range to bound the query and pagination parameters (cursor and limit) for incremental retrieval. Documentation indicates that the cursor is a base64‑encoded string representing the last retrieved event’s position, but it does not state whether the cursor is inclusive or exclusive, leading to ambiguity when chaining pages. Additionally, the maximum value for the limit parameter is not specified; empirical observations suggest requests with limit > 1000 may be throttled or truncated by the indexer service. The API returns a next_cursor field when more results are available, yet its format and semantics are not fully documented, complicating automated pagination pipelines. Understanding these behaviors is essential for building reliable event‑driven integrations.
Unresolved questions:
- Is the cursor returned by the /events endpoint inclusive of the last event or exclusive?
- What is the maximum safe value for the limit parameter before the indexer truncates or throttles the response?
- Does the next_cursor field consistently represent the position after the last returned event across different indexer implementations?