Skip to content

Commit

Permalink
Merge branch 'eichhorl/dealing-relay' into 'master'
Browse files Browse the repository at this point in the history
feat(ecdsa): FOLLOW-618 Do not relay ECDSA dealings

ECDSA dealings are added to the validated pool if public verification succeeds. Private verification is done at a later point when generating support for the dealing. If the latter verification fails, the dealing is removed from the pool, potentially giving the dealer the chance of sending another invalid dealing. The possibility of receiving many invalid messages from a malicious node exists for all artifacts. However, for these signed ECDSA dealings the issue is exacerbated, since they may be advertised and relayed to other nodes before failure of private verification removes them from the validated pool. 

With this MR we stop relaying ECDSA dealings to avoid the aforementioned problem. 

See merge request dfinity-lab/public/ic!12742
  • Loading branch information
eichhorl committed Jun 9, 2023
2 parents 089612a + 07b70a1 commit a0ab4ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rs/artifact_pool/src/ecdsa_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ impl MutablePool<EcdsaArtifact, EcdsaChangeSet> for EcdsaPoolImpl {
}
EcdsaChangeAction::MoveToValidated(message) => {
match &message {
EcdsaMessage::EcdsaDealingSupport(_) => (),
EcdsaMessage::EcdsaDealingSupport(_)
| EcdsaMessage::EcdsaSignedDealing(_) => (),
_ => adverts.push(EcdsaArtifact::message_to_advert(&message)),
}
unvalidated_ops.remove(ecdsa_msg_id(&message));
Expand Down Expand Up @@ -886,9 +887,8 @@ mod tests {
],
);
assert!(result.purged.is_empty());
// No advert is created for moved dealing support
assert_eq!(result.adverts.len(), 1);
assert_eq!(result.adverts[0].id, msg_id_2);
// No adverts are created for moved dealings and dealing support
assert!(result.adverts.is_empty());
assert_eq!(result.changed, ProcessingResult::StateChanged);
check_state(&ecdsa_pool, &[], &[msg_id_1, msg_id_2]);
})
Expand Down

0 comments on commit a0ab4ae

Please sign in to comment.