mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 00:33:06 +00:00
clean more
This commit is contained in:
parent
14ee46c850
commit
43f4d2b80c
@ -202,15 +202,19 @@ fn test_bn_final_exponent() -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
fn pairing_input() -> Vec<U256> {
|
||||||
fn test_bn_miller() -> Result<()> {
|
|
||||||
let ptr: usize = 100;
|
|
||||||
let out: usize = 106;
|
|
||||||
|
|
||||||
let curve_gen: [U256; 2] = unsafe { transmute(CURVE_GENERATOR) };
|
let curve_gen: [U256; 2] = unsafe { transmute(CURVE_GENERATOR) };
|
||||||
let twisted_gen: [U256; 4] = unsafe { transmute(TWISTED_GENERATOR) };
|
let twisted_gen: [U256; 4] = unsafe { transmute(TWISTED_GENERATOR) };
|
||||||
let mut input = curve_gen.to_vec();
|
let mut input = curve_gen.to_vec();
|
||||||
input.extend_from_slice(&twisted_gen);
|
input.extend_from_slice(&twisted_gen);
|
||||||
|
input
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_bn_miller() -> Result<()> {
|
||||||
|
let ptr: usize = 100;
|
||||||
|
let out: usize = 106;
|
||||||
|
let input = pairing_input();
|
||||||
|
|
||||||
let setup = InterpreterMemoryInitialization {
|
let setup = InterpreterMemoryInitialization {
|
||||||
label: "bn254_miller".to_string(),
|
label: "bn254_miller".to_string(),
|
||||||
@ -231,11 +235,7 @@ fn test_bn_miller() -> Result<()> {
|
|||||||
fn test_bn_pairing() -> Result<()> {
|
fn test_bn_pairing() -> Result<()> {
|
||||||
let out: usize = 100;
|
let out: usize = 100;
|
||||||
let ptr: usize = 112;
|
let ptr: usize = 112;
|
||||||
|
let input = pairing_input();
|
||||||
let curve_gen: [U256; 2] = unsafe { transmute(CURVE_GENERATOR) };
|
|
||||||
let twisted_gen: [U256; 4] = unsafe { transmute(TWISTED_GENERATOR) };
|
|
||||||
let mut input = curve_gen.to_vec();
|
|
||||||
input.extend_from_slice(&twisted_gen);
|
|
||||||
|
|
||||||
let setup = InterpreterMemoryInitialization {
|
let setup = InterpreterMemoryInitialization {
|
||||||
label: "bn254_pairing".to_string(),
|
label: "bn254_pairing".to_string(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user