pub struct MainTrace { /* private fields */ }Implementations§
Source§impl MainTrace
impl MainTrace
Sourcepub fn new(matrix: RowMajorMatrix<Felt>, last_program_row: RowIndex) -> Self
pub fn new(matrix: RowMajorMatrix<Felt>, last_program_row: RowIndex) -> Self
Creates a MainTrace from a [RowMajorMatrix].
Sourcepub fn from_parts(
core_rm: Vec<Felt>,
chiplets_rm: Vec<Felt>,
range_checker_cols: [Vec<Felt>; 2],
num_rows: usize,
last_program_row: RowIndex,
) -> Self
pub fn from_parts( core_rm: Vec<Felt>, chiplets_rm: Vec<Felt>, range_checker_cols: [Vec<Felt>; 2], num_rows: usize, last_program_row: RowIndex, ) -> Self
Builds from build_trace outputs: core and chiplets row-major, range checker column
vectors.
Sourcepub fn from_transposed(
transposed: RowMajorMatrix<Felt>,
last_program_row: RowIndex,
) -> Self
pub fn from_transposed( transposed: RowMajorMatrix<Felt>, last_program_row: RowIndex, ) -> Self
transposed is main.transpose() where main was num_rows × num_cols.
Sourcepub fn to_row_major(&self) -> RowMajorMatrix<Felt>
pub fn to_row_major(&self) -> RowMajorMatrix<Felt>
Row-major matrix of this trace.
Sourcepub fn to_row_major_stripped(&self, target_width: usize) -> RowMajorMatrix<Felt>
pub fn to_row_major_stripped(&self, target_width: usize) -> RowMajorMatrix<Felt>
Like to_row_major but only the first target_width columns.
pub fn num_rows(&self) -> usize
pub fn last_program_row(&self) -> RowIndex
Sourcepub fn read_row_into(&self, row_idx: usize, row: &mut [Felt])
pub fn read_row_into(&self, row_idx: usize, row: &mut [Felt])
Copies one logical row into row (must be at least as long as the stored width).
Sourcepub fn get_column(&self, col_idx: usize) -> Vec<Felt>
pub fn get_column(&self, col_idx: usize) -> Vec<Felt>
Returns one column as a new vector.
Sourcepub fn columns(&self) -> impl Iterator<Item = Vec<Felt>> + '_
pub fn columns(&self) -> impl Iterator<Item = Vec<Felt>> + '_
Iterates over all columns (materialises each one).
pub fn get_column_range(&self, range: Range<usize>) -> Vec<Vec<Felt>>
Sourcepub fn addr(&self, i: RowIndex) -> Felt
pub fn addr(&self, i: RowIndex) -> Felt
Returns the value in the block address column at the row i.
Sourcepub fn is_addr_change(&self, i: RowIndex) -> bool
pub fn is_addr_change(&self, i: RowIndex) -> bool
Helper method to detect change of address.
Sourcepub fn helper_register(&self, i: usize, row: RowIndex) -> Felt
pub fn helper_register(&self, i: usize, row: RowIndex) -> Felt
The i-th decoder helper register at row.
Sourcepub fn decoder_hasher_state(&self, i: RowIndex) -> [Felt; 8]
pub fn decoder_hasher_state(&self, i: RowIndex) -> [Felt; 8]
Returns the hasher state at row i.
Sourcepub fn decoder_hasher_state_first_half(&self, i: RowIndex) -> Word
pub fn decoder_hasher_state_first_half(&self, i: RowIndex) -> Word
Returns the first half of the hasher state at row i.
Sourcepub fn decoder_hasher_state_second_half(&self, i: RowIndex) -> Word
pub fn decoder_hasher_state_second_half(&self, i: RowIndex) -> Word
Returns the second half of the hasher state at row i.
Sourcepub fn decoder_hasher_state_element(&self, element: usize, i: RowIndex) -> Felt
pub fn decoder_hasher_state_element(&self, element: usize, i: RowIndex) -> Felt
Returns a specific element from the hasher state at row i.
Sourcepub fn fn_hash(&self, i: RowIndex) -> [Felt; 4]
pub fn fn_hash(&self, i: RowIndex) -> [Felt; 4]
Returns the current function hash (i.e., root) at row i.
Sourcepub fn is_loop_body_flag(&self, i: RowIndex) -> Felt
pub fn is_loop_body_flag(&self, i: RowIndex) -> Felt
Returns the is_loop_body flag at row i.
Sourcepub fn is_loop_flag(&self, i: RowIndex) -> Felt
pub fn is_loop_flag(&self, i: RowIndex) -> Felt
Returns the is_loop flag at row i.
Sourcepub fn is_call_flag(&self, i: RowIndex) -> Felt
pub fn is_call_flag(&self, i: RowIndex) -> Felt
Returns the is_call flag at row i.
Sourcepub fn is_syscall_flag(&self, i: RowIndex) -> Felt
pub fn is_syscall_flag(&self, i: RowIndex) -> Felt
Returns the is_syscall flag at row i.
Sourcepub fn op_batch_flag(&self, i: RowIndex) -> [Felt; 3]
pub fn op_batch_flag(&self, i: RowIndex) -> [Felt; 3]
Returns the operation batch flags at row i. This indicates the number of op groups in the current batch that is being processed.
Sourcepub fn group_count(&self, i: RowIndex) -> Felt
pub fn group_count(&self, i: RowIndex) -> Felt
Returns the operation group count. This indicates the number of operation that remain to be executed in the current span block.
Sourcepub fn delta_group_count(&self, i: RowIndex) -> Felt
pub fn delta_group_count(&self, i: RowIndex) -> Felt
Returns the delta between the current and next group counts.
Sourcepub fn is_in_span(&self, i: RowIndex) -> Felt
pub fn is_in_span(&self, i: RowIndex) -> Felt
Returns the in_span flag at row i.
Sourcepub fn get_op_code(&self, i: RowIndex) -> Felt
pub fn get_op_code(&self, i: RowIndex) -> Felt
Constructs the i-th op code value from its individual bits.
Sourcepub fn row_iter(&self) -> impl Iterator<Item = RowIndex>
pub fn row_iter(&self) -> impl Iterator<Item = RowIndex>
Returns an iterator of RowIndex values over the row indices of this trace.
Sourcepub fn is_left_shift(&self, i: RowIndex) -> bool
pub fn is_left_shift(&self, i: RowIndex) -> bool
Returns a flag indicating whether the current operation induces a left shift of the operand stack.
Sourcepub fn is_right_shift(&self, i: RowIndex) -> bool
pub fn is_right_shift(&self, i: RowIndex) -> bool
Returns a flag indicating whether the current operation induces a right shift of the operand stack.
Sourcepub fn stack_depth(&self, i: RowIndex) -> Felt
pub fn stack_depth(&self, i: RowIndex) -> Felt
Returns the value of the stack depth column at row i.
Sourcepub fn stack_element(&self, column: usize, i: RowIndex) -> Felt
pub fn stack_element(&self, column: usize, i: RowIndex) -> Felt
Returns the element at row i in a given stack trace column.
Sourcepub fn stack_word(&self, start: usize, i: RowIndex) -> Word
pub fn stack_word(&self, start: usize, i: RowIndex) -> Word
Returns a word from the stack starting at start index at row i, in LE order.
The word is read such that word[0] comes from stack position start (top),
word[1] from start + 1, etc.
Sourcepub fn parent_overflow_address(&self, i: RowIndex) -> Felt
pub fn parent_overflow_address(&self, i: RowIndex) -> Felt
Returns the address of the top element in the stack overflow table at row i.
Sourcepub fn is_non_empty_overflow(&self, i: RowIndex) -> bool
pub fn is_non_empty_overflow(&self, i: RowIndex) -> bool
Returns a flag indicating whether the overflow stack is non-empty.
Sourcepub fn chiplet_selector_0(&self, i: RowIndex) -> Felt
pub fn chiplet_selector_0(&self, i: RowIndex) -> Felt
Returns chiplet column number 0 at row i.
Sourcepub fn chiplet_selector_1(&self, i: RowIndex) -> Felt
pub fn chiplet_selector_1(&self, i: RowIndex) -> Felt
Returns chiplet column number 1 at row i.
Sourcepub fn chiplet_selector_2(&self, i: RowIndex) -> Felt
pub fn chiplet_selector_2(&self, i: RowIndex) -> Felt
Returns chiplet column number 2 at row i.
Sourcepub fn chiplet_selector_3(&self, i: RowIndex) -> Felt
pub fn chiplet_selector_3(&self, i: RowIndex) -> Felt
Returns chiplet column number 3 at row i.
Sourcepub fn chiplet_selector_4(&self, i: RowIndex) -> Felt
pub fn chiplet_selector_4(&self, i: RowIndex) -> Felt
Returns chiplet column number 4 at row i.
Sourcepub fn chiplet_selector_5(&self, i: RowIndex) -> Felt
pub fn chiplet_selector_5(&self, i: RowIndex) -> Felt
Returns chiplet column number 5 at row i.
Sourcepub fn is_hash_row(&self, i: RowIndex) -> bool
pub fn is_hash_row(&self, i: RowIndex) -> bool
Returns true if a row is part of the hash chiplet.
Sourcepub fn chiplet_hasher_state(&self, i: RowIndex) -> [Felt; 12]
pub fn chiplet_hasher_state(&self, i: RowIndex) -> [Felt; 12]
Returns the (full) state of the hasher chiplet at row i.
Sourcepub fn chiplet_node_index(&self, i: RowIndex) -> Felt
pub fn chiplet_node_index(&self, i: RowIndex) -> Felt
Returns the hasher’s node index column at row i
Sourcepub fn is_bitwise_row(&self, i: RowIndex) -> bool
pub fn is_bitwise_row(&self, i: RowIndex) -> bool
Returns true if a row is part of the bitwise chiplet.
Sourcepub fn chiplet_bitwise_a(&self, i: RowIndex) -> Felt
pub fn chiplet_bitwise_a(&self, i: RowIndex) -> Felt
Returns the bitwise column holding the aggregated value of input a at row i.
Sourcepub fn chiplet_bitwise_b(&self, i: RowIndex) -> Felt
pub fn chiplet_bitwise_b(&self, i: RowIndex) -> Felt
Returns the bitwise column holding the aggregated value of input b at row i.
Sourcepub fn chiplet_bitwise_z(&self, i: RowIndex) -> Felt
pub fn chiplet_bitwise_z(&self, i: RowIndex) -> Felt
Returns the bitwise column holding the aggregated value of the output at row i.
Sourcepub fn is_memory_row(&self, i: RowIndex) -> bool
pub fn is_memory_row(&self, i: RowIndex) -> bool
Returns true if a row is part of the memory chiplet.
Sourcepub fn chiplet_memory_ctx(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_ctx(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing memory context.
Sourcepub fn chiplet_memory_word(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_word(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing memory address.
Sourcepub fn chiplet_memory_idx0(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_idx0(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing 0th bit of the word index.
Sourcepub fn chiplet_memory_idx1(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_idx1(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing 1st bit of the word index.
Sourcepub fn chiplet_memory_clk(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_clk(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing clock cycle.
Sourcepub fn chiplet_memory_value_0(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_value_0(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the zeroth memory value element.
Sourcepub fn chiplet_memory_value_1(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_value_1(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the first memory value element.
Sourcepub fn chiplet_memory_value_2(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_value_2(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the second memory value element.
Sourcepub fn chiplet_memory_value_3(&self, i: RowIndex) -> Felt
pub fn chiplet_memory_value_3(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the third memory value element.
Sourcepub fn is_ace_row(&self, i: RowIndex) -> bool
pub fn is_ace_row(&self, i: RowIndex) -> bool
Returns true if a row is part of the ACE chiplet.
pub fn chiplet_ace_start_selector(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_block_selector(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_ctx(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_ptr(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_clk(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_eval_op(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_num_eval_rows(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_id_0(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_v_0_0(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_v_0_1(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_wire_0(&self, i: RowIndex) -> [Felt; 3]
pub fn chiplet_ace_id_1(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_v_1_0(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_v_1_1(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_wire_1(&self, i: RowIndex) -> [Felt; 3]
pub fn chiplet_ace_id_2(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_v_2_0(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_v_2_1(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_wire_2(&self, i: RowIndex) -> [Felt; 3]
pub fn chiplet_ace_m_1(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_m_0(&self, i: RowIndex) -> Felt
pub fn chiplet_ace_is_read_row(&self, i: RowIndex) -> bool
pub fn chiplet_ace_is_eval_row(&self, i: RowIndex) -> bool
Sourcepub fn is_kernel_row(&self, i: RowIndex) -> bool
pub fn is_kernel_row(&self, i: RowIndex) -> bool
Returns true if a row is part of the kernel chiplet.
Sourcepub fn chiplet_kernel_is_first_hash_row(&self, i: RowIndex) -> bool
pub fn chiplet_kernel_is_first_hash_row(&self, i: RowIndex) -> bool
Returns true when the i-th row of the s_first column in the kernel chiplet is one, i.e.,
when this is the first row in a range of rows containing the same kernel proc hash.
Sourcepub fn chiplet_kernel_root_0(&self, i: RowIndex) -> Felt
pub fn chiplet_kernel_root_0(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the zeroth element of the kernel procedure root.
Sourcepub fn chiplet_kernel_root_1(&self, i: RowIndex) -> Felt
pub fn chiplet_kernel_root_1(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the first element of the kernel procedure root.
Sourcepub fn chiplet_kernel_root_2(&self, i: RowIndex) -> Felt
pub fn chiplet_kernel_root_2(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the second element of the kernel procedure root.
Sourcepub fn chiplet_kernel_root_3(&self, i: RowIndex) -> Felt
pub fn chiplet_kernel_root_3(&self, i: RowIndex) -> Felt
Returns the i-th row of the chiplet column containing the third element of the kernel procedure root.
Sourcepub fn f_mv(&self, i: RowIndex) -> bool
pub fn f_mv(&self, i: RowIndex) -> bool
Returns true if the hasher chiplet flags indicate the initialization of verifying
a Merkle path to an old node during Merkle root update procedure (MRUPDATE).
Sourcepub fn f_mva(&self, i: RowIndex) -> bool
pub fn f_mva(&self, i: RowIndex) -> bool
Returns true if the hasher chiplet flags indicate the continuation of verifying
a Merkle path to an old node during Merkle root update procedure (MRUPDATE).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MainTrace
impl RefUnwindSafe for MainTrace
impl Send for MainTrace
impl Sync for MainTrace
impl Unpin for MainTrace
impl UnsafeUnpin for MainTrace
impl UnwindSafe for MainTrace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more