diff --git a/proposals/0185-vote-account-v4.md b/proposals/0185-vote-account-v4.md index 5b8b711cc..c5bc69b94 100644 --- a/proposals/0185-vote-account-v4.md +++ b/proposals/0185-vote-account-v4.md @@ -4,9 +4,9 @@ title: Vote Account v4 authors: Justin Starry (Anza) category: Standard type: Core -status: Review +status: Accepted created: 2024-10-17 -feature: (fill in with feature tracking issues once accepted) +feature: Gx4XFcrVMt4HUvPzTpTSVkdDVgcDSjKhDN1RqRS6KDuZ --- ## Summary @@ -144,10 +144,12 @@ pub struct VoteStateV4 { All vote instructions MUST be updated to support deserializing v4 vote accounts. -Whenever a vote account is initialized OR modified by the vote program in a -transaction AND hasn't been updated to v4 yet, the account state MUST be saved -in the new format with the following default values for the new fields described -above: +All vote instructions besides `InitializeAccount` MUST be updated to deserialize +vote accounts in the following order: + +1. Deserialize versioned vote state +1. Check for initialization or return `InstructionError::UninitializedAccount` +2. Convert to v4 with the following default values for the new fields: ```rust VoteStateV4 { @@ -184,13 +186,21 @@ other vote state versions, it's never stored with uninitialized state. #### `UpdateCommission` -The existing `UpdateCommission` instruction will will continue to only update -the inflation rewards commission in integer percentage values. +The existing `UpdateCommission` instruction will continue to only update the +inflation rewards commission in integer percentage values. + +The new commission value MUST be multiplied by `100` before being checked for +commission or increases and before being stored in the new +`inflation_rewards_commission_bps` field. + +#### `UpdateValidatorIdentity` + +The existing `UpdateValidatorIdentity` instruction MUST also set the +`block_revenue_collector` field to the new node pubkey value in addition to the +`node_pubkey` field to keep the fields in sync until [SIMD-0232] adds the +ability to set the field explicitly. -When updating vote state v4 accounts, the new `inflation_rewards_commission_bps` -field should be used instead of the old generic `commission` field. -Additionally, the new commission value MUST be multiplied by `100` before being -checked for commission or increases and before being stored in account data. +[SIMD-0232]: https://github.com/solana-foundation/solana-improvement-documents/pull/232 #### `Authorize`, `AuthorizeChecked`, `AuthorizeWithSeed`, `AuthorizeCheckedWithSeed`