From 47bb63611844e547fed85c9fe7f66d508caa684a Mon Sep 17 00:00:00 2001 From: Zekun Li Date: Tue, 21 Feb 2023 21:55:17 -0800 Subject: [PATCH] [vm] reserve status code for future use --- language/move-core/types/src/vm_status.rs | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/language/move-core/types/src/vm_status.rs b/language/move-core/types/src/vm_status.rs index b3914ac2a7..83ca430250 100644 --- a/language/move-core/types/src/vm_status.rs +++ b/language/move-core/types/src/vm_status.rs @@ -498,6 +498,12 @@ pub enum StatusCode { SEQUENCE_NONCE_INVALID = 29, // There was an error when accessing chain-specific account information CHAIN_ACCOUNT_INFO_DOES_NOT_EXIST = 30, + // Reserved error code for future use + RESERVED_VALIDATION_ERROR_1 = 31, + RESERVED_VALIDATION_ERROR_2 = 32, + RESERVED_VALIDATION_ERROR_3 = 33, + RESERVED_VALIDATION_ERROR_4 = 34, + RESERVED_VALIDATION_ERROR_5 = 35, // When a code module/script is published it is verified. These are the // possible errors that can arise from the verification process. @@ -651,6 +657,12 @@ pub enum StatusCode { // Failed to resolve type due to linking being broken after verification TYPE_RESOLUTION_FAILURE = 2021, DUPLICATE_NATIVE_FUNCTION = 2022, + // Reserved error code for future use + RESERVED_INVARIANT_VIOLATION_ERROR_1 = 2023, + RESERVED_INVARIANT_VIOLATION_ERROR_2 = 2024, + RESERVED_INVARIANT_VIOLATION_ERROR_3 = 2025, + RESERVED_INVARIANT_VIOLATION_ERROR_4 = 2026, + RESERVED_INVARIANT_VIOLATION_ERROR_5 = 2027, // Errors that can arise from binary decoding (deserialization) // Deserializtion Errors: 3000-3999 @@ -676,6 +688,12 @@ pub enum StatusCode { VALUE_DESERIALIZATION_ERROR = 3023, CODE_DESERIALIZATION_ERROR = 3024, INVALID_FLAG_BITS = 3025, + // Reserved error code for future use + RESERVED_DESERIALIZAION_ERROR_1 = 3026, + RESERVED_DESERIALIZAION_ERROR_2 = 3027, + RESERVED_DESERIALIZAION_ERROR_3 = 3028, + RESERVED_DESERIALIZAION_ERROR_4 = 3029, + RESERVED_DESERIALIZAION_ERROR_5 = 3030, // Errors that can arise at runtime // Runtime Errors: 4000-4999 @@ -703,6 +721,12 @@ pub enum StatusCode { EXECUTION_LIMIT_REACHED = 4030, IO_LIMIT_REACHED = 4031, STORAGE_LIMIT_REACHED = 4032, + // Reserved error code for future use + RESERVED_RUNTIME_ERROR_1 = 4033, + RESERVED_RUNTIME_ERROR_2 = 4034, + RESERVED_RUNTIME_ERROR_3 = 4035, + RESERVED_RUNTIME_ERROR_4 = 4036, + RESERVED_RUNTIME_ERROR_5 = 4037, // A reserved status to represent an unknown vm status. // this is std::u64::MAX, but we can't pattern match on that, so put the hardcoded value in