pub enum VoteInstruction {
Show 20 variants
InitializeAccount(VoteInit),
Authorize(Address, VoteAuthorize),
Vote(Vote),
Withdraw(u64),
UpdateValidatorIdentity,
UpdateCommission(u8),
VoteSwitch(Vote, Hash),
AuthorizeChecked(VoteAuthorize),
UpdateVoteState(VoteStateUpdate),
UpdateVoteStateSwitch(VoteStateUpdate, Hash),
AuthorizeWithSeed(VoteAuthorizeWithSeedArgs),
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs),
CompactUpdateVoteState(VoteStateUpdate),
CompactUpdateVoteStateSwitch(VoteStateUpdate, Hash),
TowerSync(TowerSync),
TowerSyncSwitch(TowerSync, Hash),
InitializeAccountV2(VoteInitV2),
UpdateCommissionCollector(CommissionKind),
UpdateCommissionBps {
commission_bps: u16,
kind: CommissionKind,
},
DepositDelegatorRewards {
deposit: u64,
},
}Variants§
InitializeAccount(VoteInit)
Initialize a vote account
§Account references
[WRITE]Uninitialized vote account[]Rent sysvar[]Clock sysvar[SIGNER]New validator identity (node_pubkey)
Authorize(Address, VoteAuthorize)
Authorize a key to send votes or issue a withdrawal
§Account references
[WRITE]Vote account to be updated with the Pubkey for authorization[]Clock sysvar[SIGNER]Vote or withdraw authority
When SIMD-0387 is enabled, the VoteAuthorize::Voter variant is
disallowed for any vote accounts whose BLS pubkey is set to Some.
Vote(Vote)
A Vote instruction with recent votes
§Account references
[WRITE]Vote account to vote with[]Slot hashes sysvar[]Clock sysvar[SIGNER]Vote authority
Withdraw(u64)
Withdraw some amount of funds
§Account references
[WRITE]Vote account to withdraw from[WRITE]Recipient account[SIGNER]Withdraw authority
UpdateValidatorIdentity
Update the vote account’s validator identity (node_pubkey)
§Account references
[WRITE]Vote account to be updated with the given authority public key[SIGNER]New validator identity (node_pubkey)[SIGNER]Withdraw authority
UpdateCommission(u8)
Update the commission for the vote account
§Account references
[WRITE]Vote account to be updated[SIGNER]Withdraw authority
VoteSwitch(Vote, Hash)
A Vote instruction with recent votes
§Account references
[WRITE]Vote account to vote with[]Slot hashes sysvar[]Clock sysvar[SIGNER]Vote authority
AuthorizeChecked(VoteAuthorize)
Authorize a key to send votes or issue a withdrawal
This instruction behaves like Authorize with the additional requirement that the new vote
or withdraw authority must also be a signer.
§Account references
[WRITE]Vote account to be updated with the Pubkey for authorization[]Clock sysvar[SIGNER]Vote or withdraw authority[SIGNER]New vote or withdraw authority
When SIMD-0387 is enabled, the VoteAuthorize::Voter variant is
disallowed for any vote accounts whose BLS pubkey is set to Some.
UpdateVoteState(VoteStateUpdate)
Update the onchain vote state for the signer.
§Account references
[Write]Vote account to vote with[SIGNER]Vote authority
UpdateVoteStateSwitch(VoteStateUpdate, Hash)
Update the onchain vote state for the signer along with a switching proof.
§Account references
[Write]Vote account to vote with[SIGNER]Vote authority
AuthorizeWithSeed(VoteAuthorizeWithSeedArgs)
Given that the current Voter or Withdrawer authority is a derived key, this instruction allows someone who can sign for that derived key’s base key to authorize a new Voter or Withdrawer for a vote account.
§Account references
[Write]Vote account to be updated[]Clock sysvar[SIGNER]Base key of current Voter or Withdrawer authority’s derived key
When SIMD-0387 is enabled, the VoteAuthorize::Voter variant in
authorization_type is disallowed for any vote accounts whose BLS
pubkey is set to Some.
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs)
Given that the current Voter or Withdrawer authority is a derived key, this instruction allows someone who can sign for that derived key’s base key to authorize a new Voter or Withdrawer for a vote account.
This instruction behaves like AuthorizeWithSeed with the additional requirement
that the new vote or withdraw authority must also be a signer.
§Account references
[Write]Vote account to be updated[]Clock sysvar[SIGNER]Base key of current Voter or Withdrawer authority’s derived key[SIGNER]New vote or withdraw authority
When SIMD-0387 is enabled, the VoteAuthorize::Voter variant in
authorization_type is disallowed for any vote accounts whose BLS
pubkey is set to Some.
CompactUpdateVoteState(VoteStateUpdate)
Update the onchain vote state for the signer.
§Account references
[Write]Vote account to vote with[SIGNER]Vote authority
CompactUpdateVoteStateSwitch(VoteStateUpdate, Hash)
Update the onchain vote state for the signer along with a switching proof.
§Account references
[Write]Vote account to vote with[SIGNER]Vote authority
TowerSync(TowerSync)
Sync the onchain vote state with local tower
§Account references
[Write]Vote account to vote with[SIGNER]Vote authority
TowerSyncSwitch(TowerSync, Hash)
Sync the onchain vote state with local tower along with a switching proof
§Account references
[Write]Vote account to vote with[SIGNER]Vote authority
InitializeAccountV2(VoteInitV2)
Initialize a vote account with all vote state v4 fields, including BLS public key and collector accounts.
The vote program performs BLS proof-of-possession verification on the
submitted BLS public key (per SIMD-0387). For each collector account
(indices 2 and 3), the program performs the same validation as
UpdateCommissionCollector (per SIMD-0232): if the collector is not
the vote account itself, it must be system-program owned, rent-exempt,
and writable (not a reserved account).
§Account references
[WRITE]Uninitialized vote account[SIGNER]New validator identity (node_pubkey)[WRITE]Inflation rewards collector[WRITE]Block revenue collector
UpdateCommissionCollector(CommissionKind)
Update the commission collector for the vote account
§Account references
[WRITE]Vote account to be updated with the new collector public key[WRITE]New collector account. Must be set to the vote account or a system program owned account. Must be writable to ensure the account is not reserved.[SIGNER]Vote account withdraw authority
UpdateCommissionBps
Update the commission rate in basis points for the specified commission rate kind in a vote account.
§Account references
[WRITE]Vote account to be updated with the new commission[SIGNER]Vote account withdraw authority
DepositDelegatorRewards
Deposit lamports for distribution to stake delegators
§Account references
[WRITE]Vote account to be updated with the deposit[SIGNER, WRITE]Source account for deposit funds
Implementations§
Source§impl VoteInstruction
impl VoteInstruction
pub fn is_simple_vote(&self) -> bool
pub fn is_single_vote_state_update(&self) -> bool
Sourcepub fn last_voted_slot(&self) -> Option<u64>
pub fn last_voted_slot(&self) -> Option<u64>
Only to be used on vote instructions (guard with is_simple_vote), panics otherwise
Trait Implementations§
Source§impl Clone for VoteInstruction
impl Clone for VoteInstruction
Source§fn clone(&self) -> VoteInstruction
fn clone(&self) -> VoteInstruction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VoteInstruction
impl Debug for VoteInstruction
Source§impl<'de> Deserialize<'de> for VoteInstruction
impl<'de> Deserialize<'de> for VoteInstruction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoteInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoteInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for VoteInstruction
Source§impl PartialEq for VoteInstruction
impl PartialEq for VoteInstruction
Source§impl Serialize for VoteInstruction
impl Serialize for VoteInstruction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl StableAbi for VoteInstruction
impl StableAbi for VoteInstruction
impl StructuralPartialEq for VoteInstruction
Auto Trait Implementations§
impl Freeze for VoteInstruction
impl RefUnwindSafe for VoteInstruction
impl Send for VoteInstruction
impl Sync for VoteInstruction
impl Unpin for VoteInstruction
impl UnsafeUnpin for VoteInstruction
impl UnwindSafe for VoteInstruction
Blanket Implementations§
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample,
impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample,
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.