Skip to content

Conversation

@2501babe
Copy link
Member

@2501babe 2501babe commented Nov 5, 2025

  • updated everything except bincode and clap (thank you cargo upgrade)
  • replaced spl-token, spl-associated-token-account, and spl-associated-token-account-client in the program with interface crates
  • bump cli tools and rust toolchain versions

the diff is large but this has mostly trivial code changes, namely: swapping to token/ata interfaces, changing VoteState to VoteStateV4, changing some import paths, and inlining some format args because clippy wants this now. the only notable change is the addition of VoteStateV4 support to the program

i confess to carefully choosing a nightly version that avoids the 1this call to clone can be replaced with std::slice::from_ref` clippy warning, as i didnt want to further overladen the diff

this is (no longer) blocked by:

closes #397

@2501babe 2501babe self-assigned this Nov 5, 2025
@2501babe 2501babe force-pushed the sdk-3.0 branch 2 times, most recently from f17e7b9 to 55acb74 Compare November 6, 2025 09:48
Comment on lines 10 to +13
[features]
no-entrypoint = []
custom-heap = []
custom-panic = []
Copy link
Member Author

@2501babe 2501babe Nov 6, 2025

Choose a reason for hiding this comment

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

someone on stack exchange claims you dont need this to silence warnings on the latest solana-program-entrypoint but we are on latest so i dont think thats true

@2501babe
Copy link
Member Author

since i opened this different sdk packages depend on different versions of solana-hash which depend on different versions of serde now... its not a priority so ill wait a week or two assuming this is transitory

Comment on lines 252 to 257
match u32::from_le_bytes(state_variant) {
1 | 2 => Ok(()),
1 | 2 | 3 => Ok(()),
0 => Err(SinglePoolError::LegacyVoteAccount.into()),
_ => Err(SinglePoolError::UnparseableVoteAccount.into()),
}
Copy link
Member Author

Choose a reason for hiding this comment

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

this gives us VoteStateV4 support, it was necessary to do in this pr to get tests to pass. in the future it would be cleaner to switch to the VoteState parser though, which did not exist when this program was originally written. i didnt want to make any nontrivial functional changes in this one

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.

upgrade to sdk 3.0

1 participant