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

Remove SysErrInternal definition, use of which is always a bug #304

Merged
merged 2 commits into from
Apr 27, 2020

Conversation

anorth
Copy link
Member

@anorth anorth commented Apr 20, 2020

This came out of interop efforts last time round. Everywhere this was being used was incorrect (usually because the state transition should fail to be evaluated, rather than have this exist code persist on chain).

@anorth anorth requested a review from magik6k April 20, 2020 03:11
@@ -92,9 +92,7 @@ const (
SysErrorReserved3 = ExitCode(12)
SysErrorReserved4 = ExitCode(13)
SysErrorReserved5 = ExitCode(14)

// Indicates something broken within the VM.
SysErrInternal = ExitCode(15)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd keep the definition, maybe rename to something indicating it's a VM error

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that this can never safely be used. These exit codes go on chain, but every time there's a VM error of this form (idiosyncratic, not reproducible between impls) it should not go on chain; instead the state evaluation should just fail.

It should never have existed. If Lotus still uses it, they are all bugs that should either be a different exit code, or a "fatal" error.

@anorth anorth merged commit d1d7603 into master Apr 27, 2020
@anorth anorth deleted the anorth/exitcode branch April 27, 2020 00:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants