Browse Source

remove solana-program from solana-vote (#4537)

* remove solana-program from solana-vote

* trigger ci

* trigger ci
Kevin Heavey 10 months ago
parent
commit
f6b9f76711

+ 1 - 1
Cargo.lock

@@ -10369,7 +10369,6 @@ dependencies = [
  "solana-instruction",
  "solana-instruction",
  "solana-keypair",
  "solana-keypair",
  "solana-packet",
  "solana-packet",
- "solana-program",
  "solana-pubkey",
  "solana-pubkey",
  "solana-sdk-ids",
  "solana-sdk-ids",
  "solana-sha256-hasher",
  "solana-sha256-hasher",
@@ -10377,6 +10376,7 @@ dependencies = [
  "solana-signer",
  "solana-signer",
  "solana-svm-transaction",
  "solana-svm-transaction",
  "solana-transaction",
  "solana-transaction",
+ "solana-vote-interface",
  "thiserror 2.0.11",
  "thiserror 2.0.11",
 ]
 ]
 
 

+ 1 - 1
programs/sbf/Cargo.lock

@@ -8560,12 +8560,12 @@ dependencies = [
  "solana-hash",
  "solana-hash",
  "solana-instruction",
  "solana-instruction",
  "solana-packet",
  "solana-packet",
- "solana-program",
  "solana-pubkey",
  "solana-pubkey",
  "solana-sdk-ids",
  "solana-sdk-ids",
  "solana-signature",
  "solana-signature",
  "solana-svm-transaction",
  "solana-svm-transaction",
  "solana-transaction",
  "solana-transaction",
+ "solana-vote-interface",
  "thiserror 2.0.11",
  "thiserror 2.0.11",
 ]
 ]
 
 

+ 1 - 1
svm/examples/Cargo.lock

@@ -7906,12 +7906,12 @@ dependencies = [
  "solana-hash",
  "solana-hash",
  "solana-instruction",
  "solana-instruction",
  "solana-packet",
  "solana-packet",
- "solana-program",
  "solana-pubkey",
  "solana-pubkey",
  "solana-sdk-ids",
  "solana-sdk-ids",
  "solana-signature",
  "solana-signature",
  "solana-svm-transaction",
  "solana-svm-transaction",
  "solana-transaction",
  "solana-transaction",
+ "solana-vote-interface",
  "thiserror 2.0.11",
  "thiserror 2.0.11",
 ]
 ]
 
 

+ 1 - 1
vote/Cargo.toml

