Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Test that an actor cannot Abort with a system exit code #15

Closed
anorth opened this issue Aug 6, 2020 · 4 comments · Fixed by #118
Closed

Test that an actor cannot Abort with a system exit code #15

anorth opened this issue Aug 6, 2020 · 4 comments · Fixed by #118
Assignees
Labels
area/message-vector Areas: Message-class vector discomfort-factor/8 Discomfort factor: I touched my eyes after picking up a Jalapeño (10,000 SHU). kind/vector Kind: Vector status/in-progress Status: In Progress

Comments

@anorth
Copy link
Member

anorth commented Aug 6, 2020

Test that if an actor calls Abortf with an ExitCode within the range [0, 15] the runtime should abort with SysErrorIllegalActor.

Test also that a negative value also results in SysErrorIllegalActor

@raulk raulk transferred this issue from filecoin-project/chain-validation Aug 18, 2020
@raulk
Copy link
Member

raulk commented Aug 18, 2020

Since all built-in actors are presumed to behave correctly and not violate this rule, I suspect we will need to implement a custom actor type and register it via vm.Invoker#Register(code cid.Cid, actorLogic Invokee, stateType interface{}).

Assigning to me for now, because this requires further investigation, and likely batching all these behaviours known to be illegal (and therefore never found in practice) into a single "Mischievous Actor" custom type (like the Puppet actor is another custom type for testing).

@anorth
Copy link
Member Author

anorth commented Aug 19, 2020

Yes, I think the Puppet Actor or something like it is the best approach.

@nonsense
Copy link
Member

nonsense commented Aug 20, 2020

@anorth either I have written broken tests, or our assumptions are wrong:

An actor aborting with exitcode in [1..15] U { negative_number } results in the VM propagating the given exitcode.
An actor aborting with exitcode 0 results in an unexpected error.

I marked you on the PR just in case.

@anorth
Copy link
Member Author

anorth commented Aug 21, 2020

😱 . Don't assume the implementation is correct!

@raulk raulk linked a pull request Aug 24, 2020 that will close this issue
3 tasks
@raulk raulk added area/message-vector Areas: Message-class vector kind/vector Kind: Vector hint/needs-scoring Hint: Needs scoring labels Aug 26, 2020
@anorth anorth added discomfort-factor/8 Discomfort factor: I touched my eyes after picking up a Jalapeño (10,000 SHU). and removed hint/needs-scoring Hint: Needs scoring labels Aug 27, 2020
@anorth anorth removed their assignment Aug 27, 2020
@raulk raulk assigned alanshaw and unassigned nonsense Sep 8, 2020
@alanshaw alanshaw added the status/in-progress Status: In Progress label Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/message-vector Areas: Message-class vector discomfort-factor/8 Discomfort factor: I touched my eyes after picking up a Jalapeño (10,000 SHU). kind/vector Kind: Vector status/in-progress Status: In Progress
Projects
None yet
4 participants