Skip to content

Commit 0c4d463

Browse files
Refactor BLAKE3 implementations (BitVM#248)
1 parent 91e688c commit 0c4d463

File tree

11 files changed

+599
-2110
lines changed

11 files changed

+599
-2110
lines changed

bitvm/src/chunk/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ pub mod g16_runner_utils;
1414
mod taps_msm;
1515
mod taps_point_ops;
1616
mod taps_ext_miller;
17-
mod taps_mul;
17+
mod taps_mul;

bitvm/src/chunk/wrap_hasher.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{bn254::{fp254impl::Fp254Impl, fq::Fq}, hash::blake3_u4_compact::blake3_u4_compact, treepp::*};
1+
use crate::{bn254::{fp254impl::Fp254Impl, fq::Fq}, hash::blake3::blake3, treepp::*};
22
use bitcoin_script_stack::stack::StackTracker;
33
use hash_utils::{hash_fp2, hash_fp6, hash_g2acc, hash_g2acc_with_hash_t, hash_g2acc_with_hashed_le};
44

@@ -20,7 +20,7 @@ fn wrap_scr(scr: Script) -> Script {
2020
// create Script instance from stack-tracker and pad output with zeros to appropriate hash size
2121
pub(crate) fn hash_n_bytes<const N: u32>() -> Script {
2222
let mut stack = StackTracker::new();
23-
blake3_u4_compact(&mut stack, N, true, true);
23+
blake3(&mut stack, N, true, true);
2424
wrap_scr(stack.get_script())
2525
}
2626

@@ -239,4 +239,4 @@ pub fn hash_messages(elem_types: Vec<ElementType>) -> Script {
239239
};
240240
}
241241
loop_script
242-
}
242+
}

0 commit comments

Comments
 (0)