Skip to content

fix: use delta-based budget tracking for compression top-ups#2253

Closed
ananas-block wants to merge 1 commit intomainfrom
fix/audit-issue-13-double-rent-deficit
Closed

fix: use delta-based budget tracking for compression top-ups#2253
ananas-block wants to merge 1 commit intomainfrom
fix/audit-issue-13-double-rent-deficit

Conversation

@ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Feb 6, 2026

Summary

  • Switch from absolute to delta-based budget tracking in compressible top-up calculations to prevent double-counting the rent deficit when both rent exemption increase and write top-up are needed.

Audit issue #13 (MEDIUM): When multiple compressions target the same
account, the budget was potentially double-charged. Track the previous
transfer_map value and only deduct the delta from the lamports budget.
Remove the early return so the top-up is recalculated correctly when
the same account is used in multiple compression operations.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Warning

Rate limit exceeded

@ananas-block has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/audit-issue-13-double-rent-deficit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ananas-block ananas-block deleted the fix/audit-issue-13-double-rent-deficit branch February 9, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant