Struct switchboard_solana::attestation_program::accounts::attestation_queue::AttestationQueueAccountData
source · #[repr(packed(1))]pub struct AttestationQueueAccountData {Show 17 fields
pub authority: Pubkey,
pub mr_enclaves: [[u8; 32]; 32],
pub mr_enclaves_len: u32,
pub data: [Pubkey; 128],
pub data_len: u32,
pub allow_authority_override_after: i64,
pub require_authority_heartbeat_permission: bool,
pub require_usage_permissions: bool,
pub max_quote_verification_age: i64,
pub reward: u32,
pub last_heartbeat: i64,
pub node_timeout: i64,
pub curr_idx: u32,
pub gc_idx: u32,
pub verifier_min_stake: u64,
pub function_min_stake: u64,
pub _ebuf: [u8; 1008],
}
Fields§
The address of the authority which is permitted to add/remove allowed enclave measurements.
mr_enclaves: [[u8; 32]; 32]
Allowed enclave measurements.
mr_enclaves_len: u32
The number of allowed enclave measurements.
data: [Pubkey; 128]
The addresses of the quote verifiers who have a valid verification status and have heartbeated on-chain recently.
data_len: u32
The length of valid quote verifiers for the given attestation queue.
Allow authority to force add a node after X seconds with no heartbeat.
Even if a heartbeating machine quote verifies with proper measurement, require authority signoff.
require_usage_permissions: bool
Require FunctionAccounts to have PermitQueueUsage before they are executed.
max_quote_verification_age: i64
The maximum allowable time until a EnclaveAccount needs to be re-verified on-chain.
reward: u32
The reward paid to quote verifiers for attesting on-chain.
last_heartbeat: i64
The unix timestamp when the last quote verifier heartbeated on-chain.
node_timeout: i64
§curr_idx: u32
Incrementer used to track the current quote verifier permitted to run any available functions.
gc_idx: u32
Incrementer used to garbage collect and remove stale quote verifiers.
verifier_min_stake: u64
The minimum number of lamports a quote verifier needs to lock-up in order to heartbeat and verify other quotes.
function_min_stake: u64
The minimum number of lamports a function needs to lock-up in order to use a queues resources.
_ebuf: [u8; 1008]
Reserved.
Implementations§
source§impl AttestationQueueAccountData
impl AttestationQueueAccountData
pub fn size() -> usize
sourcepub fn new<'info>(
attestation_queue_account_info: &'info AccountInfo<'info>
) -> Result<Ref<'info, AttestationQueueAccountData>>
pub fn new<'info>( attestation_queue_account_info: &'info AccountInfo<'info> ) -> Result<Ref<'info, AttestationQueueAccountData>>
Returns the deserialized Switchboard AttestationQueue account
§Arguments
attestation_queue_account_info
- A Solana AccountInfo referencing an existing Switchboard AttestationQueue
§Examples
use switchboard_solana::AttestationQueueAccountData;
let attestation_queue = AttestationQueueAccountData::new(attestation_queue_account_info)?;
sourcepub fn new_from_bytes(data: &[u8]) -> Result<&AttestationQueueAccountData>
pub fn new_from_bytes(data: &[u8]) -> Result<&AttestationQueueAccountData>
pub fn has_mr_enclave(&self, mr_enclave: &[u8]) -> bool
pub fn permitted_enclaves(&self) -> Vec<[u8; 32]>
pub fn garbage_collection_node(&self) -> Option<Pubkey>
pub fn idx_of_verifier(&self, verifier: &Pubkey) -> Option<usize>
pub fn verifier_keys(&self) -> Vec<Pubkey>
pub fn fetch(client: &RpcClient, pubkey: Pubkey) -> Result<Self, SbError>
pub async fn fetch_async( client: &RpcClient, pubkey: Pubkey ) -> Result<Self, SbError>
pub fn fetch_sync<T: SyncClient>( client: &T, pubkey: Pubkey ) -> Result<Self, SbError>
pub async fn fetch_verifiers( &self, client: &RpcClient ) -> Result<Vec<VerifierAccountData>, SbError>
Trait Implementations§
source§impl AccountDeserialize for AttestationQueueAccountData
impl AccountDeserialize for AttestationQueueAccountData
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Mint
account into a token
Account
.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
source§impl Clone for AttestationQueueAccountData
impl Clone for AttestationQueueAccountData
source§fn clone(&self) -> AttestationQueueAccountData
fn clone(&self) -> AttestationQueueAccountData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Discriminator for AttestationQueueAccountData
impl Discriminator for AttestationQueueAccountData
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
impl Copy for AttestationQueueAccountData
impl Pod for AttestationQueueAccountData
impl ZeroCopy for AttestationQueueAccountData
Auto Trait Implementations§
impl RefUnwindSafe for AttestationQueueAccountData
impl Send for AttestationQueueAccountData
impl Sync for AttestationQueueAccountData
impl Unpin for AttestationQueueAccountData
impl UnwindSafe for AttestationQueueAccountData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.