Add GPU sigverify for verify path (#20851)
Allows the use of GPU acceleration in verifying the signatures in Entry's after deserialization in the replay stage Co-authored-by: Stephen Akridge <sakridge@gmail.com> Co-authored-by: Ryan Leung <ryan.leung@solana.com>
This commit is contained in:
@ -250,6 +250,29 @@ impl<T: Clone + Default + Sized> PinnedVec<T> {
|
||||
self.check_ptr(old_ptr, old_capacity, "resize");
|
||||
}
|
||||
|
||||
/// Forces the length of the vector to `new_len`.
|
||||
///
|
||||
/// This is a low-level operation that maintains none of the normal
|
||||
/// invariants of the type. Normally changing the length of a vector
|
||||
/// is done using one of the safe operations instead, such as
|
||||
/// [`truncate`], [`resize`], [`extend`], or [`clear`].
|
||||
///
|
||||
/// [`truncate`]: Vec::truncate
|
||||
/// [`resize`]: Vec::resize
|
||||
/// [`extend`]: Extend::extend
|
||||
/// [`clear`]: Vec::clear
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// - `new_len` must be less than or equal to [`capacity()`].
|
||||
/// - The elements at `old_len..new_len` must be initialized.
|
||||
///
|
||||
/// [`capacity()`]: Vec::capacity
|
||||
///
|
||||
pub unsafe fn set_len(&mut self, size: usize) {
|
||||
self.x.set_len(size);
|
||||
}
|
||||
|
||||
pub fn shuffle<R: Rng>(&mut self, rng: &mut R) {
|
||||
self.x.shuffle(rng)
|
||||
}
|
||||
|
@ -18,6 +18,12 @@ pub fn test_tx() -> Transaction {
|
||||
system_transaction::transfer(&keypair1, &pubkey1, 42, zero)
|
||||
}
|
||||
|
||||
pub fn test_invalid_tx() -> Transaction {
|
||||
let mut tx = test_tx();
|
||||
tx.signatures = vec![Transaction::get_invalid_signature()];
|
||||
tx
|
||||
}
|
||||
|
||||
pub fn test_multisig_tx() -> Transaction {
|
||||
let keypair0 = Keypair::new();
|
||||
let keypair1 = Keypair::new();
|
||||
|
Reference in New Issue
Block a user