Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: skip deallocations when burning in grace period #1203

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

shark0der
Copy link
Contributor

@shark0der shark0der commented Aug 6, 2024

Context

When a burn is triggered while the cover is in grace period the deallocation is redundant since it will be done when the bucket expiration is processed.

Changes proposed in this pull request

The newly added code skips deallocations if the cover is expired.

Test plan

Added a test to ensure the allocations stay the same.

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

  • 🍰 = Nice to have but not essential.
  • 💡 = Suggestion or a comment based on personal opinion
  • 🔨 = I believe this should be changed.
  • 🤔 = I don’t understand something, do you mind giving me more context?
  • 🚀 = Feedback

@shark0der shark0der force-pushed the fix/burns-in-grace-period branch from f921bae to 995c714 Compare August 6, 2024 15:02
@shark0der shark0der changed the base branch from release-candidate to feat/move-staking-pool-metadata August 6, 2024 15:05
@shark0der shark0der linked an issue Aug 7, 2024 that may be closed by this pull request
@shark0der shark0der force-pushed the fix/burns-in-grace-period branch from 995c714 to f16987c Compare August 7, 2024 13:05
@shark0der shark0der changed the base branch from feat/move-staking-pool-metadata to feat/batch-nxm-withdrawal August 9, 2024 13:20
@shark0der shark0der force-pushed the fix/burns-in-grace-period branch from 8e74df2 to eef8c86 Compare August 9, 2024 13:34
@shark0der shark0der marked this pull request as ready for review August 9, 2024 13:34
@shark0der shark0der changed the title Fix: avoid burns in grace period Fix: avoid burn deallocations in grace period Aug 9, 2024
@shark0der shark0der changed the title Fix: avoid burn deallocations in grace period Fix: skip deallocations when burning in grace period Aug 9, 2024
@rackstar rackstar marked this pull request as draft August 12, 2024 07:58
@rackstar
Copy link
Contributor

marking as draft so it won't be accidentally merged while on audit

@rackstar rackstar force-pushed the feat/batch-nxm-withdrawal branch from c37d784 to fea86de Compare August 16, 2024 12:38
@rackstar rackstar force-pushed the fix/burns-in-grace-period branch from eef8c86 to 7087907 Compare August 16, 2024 12:38
Base automatically changed from feat/batch-nxm-withdrawal to fix/reward-shares August 16, 2024 12:39
@rackstar rackstar merged commit 7087907 into fix/reward-shares Aug 16, 2024
4 checks passed
@rackstar rackstar deleted the fix/burns-in-grace-period branch August 16, 2024 12:39
@rackstar rackstar mentioned this pull request Aug 16, 2024
9 tasks
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.

Burns during grace period should not deallocate
2 participants