vote-interface: rename VoteState to VoteStateV3#221
Conversation
joncinque
left a comment
There was a problem hiding this comment.
Having done both in the past:
- StakeStateV2 https://github.com/solana-program/stake/blob/330d89c6246ab3fd35d02803386fa700be0455d6/interface/src/state.rs#L152
- v1 borsh module https://github.com/anza-xyz/solana-sdk/blob/master/borsh/src/v1.rs
I think both are fine approaches, but as you point out, the bigger issue is the re-export of VoteState in state/mod.rs.
It would be good to first do the rename + re-export change as you suggested, backport to the v2.x branch, and then remove VoteState in master for the next breaking release.
I don't see how VoteStateVersions fits into the rename here, but it doesn't seem too important for this PR. Is that correct?
I was alluding to the fact that everything we do to However, since the first change in Agave and likely most annoying breakage for everyone downstream is this rename, I agree with your points above. |
joncinque
left a comment
There was a problem hiding this comment.
Ah gotcha, yeah we can certainly remove VoteStateVersions in the next major release!
We should just deprecate it first, similar to what this PR is doing.
* vote-interface: rename `VoteState` to `VoteStateV3` * add deprecatio attr (cherry picked from commit 72ae3e2)
* vote-interface: rename `VoteState` to `VoteStateV3` * add deprecatio attr
In preparation for introducing a new vote state (v4), this PR renames
vote_state_v3::VoteStatetovote_state_v3::VoteStateV3.Normally, the module path could serve as the differentiator (ie.
vote_state_v3::VoteStateandvote_state_v3::VoteState), but that's brittle and we re-exportedVoteState.@joncinque I wanted to get your opinion on how best to handle this breaking change, as well as subsequent breaking changes to
VoteStateVersions. We could introduce this change here as a minor release, where we mark the previous re-export as deprecated:However, since we plan to nuke
VoteStateVersions, I wonder if the whole thing is ok to do in a major.See #206