Remove the RemoveParticipant protocol for having new DKGs specify the participants which were removed

Obvious code cleanup is obvious.
This commit is contained in:
Luke Parker
2023-12-14 23:45:15 -05:00
parent b60e3c2524
commit 2532423d42
17 changed files with 144 additions and 615 deletions

View File

@@ -26,17 +26,14 @@ mod sync;
#[async_trait::async_trait]
impl PublishSeraiTransaction for () {
async fn publish_set_keys(&self, _set: ValidatorSet, _key_pair: KeyPair, _signature: Signature) {
panic!("publish_set_keys was called in test")
}
async fn publish_remove_participant(
async fn publish_set_keys(
&self,
_set: ValidatorSet,
_removing: [u8; 32],
_signers: Vec<SeraiAddress>,
_removed: Vec<SeraiAddress>,
_key_pair: KeyPair,
_signature: Signature,
) {
panic!("publish_remove_participant was called in test")
panic!("publish_set_keys was called in test")
}
}
@@ -226,17 +223,6 @@ fn serialize_transaction() {
signed: random_signed_with_nonce(&mut OsRng, 2),
});
{
let mut key = [0; 32];
OsRng.fill_bytes(&mut key);
test_read_write(Transaction::DkgRemoval(random_sign_data(&mut OsRng, key, Label::Preprocess)));
}
{
let mut key = [0; 32];
OsRng.fill_bytes(&mut key);
test_read_write(Transaction::DkgRemoval(random_sign_data(&mut OsRng, key, Label::Share)));
}
{
let mut block = [0; 32];
OsRng.fill_bytes(&mut block);