diff --git a/programs/validator-history/src/state.rs b/programs/validator-history/src/state.rs index 8c05e218..4b8c1322 100644 --- a/programs/validator-history/src/state.rs +++ b/programs/validator-history/src/state.rs @@ -37,7 +37,7 @@ impl Config { static_assertions::const_assert_eq!(size_of::(), 128); -#[derive(TypeLayout)] +#[derive(AnchorSerialize, TypeLayout)] #[zero_copy] pub struct ValidatorHistoryEntry { pub activated_stake_lamports: u64, @@ -103,6 +103,7 @@ pub struct ClientVersion { const MAX_ITEMS: usize = 512; +#[derive(AnchorSerialize)] #[zero_copy] pub struct CircBuf { pub idx: u64, @@ -269,6 +270,7 @@ pub enum ValidatorHistoryVersion { static_assertions::const_assert_eq!(size_of::(), 65848); +#[derive(AnchorSerialize)] #[account(zero_copy)] pub struct ValidatorHistory { // Cannot be enum due to Pod and Zeroable trait limitations @@ -656,6 +658,7 @@ impl ValidatorHistory { } } +#[derive(AnchorSerialize)] #[account(zero_copy)] pub struct ClusterHistory { pub struct_version: u64, @@ -666,6 +669,7 @@ pub struct ClusterHistory { pub history: CircBufCluster, } +#[derive(AnchorSerialize)] #[zero_copy] pub struct ClusterHistoryEntry { pub total_blocks: u32, @@ -687,6 +691,7 @@ impl Default for ClusterHistoryEntry { } } +#[derive(AnchorSerialize)] #[zero_copy] pub struct CircBufCluster { pub idx: u64,