Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early-exit Host I/O #208

Merged
merged 6 commits into from
Mar 12, 2024
Merged

Early-exit Host I/O #208

merged 6 commits into from
Mar 12, 2024

Conversation

rachel-bousfield
Copy link
Contributor

@rachel-bousfield rachel-bousfield commented Mar 11, 2024

Adds an exit_early Host I/O to suspend execution without returning from the entrypoint.

The mechanism allows user programs to revert (or succeed) with data, which differentiates this feature from just inducing a hard error.

Resolves STY-29

@cla-bot cla-bot bot added the s label Mar 11, 2024
Copy link

@mikebenfield mikebenfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointed out one typo; otherwise LGTM

@@ -114,6 +114,19 @@ pub trait UserHost<DR: DataReader>: GasMeteredMachine {
trace!("write_result", self, &*self.outs(), &[])
}

/// Exists program execution early with the given status code.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - Exists

@rachel-bousfield rachel-bousfield merged commit 484efac into stylus Mar 12, 2024
8 checks passed
@rachel-bousfield rachel-bousfield deleted the stylus-early-exit branch March 12, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants