pub struct Config {
pub pubkey_g2: [u8; 128],
pub genesis_time: u64,
pub period: u64,
pub chain_hash: [u8; 32],
pub authority: Pubkey,
pub bump: u8,
}Expand description
drand evmnet configuration account.
Single PDA at ["config"]. Stores the evmnet chain parameters
needed to verify BLS signatures on-chain. Schema is part of the
v1 CPI interface and frozen per ADR 0028 — exact field order and
sizes must not change across program upgrades.
Fields§
§pubkey_g2: [u8; 128]drand evmnet G2 public key (uncompressed, Kyber byte ordering:
x_c1 || x_c0 || y_c1 || y_c0, each 32 BE bytes).
genesis_time: u64Genesis timestamp of the evmnet chain (Unix seconds).
period: u64Round period in seconds.
chain_hash: [u8; 32]evmnet chain hash (identifies which drand chain this config points at).
Authority that can call update_config. has_one in the
UpdateConfig Accounts struct enforces the match.
bump: u8Canonical PDA bump stored at init time. verify and
update_config use bump = config.bump to skip re-derivation
(~10K CU saving).
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for Config
impl AccountDeserialize for Config
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Config, Error>
fn try_deserialize(buf: &mut &[u8]) -> Result<Config, Error>
Mint account into a token
Account.Source§impl AccountSerialize for Config
impl AccountSerialize for Config
Source§impl BorshDeserialize for Configwhere
[u8; 128]: BorshDeserialize,
u64: BorshDeserialize,
[u8; 32]: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
impl BorshDeserialize for Configwhere
[u8; 128]: BorshDeserialize,
u64: BorshDeserialize,
[u8; 32]: BorshDeserialize,
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
fn deserialize_reader<R>(reader: &mut R) -> Result<Config, Error>where
R: Read,
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Configwhere
[u8; 128]: BorshSerialize,
u64: BorshSerialize,
[u8; 32]: BorshSerialize,
Pubkey: BorshSerialize,
u8: BorshSerialize,
impl BorshSerialize for Configwhere
[u8; 128]: BorshSerialize,
u64: BorshSerialize,
[u8; 32]: BorshSerialize,
Pubkey: BorshSerialize,
u8: BorshSerialize,
Source§impl Discriminator for Config
impl Discriminator for Config
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
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,
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 more