LCOV - code coverage report
Current view: top level - flamenco/runtime/tests/generated - invoke.pb.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 2 0.0 %
Date: 2024-11-13 11:58:15 Functions: 0 0 -

          Line data    Source code
       1             : /* Automatically generated nanopb header */
       2             : /* Generated by nanopb-0.4.8-dev */
       3             : 
       4             : #ifndef PB_ORG_SOLANA_SEALEVEL_V1_INVOKE_PB_H_INCLUDED
       5             : #define PB_ORG_SOLANA_SEALEVEL_V1_INVOKE_PB_H_INCLUDED
       6             : 
       7             : #include "../../../nanopb/pb_firedancer.h"
       8             : #include "context.pb.h"
       9             : #include "metadata.pb.h"
      10             : 
      11             : #if PB_PROTO_HEADER_VERSION != 40
      12             : #error Regenerate this file with the current version of nanopb generator.
      13             : #endif
      14             : 
      15             : /* Struct definitions */
      16             : typedef struct fd_exec_test_instr_acct {
      17             :     /* Selects an account in an external list */
      18             :     uint32_t index;
      19             :     bool is_writable;
      20             :     bool is_signer;
      21             : } fd_exec_test_instr_acct_t;
      22             : 
      23             : /* The execution context of a program invocation (aka instruction).
      24             :  Contains all required information to independently replay an instruction.
      25             :  Also includes partial transaction context. */
      26             : typedef struct fd_exec_test_instr_context {
      27             :     /* The address of the program invoked.  (32 bytes) */
      28             :     pb_byte_t program_id[32];
      29             :     /* Account state accessed by the instruction.  This may include
      30             :  indirect accesses like sysvars. */
      31             :     pb_size_t accounts_count;
      32             :     struct fd_exec_test_acct_state *accounts;
      33             :     /* Account access list for this instruction (refers to above accounts list) */
      34             :     pb_size_t instr_accounts_count;
      35             :     struct fd_exec_test_instr_acct *instr_accounts;
      36             :     /* The input data passed to program execution. */
      37             :     pb_bytes_array_t *data;
      38             :     uint64_t cu_avail;
      39             :     bool has_slot_context;
      40             :     fd_exec_test_slot_context_t slot_context;
      41             :     bool has_epoch_context;
      42             :     fd_exec_test_epoch_context_t epoch_context;
      43             : } fd_exec_test_instr_context_t;
      44             : 
      45             : /* The results of executing an InstrContext. */
      46             : typedef struct fd_exec_test_instr_effects {
      47             :     /* result is zero if the instruction executed succesfully.
      48             :  Otherwise, a non-zero error code.  Error codes are not relevant to
      49             :  consensus. */
      50             :     int32_t result;
      51             :     /* Some error cases additionally have a custom error code.  Unlike
      52             :  the expected_result, this is stable across clients. */
      53             :     uint32_t custom_err;
      54             :     /* Copies of accounts that were changed.  May be in an arbitrary
      55             :  order.  The pubkey of each account is unique in this list.  Each
      56             :  account address modified here must also be in the
      57             :  InstrContext. */
      58             :     pb_size_t modified_accounts_count;
      59             :     struct fd_exec_test_acct_state *modified_accounts;
      60             :     uint64_t cu_avail;
      61             :     /* Instruction return data. */
      62             :     pb_bytes_array_t *return_data;
      63             : } fd_exec_test_instr_effects_t;
      64             : 
      65             : /* An instruction processing test fixture. */
      66             : typedef struct fd_exec_test_instr_fixture {
      67             :     bool has_metadata;
      68             :     fd_exec_test_fixture_metadata_t metadata;
      69             :     bool has_input;
      70             :     fd_exec_test_instr_context_t input;
      71             :     bool has_output;
      72             :     fd_exec_test_instr_effects_t output;
      73             : } fd_exec_test_instr_fixture_t;
      74             : 
      75             : 
      76             : #ifdef __cplusplus
      77             : extern "C" {
      78             : #endif
      79             : 
      80             : /* Initializer values for message structs */
      81             : #define FD_EXEC_TEST_INSTR_ACCT_INIT_DEFAULT     {0, 0, 0}
      82           0 : #define FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT  {{0}, 0, NULL, 0, NULL, NULL, 0, false, FD_EXEC_TEST_SLOT_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_EPOCH_CONTEXT_INIT_DEFAULT}
      83             : #define FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT  {0, 0, 0, NULL, 0, NULL}
      84             : #define FD_EXEC_TEST_INSTR_FIXTURE_INIT_DEFAULT  {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_DEFAULT, false, FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT}
      85             : #define FD_EXEC_TEST_INSTR_ACCT_INIT_ZERO        {0, 0, 0}
      86             : #define FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO     {{0}, 0, NULL, 0, NULL, NULL, 0, false, FD_EXEC_TEST_SLOT_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_EPOCH_CONTEXT_INIT_ZERO}
      87             : #define FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO     {0, 0, 0, NULL, 0, NULL}
      88             : #define FD_EXEC_TEST_INSTR_FIXTURE_INIT_ZERO     {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_ZERO, false, FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO}
      89             : 
      90             : /* Field tags (for use in manual encoding/decoding) */
      91             : #define FD_EXEC_TEST_INSTR_ACCT_INDEX_TAG        1
      92             : #define FD_EXEC_TEST_INSTR_ACCT_IS_WRITABLE_TAG  2
      93             : #define FD_EXEC_TEST_INSTR_ACCT_IS_SIGNER_TAG    3
      94             : #define FD_EXEC_TEST_INSTR_CONTEXT_PROGRAM_ID_TAG 1
      95             : #define FD_EXEC_TEST_INSTR_CONTEXT_ACCOUNTS_TAG  3
      96             : #define FD_EXEC_TEST_INSTR_CONTEXT_INSTR_ACCOUNTS_TAG 4
      97             : #define FD_EXEC_TEST_INSTR_CONTEXT_DATA_TAG      5
      98             : #define FD_EXEC_TEST_INSTR_CONTEXT_CU_AVAIL_TAG  6
      99             : #define FD_EXEC_TEST_INSTR_CONTEXT_SLOT_CONTEXT_TAG 8
     100             : #define FD_EXEC_TEST_INSTR_CONTEXT_EPOCH_CONTEXT_TAG 9
     101             : #define FD_EXEC_TEST_INSTR_EFFECTS_RESULT_TAG    1
     102             : #define FD_EXEC_TEST_INSTR_EFFECTS_CUSTOM_ERR_TAG 2
     103             : #define FD_EXEC_TEST_INSTR_EFFECTS_MODIFIED_ACCOUNTS_TAG 3
     104             : #define FD_EXEC_TEST_INSTR_EFFECTS_CU_AVAIL_TAG  4
     105             : #define FD_EXEC_TEST_INSTR_EFFECTS_RETURN_DATA_TAG 5
     106             : #define FD_EXEC_TEST_INSTR_FIXTURE_METADATA_TAG  1
     107             : #define FD_EXEC_TEST_INSTR_FIXTURE_INPUT_TAG     2
     108             : #define FD_EXEC_TEST_INSTR_FIXTURE_OUTPUT_TAG    3
     109             : 
     110             : /* Struct field encoding specification for nanopb */
     111             : #define FD_EXEC_TEST_INSTR_ACCT_FIELDLIST(X, a) \
     112             : X(a, STATIC,   SINGULAR, UINT32,   index,             1) \
     113             : X(a, STATIC,   SINGULAR, BOOL,     is_writable,       2) \
     114             : X(a, STATIC,   SINGULAR, BOOL,     is_signer,         3)
     115             : #define FD_EXEC_TEST_INSTR_ACCT_CALLBACK NULL
     116             : #define FD_EXEC_TEST_INSTR_ACCT_DEFAULT NULL
     117             : 
     118             : #define FD_EXEC_TEST_INSTR_CONTEXT_FIELDLIST(X, a) \
     119             : X(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, program_id,        1) \
     120             : X(a, POINTER,  REPEATED, MESSAGE,  accounts,          3) \
     121             : X(a, POINTER,  REPEATED, MESSAGE,  instr_accounts,    4) \
     122             : X(a, POINTER,  SINGULAR, BYTES,    data,              5) \
     123             : X(a, STATIC,   SINGULAR, UINT64,   cu_avail,          6) \
     124             : X(a, STATIC,   OPTIONAL, MESSAGE,  slot_context,      8) \
     125             : X(a, STATIC,   OPTIONAL, MESSAGE,  epoch_context,     9)
     126             : #define FD_EXEC_TEST_INSTR_CONTEXT_CALLBACK NULL
     127             : #define FD_EXEC_TEST_INSTR_CONTEXT_DEFAULT NULL
     128             : #define fd_exec_test_instr_context_t_accounts_MSGTYPE fd_exec_test_acct_state_t
     129             : #define fd_exec_test_instr_context_t_instr_accounts_MSGTYPE fd_exec_test_instr_acct_t
     130             : #define fd_exec_test_instr_context_t_slot_context_MSGTYPE fd_exec_test_slot_context_t
     131             : #define fd_exec_test_instr_context_t_epoch_context_MSGTYPE fd_exec_test_epoch_context_t
     132             : 
     133             : #define FD_EXEC_TEST_INSTR_EFFECTS_FIELDLIST(X, a) \
     134             : X(a, STATIC,   SINGULAR, INT32,    result,            1) \
     135             : X(a, STATIC,   SINGULAR, UINT32,   custom_err,        2) \
     136             : X(a, POINTER,  REPEATED, MESSAGE,  modified_accounts,   3) \
     137             : X(a, STATIC,   SINGULAR, UINT64,   cu_avail,          4) \
     138             : X(a, POINTER,  SINGULAR, BYTES,    return_data,       5)
     139             : #define FD_EXEC_TEST_INSTR_EFFECTS_CALLBACK NULL
     140             : #define FD_EXEC_TEST_INSTR_EFFECTS_DEFAULT NULL
     141             : #define fd_exec_test_instr_effects_t_modified_accounts_MSGTYPE fd_exec_test_acct_state_t
     142             : 
     143             : #define FD_EXEC_TEST_INSTR_FIXTURE_FIELDLIST(X, a) \
     144             : X(a, STATIC,   OPTIONAL, MESSAGE,  metadata,          1) \
     145             : X(a, STATIC,   OPTIONAL, MESSAGE,  input,             2) \
     146             : X(a, STATIC,   OPTIONAL, MESSAGE,  output,            3)
     147             : #define FD_EXEC_TEST_INSTR_FIXTURE_CALLBACK NULL
     148             : #define FD_EXEC_TEST_INSTR_FIXTURE_DEFAULT NULL
     149             : #define fd_exec_test_instr_fixture_t_metadata_MSGTYPE fd_exec_test_fixture_metadata_t
     150             : #define fd_exec_test_instr_fixture_t_input_MSGTYPE fd_exec_test_instr_context_t
     151             : #define fd_exec_test_instr_fixture_t_output_MSGTYPE fd_exec_test_instr_effects_t
     152             : 
     153             : extern const pb_msgdesc_t fd_exec_test_instr_acct_t_msg;
     154             : extern const pb_msgdesc_t fd_exec_test_instr_context_t_msg;
     155             : extern const pb_msgdesc_t fd_exec_test_instr_effects_t_msg;
     156             : extern const pb_msgdesc_t fd_exec_test_instr_fixture_t_msg;
     157             : 
     158             : /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
     159             : #define FD_EXEC_TEST_INSTR_ACCT_FIELDS &fd_exec_test_instr_acct_t_msg
     160           0 : #define FD_EXEC_TEST_INSTR_CONTEXT_FIELDS &fd_exec_test_instr_context_t_msg
     161             : #define FD_EXEC_TEST_INSTR_EFFECTS_FIELDS &fd_exec_test_instr_effects_t_msg
     162             : #define FD_EXEC_TEST_INSTR_FIXTURE_FIELDS &fd_exec_test_instr_fixture_t_msg
     163             : 
     164             : /* Maximum encoded size of messages (where known) */
     165             : /* fd_exec_test_InstrContext_size depends on runtime parameters */
     166             : /* fd_exec_test_InstrEffects_size depends on runtime parameters */
     167             : /* fd_exec_test_InstrFixture_size depends on runtime parameters */
     168             : #define FD_EXEC_TEST_INSTR_ACCT_SIZE             10
     169             : #define ORG_SOLANA_SEALEVEL_V1_INVOKE_PB_H_MAX_SIZE FD_EXEC_TEST_INSTR_ACCT_SIZE
     170             : 
     171             : /* Mapping from canonical names (mangle_names or overridden package name) */
     172             : #define org_solana_sealevel_v1_InstrAcct fd_exec_test_InstrAcct
     173             : #define org_solana_sealevel_v1_InstrContext fd_exec_test_InstrContext
     174             : #define org_solana_sealevel_v1_InstrEffects fd_exec_test_InstrEffects
     175             : #define org_solana_sealevel_v1_InstrFixture fd_exec_test_InstrFixture
     176             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_ACCT_INIT_DEFAULT FD_EXEC_TEST_INSTR_ACCT_INIT_DEFAULT
     177             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT
     178             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_EFFECTS_INIT_DEFAULT FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT
     179             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_FIXTURE_INIT_DEFAULT FD_EXEC_TEST_INSTR_FIXTURE_INIT_DEFAULT
     180             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_ACCT_INIT_ZERO FD_EXEC_TEST_INSTR_ACCT_INIT_ZERO
     181             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_CONTEXT_INIT_ZERO FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO
     182             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_EFFECTS_INIT_ZERO FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO
     183             : #define ORG_SOLANA_SEALEVEL_V1_INSTR_FIXTURE_INIT_ZERO FD_EXEC_TEST_INSTR_FIXTURE_INIT_ZERO
     184             : 
     185             : #ifdef __cplusplus
     186             : } /* extern "C" */
     187             : #endif
     188             : 
     189             : #endif

Generated by: LCOV version 1.14