Struct air_interpreter_data::InterpreterData
source · pub struct InterpreterData {
pub versions: Versions,
pub trace: ExecutionTrace,
pub global_streams: GlobalStreamGens,
pub restricted_streams: RestrictedStreamGens,
pub last_call_request_id: u32,
pub cid_info: CidInfo,
}
Expand description
The AIR interpreter could be considered as a function f(prev_data: InterpreterData, current_data: InterpreterData, … ) -> (result_data: InterpreterData, …). This function receives prev and current data and produces a result data. All these data have the following format.
Fields§
§versions: Versions
Versions of data and an interpreter produced this data.
trace: ExecutionTrace
Trace of AIR execution, which contains executed call, par, fold, and ap states.
global_streams: GlobalStreamGens
Contains maximum generation for each global stream. This info will be used while merging values in streams. This field is also needed for backward compatibility with <= 0.2.1 versions.
restricted_streams: RestrictedStreamGens
Contains maximum generation for each private stream. This info will be used while merging values in streams.
last_call_request_id: u32
Last exposed to a peer call request id. All next call request ids will be bigger than this.
cid_info: CidInfo
CID-to-somethings mappings.
Implementations§
source§impl InterpreterData
impl InterpreterData
pub fn new(interpreter_version: Version) -> Self
pub fn from_execution_result( trace: ExecutionTrace, streams: GlobalStreamGens, restricted_streams: RestrictedStreamGens, cid_info: CidInfo, last_call_request_id: u32, interpreter_version: Version ) -> Self
sourcepub fn try_from_slice(slice: &[u8]) -> Result<Self, Error>
pub fn try_from_slice(slice: &[u8]) -> Result<Self, Error>
Tries to de InterpreterData from slice according to the data version.
Trait Implementations§
source§impl Clone for InterpreterData
impl Clone for InterpreterData
source§fn clone(&self) -> InterpreterData
fn clone(&self) -> InterpreterData
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more