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

Undelegation queue #2757

Open
MatusKysel opened this issue May 17, 2024 · 0 comments · Fixed by #2788
Open

Undelegation queue #2757

MatusKysel opened this issue May 17, 2024 · 0 comments · Fixed by #2788
Assignees
Labels
task A small task that is, most likely, part of an Epic

Comments

@MatusKysel
Copy link
Collaborator

Task Description

Background

Our current system supports only a single undelegation per delegator per validator. This limitation poses challenges for liquid staking, where more flexible and sophisticated solutions are required.

Objective

We aim to enhance the undelegation functionality by implementing a queue system. This new approach will allow users to initiate multiple undelegations over time, ensuring they are managed in a strict chronological order.

Requirements

  1. Implement Undelegation Queue:

    • Replace the current single undelegation object with a queue structure.
    • Ensure the queue maintains the order of undelegations based on the time they were triggered.
  2. Triggering Undelegations:

    • Users should be able to initiate multiple undelegations at different times.
    • Each undelegation should be added to the queue in the order it was initiated.
  3. Claiming and Canceling Undelegations:

    • Undelegations must be claimed or canceled in the order they appear in the queue (i.e., FIFO - First In, First Out).
    • Implement mechanisms to manage the claiming and canceling process, ensuring strict adherence to the queue order.

Acceptance Criteria

  • Users can successfully trigger multiple undelegations for the same validator.
  • The system maintains a queue for each delegator-validator pair.
  • Undelegations are processed (claimed or canceled) in the exact order they were triggered.
  • Comprehensive testing to ensure the queue operates correctly under various scenarios.

Notes

  • Consider the impact on existing functionality and ensure backward compatibility where possible.
  • Documentation and comments should be provided to explain the new queue mechanism and its integration with the current system.
@MatusKysel MatusKysel added the task A small task that is, most likely, part of an Epic label May 17, 2024
@JakubFornadel JakubFornadel self-assigned this May 28, 2024
@JakubFornadel JakubFornadel linked a pull request Aug 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task A small task that is, most likely, part of an Epic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants