-
Notifications
You must be signed in to change notification settings - Fork 25
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
Anchor upgrade #62
base: master
Are you sure you want to change the base?
Anchor upgrade #62
Conversation
This change doesn't introduce any new functionality. It only upgrades the project to the latest If you still think this should not be merged please let us know and we would fork it |
just worried there is definitely change in there that I wouldn't be able to sign off in short time, specifically in the test suite, if you want it merged you would need to rework those parts. i triggered a CI run, so all of the formal checks are run at least once and you get an idea for what needs to change apart from that. |
@@ -110,7 +110,8 @@ impl TestContext { | |||
let mut test = ProgramTest::new( | |||
"voter_stake_registry", | |||
addin_program_id, | |||
processor!(voter_stake_registry::entry), | |||
// processor!(voter_stake_registry::entry), | |||
None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would you not bind the entry point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// &authority.pubkey(), | ||
// &payer.pubkey(), | ||
// &authority.pubkey(), | ||
// ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come this is no longer needed? in general we prefer not to keep unused code in comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I missed this, the add_signatory() has changed in spl-gov, newer tests did not have it when creating a proposal.
I readded it with the new version of the instruction.
@@ -127,8 +127,10 @@ async fn test_grants() -> Result<(), TransportError> { | |||
.await; | |||
let deposit = &voter_data.deposits[1]; | |||
assert_eq!(deposit.is_used, true); | |||
assert_eq!(deposit.amount_deposited_native, 12000); | |||
assert_eq!(deposit.amount_initially_locked_native, 12000); | |||
let amount_deposited_native = deposit.amount_deposited_native; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep the diff minimal when possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i also would appreciate a comment if this code is 100% backwards compatible and how that was verified. the zero copy implementation did change substantially in v27 afaik |
please note that soteria has been deprecated sec3 has moved to a newer version called |
gm,
Hope this is what is needed.
main notes:
zero_copy(unsafe)
is used so that the Voter could have the same old behavior.close_voter()
andregistrar.max_vote_weight()
is_initialized()
which includes the old discriminator. and the method for deserializing the VoterWeightRecord has this check. this dictates that it would work. I'm not entirely sure tho.Regards,
miester