starknet_in_rust icon indicating copy to clipboard operation
starknet_in_rust copied to clipboard

Sandboxed Fallback

Open fborello-lambda opened this issue 1 year ago • 0 comments

Sandbox_Fallback

Description

The change implements a fallback mechanism, if the sandboxed cairo_native fails, the cairoVM should run instead.

The current test depends on the OS, lsof is used to check the status of the process invoked by the IsolatedExecutor instance.

A better way to test may be:

Change ExecutironResult struct in order to return some info related to the environment used to run the contract whenever execution_entry_point.rs::execute() is used.

pub struct ExecutionResult {
    pub call_info: Option<CallInfo>,
    pub revert_error: Option<String>,
		pub native_or_casm: Option<String>, // <- For example 
    pub n_reverted_steps: usize,
}

Checklist

  • [N/A] Linked to Github Issue
  • [N/A] Unit tests added
  • [x] Integration tests added.
  • [N/A] This change requires new documentation.
  • [N/A] Documentation has been added/updated.

fborello-lambda avatar Jan 30 '24 14:01 fborello-lambda