@@ -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 :: {
@@ -1546,43 +1546,6 @@ impl CairoRunner {
15461546 }
15471547}
15481548
1549- // TODO(Stav): move to specified file.
1550- //* ----------------------
1551- //* ProverInputInfo
1552- //* ----------------------
1553- /// This struct contains all relevant data for the prover.
1554- /// All addresses are relocatable.
1555- #[ derive( Deserialize , Serialize , PartialEq ) ]
1556- pub struct ProverInputInfo {
1557- /// A vector of trace entries, i.e. pc, ap, fp, where pc is relocatable.
1558- pub relocatable_trace : Vec < TraceEntry > ,
1559- /// A vector of segments, where each segment is a vector of maybe relocatable values or holes (`None`).
1560- pub relocatable_memory : Vec < Vec < Option < MaybeRelocatable > > > ,
1561- /// A map from segment index to a vector of offsets within the segment, representing the public memory addresses.
1562- pub public_memory_offsets : BTreeMap < usize , Vec < usize > > ,
1563- /// A map from the builtin segment index into its name.
1564- pub builtins_segments : BTreeMap < usize , BuiltinName > ,
1565- }
1566-
1567- impl ProverInputInfo {
1568- pub fn serialize_json ( & self ) -> Result < String , ProverInputInfoError > {
1569- serde_json:: to_string_pretty ( & self ) . map_err ( ProverInputInfoError :: from)
1570- }
1571- pub fn serialize ( & self ) -> Result < Vec < u8 > , ProverInputInfoError > {
1572- bincode:: serde:: encode_to_vec ( self , bincode:: config:: standard ( ) )
1573- . map_err ( ProverInputInfoError :: from)
1574- }
1575- }
1576-
1577- // TODO(Stav): add TraceNotEnabled error.
1578- #[ derive( Debug , Error ) ]
1579- pub enum ProverInputInfoError {
1580- #[ error( "Failed to (de)serialize data using bincode" ) ]
1581- SerdeBincode ( #[ from] bincode:: error:: EncodeError ) ,
1582- #[ error( "Failed to (de)serialize data using json" ) ]
1583- SerdeJson ( #[ from] serde_json:: Error ) ,
1584- }
1585-
15861549#[ derive( Clone , Debug , Eq , PartialEq ) ]
15871550pub struct SegmentInfo {
15881551 pub index : isize ,
0 commit comments