pub enum CoreHint {
Show 27 variants AllocSegment { dst: CellRef, }, TestLessThan { lhs: ResOperand, rhs: ResOperand, dst: CellRef, }, TestLessThanOrEqual { lhs: ResOperand, rhs: ResOperand, dst: CellRef, }, WideMul128 { lhs: ResOperand, rhs: ResOperand, high: CellRef, low: CellRef, }, DivMod { lhs: ResOperand, rhs: ResOperand, quotient: CellRef, remainder: CellRef, }, Uint256DivMod { dividend0: ResOperand, dividend1: ResOperand, divisor0: ResOperand, divisor1: ResOperand, quotient0: CellRef, quotient1: CellRef, remainder0: CellRef, remainder1: CellRef, }, Uint512DivModByUint256 { dividend0: ResOperand, dividend1: ResOperand, dividend2: ResOperand, dividend3: ResOperand, divisor0: ResOperand, divisor1: ResOperand, quotient0: CellRef, quotient1: CellRef, quotient2: CellRef, quotient3: CellRef, remainder0: CellRef, remainder1: CellRef, }, SquareRoot { value: ResOperand, dst: CellRef, }, Uint256SquareRoot { value_low: ResOperand, value_high: ResOperand, sqrt0: CellRef, sqrt1: CellRef, remainder_low: CellRef, remainder_high: CellRef, sqrt_mul_2_minus_remainder_ge_u128: CellRef, }, LinearSplit { value: ResOperand, scalar: ResOperand, max_x: ResOperand, x: CellRef, y: CellRef, }, AllocFelt252Dict { segment_arena_ptr: ResOperand, }, Felt252DictEntryInit { dict_ptr: ResOperand, key: ResOperand, }, Felt252DictEntryUpdate { dict_ptr: ResOperand, value: ResOperand, }, GetSegmentArenaIndex { dict_end_ptr: ResOperand, dict_index: CellRef, }, InitSquashData { dict_accesses: ResOperand, ptr_diff: ResOperand, n_accesses: ResOperand, big_keys: CellRef, first_key: CellRef, }, GetCurrentAccessIndex { range_check_ptr: ResOperand, }, ShouldSkipSquashLoop { should_skip_loop: CellRef, }, GetCurrentAccessDelta { index_delta_minus1: CellRef, }, ShouldContinueSquashLoop { should_continue: CellRef, }, GetNextDictKey { next_key: CellRef, }, AssertLeFindSmallArcs { range_check_ptr: ResOperand, a: ResOperand, b: ResOperand, }, AssertLeIsFirstArcExcluded { skip_exclude_a_flag: CellRef, }, AssertLeIsSecondArcExcluded { skip_exclude_b_minus_a: CellRef, }, RandomEcPoint { x: CellRef, y: CellRef, }, FieldSqrt { val: ResOperand, sqrt: CellRef, }, DebugPrint { start: ResOperand, end: ResOperand, }, AllocConstantSize { size: ResOperand, dst: CellRef, },
}

Variants§

§

AllocSegment

Fields

§

TestLessThan

§

TestLessThanOrEqual

§

WideMul128

Multiplies two 128-bit integers and returns two 128-bit integers: the high and low parts of the product.

§

DivMod

Fields

§quotient: CellRef
§remainder: CellRef

Computes lhs/rhs and returns the quotient and remainder.

Note: the hint may be used to write an already assigned memory cell.

§

Uint256DivMod

Fields

§dividend0: ResOperand
§dividend1: ResOperand
§divisor0: ResOperand
§divisor1: ResOperand
§quotient0: CellRef
§quotient1: CellRef
§remainder0: CellRef
§remainder1: CellRef

Divides dividend (represented by 2 128bit limbs) by divisor (represented by 2 128bit limbs). Returns the quotient (represented by 2 128bit limbs) and remainder (represented by 2 128bit limbs). In all cases - name0 is the least significant limb.

§

Uint512DivModByUint256

Fields

§dividend0: ResOperand
§dividend1: ResOperand
§dividend2: ResOperand
§dividend3: ResOperand
§divisor0: ResOperand
§divisor1: ResOperand
§quotient0: CellRef
§quotient1: CellRef
§quotient2: CellRef
§quotient3: CellRef
§remainder0: CellRef
§remainder1: CellRef

Divides dividend (represented by 4 128bit limbs) by divisor (represented by 2 128bit limbs). Returns the quotient (represented by 4 128bit limbs) and remainder (represented by 2 128bit limbs). In all cases - name0 is the least significant limb.

§

SquareRoot

Fields

§

Uint256SquareRoot

Fields

§value_low: ResOperand
§value_high: ResOperand
§sqrt0: CellRef
§sqrt1: CellRef
§remainder_low: CellRef
§remainder_high: CellRef
§sqrt_mul_2_minus_remainder_ge_u128: CellRef

Computes the square root of value_low<<128+value_high, stores the 64bit limbs of the result in sqrt0 and sqrt1 as well as the 128bit limbs of the remainder in remainder_low and remainder_high. The remainder is defined as value - sqrt**2. Lastly it checks weather 2*sqrt - remainder >= 2**128.

§

LinearSplit

Finds some x and y such that x * scalar + y = value and x <= max_x.

§

AllocFelt252Dict

Fields

§segment_arena_ptr: ResOperand

Allocates a new dict segment, and write its start address into the dict_infos segment.

§

Felt252DictEntryInit

Fields

§dict_ptr: ResOperand

Fetch the previous value of a key in a dict, and write it in a new dict access.

§

Felt252DictEntryUpdate

Fields

§dict_ptr: ResOperand

Similar to Felt252DictWrite, but updates an existing entry and does not write the previous value to the stack.

§

GetSegmentArenaIndex

Fields

§dict_end_ptr: ResOperand
§dict_index: CellRef

Retrieves the index of the given dict in the dict_infos segment.

§

InitSquashData

Fields

§dict_accesses: ResOperand
§ptr_diff: ResOperand
§n_accesses: ResOperand
§big_keys: CellRef
§first_key: CellRef

Initialized the lists of accesses of each key of a dict as a preparation of squash_dict.

§

GetCurrentAccessIndex

Fields

§range_check_ptr: ResOperand

Retrieves the current index of a dict access to process.

§

ShouldSkipSquashLoop

Fields

§should_skip_loop: CellRef

Writes if the squash_dict loop should be skipped.

§

GetCurrentAccessDelta

Fields

§index_delta_minus1: CellRef

Writes the delta from the current access index to the next one.

§

ShouldContinueSquashLoop

Fields

§should_continue: CellRef

Writes if the squash_dict loop should be continued.

§

GetNextDictKey

Fields

§next_key: CellRef

Writes the next dict key to process.

§

AssertLeFindSmallArcs

Fields

§range_check_ptr: ResOperand

Finds the two small arcs from within [(0,a),(a,b),(b,PRIME)] and writes it to the range_check segment.

§

AssertLeIsFirstArcExcluded

Fields

§skip_exclude_a_flag: CellRef

Writes if the arc (0,a) was excluded.

§

AssertLeIsSecondArcExcluded

Fields

§skip_exclude_b_minus_a: CellRef

Writes if the arc (a,b) was excluded.

§

RandomEcPoint

Fields

Samples a random point on the EC.

§

FieldSqrt

Fields

§sqrt: CellRef

Computes the square root of val, if val is a quadratic residue, and of 3 * val otherwise.

Since 3 is not a quadratic residue, exactly one of val and 3 * val is a quadratic residue (unless val is 0). This allows proving that val is not a quadratic residue.

§

DebugPrint

Fields

Prints the values from start to end. Both must be pointers.

§

AllocConstantSize

Fields

Returns an address with size free locations afterwards.

Trait Implementations§

source§

impl Clone for CoreHint

source§

fn clone(&self) -> CoreHint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CoreHint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decode for CoreHint

source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>

Attempt to deserialise the value from input.
source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<'de> Deserialize<'de> for CoreHint

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Encode for CoreHint

source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )

Convert self to a slice and append it to the destination.
source§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
source§

fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl From<CoreHint> for CoreHintBase

source§

fn from(value: CoreHint) -> Self

Converts to this type from the input type.
source§

impl From<CoreHint> for Hint

source§

fn from(value: CoreHint) -> Self

Converts to this type from the input type.
source§

impl JsonSchema for CoreHint

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl PartialEq<CoreHint> for CoreHint

source§

fn eq(&self, other: &CoreHint) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PythonicHint for CoreHint

source§

impl Serialize for CoreHint

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl EncodeLike<CoreHint> for CoreHint

source§

impl Eq for CoreHint

source§

impl StructuralEq for CoreHint

source§

impl StructuralPartialEq for CoreHint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DecodeAll for Twhere T: Decode,

source§

fn decode_all(input: &mut &[u8]) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
source§

impl<T> DecodeLimit for Twhere T: Decode,

source§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8] ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
source§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> KeyedVec for Twhere T: Codec,

source§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8, Global>

Return an encoding of Self prepended by given slice.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for Twhere T: ?Sized,

source§

fn upcast(&self) -> &T

source§

impl<T> UpcastMut<T> for Twhere T: ?Sized,

source§

fn upcast_mut(&mut self) -> &mut T

source§

impl<S> Codec for Swhere S: Decode + Encode,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

source§

impl<T> EncodeLike<&&T> for Twhere T: Encode,

source§

impl<T> EncodeLike<&T> for Twhere T: Encode,

source§

impl<T> EncodeLike<&mut T> for Twhere T: Encode,

source§

impl<T> EncodeLike<Arc<T, Global>> for Twhere T: Encode,

source§

impl<T> EncodeLike<Box<T, Global>> for Twhere T: Encode,

source§

impl<'a, T> EncodeLike<Cow<'a, T>> for Twhere T: ToOwned + Encode,

source§

impl<T> EncodeLike<Rc<T, Global>> for Twhere T: Encode,

source§

impl<S> FullCodec for Swhere S: Decode + FullEncode,

source§

impl<S> FullEncode for Swhere S: Encode + EncodeLike<S>,