Skip to content

Commit

Permalink
fix: error when actor panics directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Sep 9, 2020
1 parent de772bf commit 7519bb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chain/vm/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ func (rt *Runtime) shimCall(f func() interface{}) (rval []byte, aerr aerrors.Act
//log.Desugar().WithOptions(zap.AddStacktrace(zapcore.ErrorLevel)).
//Sugar().Errorf("spec actors failure: %s", r)
log.Errorf("spec actors failure: %s", r)
aerr = aerrors.Newf(1, "spec actors failure: %s", r)
// If an actor implementation panics directly (rather than calling Abortf) then the evaluation is undefined.
// There is no exit code corresponding to this. The result should not go on chain. A panic (which could also
// come from some actor dependency) may indicate a transient state or error that cannot be replicated by
// other nodes and thus cannot form part of consensus. E.g. an out-of-memory.
aerr = aerrors.Fatalf("spec actors failure: %s", r)
}
}()

Expand Down

0 comments on commit 7519bb7

Please sign in to comment.