triton_air::challenge_id

Enum ChallengeId

Source
#[repr(usize)]
pub enum ChallengeId {
Show 63 variants CompressProgramDigestIndeterminate = 0, StandardInputIndeterminate = 1, StandardOutputIndeterminate = 2, InstructionLookupIndeterminate = 3, HashInputIndeterminate = 4, HashDigestIndeterminate = 5, SpongeIndeterminate = 6, OpStackIndeterminate = 7, RamIndeterminate = 8, JumpStackIndeterminate = 9, U32Indeterminate = 10, ClockJumpDifferenceLookupIndeterminate = 11, RamTableBezoutRelationIndeterminate = 12, ProgramAddressWeight = 13, ProgramInstructionWeight = 14, ProgramNextInstructionWeight = 15, OpStackClkWeight = 16, OpStackIb1Weight = 17, OpStackPointerWeight = 18, OpStackFirstUnderflowElementWeight = 19, RamClkWeight = 20, RamPointerWeight = 21, RamValueWeight = 22, RamInstructionTypeWeight = 23, JumpStackClkWeight = 24, JumpStackCiWeight = 25, JumpStackJspWeight = 26, JumpStackJsoWeight = 27, JumpStackJsdWeight = 28, ProgramAttestationPrepareChunkIndeterminate = 29, ProgramAttestationSendChunkIndeterminate = 30, HashCIWeight = 31, StackWeight0 = 32, StackWeight1 = 33, StackWeight2 = 34, StackWeight3 = 35, StackWeight4 = 36, StackWeight5 = 37, StackWeight6 = 38, StackWeight7 = 39, StackWeight8 = 40, StackWeight9 = 41, StackWeight10 = 42, StackWeight11 = 43, StackWeight12 = 44, StackWeight13 = 45, StackWeight14 = 46, StackWeight15 = 47, HashCascadeLookupIndeterminate = 48, HashCascadeLookInWeight = 49, HashCascadeLookOutWeight = 50, CascadeLookupIndeterminate = 51, LookupTableInputWeight = 52, LookupTableOutputWeight = 53, LookupTablePublicIndeterminate = 54, U32LhsWeight = 55, U32RhsWeight = 56, U32CiWeight = 57, U32ResultWeight = 58, StandardInputTerminal = 59, StandardOutputTerminal = 60, LookupTablePublicTerminal = 61, CompressedProgramDigest = 62,
}
Expand description

A ChallengeId is a unique, symbolic identifier for a challenge used in Triton VM.

Since almost all challenges relate to the Processor Table in some form, the words “Processor Table” are usually omitted from the ChallengeId’s name.

Variants§

§

CompressProgramDigestIndeterminate = 0

The indeterminate for the Evaluation Argument compressing the program digest into a single extension field element, i.e., CompressedProgramDigest. Relates to program attestation.

§

StandardInputIndeterminate = 1

The indeterminate for the Evaluation Argument with standard input.

§

StandardOutputIndeterminate = 2

The indeterminate for the Evaluation Argument with standard output.

§

InstructionLookupIndeterminate = 3

The indeterminate for the instruction Lookup Argument between the Processor Table and the Program Table guaranteeing that the instructions and their arguments are copied correctly.

§

HashInputIndeterminate = 4

§

HashDigestIndeterminate = 5

§

SpongeIndeterminate = 6

§

OpStackIndeterminate = 7

§

RamIndeterminate = 8

§

JumpStackIndeterminate = 9

§

U32Indeterminate = 10

§

ClockJumpDifferenceLookupIndeterminate = 11

The indeterminate for the Lookup Argument between the Processor Table and all memory-like tables, i.e., the OpStack Table, the Ram Table, and the JumpStack Table, guaranteeing that all clock jump differences are directed forward.

§

RamTableBezoutRelationIndeterminate = 12

The indeterminate for the Contiguity Argument within the Ram Table.

§

ProgramAddressWeight = 13

A weight for linearly combining multiple elements. Applies to

  • Address in the Program Table
  • IP in the Processor Table
§

ProgramInstructionWeight = 14

A weight for linearly combining multiple elements. Applies to

  • Instruction in the Program Table
  • CI in the Processor Table
§

ProgramNextInstructionWeight = 15

A weight for linearly combining multiple elements. Applies to

  • Instruction in the next row in the Program Table
  • NIA in the Processor Table
§

OpStackClkWeight = 16

§

OpStackIb1Weight = 17

§

OpStackPointerWeight = 18

§

OpStackFirstUnderflowElementWeight = 19

§

