File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
noir-projects/noir-protocol-circuits/crates/rollup-lib/src/root/utils Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ use types::{
2525/// By using a fixed unbalanced tree structure, the positions (leaf ids) of existing checkpoints remain stable even as
2626/// more checkpoints are appended.
2727pub fn compute_epoch_out_hash (out_hashes : [Field ; AZTEC_MAX_EPOCH_DURATION ]) -> Field {
28+ std:: static_assert (
29+ AZTEC_MAX_EPOCH_DURATION == 48 ,
30+ "Remember to update these constants of 32 and 16" ,
31+ );
2832 let left_subtree_out_hashes : [Field ; 32 ] = subarray (out_hashes , 0 );
2933 let right_subtree_out_hashes : [Field ; 16 ] = subarray (out_hashes , 32 );
3034 let left_subtree_root = MerkleTree ::new_sha (left_subtree_out_hashes ).get_root ();
@@ -47,9 +51,6 @@ mod tests {
4751
4852 #[test]
4953 fn full_epoch_matches_ts () {
50- // If the constant's changed, update `compute_epoch_out_hash` to work with the new tree size.
51- assert_eq (AZTEC_MAX_EPOCH_DURATION , 48 );
52-
5354 let mut out_hashes = [0 ; AZTEC_MAX_EPOCH_DURATION ];
5455 for i in 0 ..AZTEC_MAX_EPOCH_DURATION {
5556 out_hashes [i ] = 123 + i as Field ;
You can’t perform that action at this time.
0 commit comments