Skip to content

Conversation

@jdodinh
Copy link
Contributor

@jdodinh jdodinh commented Apr 3, 2025

No description provided.

);
}
}
pub mod lagrange_iterator;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these at the end? This file seems to have some conflicts.

}

pub struct CommitmentReader<'a, F, MerkleConfig, PowStrategy>(
// TODO: Refactor to use this.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can even just remove it no?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

folded_domain_size: usize,
}

type ToBeReplaced<F> = (
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I forgot about this. Will remove.

Copy link
Owner

@WizardOfMenlo WizardOfMenlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think let's wait a bit to merge, I think things are still in a bit of a rough stage, left some comments.

// #[derive(Debug, Clone, PartialEq, Eq)]
// pub struct MultilinearPoint<F>(pub Vec<F>);

pub fn eq_poly<F>(coords: &MultilinearPoint<F>, point: BinaryHypercubePoint) -> F
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now lives in multilinear. Please go ahead and double checked that these are not duplicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 16bb823

ProofResult,
};

use crate::whir::utils::DigestToUnitDeserialize;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can move this to a common fs_utils/util module? Because it's now WHIR specific anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. There is a lot of streamlining and logic separation to do, and I just thought it would be nice to deal with it separately after this is merged. I could do it in this PR if you prefer, though. lmk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 271d84d

F: FftField,
MerkleConfig: Config<Leaf = [F]>,
VerifierState:
FieldToUnitDeserialize<F> + UnitToField<F> + DigestToUnitDeserialize<MerkleConfig>,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trait bound here can be simplified

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified in 10e89ca

}
}

impl Default for CommitmentReader {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a #[derive] istead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f724060

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 41303b7

Copy link
Owner

@WizardOfMenlo WizardOfMenlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments

&ctx.prev_root,
virtual_evals.iter().map(|a| a.as_ref()),
)
.unwrap()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done for the final round, so it might be necessary here, too. I don’t yet understand the code well enough to be sure.

Suggested change
.unwrap()
.unwrap() || merkle_proof.leaf_indexes != r_shift_indexes

Copy link

@jan-ferdinand jan-ferdinand Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the merkle_proof.leaf_indexes are implicitly checked later since the corresponding points become part of the quotient set for that round. However, the final_merkle_proof.leaf_indexes are also implicitly checked against the final_r_shift_indexes later, since the latter are used to get the final_evaluations, which are then compared to the final_folds.

So it seems to me that checking the correctness of (final_)merkle_proof.leaf_indexes is redundant in any case, but doing so might make the error cleaner in case of verification failure. If that cleaner error is irrelevant, then I don’t think the check is necessary at all; if the cleaner error is the reason the check exists for the final indices, I’d argue the code becomes more consistent when my suggestion above is included.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: feel free to let me know in case this PR is stale, then I’ll stop necroposting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants