Shred gpu sigverify (#6520)

Implement APIs for verifying shred signatures on the GPU.
This commit is contained in:
anatoly yakovenko
2019-10-28 10:29:38 -07:00
committed by GitHub
parent 30c0a7d069
commit 243fa6cf63
4 changed files with 436 additions and 22 deletions

View File

@ -442,7 +442,7 @@ impl Shredder {
(data_shreds, coding_shreds, last_shred_index + 1)
}
pub fn sign_shred(signer: &Arc<Keypair>, shred: &mut Shred) {
pub fn sign_shred(signer: &Keypair, shred: &mut Shred) {
let signature = signer.sign_message(&shred.payload[SIZE_OF_SIGNATURE..]);
bincode::serialize_into(&mut shred.payload[..SIZE_OF_SIGNATURE], &signature)
.expect("Failed to generate serialized signature");