This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Sandboxed Fallback #1215
Open
fborello-lambda
wants to merge
15
commits into
sandboxed_native
Choose a base branch
from
sandboxed_fallback
base: sandboxed_native
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sandboxed Fallback #1215
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The test proposed kills `sandbox.proc` == `std::process:Child`. This kill makes the `sandbox` instance unusable. The current testbench checks with `lsof` command, using the `sandbox.proc`'s pid, comparing the outputs, before `sandbox.kill()` and after. A better way to test may be adding an extra field to the `ExecutionResult` struct: ```rust 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, } ``` in order to return some info related to the environment used to run the contract whenever `execution_entry_point.rs::execute()` is used.
juanbono
approved these changes
Feb 6, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theIsolatedExecutor
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 wheneverexecution_entry_point.rs::execute()
is used.Checklist