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

Function extract_hashes_from_assertions

bitvm/src/chunk/api_runtime_utils.rs:182–196  ·  view source on GitHub ↗
(
        state_hashes: [CompressedStateObject; NUM_HASH],
    )

Source from the content-addressed store, hash-verified

180 }
181
182 fn extract_hashes_from_assertions(
183 state_hashes: [CompressedStateObject; NUM_HASH],
184 ) -> Option<Vec<HashBytes>> {
185 // Intermediates
186 let mut hashes: Vec<HashBytes> = vec![];
187 for cobj in state_hashes {
188 if let CompressedStateObject::Hash(cobj) = cobj {
189 hashes.push(cobj);
190 } else {
191 return None;
192 }
193 }
194 hashes.reverse();
195 Some(hashes)
196 }
197
198 fn extract_public_params(vk: &ark_groth16::VerifyingKey<Bn254>) -> PublicParams {
199 let mut msm_gs = vk.gamma_abc_g1.clone(); // vk.vk_pubs[0]

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected