Skip to content

Merge stir#161

Open
jdodinh wants to merge 63 commits intoWizardOfMenlo:mainfrom
jdodinh:merge-stir
Open

Merge stir#161
jdodinh wants to merge 63 commits intoWizardOfMenlo:mainfrom
jdodinh:merge-stir

Conversation

@jdodinh
Copy link
Copy Markdown
Contributor

@jdodinh jdodinh commented Apr 3, 2025

No description provided.

Comment thread src/poly_utils/mod.rs
);
}
}
pub mod lagrange_iterator;
Copy link
Copy Markdown
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.

Comment thread src/stir_ldt/committer/reader.rs Outdated
}

pub struct CommitmentReader<'a, F, MerkleConfig, PowStrategy>(
// TODO: Refactor to use this.
Copy link
Copy Markdown
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?

Comment thread src/stir_ldt/utils.rs Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

?

Comment thread src/stir_ldt/verifier.rs Outdated
folded_domain_size: usize,
}

type ToBeReplaced<F> = (
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ugh

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/poly_utils/mod.rs Outdated
// #[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
Copy Markdown
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
Copy Markdown
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

Comment thread src/stir_ldt/committer/reader.rs Outdated
ProofResult,
};

use crate::whir::utils::DigestToUnitDeserialize;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread src/stir_ldt/committer/reader.rs Outdated
F: FftField,
MerkleConfig: Config<Leaf = [F]>,
VerifierState:
FieldToUnitDeserialize<F> + UnitToField<F> + DigestToUnitDeserialize<MerkleConfig>,
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/stir_ldt/committer/reader.rs Outdated
}
}

impl Default for CommitmentReader {
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/stir_ldt/utils.rs Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Remove?

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/stir_ldt/verifier.rs
&ctx.prev_root,
virtual_evals.iter().map(|a| a.as_ref()),
)
.unwrap()
Copy link
Copy Markdown

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
Copy Markdown

@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.

Copy link
Copy Markdown

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