@@ -27,12 +27,12 @@ solana-frozen-abi-macro = { workspace = true, optional = true, features = [
 solana-hash = { workspace = true }
 solana-hash = { workspace = true }
 solana-instruction = { workspace = true }
 solana-instruction = { workspace = true }
 solana-packet = { workspace = true }
 solana-packet = { workspace = true }
-solana-program = { workspace = true }
 solana-pubkey = { workspace = true }
 solana-pubkey = { workspace = true }
 solana-sdk-ids = { workspace = true }
 solana-sdk-ids = { workspace = true }
 solana-signature = { workspace = true }
 solana-signature = { workspace = true }
 solana-svm-transaction = { workspace = true }
 solana-svm-transaction = { workspace = true }
 solana-transaction = { workspace = true }
 solana-transaction = { workspace = true }
+solana-vote-interface = { workspace = true, features = ["bincode"] }
 thiserror = { workspace = true }
 thiserror = { workspace = true }
 
 
 [lib]
 [lib]

+ 1 - 1
vote/benches/vote_account.rs

@@ -4,9 +4,9 @@ extern crate test;
 use {
 use {
     rand::Rng,
     rand::Rng,
     solana_account::AccountSharedData,
     solana_account::AccountSharedData,
-    solana_program::vote::state::{VoteInit, VoteState, VoteStateVersions},
     solana_pubkey::Pubkey,
     solana_pubkey::Pubkey,
     solana_vote::vote_account::VoteAccount,
     solana_vote::vote_account::VoteAccount,
+    solana_vote_interface::state::{VoteInit, VoteState, VoteStateVersions},
     test::Bencher,
     test::Bencher,
 };
 };
 
 

+ 3 - 3
vote/src/vote_account.rs

@@ -6,8 +6,8 @@ use {
     },
     },
     solana_account::{AccountSharedData, ReadableAccount},
     solana_account::{AccountSharedData, ReadableAccount},
     solana_instruction::error::InstructionError,
     solana_instruction::error::InstructionError,
-    solana_program::vote::state::VoteState,
     solana_pubkey::Pubkey,
     solana_pubkey::Pubkey,
+    solana_vote_interface::state::VoteState,
     std::{
     std::{
         cmp::Ordering,
         cmp::Ordering,
         collections::{hash_map::Entry, HashMap},
         collections::{hash_map::Entry, HashMap},
@@ -97,7 +97,7 @@ impl VoteAccount {
         use {
         use {
             rand::Rng as _,
             rand::Rng as _,
             solana_clock::Clock,
             solana_clock::Clock,
-            solana_program::vote::state::{VoteInit, VoteStateVersions},
+            solana_vote_interface::state::{VoteInit, VoteStateVersions},
         };
         };
 
 
         let mut rng = rand::thread_rng();
         let mut rng = rand::thread_rng();
@@ -483,8 +483,8 @@ mod tests {
         rand::Rng,
         rand::Rng,
         solana_account::WritableAccount,
         solana_account::WritableAccount,
         solana_clock::Clock,
         solana_clock::Clock,
-        solana_program::vote::state::{VoteInit, VoteStateVersions},
         solana_pubkey::Pubkey,
         solana_pubkey::Pubkey,
+        solana_vote_interface::state::{VoteInit, VoteStateVersions},
         std::iter::repeat_with,
         std::iter::repeat_with,
     };
     };
 
 

+ 4 - 4
vote/src/vote_parser.rs

@@ -1,8 +1,8 @@
 use {
 use {
     crate::vote_transaction::VoteTransaction, solana_bincode::limited_deserialize,
     crate::vote_transaction::VoteTransaction, solana_bincode::limited_deserialize,
-    solana_hash::Hash, solana_program::vote::instruction::VoteInstruction, solana_pubkey::Pubkey,
-    solana_signature::Signature, solana_svm_transaction::svm_transaction::SVMTransaction,
-    solana_transaction::Transaction,
+    solana_hash::Hash, solana_pubkey::Pubkey, solana_signature::Signature,
+    solana_svm_transaction::svm_transaction::SVMTransaction, solana_transaction::Transaction,
+    solana_vote_interface::instruction::VoteInstruction,
 };
 };
 
 
 pub type ParsedVote = (Pubkey, VoteTransaction, Option<Hash>, Signature);
 pub type ParsedVote = (Pubkey, VoteTransaction, Option<Hash>, Signature);
@@ -82,9 +82,9 @@ mod test {
         super::*,
         super::*,
         solana_clock::Slot,
         solana_clock::Slot,
         solana_keypair::Keypair,
         solana_keypair::Keypair,
-        solana_program::vote::{instruction as vote_instruction, state::Vote},
         solana_sha256_hasher::hash,
         solana_sha256_hasher::hash,
         solana_signer::Signer,
         solana_signer::Signer,
+        solana_vote_interface::{instruction as vote_instruction, state::Vote},
     };
     };
 
 
     // Reimplemented locally from Vote program.
     // Reimplemented locally from Vote program.

+ 1 - 1
vote/src/vote_transaction.rs

@@ -1,7 +1,7 @@
 use {
 use {
     solana_clock::{Slot, UnixTimestamp},
     solana_clock::{Slot, UnixTimestamp},
     solana_hash::Hash,
     solana_hash::Hash,
-    solana_program::vote::state::{TowerSync, Vote, VoteStateUpdate},
+    solana_vote_interface::state::{TowerSync, Vote, VoteStateUpdate},
 };
 };
 
 
 #[derive(Debug, PartialEq, Eq, Clone)]
 #[derive(Debug, PartialEq, Eq, Clone)]