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

@@ -34,6 +34,7 @@ pub struct ValidatorInfo {
pub voting_keypair: Arc<Keypair>,
pub storage_keypair: Arc<Keypair>,
pub ledger_path: String,
pub contact_info: ContactInfo,
}
pub struct ReplicatorInfo {
@@ -173,6 +174,7 @@ impl LocalCluster {
voting_keypair: leader_voting_keypair,
storage_keypair: leader_storage_keypair,
ledger_path: leader_ledger_path,
contact_info: leader_contact_info.clone(),
},
);
@@ -247,6 +249,7 @@ impl LocalCluster {
let storage_keypair = Arc::new(Keypair::new());
let validator_pubkey = validator_keypair.pubkey();
let validator_node = Node::new_localhost_with_pubkey(&validator_keypair.pubkey());
let contact_info = validator_node.info.clone();
let ledger_path = tmp_copy_blocktree!(&self.genesis_ledger_path);
if validator_config.voting_disabled {
@@ -299,6 +302,7 @@ impl LocalCluster {
voting_keypair,
storage_keypair,
ledger_path,
contact_info,
},
);
} else {
@@ -309,6 +313,7 @@ impl LocalCluster {
voting_keypair,
storage_keypair,
ledger_path,
contact_info,
},
);
}
@@ -513,6 +518,12 @@ impl Cluster for LocalCluster {
self.fullnodes.keys().cloned().collect()
}
fn get_validator_client(&self, pubkey: &Pubkey) -> Option<ThinClient> {
self.fullnode_infos
.get(pubkey)
.map(|f| create_client(f.contact_info.client_facing_addr(), FULLNODE_PORT_RANGE))
}
fn restart_node(&mut self, pubkey: Pubkey) {
// Shut down the fullnode
let node = self.fullnodes.remove(&pubkey).unwrap();