@@ -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 :: {
@@ -1545,43 +1545,6 @@ impl CairoRunner {
1545
1545
}
1546
1546
}
1547
1547
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
-
1585
1548
#[ derive( Clone , Debug , Eq , PartialEq ) ]
1586
1549
pub struct SegmentInfo {
1587
1550
pub index : isize ,
0 commit comments