Data plane verification (#4639)

* Add signature to blob

* Change Signable trait to support returning references to signable data

* Add signing to broadcast

* Verify signatures in window_service

* Add testing for signatures to erasure

* Add RPC for getting current slot, consume RPC call in test_repairman_catchup for more deterministic results
This commit is contained in:
carllin
2019-06-12 16:43:05 -07:00
committed by GitHub
parent 0da9ac1a47
commit 8c1b9a0b67
22 changed files with 229 additions and 81 deletions

View File

@ -2,6 +2,7 @@ use serde_derive::{Deserialize, Serialize};
use solana_config_api::ConfigState;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Signable, Signature};
use std::borrow::Cow;
use std::error;
use std::io;
@ -27,8 +28,8 @@ impl Signable for SignedUpdateManifest {
self.account_pubkey
}
fn signable_data(&self) -> Vec<u8> {
bincode::serialize(&self.manifest).expect("serialize")
fn signable_data(&self) -> Cow<[u8]> {
Cow::Owned(bincode::serialize(&self.manifest).expect("serialize"))
}
fn get_signature(&self) -> Signature {
self.manifest_signature