Commit ec2ddf7
committed
refactor: make prover leaf-hashing hash-agnostic via backend's hash_bytes
Add hash_bytes() inherent method to FieldElementVectorBackend that
surfaces the generic digest parameter D. The prover now calls
BatchedMerkleTreeBackend::<E>::hash_bytes() instead of hardcoding
sha3::Keccak256, so changing the config.rs type alias automatically
propagates the hash function to the commit hot paths.
Also adds missing debug_assert for power-of-two in
commit_columns_bit_reversed for consistency with
commit_composition_polynomial.1 parent 33b6e50 commit ec2ddf7
2 files changed
Lines changed: 25 additions & 9 deletions
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | 376 | | |
378 | 377 | | |
379 | 378 | | |
| |||
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
| |||
399 | 403 | | |
400 | 404 | | |
401 | 405 | | |
402 | | - | |
403 | | - | |
404 | | - | |
| 406 | + | |
405 | 407 | | |
406 | 408 | | |
407 | 409 | | |
| |||
694 | 696 | | |
695 | 697 | | |
696 | 698 | | |
697 | | - | |
698 | 699 | | |
699 | 700 | | |
700 | 701 | | |
| |||
735 | 736 | | |
736 | 737 | | |
737 | 738 | | |
738 | | - | |
739 | | - | |
740 | | - | |
| 739 | + | |
741 | 740 | | |
742 | 741 | | |
743 | 742 | | |
| |||
0 commit comments