[frontend] Add public key hash tweak#879
[frontend] Add public key hash tweak#879paulcadman wants to merge 1 commit into08-22-_frontend_add_merkle_tree_verifierfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-ready to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
| num_hashes in 1usize..=10, | ||
| ) { | ||
| use rand::SeedableRng; | ||
| use rand::prelude::StdRng; |
There was a problem hiding this comment.
The import use rand::prelude::StdRng is incorrect for reproducible testing. The prelude import does not guarantee availability of SeedableRng trait methods required for StdRng::seed_from_u64. Change to use rand::{SeedableRng, rngs::StdRng}; to ensure proper access to seeding functionality.
| use rand::prelude::StdRng; | |
| use rand::{SeedableRng, rngs::StdRng}; |
Spotted by Diamond (based on custom rule: Monbijou Testing Patterns)
Is this helpful? React 👍 or 👎 to let us know.
73076a9 to
9275d23
Compare
bb2c6a3 to
fcc32e5
Compare
9275d23 to
50b3a36
Compare
fcc32e5 to
b9b2273
Compare
50b3a36 to
db4c440
Compare
| use rand::SeedableRng; | ||
| use rand::prelude::StdRng; | ||
|
|
||
| let mut rng = StdRng::seed_from_u64(0); |
There was a problem hiding this comment.
Property-based tests should not use seeded random number generators. This test violates the Pseudo-Random Testing rule by importing rand::SeedableRng and StdRng within the proptest! macro and using StdRng::seed_from_u64(0) for deterministic random generation. Property-based tests using the proptest crate should rely on rand::rng() or proptest's built-in randomization strategies instead of seeded RNG. Seeded random generation with StdRng::seed_from_u64 is appropriate for reproducible unit tests but not for property-based tests. Remove the rand imports and StdRng usage, and allow proptest to handle randomization internally.
Spotted by Diamond (based on custom rule: Monbijou Testing Patterns)
Is this helpful? React 👍 or 👎 to let us know.
db4c440 to
c77be67
Compare
b9b2273 to
017db1b
Compare
c77be67 to
a07698b
Compare
017db1b to
84124c1
Compare
Merge activity
|
This PR adds a Keccak256 tweak circuit that will be used to hash the public keys in the hash-based signature circuit. Helper functions to compute the hash for tree and chain tweaks are also added.
This PR adds a Keccak256 tweak circuit that will be used to hash the public keys in the hash-based signature circuit. Helper functions to compute the hash for tree and chain tweaks are also added.

This PR adds a Keccak256 tweak circuit that will be used to hash the public keys in the hash-based signature circuit.
Helper functions to compute the hash for tree and chain tweaks are also added.