diff --git a/core/src/consensus.rs b/core/src/consensus.rs index cb4beca4ae80ed..e1a6bfd179de91 100644 --- a/core/src/consensus.rs +++ b/core/src/consensus.rs @@ -239,7 +239,7 @@ pub(crate) enum BlockhashStatus { #[cfg_attr( feature = "frozen-abi", derive(AbiExample), - frozen_abi(digest = "9ziHa1vA7WG5RCvXiE3g1f2qjSTNa47FB7e2czo7en7a") + frozen_abi(digest = "Lbx8JWmgAWq4SSo1XyrXprAgPtp9ncRNJJPCKH1pZ3W") )] #[derive(Clone, Serialize, Deserialize, Debug, PartialEq)] pub struct Tower { diff --git a/core/src/consensus/tower1_14_11.rs b/core/src/consensus/tower1_14_11.rs index 2c90bd1fd62926..a0c20fb8880694 100644 --- a/core/src/consensus/tower1_14_11.rs +++ b/core/src/consensus/tower1_14_11.rs @@ -9,7 +9,7 @@ use { #[cfg_attr( feature = "frozen-abi", derive(AbiExample), - frozen_abi(digest = "6VhLW7DSHNzrcswtxbNo4cb47oGrKLcKuDmCWVpUMLLM") + frozen_abi(digest = "FYKsZaj6MH3hqA4ksJWEG8LHQZF3Ty5PQgfbexnpAPtB") )] #[derive(Clone, Serialize, Deserialize, Debug, PartialEq)] pub struct Tower1_14_11 { diff --git a/programs/vote/src/vote_state/mod.rs b/programs/vote/src/vote_state/mod.rs index 24b480c6198d84..ff46ab9de7c60d 100644 --- a/programs/vote/src/vote_state/mod.rs +++ b/programs/vote/src/vote_state/mod.rs @@ -30,7 +30,7 @@ use { #[cfg_attr( feature = "frozen-abi", derive(AbiExample, AbiEnumVisitor), - frozen_abi(digest = "3dbyMxwfCN43orGKa5YiyY1EqN2K97pTicNhKYTZSUQH") + frozen_abi(digest = "5zYYafKxFiaQj4s1PUhK7bW2rKAXBBcnpHVxR8kfpZhQ") )] #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub enum VoteTransaction { diff --git a/sdk/program/src/vote/state/mod.rs b/sdk/program/src/vote/state/mod.rs index 73a6221eadf354..e744c0e4af6a83 100644 --- a/sdk/program/src/vote/state/mod.rs +++ b/sdk/program/src/vote/state/mod.rs @@ -221,16 +221,21 @@ impl VoteStateUpdate { #[cfg_attr( feature = "frozen-abi", - frozen_abi(digest = "5PFw9pyF1UG1DXVsw7gpjHegNyRycAAxWf2GA9wUXPs5"), + frozen_abi(digest = "DqMoZ6hSsG1wguKx49kjZmU8sEu7jjzDWqg14qxoeinM"), derive(AbiExample) )] #[derive(Serialize, Default, Deserialize, Debug, PartialEq, Eq, Clone)] pub struct TowerSync { - /// The proposed tower + /// the proposed tower pub lockouts: VecDeque, - /// The proposed root + /// the proposed root pub root: Option, - /// signature of the bank's state at the last slot + /// signature of the VoteState's at the latest slot in `lockouts` + pub yolo_hash: Hash, + /// the latest fully replayed slot, equal to the last + /// slot in `lockouts` until asynchronous execution. + pub replay_tip: Slot, + /// signature of the bank's state at `replay_tip` pub hash: Hash, /// processing timestamp of last slot pub timestamp: Option, @@ -251,6 +256,8 @@ impl From> for TowerSync { Self { lockouts, root: None, + yolo_hash: Hash::default(), + replay_tip: 0, hash: Hash::default(), timestamp: None, block_id: Hash::default(), @@ -265,9 +272,13 @@ impl TowerSync { hash: Hash, block_id: Hash, ) -> Self { + let replay_tip = lockouts.back().map(|l| l.slot).unwrap_or(0); + let yolo_hash = hash; Self { lockouts, root, + yolo_hash, + replay_tip, hash, timestamp: None, block_id, @@ -298,8 +309,11 @@ impl TowerSync { .map(|(cc, s)| Lockout::new_with_confirmation_count(s, cc.saturating_add(1) as u32)) .rev() .collect(); + let replay_tip = lockouts.back().map(|l| l.slot).unwrap_or(0); Self { lockouts, + replay_tip, + yolo_hash: hash, hash, root, timestamp: None, @@ -1090,6 +1104,8 @@ pub mod serde_tower_sync { root: Slot, #[serde(with = "short_vec")] lockout_offsets: Vec, + replay_tip: Slot, + yolo_hash: Hash, hash: Hash, timestamp: Option, block_id: Hash, @@ -1119,6 +1135,8 @@ pub mod serde_tower_sync { let compact_tower_sync = CompactTowerSync { root: tower_sync.root.unwrap_or(Slot::MAX), lockout_offsets: lockout_offsets.collect::>()?, + replay_tip: tower_sync.replay_tip, + yolo_hash: tower_sync.yolo_hash, hash: tower_sync.hash, timestamp: tower_sync.timestamp, block_id: tower_sync.block_id, @@ -1133,6 +1151,8 @@ pub mod serde_tower_sync { let CompactTowerSync { root, lockout_offsets, + replay_tip, + yolo_hash, hash, timestamp, block_id, @@ -1157,6 +1177,8 @@ pub mod serde_tower_sync { Ok(TowerSync { root, lockouts: lockouts.collect::>()?, + replay_tip, + yolo_hash, hash, timestamp, block_id,