Skip to content

Conversation

dignifiedquire
Copy link
Contributor

Replaces #191

Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

[shakes fist] stealing my praise lines!

// it even could validate the caller.
if !rt.caller_validated {
fvm::vm::abort(ExitCode::SysErrIllegalActor as u32, Some("failed to validate caller"))
fvm::vm::abort(ExitCode::USR_UNSPECIFIED.value(), Some("failed to validate caller"))
Copy link
Member

Choose a reason for hiding this comment

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

This should be the "user assertion failed" one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@Stebalien
Copy link
Member

So, I think the core issue we (I?) have is that we're using ActorError for two purposes:

  1. To propagate error information from the runtime.
  2. To decide which exit code we should exit with.

But I believe dig's proposal in #197 will solve this. Basically:

  1. Syscalls can return a real "error" indicating what went wrong.
  2. We can implement conversions to ActorErrors (or aborts, or exit codes, or whatever) where we can make a reasonable mapping between "if an actor sees error X from the runtime and wants to abort, it should abort with exit code Y".

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM for merge modulo the incorrect comments.

@Stebalien
Copy link
Member

Updated to released dependencies.

The real fix is discussed in #144, but this version is strictly "more
correct" than the previous code.
Many of these are temporary (waiting on #144), but this is as correct as
we can get it for now.
@dignifiedquire
Copy link
Contributor Author

lgtm (can’t approve my own pr)

@Stebalien
Copy link
Member

I've stolen the blame lines back for @anorth now that we're ready to merge.

@Stebalien Stebalien closed this Apr 11, 2022
@Stebalien
Copy link
Member

Will be merged in #191.

@Stebalien Stebalien deleted the dig/syserror branch April 11, 2022 14:00
snissn pushed a commit to snissn/builtin-actors that referenced this pull request Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants