Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failures of some STM property based tests #2109

Open
1 of 2 tasks
jpraynaud opened this issue Nov 13, 2024 · 1 comment
Open
1 of 2 tasks

Failures of some STM property based tests #2109

jpraynaud opened this issue Nov 13, 2024 · 1 comment
Assignees
Labels
cryptography 🔐 Cryptography related

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Nov 13, 2024

Why

We have noticed some failures in some property based tests of the STM library which make the CI flaky:

We'd like to understand if these occurrences are normal and create the appropriate fixes if necessary.

What

Investigate and fix the source of flakiness.

How

  • Investigate the source of flakiness
  • Fix the flakiness
@jpraynaud jpraynaud added the cryptography 🔐 Cryptography related label Nov 13, 2024
@curiecrypt
Copy link
Collaborator

Property test batch_verify in /mithril-stm/stm.rs fails for the following cases:

  • Case 1:
let nparties = 12;
let m = 10;
let k = 4;
let seed = [60, 97, 149, 225, 10, 42, 3, 8, 185, 163, 227, 69, 225, 72, 238, 154, 164, 77, 167, 233, 251, 171, 68, 218, 151, 159, 193, 202, 209, 169, 90, 210];
batch_size = 6;

The failing instance occurs in the 3rd iteration of the batch with the randomly filled message:

let msg: [u8; 32] = [237, 247, 38, 63, 164, 83, 106, 19, 86, 163, 29, 139, 0, 156, 213, 132, 8, 172, 194, 77, 117, 160, 158, 189, 70, 185, 249, 151, 117, 42, 113, 7];

The number of signatures is 5 (created with the helper function find_signatures), but in the aggregation process, only 3 unique signatures are found. sigs.len() < k => 3 < 4

  • Case 2:
let nparties = 6;
let m = 10;
let k = 4;
let seed = [99, 129, 128, 56, 143, 205, 173, 33, 36, 48, 11, 203, 0, 117, 75, 70, 90, 130, 249, 188, 234, 190, 69, 233, 128, 35, 28, 49, 105, 186, 88, 183,];
batch_size = 5;

The failing instance occurs in the 3rd iteration of the batch with the randomly filled message:

let msg: [u8; 32] = [171, 90, 33, 241, 15, 147, 222, 182, 45, 8, 55, 183, 212, 48, 225, 52, 218, 186, 11, 69, 112, 35, 21, 82, 211, 162, 175, 7, 54, 112, 63, 17,];

The number of signatures is 4 (created with the helper function find_signatures), but in the aggregation process, only 3 unique signatures are found. sigs.len() < k => 3 < 4


Possible workaround: For the test batch_verify, the iteration that generates insufficient signatures could be repeated. Since the aim of this test is not to check the aggregation functionality but to check the batch verification functionality.
@jpraynaud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cryptography 🔐 Cryptography related
Projects
None yet
Development

No branches or pull requests

2 participants