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

Add test vectors for preparation failures #536

Open
cjpatton opened this issue Jan 18, 2025 · 2 comments
Open

Add test vectors for preparation failures #536

cjpatton opened this issue Jan 18, 2025 · 2 comments

Comments

@cjpatton
Copy link
Collaborator

cjpatton commented Jan 18, 2025

list feedback:

It should be pretty easy to modify gen_test_vec.py to output tweaked test vectors that trigger preparation to fail. For example:

  • Tweak the nonce
  • Tweak the first byte of the public share
  • Tweak the first byte of a random input share
  • Tweak the first byte of a random prep share
  • Tweak the first byte of the prep message
@cjpatton
Copy link
Collaborator Author

cjpatton commented Jan 18, 2025

cc @armfazh

@divergentdave
Copy link
Collaborator

Negative test vectors will need to be a bit more focused than the existing test vectors, at minimum to specify which stages of execution should succeed or fail. On the happy path, many fields serve double duty as an expected output from one step and an input for the next step.

One idea: we could add a top-level field that contains an array of objects representing which computations should be run on a test vector. We could indicate which computation with one of "shard", "prepare_init", "prepare_next", "prep_shares_to_prep", and "aggregate", plus the aggregator ID, round number, and index of the report in the prep array as appropriate. Existing test vectors would just list all operations, and new negative test vectors would only list one or two computations, providing the appropriate tampered inputs for them. We'd also need some flags elsewhere in the schema to signal that a preparation failure is expected.

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

No branches or pull requests

2 participants