Skip to content

Add accelerated vesting (#1)#60

Open
tomjohn1028 wants to merge 1 commit into
blockworks-foundation:masterfrom
mithraiclabs:master
Open

Add accelerated vesting (#1)#60
tomjohn1028 wants to merge 1 commit into
blockworks-foundation:masterfrom
mithraiclabs:master

Conversation

@tomjohn1028

Copy link
Copy Markdown
  • 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

@ckamm ckamm left a comment

Copy link
Copy Markdown

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

# 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
Copy Markdown

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

ckamm commented Dec 21, 2023

Copy link
Copy Markdown

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