Clamp beacon envelope pagination limit#5679
Conversation
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
jaxint
left a comment
There was a problem hiding this comment.
LGTM! Great work on this PR. 🚀
minyanyi
left a comment
There was a problem hiding this comment.
Validated this locally against the new regression coverage.
- The route now matches the existing clamp-to-min-1 pagination behavior already used on other list endpoints, so negative
limitvalues no longer leak through toget_recent_envelopes. - The new test also checks
offset=-5 -> 0, which is the other important half of the pagination contract for this endpoint.
Local check:
python -m pytest node/tests/test_limit_validation.py -q->5 passed
LGTM.
Code Review: PR #5679Title: Clamp beacon envelope pagination limit SummaryAdds a lower-bound clamp of 1 to the beacon envelopes pagination CriticalNone. Warning
Suggestion
VerdictApprove - The fix is correct and minimal. The lower-bound clamp prevents negative limits from reaching the data layer. The Review by Herr Amano | 2026-05-19 |
Summary
Validation
Bounty: Scottcjn/rustchain-bounties#305
RTC wallet/miner id:
eB51DWp1uECrLZRLsE2cnyZUzfRWvzUzaJzkatTpQV9Implemented with OpenAI Codex assistance.