mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 16:23:12 +00:00
Minor
This commit is contained in:
parent
c78d7611ed
commit
5f7992f0ea
@ -16,13 +16,10 @@ fn main() -> Result<()> {
|
||||
// change this to info or warn later.
|
||||
env_logger::Builder::from_env(Env::default().default_filter_or("debug")).init();
|
||||
|
||||
bench_prove()
|
||||
bench_prove::<PoseidonGoldilocksConfig, 2>()
|
||||
}
|
||||
|
||||
fn bench_prove() -> Result<()> {
|
||||
const D: usize = 2;
|
||||
type C = PoseidonGoldilocksConfig;
|
||||
type F = <C as GenericConfig<D>>::F;
|
||||
fn bench_prove<C: GenericConfig<D>, const D: usize>() -> Result<()> {
|
||||
let config = CircuitConfig {
|
||||
num_wires: 126,
|
||||
num_routed_wires: 33,
|
||||
@ -40,7 +37,7 @@ fn bench_prove() -> Result<()> {
|
||||
};
|
||||
|
||||
let inputs = PartialWitness::new();
|
||||
let mut builder = CircuitBuilder::<F, D>::new(config);
|
||||
let mut builder = CircuitBuilder::<C::F, D>::new(config);
|
||||
|
||||
let zero = builder.zero();
|
||||
let zero_ext = builder.zero_extension();
|
||||
|
||||
@ -156,7 +156,3 @@ pub fn hash_n_to_hash<F: RichField, P: PlonkyPermutation<F>>(
|
||||
) -> HashOut<F> {
|
||||
HashOut::from_vec(hash_n_to_m::<F, P>(inputs, 4, pad))
|
||||
}
|
||||
|
||||
pub fn hash_n_to_1<F: RichField, P: PlonkyPermutation<F>>(inputs: Vec<F>, pad: bool) -> F {
|
||||
hash_n_to_m::<F, P>(inputs, 1, pad)[0]
|
||||
}
|
||||
|
||||
@ -24,7 +24,6 @@ pub trait Hasher<F: RichField>: Sized + Clone + Debug + Eq + PartialEq {
|
||||
type Hash: From<Vec<u8>>
|
||||
+ Into<Vec<u8>>
|
||||
+ Into<Vec<F>>
|
||||
+ Into<u64>
|
||||
+ Copy
|
||||
+ Clone
|
||||
+ Debug
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user