Skip to content

Proto/AI: unstaked frozen deposits

Mehdi Bouaziz requested to merge mehdi@unstaked_frozen_deposits into master

Context

When stakers request an unstake, their part of the deposit will be removed from the baker's frozen deposits and will be moved to a temporary place, the unstaked frozen deposits, before they can be withdrawn to their owner about preserved_cycles + max_slashing_period cycles later minus the slashing that happened in between.

To avoid storing a balance for all cycles, balances for cycles that cannot be slashed are squashed together.

This MR adds the storage part, the token container and the squashing at cycle ends.

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading