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

[Application] Unstaking POKT to Leave the Network #98

Closed
7 tasks
Tracked by #26
RossiNYC opened this issue Oct 24, 2023 · 2 comments
Closed
7 tasks
Tracked by #26

[Application] Unstaking POKT to Leave the Network #98

RossiNYC opened this issue Oct 24, 2023 · 2 comments
Assignees
Labels
application Changes related to the Application actor e2e_story E2E User Story

Comments

@RossiNYC
Copy link

RossiNYC commented Oct 24, 2023

Objective

  1. Define Unstaking & Unbonding (return of any existing POKT stake) rules for Shannon
  2. Provide User Story & BDD-Gherkin to facilitate test automation

Origin Document

Goals

  1. Developer understands Unstaking and Unbonding rules enough to test the features
  2. Inform E2E automated testing

User Story & BDD

As an Application, I can unstake any positive remaining POKT balance which will be returned (i.e. unlocked) to me after the unbonding period so I can leave the pocket network.

Feature: Unstaking POKT Tokens from the Pocket Network

  Scenario: Application Unstakes POKT Tokens and Leaves the Network
    Given the Application has the pocketd binary installed
    And the Applications has a balance greater than "0" uPOKT
    And the Application has waited "n" seconds during the unbonding period
    And the Application is not part of an active session
    When the Application initiates the unstaking process
    Then the remaining POKT balance is returned (unlocked) to the Application
    And the Application successfully leaves the Pocket Network

Constraints

  • Unstaking/Unbonding is not possible to initiate while the application is part of an active session
  • Unstaking/Unbonding is not possible to initiate until the last active session payment has been made (part or all of the current application stake is burned post-session)

Deliverables / Acceptance Criteria

  • 1. A test that proves an application can successfully unstake from the network
  • 2. A test that proves an application cannot initiate unstaking during an active session or before the last active session has been settled (POKT spent during the last active session has been burned)
  • 3. A test that proves an application positive POKT balance is returned in full if all qualifying conditions are met and after an unbonding period (as a configurable param)

Non-goals / Non-deliverables

  1. Exhaustively covering all edge cases
  2. Establishing param default values

General deliverables

  • Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
  • Testing: Add new tests (unit and/or E2E) to the test suite.
  • Makefile: Add new targets to the Makefile to make the new functionality easier to use.
  • Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @RossiNYC
Co-Owners: @Olshansk

@RossiNYC RossiNYC self-assigned this Oct 24, 2023
@RossiNYC RossiNYC added the application Changes related to the Application actor label Oct 24, 2023
@RossiNYC RossiNYC added this to Shannon Oct 24, 2023
@RossiNYC RossiNYC moved this to Draft in Shannon Oct 24, 2023
@RossiNYC RossiNYC added this to the Shannon TestNet milestone Oct 24, 2023
@Olshansk Olshansk added the e2e_story E2E User Story label Oct 31, 2023
@Olshansk
Copy link
Member

@RossiNYC Reviewed this issue and overall LGTM regarding the contest, deliverables, goals, etc! left a few edits w.r.t to the formatting so PTAL by reviewing the deltas (see screenshot below) and apply it elsewhere. Let's also start using the e2e_story label. Otherwise, 👌

Screenshot 2023-10-30 at 5 22 56 PM

@RossiNYC RossiNYC moved this from Draft to 📋 Backlog in Shannon Oct 31, 2023
@RossiNYC
Copy link
Author

RossiNYC commented Nov 2, 2023

@Olshansk - yeah, I'll clean everything up in the next 24-48 hours, once I figured out you could /templates I started using that, but already had a few of these framed out

@RossiNYC RossiNYC moved this from 📋 Backlog to 🔖 Ready in Shannon Nov 17, 2023
@Olshansk Olshansk closed this as completed Mar 5, 2024
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Shannon Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application Changes related to the Application actor e2e_story E2E User Story
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants