@@ -11,13 +11,14 @@ use crate::{
1111 types:: { builtin_name:: BuiltinName , layout:: CairoLayoutParams , layout_name:: LayoutName } ,
1212 vm:: {
1313 runners:: builtin_runner:: SegmentArenaBuiltinRunner ,
14- trace:: trace_entry:: { relocate_trace_register, RelocatedTraceEntry , TraceEntry } ,
14+ trace:: trace_entry:: { relocate_trace_register, RelocatedTraceEntry } ,
1515 } ,
1616 Felt252 ,
1717} ;
1818
1919use crate :: {
2020 hint_processor:: hint_processor_definition:: { HintProcessor , HintReference } ,
21+ prover_input_info:: ProverInputInfo ,
2122 types:: {
2223 errors:: { math_errors:: MathError , program_errors:: ProgramError } ,
2324 exec_scope:: ExecutionScopes ,
@@ -48,7 +49,6 @@ use crate::{
4849use num_integer:: div_rem;
4950use num_traits:: { ToPrimitive , Zero } ;
5051use serde:: { Deserialize , Serialize } ;
51- use thiserror:: Error ;
5252
5353use super :: { builtin_runner:: ModBuiltinRunner , cairo_pie:: CairoPieAdditionalData } ;
5454use super :: {
@@ -1545,43 +1545,6 @@ impl CairoRunner {
15451545 }
15461546}
15471547
1548- // TODO(Stav): move to specified file.
1549- //* ----------------------
1550- //* ProverInputInfo
1551- //* ----------------------
1552- /// This struct contains all relevant data for the prover.
1553- /// All addresses are relocatable.
1554- #[ derive( Deserialize , Serialize , PartialEq ) ]
1555- pub struct ProverInputInfo {
1556- /// A vector of trace entries, i.e. pc, ap, fp, where pc is relocatable.
1557- pub relocatable_trace : Vec < TraceEntry > ,
1558- /// A vector of segments, where each segment is a vector of maybe relocatable values or holes (`None`).
1559- pub relocatable_memory : Vec < Vec < Option < MaybeRelocatable > > > ,
1560- /// A map from segment index to a vector of offsets within the segment, representing the public memory addresses.
1561- pub public_memory_offsets : BTreeMap < usize , Vec < usize > > ,
1562- /// A map from the builtin segment index into its name.
1563- pub builtins_segments : BTreeMap < usize , BuiltinName > ,
1564- }
1565-
1566- impl ProverInputInfo {
1567- pub fn serialize_json ( & self ) -> Result < String , ProverInputInfoError > {
1568- serde_json:: to_string_pretty ( & self ) . map_err ( ProverInputInfoError :: from)
1569- }
1570- pub fn serialize ( & self ) -> Result < Vec < u8 > , ProverInputInfoError > {
1571- bincode:: serde:: encode_to_vec ( self , bincode:: config:: standard ( ) )
1572- . map_err ( ProverInputInfoError :: from)
1573- }
1574- }
1575-
1576- // TODO(Stav): add TraceNotEnabled error.
1577- #[ derive( Debug , Error ) ]
1578- pub enum ProverInputInfoError {
1579- #[ error( "Failed to (de)serialize data using bincode" ) ]
1580- SerdeBincode ( #[ from] bincode:: error:: EncodeError ) ,
1581- #[ error( "Failed to (de)serialize data using json" ) ]
1582- SerdeJson ( #[ from] serde_json:: Error ) ,
1583- }
1584-
15851548#[ derive( Clone , Debug , Eq , PartialEq ) ]
15861549pub struct SegmentInfo {
15871550 pub index : isize ,
0 commit comments