Skip to content

Commit fb6141b

Browse files
authored
Merge branch 'master' into ahzam/fix-arithmetic-operations
2 parents 8995797 + c4c6576 commit fb6141b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1647
-968
lines changed

.buildkite/alpenglow/pipeline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ steps:
2323
timeout_in_minutes: 40
2424
agents:
2525
queue: "default"
26-
parallelism: 2
26+
parallelism: 3
2727
retry:
2828
automatic:
2929
- limit: 3

Cargo.lock

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ members = [
147147
"vortexor",
148148
"vote",
149149
"votor",
150+
"votor-messages",
150151
"watchtower",
151152
"wen-restart",
152153
"zk-keygen",
@@ -567,6 +568,7 @@ solana-vote = { path = "vote", version = "=2.3.0" }
567568
solana-vote-interface = "=2.2.2"
568569
solana-vote-program = { path = "programs/vote", version = "=2.3.0", default-features = false }
569570
solana-votor = { path = "votor", version = "=2.3.0" }
571+
solana-votor-messages = { path = "votor-messages", version = "=2.3.0" }
570572
solana-wen-restart = { path = "wen-restart", version = "=2.3.0" }
571573
solana-zk-elgamal-proof-program = { path = "programs/zk-elgamal-proof", version = "=2.3.0" }
572574
solana-zk-keygen = { path = "zk-keygen", version = "=2.3.0" }

ci/stable/run-partition.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ARGS=(
3434
--partition hash:"$((INDEX + 1))/$LIMIT"
3535
--verbose
3636
--exclude solana-local-cluster
37+
--exclude solana-cargo-build-sbf
3738
--no-tests=warn
3839
)
3940

cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ solana-udp-client = { workspace = true }
8888
solana-version = { workspace = true }
8989
solana-vote = { workspace = true }
9090
solana-vote-program = { workspace = true }
91+
solana-votor-messages = { workspace = true }
9192
spl-memo = { workspace = true, features = ["no-entrypoint"] }
9293
thiserror = { workspace = true }
9394
tiny-bip39 = { workspace = true }

cli/src/vote.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ use {
4040
solana_rpc_client_nonce_utils::blockhash_query::BlockhashQuery,
4141
solana_system_interface::error::SystemError,
4242
solana_transaction::Transaction,
43-
solana_vote::alpenglow::{
44-
bls_message::BLS_KEYPAIR_DERIVE_SEED, instruction::InitializeAccountInstructionData,
45-
state::VoteState as AlpenglowVoteState,
46-
},
4743
solana_vote_program::{
4844
authorized_voters::AuthorizedVoters,
4945
vote_error::VoteError,
@@ -53,6 +49,10 @@ use {
5349
VOTE_CREDITS_MAXIMUM_PER_SLOT,
5450
},
5551
},
52+
solana_votor_messages::{
53+
bls_message::BLS_KEYPAIR_DERIVE_SEED, instruction::InitializeAccountInstructionData,
54+
state::VoteState as AlpenglowVoteState,
55+
},
5656
std::rc::Rc,
5757
};
5858

@@ -849,7 +849,7 @@ pub fn process_create_vote_account(
849849

850850
let required_balance = rpc_client
851851
.get_minimum_balance_for_rent_exemption(if is_alpenglow {
852-
solana_vote::alpenglow::state::VoteState::size()
852+
solana_votor_messages::state::VoteState::size()
853853
} else {
854854
VoteState::size_of()
855855
})?
@@ -887,11 +887,11 @@ pub fn process_create_vote_account(
887887
from_pubkey,
888888
to_pubkey,
889889
lamports,
890-
solana_vote::alpenglow::state::VoteState::size() as u64,
891-
&solana_vote::alpenglow::id(),
890+
solana_votor_messages::state::VoteState::size() as u64,
891+
&solana_votor_messages::id(),
892892
);
893893

894-
let init_ix = solana_vote::alpenglow::instruction::initialize_account(
894+
let init_ix = solana_votor_messages::instruction::initialize_account(
895895
*to_pubkey,
896896
&initialize_account_ixn_meta,
897897
);
@@ -1374,7 +1374,7 @@ impl VoteStateWrapper {
13741374
}
13751375

13761376
const SOLANA_VOTE_PROGRAM_ID: Pubkey = solana_vote_program::id();
1377-
const ALPENGLOW_VOTE_PROGRAM_ID: Pubkey = solana_vote::alpenglow::id();
1377+
const ALPENGLOW_VOTE_PROGRAM_ID: Pubkey = solana_votor_messages::id();
13781378

13791379
pub(crate) fn get_vote_account(
13801380
rpc_client: &RpcClient,

core/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ serde_derive = { workspace = true }
5151
slab = { workspace = true }
5252
solana-accounts-db = { workspace = true }
5353
solana-bloom = { workspace = true }
54-
solana-bls-signatures = { workspace = true, features = ["solana-signer-derive"] }
54+
solana-bls-signatures = { workspace = true, features = [
55+
"solana-signer-derive",
56+
] }
5557
solana-builtins-default-costs = { workspace = true }
5658
solana-client = { workspace = true }
5759
solana-compute-budget = { workspace = true }
@@ -100,6 +102,7 @@ solana-version = { workspace = true }
100102
solana-vote = { workspace = true }
101103
solana-vote-program = { workspace = true }
102104
solana-votor = { workspace = true }
105+
solana-votor-messages = { workspace = true }
103106
solana-wen-restart = { workspace = true }
104107
strum = { workspace = true, features = ["derive"] }
105108
strum_macros = { workspace = true }

core/src/repair/certificate_service.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use {
77
crate::result::{Error, Result},
88
crossbeam_channel::{Receiver, RecvTimeoutError},
99
solana_ledger::blockstore::Blockstore,
10-
solana_vote::alpenglow::bls_message::CertificateMessage,
11-
solana_votor::CertificateId,
10+
solana_votor_messages::bls_message::{Certificate, CertificateMessage},
1211
std::{
1312
sync::{
1413
atomic::{AtomicBool, Ordering},
@@ -19,7 +18,7 @@ use {
1918
},
2019
};
2120

22-
pub(crate) type CertificateReceiver = Receiver<(CertificateId, CertificateMessage)>;
21+
pub(crate) type CertificateReceiver = Receiver<(Certificate, CertificateMessage)>;
2322
pub struct CertificateService {
2423
t_cert_insert: JoinHandle<()>,
2524
}
@@ -73,8 +72,8 @@ impl CertificateService {
7372
}
7473

7574
fn receive_new_certificates(
76-
certificate_receiver: &Receiver<(CertificateId, CertificateMessage)>,
77-
) -> Result<Vec<(CertificateId, CertificateMessage)>> {
75+
certificate_receiver: &Receiver<(Certificate, CertificateMessage)>,
76+
) -> Result<Vec<(Certificate, CertificateMessage)>> {
7877
const RECV_TIMEOUT: Duration = Duration::from_millis(200);
7978
Ok(
8079
std::iter::once(certificate_receiver.recv_timeout(RECV_TIMEOUT)?)
@@ -85,18 +84,18 @@ impl CertificateService {
8584

8685
fn insert_certificate(
8786
blockstore: &Blockstore,
88-
cert_id: CertificateId,
87+
cert_id: Certificate,
8988
vote_certificate: CertificateMessage,
9089
) -> Result<()> {
9190
match cert_id {
92-
CertificateId::NotarizeFallback(slot, block_id) => blockstore
91+
Certificate::NotarizeFallback(slot, block_id) => blockstore
9392
.insert_new_notarization_fallback_certificate(slot, block_id, vote_certificate)?,
94-
CertificateId::Skip(slot) => {
93+
Certificate::Skip(slot) => {
9594
blockstore.insert_new_skip_certificate(slot, vote_certificate)?
9695
}
97-
CertificateId::Finalize(_)
98-
| CertificateId::FinalizeFast(_, _)
99-
| CertificateId::Notarize(_, _) => {
96+
Certificate::Finalize(_)
97+
| Certificate::FinalizeFast(_, _)
98+
| Certificate::Notarize(_, _) => {
10099
panic!("Programmer error, certificate pool should not notify for {cert_id:?}")
101100
}
102101
}

core/src/replay_stage.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ use {
8282
transaction::Transaction,
8383
},
8484
solana_timings::ExecuteTimings,
85-
solana_vote::{alpenglow::bls_message::CertificateMessage, vote_transaction::VoteTransaction},
85+
solana_vote::vote_transaction::VoteTransaction,
8686
solana_votor::{
8787
event::{CompletedBlock, VotorEvent, VotorEventReceiver, VotorEventSender},
8888
root_utils,
8989
vote_history::VoteHistory,
9090
vote_history_storage::VoteHistoryStorage,
9191
voting_utils::{BLSOp, GenerateVoteTxResult},
9292
votor::{LeaderWindowNotifier, Votor, VotorConfig},
93-
CertificateId,
9493
},
94+
solana_votor_messages::bls_message::{Certificate, CertificateMessage},
9595
std::{
9696
collections::{HashMap, HashSet},
9797
num::NonZeroUsize,
@@ -300,7 +300,7 @@ pub struct ReplaySenders {
300300
pub drop_bank_sender: Sender<Vec<BankWithScheduler>>,
301301
pub block_metadata_notifier: Option<BlockMetadataNotifierArc>,
302302
pub dumped_slots_sender: Sender<Vec<(u64, Hash)>>,
303-
pub certificate_sender: Sender<(CertificateId, CertificateMessage)>,
303+
pub certificate_sender: Sender<(Certificate, CertificateMessage)>,
304304
pub votor_event_sender: VotorEventSender,
305305
pub own_vote_sender: BLSVerifiedMessageSender,
306306
}

0 commit comments

Comments
 (0)