RamClkWeight = 20

§

RamPointerWeight = 21

§

RamValueWeight = 22

§

RamInstructionTypeWeight = 23

§

JumpStackClkWeight = 24

§

JumpStackCiWeight = 25

§

JumpStackJspWeight = 26

§

JumpStackJsoWeight = 27

§

JumpStackJsdWeight = 28

§

ProgramAttestationPrepareChunkIndeterminate = 29

The indeterminate for compressing a RATE-sized chunk of instructions into a single extension field element. Relates to program attestation.

Used by the evaluation argument PrepareChunkEvalArg and in the Hash Table.

§

ProgramAttestationSendChunkIndeterminate = 30

The indeterminate for the bus over which the RATE-sized chunks of instructions are sent. Relates to program attestation. Used by the evaluation arguments SendChunkEvalArg and ReceiveChunkEvalArg. See also: ProgramAttestationPrepareChunkIndeterminate.

§

HashCIWeight = 31

§

StackWeight0 = 32

§

StackWeight1 = 33

§

StackWeight2 = 34

§

StackWeight3 = 35

§

StackWeight4 = 36

§

StackWeight5 = 37

§

StackWeight6 = 38

§

StackWeight7 = 39

§

StackWeight8 = 40

§

StackWeight9 = 41

§

StackWeight10 = 42

§

StackWeight11 = 43

§

StackWeight12 = 44

§

StackWeight13 = 45

§

StackWeight14 = 46

§

StackWeight15 = 47

§

HashCascadeLookupIndeterminate = 48

The indeterminate for the Lookup Argument between the Hash Table and the Cascade Table.

§

HashCascadeLookInWeight = 49

A weight for linearly combining multiple elements. Applies to

  • *LkIn in the Hash Table, and
  • 2^16·LookInHi + LookInLo in the Cascade Table.
§

HashCascadeLookOutWeight = 50

A weight for linearly combining multiple elements. Applies to

  • *LkOut in the Hash Table, and
  • 2^16·LookOutHi + LookOutLo in the Cascade Table.
§

CascadeLookupIndeterminate = 51

The indeterminate for the Lookup Argument between the Cascade Table and the Lookup Table.

§

LookupTableInputWeight = 52

A weight for linearly combining multiple elements. Applies to

  • LkIn* in the Cascade Table, and
  • LookIn in the Lookup Table.
§

LookupTableOutputWeight = 53

A weight for linearly combining multiple elements. Applies to

  • LkOut* in the Cascade Table, and
  • LookOut in the Lookup Table.
§

LookupTablePublicIndeterminate = 54

The indeterminate for the public Evaluation Argument establishing correctness of the Lookup Table.

§

U32LhsWeight = 55

§

U32RhsWeight = 56

§

U32CiWeight = 57

§

U32ResultWeight = 58

§

StandardInputTerminal = 59

The terminal for the EvaluationArgument with standard input. Makes use of challenge StandardInputIndeterminate.

§

StandardOutputTerminal = 60

The terminal for the EvaluationArgument with standard output. Makes use of challenge StandardOutputIndeterminate.

§

LookupTablePublicTerminal = 61

The terminal for the EvaluationArgument establishing correctness of the Lookup Table. Makes use of challenge LookupTablePublicIndeterminate.

§

CompressedProgramDigest = 62

The digest of the program to be executed, compressed into a single extension field element. The compression happens using an EvaluationArgument under challenge CompressProgramDigestIndeterminate. Relates to program attestation.

Implementations§

Source§

impl ChallengeId

Source

pub const NUM_DERIVED_CHALLENGES: usize = 4usize

The number of challenges derived from other challenges.

The IDs of the derived challenges are guaranteed to be larger than the challenges they are derived from.

Source

pub const fn index(&self) -> usize

Trait Implementations§

Source§

impl<'arbitrary> Arbitrary<'arbitrary> for ChallengeId

Source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
Source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

impl Clone for ChallengeId

Source§

fn clone(&self) -> ChallengeId

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 ChallengeId

Source§

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

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

impl Display for ChallengeId

Source§

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

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

impl EnumCount for ChallengeId

Source§

const COUNT: usize = 63usize

Source§

impl From<ChallengeId> for usize

Source§

fn from(id: ChallengeId) -> Self

Converts to this type from the input type.
Source§

impl Hash for ChallengeId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoEnumIterator for ChallengeId

Source§

impl PartialEq for ChallengeId

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ChallengeId

Source§

impl Eq for ChallengeId

Source§

impl StructuralPartialEq for ChallengeId

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V