Skip to content

Conversation

@sjoshisupra
Copy link

Description

  • added a new admin controlled method update_unlocking_schedule_unchecked to update the unlocking schedule but omitting some sanity checks and allow update of last_unlock_period also directly.
  • Admin is fully responsible to gauge the consequences of parameter values sent
  • cumulative_unlock_fraction won't be updated in this method

How Has This Been Tested?

  • unit test has been added with following scenario
  • create a pool with 3 month cliff, monthly 5% unlock, after 12 months (9 monthly unlocks), use admin_increase_last_unlock_period to delay unlocks for 2 months, then check that unlock doesn't happen for 2 months
  • now use update_unlocking_schedule_unchecked to change to quarterly unlocks with 15% unlocking and change last_unlock_period to 3 to account that 11 monthly unlock periods are passed but it means 3 quarters
  • assert that after 1 more month additional 15% can be unlocked
  • assert that after 1 more month no additional unlock can happen since schedule changed to quarterly unlock
  • assert that after 2 more months again additional 15% can be unlocked add other sanity asserts as well
  • final failure scenario where non admin tries to use the API to change the schedule

Key Areas to Review

-review added method and the unit test

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

@sjoshisupra sjoshisupra self-assigned this Dec 30, 2025
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