Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_runtime_fd_executor_err_h 2 : #define HEADER_fd_src_flamenco_runtime_fd_executor_err_h 3 : 4 : /* Instruction error types */ 5 : 6 177 : #define FD_EXECUTOR_ERR_KIND_NONE (0) 7 42 : #define FD_EXECUTOR_ERR_KIND_EBPF (1) 8 24 : #define FD_EXECUTOR_ERR_KIND_SYSCALL (2) 9 0 : #define FD_EXECUTOR_ERR_KIND_INSTR (3) 10 : 11 : /* Instruction error codes */ 12 : 13 0 : #define FD_EXECUTOR_INSTR_ERR_FATAL ( INT_MIN ) /* Unrecoverable error */ 14 18 : #define FD_EXECUTOR_INSTR_SUCCESS ( 0 ) /* Instruction executed successfully */ 15 6 : #define FD_EXECUTOR_INSTR_ERR_GENERIC_ERR ( -1 ) /* The program instruction returned an error */ 16 0 : #define FD_EXECUTOR_INSTR_ERR_INVALID_ARG ( -2 ) /* The arguments provided to a program were invalid */ 17 6 : #define FD_EXECUTOR_INSTR_ERR_INVALID_INSTR_DATA ( -3 ) /* An instruction's data contents were invalid */ 18 0 : #define FD_EXECUTOR_INSTR_ERR_INVALID_ACC_DATA ( -4 ) /* An account's data contents was invalid */ 19 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_DATA_TOO_SMALL ( -5 ) /* An account's data was too small */ 20 0 : #define FD_EXECUTOR_INSTR_ERR_INSUFFICIENT_FUNDS ( -6 ) /* An account's balance was too small to complete the instruction */ 21 0 : #define FD_EXECUTOR_INSTR_ERR_INCORRECT_PROGRAM_ID ( -7 ) /* The account did not have the expected program id */ 22 0 : #define FD_EXECUTOR_INSTR_ERR_MISSING_REQUIRED_SIGNATURE ( -8 ) /* A signature was required but not found */ 23 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_ALREADY_INITIALIZED ( -9 ) /* An initialize instruction was sent to an account that has already been initialized. */ 24 0 : #define FD_EXECUTOR_INSTR_ERR_UNINITIALIZED_ACCOUNT ( -10 ) /* An attempt to operate on an account that hasn't been initialized. */ 25 0 : #define FD_EXECUTOR_INSTR_ERR_UNBALANCED_INSTR ( -11 ) /* Program's instruction lamport balance does not equal the balance after the instruction */ 26 0 : #define FD_EXECUTOR_INSTR_ERR_MODIFIED_PROGRAM_ID ( -12 ) /* Program illegally modified an account's program id */ 27 0 : #define FD_EXECUTOR_INSTR_ERR_EXTERNAL_ACCOUNT_LAMPORT_SPEND ( -13 ) /* Program spent the lamports of an account that doesn't belong to it */ 28 0 : #define FD_EXECUTOR_INSTR_ERR_EXTERNAL_DATA_MODIFIED ( -14 ) /* Program modified the data of an account that doesn't belong to it */ 29 0 : #define FD_EXECUTOR_INSTR_ERR_READONLY_LAMPORT_CHANGE ( -15 ) /* Read-only account's lamports modified */ 30 0 : #define FD_EXECUTOR_INSTR_ERR_READONLY_DATA_MODIFIED ( -16 ) /* Read-only account's data was modified */ 31 0 : #define FD_EXECUTOR_INSTR_ERR_DUPLICATE_ACCOUNT_IDX ( -17 ) /* An account was referenced more than once in a single instruction. Deprecated. */ 32 0 : #define FD_EXECUTOR_INSTR_ERR_EXECUTABLE_MODIFIED ( -18 ) /* Executable bit on account changed, but shouldn't have */ 33 0 : #define FD_EXECUTOR_INSTR_ERR_RENT_EPOCH_MODIFIED ( -19 ) /* Rent_epoch account changed, but shouldn't have */ 34 0 : #define FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS ( -20 ) /* The instruction expected additional account keys */ 35 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_DATA_SIZE_CHANGED ( -21 ) /* Program other than the account's owner changed the size of the account data */ 36 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_NOT_EXECUTABLE ( -22 ) /* The instruction expected an executable account */ 37 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_BORROW_FAILED ( -23 ) /* Failed to borrow a reference to account data, already borrowed */ 38 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_BORROW_OUTSTANDING ( -24 ) /* Account data has an outstanding reference after a program's execution */ 39 0 : #define FD_EXECUTOR_INSTR_ERR_DUPLICATE_ACCOUNT_OUT_OF_SYNC ( -25 ) /* The same account was multiply passed to an on-chain program's entrypoint, but the program modified them differently. */ 40 1440 : #define FD_EXECUTOR_INSTR_ERR_CUSTOM_ERR ( -26 ) /* Allows on-chain programs to implement program-specific error types and see them returned by the runtime. */ 41 0 : #define FD_EXECUTOR_INSTR_ERR_INVALID_ERR ( -27 ) /* The return value from the program was invalid. */ 42 0 : #define FD_EXECUTOR_INSTR_ERR_EXECUTABLE_DATA_MODIFIED ( -28 ) /* Executable account's data was modified */ 43 0 : #define FD_EXECUTOR_INSTR_ERR_EXECUTABLE_LAMPORT_CHANGE ( -29 ) /* Executable account's lamports modified */ 44 0 : #define FD_EXECUTOR_INSTR_ERR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT ( -30 ) /* Executable accounts must be rent exempt */ 45 0 : #define FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_PROGRAM_ID ( -31 ) /* Unsupported program id */ 46 0 : #define FD_EXECUTOR_INSTR_ERR_CALL_DEPTH ( -32 ) /* Cross-program invocation call depth too deep */ 47 0 : #define FD_EXECUTOR_INSTR_ERR_MISSING_ACC ( -33 ) /* An account required by the instruction is missing */ 48 0 : #define FD_EXECUTOR_INSTR_ERR_REENTRANCY_NOT_ALLOWED ( -34 ) /* Cross-program invocation reentrancy not allowed for this instruction */ 49 0 : #define FD_EXECUTOR_INSTR_ERR_MAX_SEED_LENGTH_EXCEEDED ( -35 ) /* Length of the seed is too long for address generation */ 50 0 : #define FD_EXECUTOR_INSTR_ERR_INVALID_SEEDS ( -36 ) /* Provided seeds do not result in a valid address */ 51 0 : #define FD_EXECUTOR_INSTR_ERR_INVALID_REALLOC ( -37 ) /* Failed to reallocate account data of this length */ 52 0 : #define FD_EXECUTOR_INSTR_ERR_COMPUTE_BUDGET_EXCEEDED ( -38 ) /* Computational budget exceeded */ 53 0 : #define FD_EXECUTOR_INSTR_ERR_PRIVILEGE_ESCALATION ( -39 ) /* Cross-program invocation with unauthorized signer or writable account */ 54 0 : #define FD_EXECUTOR_INSTR_ERR_PROGRAM_ENVIRONMENT_SETUP_FAILURE ( -40 ) /* Failed to create program execution environment */ 55 0 : #define FD_EXECUTOR_INSTR_ERR_PROGRAM_FAILED_TO_COMPLETE ( -41 ) /* Program failed to complete */ 56 0 : #define FD_EXECUTOR_INSTR_ERR_PROGRAM_FAILED_TO_COMPILE ( -42 ) /* Program failed to compile */ 57 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_IMMUTABLE ( -43 ) /* Account is immutable */ 58 0 : #define FD_EXECUTOR_INSTR_ERR_INCORRECT_AUTHORITY ( -44 ) /* Incorrect authority provided */ 59 0 : #define FD_EXECUTOR_INSTR_ERR_BORSH_IO_ERROR ( -45 ) /* Failed to serialize or deserialize account data */ 60 0 : #define FD_EXECUTOR_INSTR_ERR_ACC_NOT_RENT_EXEMPT ( -46 ) /* An account does not have enough lamports to be rent-exempt */ 61 0 : #define FD_EXECUTOR_INSTR_ERR_INVALID_ACC_OWNER ( -47 ) /* Invalid account owner */ 62 0 : #define FD_EXECUTOR_INSTR_ERR_ARITHMETIC_OVERFLOW ( -48 ) /* Program arithmetic overflowed */ 63 0 : #define FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_SYSVAR ( -49 ) /* Unsupported sysvar */ 64 0 : #define FD_EXECUTOR_INSTR_ERR_ILLEGAL_OWNER ( -50 ) /* Provided owner is not allowed */ 65 0 : #define FD_EXECUTOR_INSTR_ERR_MAX_ACCS_DATA_ALLOCS_EXCEEDED ( -51 ) /* Account data allocation exceeded the maximum accounts data size limit */ 66 0 : #define FD_EXECUTOR_INSTR_ERR_MAX_ACCS_EXCEEDED ( -52 ) /* Max accounts exceeded */ 67 0 : #define FD_EXECUTOR_INSTR_ERR_MAX_INSN_TRACE_LENS_EXCEEDED ( -53 ) /* Max instruction trace length exceeded */ 68 0 : #define FD_EXECUTOR_INSTR_ERR_BUILTINS_MUST_CONSUME_CUS ( -54 ) /* Builtin programs must consume compute units */ 69 : 70 : #endif /* HEADER_fd_src_flamenco_runtime_fd_executor_err_h */