-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ivc): impl cyclefold zero step #404
base: 369-feat-support-circuit-p-out
Are you sure you want to change the base?
Conversation
ddd13b6
to
ae71038
Compare
A lot of staff will changed in future PR, not spent a lot of time with IVC::new |
initial_secondary_trace: FoldablePlonkTrace<C2>, | ||
pub support_ck: CommitmentKey<CSup>, | ||
pub support_S: PlonkStructure<CSup::ScalarExt>, | ||
pub support_initial_trace: FoldablePlonkTrace<CSup>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are difference between FoldablePlonkTrace and PlonkTrace? Can we just use one type of trace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a NewType pattern for checking conditions
Using NonZero
as an example: using this type implies that it is not zero and you don't need to use a check everywhere.
Specifically here it saved me hours of debugging or hundreds of lines like assert!(trace.instances.len() == MARKERS_LEN)
.
Well and this has been in the code base for a some time
@@ -20,11 +20,11 @@ pub const RATE: usize = T - 1; | |||
pub const R_F: usize = 10; | |||
pub const R_P: usize = 10; | |||
|
|||
/// Safety: because 32 != 0 | |||
pub const DEFAULT_LIMB_WIDTH: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(32) }; | |||
/// Safety: because 64 != 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason to increase both LIMB_WIDTH and COUNT_LIMIT here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This simply reduced the number of rows, the search for optimal values is left to the benchmark stage
@@ -430,12 +449,55 @@ impl<F: PrimeField> SangriaAccumulatorInstance<F> { | |||
|
|||
pub type SangriaCrossTermCommits<F> = Vec<(AssignedValue<F>, AssignedValue<F>)>; | |||
|
|||
pub struct PairedIncoming<F: PrimeField> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NBD: add a short comment to describe what is it, e.g. something like
// instance from support circuit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will add at the end of PR-train ✍️
@@ -408,7 +576,121 @@ impl<const ARITY: usize, F: PrimeField, RO: ROTrait<F>> AbsorbInRO<F, RO> for In | |||
|
|||
impl<const ARITY: usize, F: PrimeField> Input<ARITY, F> { | |||
pub(super) fn get_without_witness(&self) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double confirm, this is used for initial input at step zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in pp.new
Motivation
Part of #373 and testing of #369
Overview
The first part of the implementation of the zero step cyclefold. Split because of size of changes
Temporarily commented out part of cyclefold step folding circuit concerning pairing check