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

Add accelerated vesting (#1) #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomjohn1028
Copy link

  • Upgrade solana dependencies to 1.14.22 and SPL governance to 3.1.1
  • Fix some outdated / broken VSR tests
  • Add UnlockDepoist instruction and basic tests
    UnlockDeposit allows the grant_authority or realm_authority to completely unlock a single deposit. All tokens in the DepositEntry will be available for immediate withdrawal.

This is identical to mithraiclabs#1

* update dependencies

* revert some debugging stuff

* WIP integration tests erroring with BlockhashNotFound

* WIP fix test suite

* WIP setting up accelerate investing tests

* WIP test correctly fails for bad grant authority

* basic accelerated vesting and tests

* improve comment

* delete debugging log

* remove added logs

* remove old import

* fmt

* update rust toolchain to 1.65

* rever then_some

* rename accelerate vesting => unlock deposit

* add suggested checks

* refactor to use LockupData struct; run cargo fmt

* fix log test by not using preflight
@SebastianBor SebastianBor requested a review from ckamm December 20, 2023 09:21
Copy link

@ckamm ckamm left a comment

Choose a reason for hiding this comment

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

When I run the tests, I get a failure:

---- test_log_voter_info stdout ----
Created context
thread 'test_log_voter_info' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `2`', programs/voter-stake-registry/tests/test_log_voter_info.rs:113:5

Will need to check that out

@@ -36,16 +36,16 @@ bytemuck = "1.9.1"
# Recently the discriminator for new VoterWeightRecord accounts has changed, and upgrading
# this dependency here without also upgrading the spl-governance program instance beforehand
# would lead to VWR accounts that are unusable until the spl-governance program is upgraded.
spl-governance = { version = "=2.2.1", features = ["no-entrypoint"] }
spl-governance-addin-api = "=0.1.1"
spl-governance = { version = "=3.1.1", features = ["no-entrypoint"] }
Copy link

Choose a reason for hiding this comment

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

this needs to be checked out in relation to the warning above - likely all gov deployments have updated, but need to double check

@ckamm
Copy link

ckamm commented Dec 21, 2023

Have fixed the test failure in local merge

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