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

Built-in actors abort versus errors #53

Closed
Stebalien opened this issue Jan 20, 2022 · 8 comments
Closed

Built-in actors abort versus errors #53

Stebalien opened this issue Jan 20, 2022 · 8 comments
Labels
enhancement New feature or request P3

Comments

@Stebalien
Copy link
Member

  • In go actors, we panic (abort) with an exit code on error.
  • In rust actors, we bubble an error all the way to the caller.

We should abort in rust actors as well:

  • It's easier to say we exit with code X on error E, because nothing can intercept/downcast/etc. the error.
  • It's faster (we exit immediately) and helps the compiler optimize for the non-error path.
@raulk
Copy link
Member

raulk commented Jan 20, 2022

In the Forest actors there was no hard system boundary between actors and the runtime, that’s why they return/propagate up the stack.

In the post-FVM world, the trampoline shims the no-boundary world with the boundary world by recognising the error after its been propagated, and signalling the interruption across the boundary.

IMO, the key behaviour we want to bring home is that the actor emitting an error should interrupt execution immediately.

Go achieves this through the usage of panics. WASM can achieve this by invoking a host function that traps. I'm all onboard with the latter model.

@Stebalien
Copy link
Member Author

Sounds good to me.

In the Forest actors there was no hard system boundary between actors and the runtime, that’s why they return/propagate up the stack.

Yes and no. It would have been possible to create that boundary with https://doc.rust-lang.org/std/panic/fn.catch_unwind.html.

@Stebalien Stebalien added the P3 label Jan 20, 2022
Stebalien referenced this issue in dtynn/ref-fvm Jan 28, 2022
@jennijuju jennijuju transferred this issue from filecoin-project/ref-fvm Mar 7, 2022
@jennijuju
Copy link
Member

this can be a post network v16 thing - whoever has time, it would be nice to. pick this up

@anorth
Copy link
Member

anorth commented Mar 7, 2022

This would make matching the Go actors behaviour much easier to verify for nv16.

@anorth
Copy link
Member

anorth commented Aug 11, 2022

I agree with the "should" here, but are we really going to do it? I don't think we'll ever get to it, and the thing we have now works (module #52).

@Stebalien
Copy link
Member Author

Not in the near term, but I expect this is something new contributors could chip away at.

@anorth anorth added enhancement New feature or request and removed kind/improvement labels Sep 1, 2022
@anorth
Copy link
Member

anorth commented Mar 3, 2023

I propose closing this issue as something we're not going to action. Any objections?

@Stebalien
Copy link
Member Author

Not really. I still think this is something we should explore (maybe in a new sdk) but it's not really actionable as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3
Projects
None yet
Development

No branches or pull requests

4 participants