pub enum Hint {
Show 35 variants AllocSegment { dst: CellRef, }, TestLessThan { lhs: ResOperand, rhs: ResOperand, dst: CellRef, }, TestLessThanOrEqual { lhs: ResOperand, rhs: ResOperand, dst: CellRef, }, DivMod { lhs: ResOperand, rhs: ResOperand, quotient: CellRef, remainder: CellRef, }, SquareRoot { value: ResOperand, dst: CellRef, }, LinearSplit { value: ResOperand, scalar: ResOperand, max_x: ResOperand, x: CellRef, y: CellRef, }, AllocDictFeltTo { dict_manager_ptr: ResOperand, }, DictFeltToRead { dict_ptr: ResOperand, key: ResOperand, value_dst: CellRef, }, DictFeltToWrite { dict_ptr: ResOperand, key: ResOperand, value: ResOperand, prev_value_dst: CellRef, }, GetDictIndex { dict_manager_ptr: ResOperand, dict_end_ptr: ResOperand, dict_index: CellRef, }, SetDictTrackerEnd { squashed_dict_start: ResOperand, squashed_dict_end: ResOperand, }, 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, }, AssertCurrentAccessIndicesIsEmpty, AssertAllAccessesUsed { n_used_accesses: CellRef, }, AssertAllKeysUsed, GetNextDictKey { next_key: CellRef, }, AssertLtAssertValidInput { a: ResOperand, b: ResOperand, }, AssertLeFindSmallArcs { range_check_ptr: ResOperand, a: ResOperand, b: ResOperand, }, AssertLeIsFirstArcExcluded { skip_exclude_a_flag: CellRef, }, AssertLeIsSecondArcExcluded { skip_exclude_b_minus_a: CellRef, }, AssertLeAssertThirdArcExcluded, RandomEcPoint { x: CellRef, y: CellRef, }, FieldSqrt { val: ResOperand, sqrt: CellRef, }, SystemCall { system: ResOperand, }, DebugPrint { start: ResOperand, end: ResOperand, }, AllocConstantSize { size: ResOperand, dst: CellRef, }, SetBlockNumber { value: ResOperand, }, SetBlockTimestamp { value: ResOperand, }, SetCallerAddress { value: ResOperand, }, SetContractAddress { value: ResOperand, }, SetSequencerAddress { value: ResOperand, },
}

Variants§

§

AllocSegment

Fields

§

TestLessThan

§

TestLessThanOrEqual

§

DivMod

Fields

§quotient: CellRef
§remainder: CellRef
§

SquareRoot

Fields

§

LinearSplit

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

§

AllocDictFeltTo

Fields

§dict_manager_ptr: ResOperand

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

§

DictFeltToRead

Fields

§dict_ptr: ResOperand
§value_dst: CellRef

Retrives and writes the value corresponding to the given dict and key from the vm dict_manager.

§

DictFeltToWrite

Fields

§dict_ptr: ResOperand
§prev_value_dst: CellRef

Sets the value correspoinding to the key in the vm dict_manager.

§

GetDictIndex

Fields

§dict_manager_ptr: ResOperand
§dict_end_ptr: ResOperand
§dict_index: CellRef

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

§

SetDictTrackerEnd

Fields

§squashed_dict_start: ResOperand
§squashed_dict_end: ResOperand

Sets the end of a finalized dict in the vm tracker of the dict.

§

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

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

§

AssertCurrentAccessIndicesIsEmpty

Asserts that the current access indices list is empty (after the loop).

§

AssertAllAccessesUsed

Fields

§n_used_accesses: CellRef

Asserts that the number of used accesses is equal to the length of the original accesses list.

§

AssertAllKeysUsed

Asserts that the keys list is empty.

§

GetNextDictKey

Fields

§next_key: CellRef

Writes the next dict key to process.

§

AssertLtAssertValidInput

Asserts that the input represents integers and that a<b.

§

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.

§

AssertLeAssertThirdArcExcluded

Asserts that the arc (b, PRIME) 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.

§

SystemCall

Fields

§system: ResOperand

Represents a hint that triggers a system call.

§

DebugPrint

Fields

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

§

AllocConstantSize

Fields

Returns an address with size free locations afterwards.

§

SetBlockNumber

Fields

§

SetBlockTimestamp

Fields

§

SetCallerAddress

Fields

§

SetContractAddress

Fields

§

SetSequencerAddress

Fields

Trait Implementations§

source§

impl Clone for Hint

source§

fn clone(&self) -> Hint

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 Hint

source§

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

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

impl Display for Hint

source§

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

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

impl PartialEq<Hint> for Hint

source§

fn eq(&self, other: &Hint) -> 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 Eq for Hint

source§

impl StructuralEq for Hint

source§

impl StructuralPartialEq for Hint

Auto Trait Implementations§

§

impl RefUnwindSafe for Hint

§

impl Send for Hint

§

impl Sync for Hint

§

impl Unpin for Hint

§

impl UnwindSafe for Hint

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
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.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> 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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.
const: unstable · 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.
const: unstable · 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