// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; package types; import "language_storage.proto"; // The statuses and errors produced by the VM can be categorized into a // couple different types: // 1. Validation Statuses: all the errors that can (/should) be // the result of executing the prologue -- these are primarily used by // the vm validator and AC. // 2. Verification Errors: errors that are the result of performing // bytecode verification (happens at the time of publishing). // 3. VM Invariant Errors: errors that arise from an internal invariant of // the VM being violated. These signify a problem with either the VM or // bytecode verifier. // 4. Binary Errors: errors that can occur during the process of // deserialization of a transaction. // 5. Runtime Statuses: errors that can arise from the execution of a // transaction (assuming the prologue executes without error). These are // errors that can occur during execution due to things such as division // by zero, running out of gas, etc. These do not signify an issue with // the VM. message VMStatus { // e.g. assertion violation, out of gas uint64 major_status = 1; // Any substatus code. e.g. assertion error number bool has_sub_status = 2; uint64 sub_status = 3; bool has_message = 4; string message = 5; }