-
Notifications
You must be signed in to change notification settings - Fork 595
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
Add init_circuit_data. #5481
Add init_circuit_data. #5481
Conversation
4648ded
to
6e59257
Compare
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.
Reviewed 14 of 15 files at r1, 1 of 2 files at r2.
Reviewable status: 14 of 16 files reviewed, 8 unresolved discussions (waiting on @ilyalesokhin-starkware)
corelib/src/circuit.cairo
line 15 at r1 (raw file):
extern type CircuitInputAccumulator<C>; impl CircuitInputAccumulatorDrop<C> of Drop<CircuitInputAccumulator<C>>;
Suggestion:
pub type u96 = core::internal::BoundedInt<0, 79228162514264337593543950335>;
pub extern type RangeCheck96;
/// Defines an input for a circuit.
#[phantom]
pub extern type CircuitInput<const N: usize>;
/// Initializes the input data for running an instance of the circuit.
extern fn init_circuit_data<C>() -> CircuitInputAccumulator<C> implicits(RangeCheck96) nopanic;
/// Type for accumulating inputs into the circuit instance's data.
extern type CircuitInputAccumulator<C>;
impl CircuitInputAccumulatorDrop<C> of Drop<CircuitInputAccumulator<C>>;
crates/cairo-lang-sierra/src/extensions/mod.rs
line 64 at r1 (raw file):
/// Extracts the generic args of `ty`, additionally validates it is of generic type `T`. fn extract_type_generic_args<T: NamedType>(
is this useful in other places already?
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 32 at r1 (raw file):
} fn is_circuit_component(
doc and maybe use extract_type_generic_args
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 65 at r1 (raw file):
pub struct ConcreteCircuitInput { pub info: TypeInfo,
doc members.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 97 at r1 (raw file):
} /// Add mod gate type.
fix doc.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 145 at r1 (raw file):
} fn parse_circuit(
doc
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 170 at r1 (raw file):
} /// Libfunc for ignoring a plain old data object.
fix doc
crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs
line 19 at r1 (raw file):
/// Handles a Sierra statement for appending an element to an array. fn build_array_append(
rename and fix doc.
6e59257
to
92960e5
Compare
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.
Reviewed 1 of 2 files at r2, 2 of 3 files at r3, all commit messages.
Reviewable status: 16 of 17 files reviewed, 7 unresolved discussions (waiting on @ilyalesokhin-starkware)
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.
Reviewable status: 16 of 17 files reviewed, 7 unresolved discussions (waiting on @orizi)
corelib/src/circuit.cairo
line 15 at r1 (raw file):
extern type CircuitInputAccumulator<C>; impl CircuitInputAccumulatorDrop<C> of Drop<CircuitInputAccumulator<C>>;
Done.
crates/cairo-lang-sierra/src/extensions/mod.rs
line 64 at r1 (raw file):
Previously, orizi wrote…
is this useful in other places already?
yes, I meant to move it from 'crates/cairo-lang-sierra/src/extensions/modules/const_type.rs.'
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 32 at r1 (raw file):
Previously, orizi wrote…
doc and maybe use extract_type_generic_args
Done.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 65 at r1 (raw file):
Previously, orizi wrote…
doc members.
Done.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 97 at r1 (raw file):
Previously, orizi wrote…
fix doc.
removed as the type is documented in circuits.cairo
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 145 at r1 (raw file):
Previously, orizi wrote…
doc
Done.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 170 at r1 (raw file):
Previously, orizi wrote…
fix doc
removed as the libfunc is documented in circuits.cairo
92960e5
to
4d75b1c
Compare
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.
Reviewable status: 15 of 17 files reviewed, 7 unresolved discussions (waiting on @orizi)
crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs
line 19 at r1 (raw file):
Previously, orizi wrote…
rename and fix doc.
Done.
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.
Reviewed 1 of 3 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 65 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
Done.
With ///
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 97 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
removed as the type is documented in circuits.cairo
We usually doc in both, as these appear to different sort of users.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 170 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
removed as the libfunc is documented in circuits.cairo
Same
Previously, orizi wrote…
just copy the same comment? |
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 97 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
just copy the same comment?
good enough for me
4d75b1c
to
08c847b
Compare
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.
Reviewable status: 15 of 17 files reviewed, 3 unresolved discussions (waiting on @orizi)
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 65 at r1 (raw file):
Previously, orizi wrote…
With ///
Done.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 97 at r1 (raw file):
Previously, orizi wrote…
good enough for me
Done.
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 170 at r1 (raw file):
Previously, orizi wrote…
Same
Done.
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.
Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 175 at r5 (raw file):
} /// libfunc for Initializing the input data for running an instance of the circuit.
Suggestion:
/// Libfunc for initializing the input data for running an instance of the circuit.
08c847b
to
29e7130
Compare
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-sierra/src/extensions/modules/circuit.rs
line 175 at r5 (raw file):
} /// libfunc for Initializing the input data for running an instance of the circuit.
Done.
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.
Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)
29e7130
to
7eb8c59
Compare
7eb8c59
to
37edf2e
Compare
This change is