fix: correct pagination limits for getLedgers and getTransactions in OpenRPC spec#2290
Conversation
There was a problem hiding this comment.
Pull request overview
This PR corrects the pagination limit parameter descriptions in the Stellar RPC OpenRPC specification so they match the actual server-enforced defaults and maximums for getLedgers and getTransactions.
Changes:
- Update
getLedgerspaginationlimitdescription to max 200 / default 50. - Update
getTransactionspaginationlimitdescription to max 200 / default 50.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey, @miguelnietoa! thanks so much for helping to fix this! The file you've modified will actually be over-written at build-time. the "source" of this OpenRPC specfile lives in the
If you run into any trouble with steps 2 or 3, i'd be happy to help out by pushing some changes for you, too. Thanks again! |
…nsactions Replace the shared Pagination schema with PaginationEvents, PaginationLedgers, and PaginationTransactions since each method has different limits (getEvents: max 10000/default 100, getLedgers and getTransactions: max 200/default 50).
|
Hi @ElliotFriend 👋🏻 Lmk if it needs further changes! |
ElliotFriend
left a comment
There was a problem hiding this comment.
@miguelnietoa thanks so much for those changes!
This is probably a bit of a nitpick, but I'd prefer to see these Pagination* content descriptors and schemas grouped together into a single file, similar to how we have a few *Hash schemas in this file.
Everything else looks right to me, though. And, I'm not actually gonna "die on that hill" about putting things in a single file. Let me know what you think!
The pagination limit descriptions for
getLedgersandgetTransactionsreference a maximum of10,000, but the actual defaults in https://github.com/stellar/stellar-rpc/blob/1a9a97b3f533f91c509661094e71b269d33b735a/cmd/stellar-rpc/internal/config/options.go are:getEvents: max 10,000, default 100 (correct in docs)getLedgers: max 200, default 50getTransactions: max 200, default 50Confirmed empirically against both testnet (
soroban-testnet.stellar.org) and mainnet (soroban-rpc.mainnet.stellar.gateway.fm) - requesting limit=201 returns "limit must not exceed 200".