pub struct ExecutionTracer {Show 14 fields
pub overflow_table: OverflowTable,
pub overflow_replay: StackOverflowReplay,
pub block_stack: BlockStack,
pub block_stack_replay: BlockStackReplay,
pub hasher_chiplet_shim: HasherChipletShim,
pub memory_reads: MemoryReadsReplay,
pub advice: AdviceReplay,
pub external: MastForestResolutionReplay,
pub range_checker: RangeCheckerReplay,
pub memory_writes: MemoryWritesReplay,
pub bitwise: BitwiseReplay,
pub kernel: KernelReplay,
pub hasher_for_chiplet: HasherRequestReplay,
pub ace: AceReplay,
/* private fields */
}Expand description
Builder for recording the context to generate trace fragments during execution.
Specifically, this records the information necessary to be able to generate the trace in fragments of configurable length. This requires storing state at the very beginning of the fragment before any operations are executed, as well as recording the various values read during execution in the corresponding “replays” (e.g. values read from memory are recorded in MemoryReadsReplay, values read from the advice provider are recorded in AdviceReplay, etc).
Then, to generate a trace fragment, we initialize the state of the processor using the stored snapshot from the beginning of the fragment, and replay the recorded values as they are encountered during execution (e.g. when encountering a memory read operation, we will replay the value rather than querying the memory chiplet).
Fields§
§overflow_table: OverflowTable§overflow_replay: StackOverflowReplay§block_stack: BlockStack§block_stack_replay: BlockStackReplay§hasher_chiplet_shim: HasherChipletShim§memory_reads: MemoryReadsReplay§advice: AdviceReplay§external: MastForestResolutionReplay§range_checker: RangeCheckerReplay§memory_writes: MemoryWritesReplay§bitwise: BitwiseReplay§kernel: KernelReplay§hasher_for_chiplet: HasherRequestReplay§ace: AceReplayImplementations§
Source§impl ExecutionTracer
impl ExecutionTracer
Sourcepub fn new(fragment_size: usize) -> Self
pub fn new(fragment_size: usize) -> Self
Creates a new ExecutionTracer with the given fragment size.
Sourcepub fn into_trace_generation_context(
self,
final_pc_transcript: PrecompileTranscript,
) -> TraceGenerationContext
pub fn into_trace_generation_context( self, final_pc_transcript: PrecompileTranscript, ) -> TraceGenerationContext
Convert the ExecutionTracer into a TraceGenerationContext using the data accumulated
during execution.
The final_pc_transcript parameter represents the final precompile transcript at
the end of execution, which is needed for the auxiliary trace column builder.
Trait Implementations§
Source§impl Debug for ExecutionTracer
impl Debug for ExecutionTracer
Source§impl Tracer for ExecutionTracer
impl Tracer for ExecutionTracer
Source§fn start_clock_cycle(
&mut self,
processor: &FastProcessor,
execution_state: NodeExecutionState,
continuation_stack: &mut ContinuationStack,
current_forest: &Arc<MastForest>,
)
fn start_clock_cycle( &mut self, processor: &FastProcessor, execution_state: NodeExecutionState, continuation_stack: &mut ContinuationStack, current_forest: &Arc<MastForest>, )
When sufficiently many clock cycles have elapsed, starts a new trace state. Also updates the internal block stack.
Source§fn record_mast_forest_resolution(
&mut self,
node_id: MastNodeId,
forest: &Arc<MastForest>,
)
fn record_mast_forest_resolution( &mut self, node_id: MastNodeId, forest: &Arc<MastForest>, )
Source§fn record_hasher_permute(
&mut self,
input_state: [Felt; 12],
output_state: [Felt; 12],
)
fn record_hasher_permute( &mut self, input_state: [Felt; 12], output_state: [Felt; 12], )
Hasher::permute().Source§fn record_hasher_build_merkle_root(
&mut self,
node: Word,
path: Option<&MerklePath>,
index: Felt,
output_root: Word,
)
fn record_hasher_build_merkle_root( &mut self, node: Word, path: Option<&MerklePath>, index: Felt, output_root: Word, )
Hasher::build_merkle_root(). Read moreSource§fn record_hasher_update_merkle_root(
&mut self,
old_value: Word,
new_value: Word,
path: Option<&MerklePath>,
index: Felt,
old_root: Word,
new_root: Word,
)
fn record_hasher_update_merkle_root( &mut self, old_value: Word, new_value: Word, path: Option<&MerklePath>, index: Felt, old_root: Word, new_root: Word, )
Hasher::update_merkle_root(). Read moreSource§fn record_memory_read_element(
&mut self,
element: Felt,
addr: Felt,
ctx: ContextId,
clk: RowIndex,
)
fn record_memory_read_element( &mut self, element: Felt, addr: Felt, ctx: ContextId, clk: RowIndex, )
Source§fn record_memory_read_word(
&mut self,
word: Word,
addr: Felt,
ctx: ContextId,
clk: RowIndex,
)
fn record_memory_read_word( &mut self, word: Word, addr: Felt, ctx: ContextId, clk: RowIndex, )
Source§fn record_memory_write_element(
&mut self,
element: Felt,
addr: Felt,
ctx: ContextId,
clk: RowIndex,
)
fn record_memory_write_element( &mut self, element: Felt, addr: Felt, ctx: ContextId, clk: RowIndex, )
Source§fn record_memory_write_word(
&mut self,
word: Word,
addr: Felt,
ctx: ContextId,
clk: RowIndex,
)
fn record_memory_write_word( &mut self, word: Word, addr: Felt, ctx: ContextId, clk: RowIndex, )
Source§fn record_advice_pop_stack(&mut self, value: Felt)
fn record_advice_pop_stack(&mut self, value: Felt)
Source§fn record_advice_pop_stack_word(&mut self, word: Word)
fn record_advice_pop_stack_word(&mut self, word: Word)
Source§fn record_advice_pop_stack_dword(&mut self, words: [Word; 2])
fn record_advice_pop_stack_dword(&mut self, words: [Word; 2])
Source§fn record_u32and(&mut self, a: Felt, b: Felt)
fn record_u32and(&mut self, a: Felt, b: Felt)
Source§fn record_u32xor(&mut self, a: Felt, b: Felt)
fn record_u32xor(&mut self, a: Felt, b: Felt)
Source§fn record_u32_range_checks(&mut self, clk: RowIndex, u32_lo: Felt, u32_hi: Felt)
fn record_u32_range_checks(&mut self, clk: RowIndex, u32_lo: Felt, u32_hi: Felt)
Source§fn record_kernel_proc_access(&mut self, proc_hash: Word)
fn record_kernel_proc_access(&mut self, proc_hash: Word)
Source§fn record_circuit_evaluation(
&mut self,
clk: RowIndex,
circuit_eval: CircuitEvaluation,
)
fn record_circuit_evaluation( &mut self, clk: RowIndex, circuit_eval: CircuitEvaluation, )
Source§fn increment_clk(&mut self)
fn increment_clk(&mut self)
Source§fn increment_stack_size(&mut self, processor: &FastProcessor)
fn increment_stack_size(&mut self, processor: &FastProcessor)
Source§fn decrement_stack_size(&mut self)
fn decrement_stack_size(&mut self)
Source§fn start_context(&mut self)
fn start_context(&mut self)
Source§fn restore_context(&mut self)
fn restore_context(&mut self)
Auto Trait Implementations§
impl Freeze for ExecutionTracer
impl RefUnwindSafe for ExecutionTracer
impl Send for ExecutionTracer
impl Sync for ExecutionTracer
impl Unpin for ExecutionTracer
impl UnwindSafe for ExecutionTracer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§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 moreSource§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