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: ensure stake removal processing #758

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

amimart
Copy link
Contributor

@amimart amimart commented Mar 4, 2025

Purpose of Changes and their Description

When processing stake removals in the x/emissions end blocker there's a limit to the number of stakes to process which when reached was causing an error, resulting with the stake removals until not to be processed.

The resolution consists of not returning such error anymore but emitting a log instead, allowing to process these removals.

Another fix is covered here: in the case stake removals were not process in the block they were expected to be completed because of this limit, they were not managed afterwards because the provided block when removing them was systematically the current block.

Some refactoring has been necessary to allow this module part to be testable by mocking the emissions keeper.

Link(s) to Ticket(s) or Issue(s) resolved by this PR

https://linear.app/alloralabs/issue/ENGN-3494/135-logic-error-in-the-removestakes-function-could-lead-to-a-denial-of

Are these changes tested and documented?

  • If tested, please describe how. If not, why tests are not needed.
  • If documented, please describe where. If not, describe why docs are not needed.
  • Added to Unreleased section of CHANGELOG.md?

@amimart amimart force-pushed the arnaud/engn-3494-135-logic-error-in-the-removestakes-function-could-lead-to-a branch from eb80312 to a1978ca Compare March 4, 2025 14:43
@amimart amimart marked this pull request as ready for review March 4, 2025 14:43
Copy link
Contributor

@xmariachi xmariachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

2 participants