mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
test fixes
This commit is contained in:
parent
f6954704d9
commit
7da99ad4d4
@ -369,28 +369,4 @@ mod tests {
|
||||
let proof = data.prove(pw).unwrap();
|
||||
verify(proof, &data.verifier_only, &data.common)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_biguint_sub() -> Result<()> {
|
||||
let x_value = BigUint::from_u128(33333333333333333333333333333333333333).unwrap();
|
||||
let y_value = BigUint::from_u128(22222222222222222222222222222222222222).unwrap();
|
||||
let expected_z_value = &x_value - &y_value;
|
||||
|
||||
type F = CrandallField;
|
||||
let config = CircuitConfig::large_config();
|
||||
let pw = PartialWitness::new();
|
||||
let mut builder = CircuitBuilder::<F, 4>::new(config);
|
||||
|
||||
let x = builder.constant_biguint(x_value);
|
||||
let y = builder.constant_biguint(y_value);
|
||||
let z = builder.sub_biguint(x, y);
|
||||
let expected_z = builder.constant_biguint(expected_z_value);
|
||||
|
||||
builder.connect_biguint(z, expected_z);
|
||||
|
||||
let data = builder.build();
|
||||
let proof = data.prove(pw).unwrap();
|
||||
|
||||
verify(proof, &data.verifier_only, &data.common)
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ mod tests {
|
||||
|
||||
use crate::field::field_types::Field;
|
||||
use crate::field::goldilocks_field::GoldilocksField;
|
||||
use crate::field::secp256k1::Secp256K1Base;
|
||||
use crate::field::secp256k1_base::Secp256K1Base;
|
||||
use crate::iop::witness::PartialWitness;
|
||||
use crate::plonk::circuit_builder::CircuitBuilder;
|
||||
use crate::plonk::circuit_data::CircuitConfig;
|
||||
@ -267,8 +267,8 @@ mod tests {
|
||||
let x_ff = FF::rand();
|
||||
let inv_x_ff = x_ff.inverse();
|
||||
|
||||
type F = CrandallField;
|
||||
let config = CircuitConfig::large_config();
|
||||
type F = GoldilocksField;
|
||||
let config = CircuitConfig::standard_recursion_config();
|
||||
let pw = PartialWitness::new();
|
||||
let mut builder = CircuitBuilder::<F, 4>::new(config);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user