mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 16:23:12 +00:00
Witness generation fix (#266)
When we went through newly-populated values, as in
for &(watch, _) in &buffer.target_values
`watch` was not necessarily a representative, because it came from a `GeneratedValues`, whose `set_target` doesn't know about representatives.
This commit is contained in:
parent
7360391515
commit
e8cb2bbd22
@ -51,7 +51,9 @@ pub(crate) fn generate_partial_witness<F: RichField + Extendable<D>, const D: us
|
||||
|
||||
// Enqueue unfinished generators that were watching one of the newly populated targets.
|
||||
for &(watch, _) in &buffer.target_values {
|
||||
let opt_watchers = generator_indices_by_watches.get(&witness.target_index(watch));
|
||||
let watch_index = witness.target_index(watch);
|
||||
let watch_rep_index = witness.forest[watch_index].parent;
|
||||
let opt_watchers = generator_indices_by_watches.get(&watch_rep_index);
|
||||
if let Some(watchers) = opt_watchers {
|
||||
for &watching_generator_idx in watchers {
|
||||
if !generator_is_expired[watching_generator_idx] {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user