mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 07:13:08 +00:00
parent
ce456fb8ea
commit
1b9c4778d8
@ -2,6 +2,7 @@ use std::cmp::max;
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
use std::time::Instant;
|
||||
|
||||
use itertools::Itertools;
|
||||
use log::{debug, info, Level};
|
||||
use plonky2_field::cosets::get_unique_coset_shifts;
|
||||
use plonky2_field::extension::{Extendable, FieldExtension};
|
||||
@ -95,9 +96,9 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
context_log: ContextTree::new(),
|
||||
generators: Vec::new(),
|
||||
constants_to_targets: HashMap::new(),
|
||||
targets_to_constants: HashMap::new(),
|
||||
base_arithmetic_results: HashMap::new(),
|
||||
arithmetic_results: HashMap::new(),
|
||||
targets_to_constants: HashMap::new(),
|
||||
current_slots: HashMap::new(),
|
||||
constant_generators: Vec::new(),
|
||||
};
|
||||
@ -665,6 +666,9 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
.constants_to_targets
|
||||
.clone()
|
||||
.into_iter()
|
||||
// We need to enumerate constants_to_targets in some deterministic order to ensure that
|
||||
// building a circuit is deterministic.
|
||||
.sorted_by_key(|(c, _t)| c.to_canonical_u64())
|
||||
.zip(self.constant_generators.clone())
|
||||
{
|
||||
// Set the constant in the constant polynomial.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user