@@ -11,13 +11,14 @@ use crate::{
11
11
types:: { builtin_name:: BuiltinName , layout:: CairoLayoutParams , layout_name:: LayoutName } ,
12
12
vm:: {
13
13
runners:: builtin_runner:: SegmentArenaBuiltinRunner ,
14
- trace:: trace_entry:: { relocate_trace_register, RelocatedTraceEntry , TraceEntry } ,
14
+ trace:: trace_entry:: { relocate_trace_register, RelocatedTraceEntry } ,
15
15
} ,
16
16
Felt252 ,
17
17
} ;
18
18
19
19
use crate :: {
20
20
hint_processor:: hint_processor_definition:: { HintProcessor , HintReference } ,
21
+ prover_input_info:: ProverInputInfo ,
21
22
types:: {
22
23
errors:: { math_errors:: MathError , program_errors:: ProgramError } ,
23
24
exec_scope:: ExecutionScopes ,
@@ -48,7 +49,6 @@ use crate::{
48
49
use num_integer:: div_rem;
49
50
use num_traits:: { ToPrimitive , Zero } ;
50
51
use serde:: { Deserialize , Serialize } ;
51
- use thiserror:: Error ;
52
52
53
53
use super :: { builtin_runner:: ModBuiltinRunner , cairo_pie:: CairoPieAdditionalData } ;
54
54
use super :: {
@@ -1546,43 +1546,6 @@ impl CairoRunner {
1546
1546
}
1547
1547
}
1548
1548
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
-
1586
1549
#[ derive( Clone , Debug , Eq , PartialEq ) ]
1587
1550
pub struct SegmentInfo {
1588
1551
pub index : isize ,
0 commit comments