MCPcopy Create free account
hub / github.com/BitVM/BitVM / get_assertions_from_signature

Function get_assertions_from_signature

bitvm/src/chunk/api_runtime_utils.rs:332–358  ·  view source on GitHub ↗

decode signature to assertion mirror of get_signature_from_assertion

(signed_asserts: Signatures)

Source from the content-addressed store, hash-verified

330// decode signature to assertion
331// mirror of get_signature_from_assertion
332pub(crate) fn get_assertions_from_signature(signed_asserts: Signatures) -> Assertions {
333 println!("get_assertions_from_signature");
334 let mut ks: Vec<[u8; 32]> = vec![];
335 for i in 0..NUM_PUBS {
336 let nibs = Wots32::signature_to_message(&signed_asserts.0[i]);
337 ks.push(nibs);
338 }
339 let ks: [[u8; 32]; NUM_PUBS] = ks.try_into().unwrap();
340
341 let mut numfqs: Vec<[u8; 32]> = vec![];
342 for i in 0..NUM_U256 {
343 let nibs = Wots32::signature_to_message(&signed_asserts.1[i]);
344 numfqs.push(nibs);
345 }
346 let num_fqs: [[u8; 32]; NUM_U256] = numfqs.try_into().unwrap();
347
348 let mut numhashes: Vec<[u8; BLAKE3_HASH_LENGTH]> = vec![];
349 for i in 0..NUM_HASH {
350 let nibs = Wots16::signature_to_message(&signed_asserts.2[i]);
351 numhashes.push(nibs);
352 }
353
354 let num_hashes: [[u8; BLAKE3_HASH_LENGTH]; NUM_HASH] = numhashes.try_into().unwrap();
355
356 let asst: Assertions = (ks, num_fqs, num_hashes);
357 asst
358}
359
360fn utils_collect_mul_hints_per_segment(segments: &[Segment]) -> Vec<Vec<Hint>> {
361 let aux_hints: Vec<Vec<Hint>> = segments

Callers 6

validate_assertionsFunction · 0.85
test_largest_chunksFunction · 0.85
full_e2e_executionFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by 4

test_largest_chunksFunction · 0.68
full_e2e_executionFunction · 0.68