LCOV - code coverage report
Current view: top level - flamenco/runtime/tests/harness/generated - context.pb.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 8 0.0 %
Date: 2025-07-01 05:00:49 Functions: 0 0 -

          Line data    Source code
       1             : /* Automatically generated nanopb header */
       2             : /* Generated by nanopb-0.4.9.1 */
       3             : 
       4             : #ifndef PB_ORG_SOLANA_SEALEVEL_V1_CONTEXT_PB_H_INCLUDED
       5             : #define PB_ORG_SOLANA_SEALEVEL_V1_CONTEXT_PB_H_INCLUDED
       6             : 
       7             : #include "../../../../../ballet/nanopb/pb_firedancer.h"
       8             : 
       9             : #if PB_PROTO_HEADER_VERSION != 40
      10             : #error Regenerate this file with the current version of nanopb generator.
      11             : #endif
      12             : 
      13             : /* Struct definitions */
      14             : /* A set of feature flags. */
      15             : typedef struct fd_exec_test_feature_set {
      16             :     /* Every item in this list marks an enabled feature.  The value of
      17             :  each item is the first 8 bytes of the feature ID as a little-
      18             :  endian integer. */
      19             :     pb_size_t features_count;
      20             :     uint64_t *features;
      21             : } fd_exec_test_feature_set_t;
      22             : 
      23             : /* A seed address.  This is not a PDA. */
      24             : typedef struct fd_exec_test_seed_address {
      25             :     /* The seed address base.  (32 bytes) */
      26             :     pb_callback_t base;
      27             :     /* The seed path  (<= 32 bytes) */
      28             :     pb_callback_t seed;
      29             :     /* The seed address owner.  (32 bytes) */
      30             :     pb_callback_t owner;
      31             : } fd_exec_test_seed_address_t;
      32             : 
      33             : /* The complete state of an account excluding its public key. */
      34             : typedef struct fd_exec_test_acct_state {
      35             :     /* The account address.  (32 bytes) */
      36             :     pb_byte_t address[32];
      37             :     uint64_t lamports;
      38             :     /* Account data is limited to 10 MiB on Solana mainnet as of 2024-Feb. */
      39             :     pb_bytes_array_t *data;
      40             :     bool executable;
      41             :     /* The rent epoch is deprecated on Solana mainnet as of 2024-Feb.
      42             :  If ommitted, implies a value of UINT64_MAX. */
      43             :     uint64_t rent_epoch;
      44             :     /* Address of the program that owns this account.  (32 bytes) */
      45             :     pb_byte_t owner[32];
      46             :     /* The account address, but derived as a seed address.  Overrides
      47             :  `address` if present.
      48             :  TODO: This is a solfuzz specific extension and is not compliant
      49             :  with the org.solana.sealevel.v1 API. */
      50             :     bool has_seed_addr;
      51             :     fd_exec_test_seed_address_t seed_addr;
      52             : } fd_exec_test_acct_state_t;
      53             : 
      54             : typedef struct fd_exec_test_vote_account {
      55             :     /* Account state of the vote account */
      56             :     bool has_vote_account;
      57             :     fd_exec_test_acct_state_t vote_account;
      58             :     /* How much stake has been delegated to this account */
      59             :     uint64_t stake;
      60             : } fd_exec_test_vote_account_t;
      61             : 
      62             : /* Epoch bank inflation parameters */
      63             : typedef struct fd_exec_test_inflation {
      64             :     double initial;
      65             :     double terminal;
      66             :     double taper;
      67             :     double foundation;
      68             :     double foundation_term;
      69             : } fd_exec_test_inflation_t;
      70             : 
      71             : /* EpochContext includes context scoped to an epoch.
      72             :  On "real" ledgers, it is created during the epoch boundary. */
      73             : typedef struct fd_exec_test_epoch_context {
      74             :     /* Active feature set */
      75             :     bool has_features;
      76             :     fd_exec_test_feature_set_t features;
      77             :     /* Hashes per tick */
      78             :     uint64_t hashes_per_tick;
      79             :     /* Ticks per slot */
      80             :     uint64_t ticks_per_slot;
      81             :     /* Slots per year */
      82             :     double slots_per_year;
      83             :     /* Inflation */
      84             :     bool has_inflation;
      85             :     fd_exec_test_inflation_t inflation;
      86             :     /* Genesis creation time */
      87             :     uint64_t genesis_creation_time;
      88             :     /* Epoch vote accounts for epochs T-1 and T-2 */
      89             :     pb_size_t vote_accounts_t_1_count;
      90             :     struct fd_exec_test_vote_account *vote_accounts_t_1;
      91             :     pb_size_t vote_accounts_t_2_count;
      92             :     struct fd_exec_test_vote_account *vote_accounts_t_2;
      93             : } fd_exec_test_epoch_context_t;
      94             : 
      95             : /* SlotContext includes context scoped to a block.
      96             :  On "real" ledgers, it is created during the slot boundary. */
      97             : typedef struct fd_exec_test_slot_context {
      98             :     /* Current slot number */
      99             :     uint64_t slot;
     100             :     uint64_t block_height;
     101             :     /* POH hash */
     102             :     pb_byte_t poh[32];
     103             :     /* Parent bank hash */
     104             :     pb_byte_t parent_bank_hash[32];
     105             :     /* The last executed slot */
     106             :     uint64_t prev_slot;
     107             :     /* Last slot lamports per signature */
     108             :     uint64_t prev_lps;
     109             :     /* Previous slot's capitalization.
     110             :  TODO: I was very smart and named this incorrectly. This should be fixed in the future. */
     111             :     uint64_t prev_epoch_capitalization;
     112             : } fd_exec_test_slot_context_t;
     113             : 
     114             : 
     115             : #ifdef __cplusplus
     116             : extern "C" {
     117             : #endif
     118             : 
     119             : /* Initializer values for message structs */
     120           0 : #define FD_EXEC_TEST_FEATURE_SET_INIT_DEFAULT    {0, NULL}
     121             : #define FD_EXEC_TEST_SEED_ADDRESS_INIT_DEFAULT   {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
     122             : #define FD_EXEC_TEST_ACCT_STATE_INIT_DEFAULT     {{0}, 0, NULL, 0, 0, {0}, false, FD_EXEC_TEST_SEED_ADDRESS_INIT_DEFAULT}
     123             : #define FD_EXEC_TEST_VOTE_ACCOUNT_INIT_DEFAULT   {false, FD_EXEC_TEST_ACCT_STATE_INIT_DEFAULT, 0}
     124           0 : #define FD_EXEC_TEST_INFLATION_INIT_DEFAULT      {0, 0, 0, 0, 0}
     125           0 : #define FD_EXEC_TEST_EPOCH_CONTEXT_INIT_DEFAULT  {false, FD_EXEC_TEST_FEATURE_SET_INIT_DEFAULT, 0, 0, 0, false, FD_EXEC_TEST_INFLATION_INIT_DEFAULT, 0, 0, NULL, 0, NULL}
     126           0 : #define FD_EXEC_TEST_SLOT_CONTEXT_INIT_DEFAULT   {0, 0, {0}, {0}, 0, 0, 0}
     127           0 : #define FD_EXEC_TEST_FEATURE_SET_INIT_ZERO       {0, NULL}
     128             : #define FD_EXEC_TEST_SEED_ADDRESS_INIT_ZERO      {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}}
     129             : #define FD_EXEC_TEST_ACCT_STATE_INIT_ZERO        {{0}, 0, NULL, 0, 0, {0}, false, FD_EXEC_TEST_SEED_ADDRESS_INIT_ZERO}
     130             : #define FD_EXEC_TEST_VOTE_ACCOUNT_INIT_ZERO      {false, FD_EXEC_TEST_ACCT_STATE_INIT_ZERO, 0}
     131           0 : #define FD_EXEC_TEST_INFLATION_INIT_ZERO         {0, 0, 0, 0, 0}
     132           0 : #define FD_EXEC_TEST_EPOCH_CONTEXT_INIT_ZERO     {false, FD_EXEC_TEST_FEATURE_SET_INIT_ZERO, 0, 0, 0, false, FD_EXEC_TEST_INFLATION_INIT_ZERO, 0, 0, NULL, 0, NULL}
     133           0 : #define FD_EXEC_TEST_SLOT_CONTEXT_INIT_ZERO      {0, 0, {0}, {0}, 0, 0, 0}
     134             : 
     135             : /* Field tags (for use in manual encoding/decoding) */
     136             : #define FD_EXEC_TEST_FEATURE_SET_FEATURES_TAG    1
     137             : #define FD_EXEC_TEST_SEED_ADDRESS_BASE_TAG       1
     138             : #define FD_EXEC_TEST_SEED_ADDRESS_SEED_TAG       2
     139             : #define FD_EXEC_TEST_SEED_ADDRESS_OWNER_TAG      3
     140             : #define FD_EXEC_TEST_ACCT_STATE_ADDRESS_TAG      1
     141             : #define FD_EXEC_TEST_ACCT_STATE_LAMPORTS_TAG     2
     142             : #define FD_EXEC_TEST_ACCT_STATE_DATA_TAG         3
     143             : #define FD_EXEC_TEST_ACCT_STATE_EXECUTABLE_TAG   4
     144             : #define FD_EXEC_TEST_ACCT_STATE_RENT_EPOCH_TAG   5
     145             : #define FD_EXEC_TEST_ACCT_STATE_OWNER_TAG        6
     146             : #define FD_EXEC_TEST_ACCT_STATE_SEED_ADDR_TAG    7
     147             : #define FD_EXEC_TEST_VOTE_ACCOUNT_VOTE_ACCOUNT_TAG 1
     148             : #define FD_EXEC_TEST_VOTE_ACCOUNT_STAKE_TAG      2
     149             : #define FD_EXEC_TEST_INFLATION_INITIAL_TAG       1
     150             : #define FD_EXEC_TEST_INFLATION_TERMINAL_TAG      2
     151             : #define FD_EXEC_TEST_INFLATION_TAPER_TAG         3
     152             : #define FD_EXEC_TEST_INFLATION_FOUNDATION_TAG    4
     153             : #define FD_EXEC_TEST_INFLATION_FOUNDATION_TERM_TAG 5
     154             : #define FD_EXEC_TEST_EPOCH_CONTEXT_FEATURES_TAG  1
     155             : #define FD_EXEC_TEST_EPOCH_CONTEXT_HASHES_PER_TICK_TAG 2
     156             : #define FD_EXEC_TEST_EPOCH_CONTEXT_TICKS_PER_SLOT_TAG 3
     157             : #define FD_EXEC_TEST_EPOCH_CONTEXT_SLOTS_PER_YEAR_TAG 4
     158             : #define FD_EXEC_TEST_EPOCH_CONTEXT_INFLATION_TAG 5
     159             : #define FD_EXEC_TEST_EPOCH_CONTEXT_GENESIS_CREATION_TIME_TAG 6
     160             : #define FD_EXEC_TEST_EPOCH_CONTEXT_VOTE_ACCOUNTS_T_1_TAG 11
     161             : #define FD_EXEC_TEST_EPOCH_CONTEXT_VOTE_ACCOUNTS_T_2_TAG 12
     162             : #define FD_EXEC_TEST_SLOT_CONTEXT_SLOT_TAG       1
     163             : #define FD_EXEC_TEST_SLOT_CONTEXT_BLOCK_HEIGHT_TAG 2
     164             : #define FD_EXEC_TEST_SLOT_CONTEXT_POH_TAG        3
     165             : #define FD_EXEC_TEST_SLOT_CONTEXT_PARENT_BANK_HASH_TAG 4
     166             : #define FD_EXEC_TEST_SLOT_CONTEXT_PREV_SLOT_TAG  6
     167             : #define FD_EXEC_TEST_SLOT_CONTEXT_PREV_LPS_TAG   7
     168             : #define FD_EXEC_TEST_SLOT_CONTEXT_PREV_EPOCH_CAPITALIZATION_TAG 8
     169             : 
     170             : /* Struct field encoding specification for nanopb */
     171             : #define FD_EXEC_TEST_FEATURE_SET_FIELDLIST(X, a) \
     172             : X(a, POINTER,  REPEATED, FIXED64,  features,          1)
     173             : #define FD_EXEC_TEST_FEATURE_SET_CALLBACK NULL
     174             : #define FD_EXEC_TEST_FEATURE_SET_DEFAULT NULL
     175             : 
     176             : #define FD_EXEC_TEST_SEED_ADDRESS_FIELDLIST(X, a) \
     177             : X(a, CALLBACK, SINGULAR, BYTES,    base,              1) \
     178             : X(a, CALLBACK, SINGULAR, BYTES,    seed,              2) \
     179             : X(a, CALLBACK, SINGULAR, BYTES,    owner,             3)
     180             : #define FD_EXEC_TEST_SEED_ADDRESS_CALLBACK pb_default_field_callback
     181             : #define FD_EXEC_TEST_SEED_ADDRESS_DEFAULT NULL
     182             : 
     183             : #define FD_EXEC_TEST_ACCT_STATE_FIELDLIST(X, a) \
     184             : X(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, address,           1) \
     185             : X(a, STATIC,   SINGULAR, UINT64,   lamports,          2) \
     186             : X(a, POINTER,  SINGULAR, BYTES,    data,              3) \
     187             : X(a, STATIC,   SINGULAR, BOOL,     executable,        4) \
     188             : X(a, STATIC,   SINGULAR, UINT64,   rent_epoch,        5) \
     189             : X(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, owner,             6) \
     190             : X(a, STATIC,   OPTIONAL, MESSAGE,  seed_addr,         7)
     191             : #define FD_EXEC_TEST_ACCT_STATE_CALLBACK NULL
     192             : #define FD_EXEC_TEST_ACCT_STATE_DEFAULT NULL
     193             : #define fd_exec_test_acct_state_t_seed_addr_MSGTYPE fd_exec_test_seed_address_t
     194             : 
     195             : #define FD_EXEC_TEST_VOTE_ACCOUNT_FIELDLIST(X, a) \
     196             : X(a, STATIC,   OPTIONAL, MESSAGE,  vote_account,      1) \
     197             : X(a, STATIC,   SINGULAR, UINT64,   stake,             2)
     198             : #define FD_EXEC_TEST_VOTE_ACCOUNT_CALLBACK NULL
     199             : #define FD_EXEC_TEST_VOTE_ACCOUNT_DEFAULT NULL
     200             : #define fd_exec_test_vote_account_t_vote_account_MSGTYPE fd_exec_test_acct_state_t
     201             : 
     202             : #define FD_EXEC_TEST_INFLATION_FIELDLIST(X, a) \
     203             : X(a, STATIC,   SINGULAR, DOUBLE,   initial,           1) \
     204             : X(a, STATIC,   SINGULAR, DOUBLE,   terminal,          2) \
     205             : X(a, STATIC,   SINGULAR, DOUBLE,   taper,             3) \
     206             : X(a, STATIC,   SINGULAR, DOUBLE,   foundation,        4) \
     207             : X(a, STATIC,   SINGULAR, DOUBLE,   foundation_term,   5)
     208             : #define FD_EXEC_TEST_INFLATION_CALLBACK NULL
     209             : #define FD_EXEC_TEST_INFLATION_DEFAULT NULL
     210             : 
     211             : #define FD_EXEC_TEST_EPOCH_CONTEXT_FIELDLIST(X, a) \
     212             : X(a, STATIC,   OPTIONAL, MESSAGE,  features,          1) \
     213             : X(a, STATIC,   SINGULAR, UINT64,   hashes_per_tick,   2) \
     214             : X(a, STATIC,   SINGULAR, UINT64,   ticks_per_slot,    3) \
     215             : X(a, STATIC,   SINGULAR, DOUBLE,   slots_per_year,    4) \
     216             : X(a, STATIC,   OPTIONAL, MESSAGE,  inflation,         5) \
     217             : X(a, STATIC,   SINGULAR, UINT64,   genesis_creation_time,   6) \
     218             : X(a, POINTER,  REPEATED, MESSAGE,  vote_accounts_t_1,  11) \
     219             : X(a, POINTER,  REPEATED, MESSAGE,  vote_accounts_t_2,  12)
     220             : #define FD_EXEC_TEST_EPOCH_CONTEXT_CALLBACK NULL
     221             : #define FD_EXEC_TEST_EPOCH_CONTEXT_DEFAULT NULL
     222             : #define fd_exec_test_epoch_context_t_features_MSGTYPE fd_exec_test_feature_set_t
     223             : #define fd_exec_test_epoch_context_t_inflation_MSGTYPE fd_exec_test_inflation_t
     224             : #define fd_exec_test_epoch_context_t_vote_accounts_t_1_MSGTYPE fd_exec_test_vote_account_t
     225             : #define fd_exec_test_epoch_context_t_vote_accounts_t_2_MSGTYPE fd_exec_test_vote_account_t
     226             : 
     227             : #define FD_EXEC_TEST_SLOT_CONTEXT_FIELDLIST(X, a) \
     228             : X(a, STATIC,   SINGULAR, FIXED64,  slot,              1) \
     229             : X(a, STATIC,   SINGULAR, FIXED64,  block_height,      2) \
     230             : X(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, poh,               3) \
     231             : X(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, parent_bank_hash,   4) \
     232             : X(a, STATIC,   SINGULAR, FIXED64,  prev_slot,         6) \
     233             : X(a, STATIC,   SINGULAR, UINT64,   prev_lps,          7) \
     234             : X(a, STATIC,   SINGULAR, UINT64,   prev_epoch_capitalization,   8)
     235             : #define FD_EXEC_TEST_SLOT_CONTEXT_CALLBACK NULL
     236             : #define FD_EXEC_TEST_SLOT_CONTEXT_DEFAULT NULL
     237             : 
     238             : extern const pb_msgdesc_t fd_exec_test_feature_set_t_msg;
     239             : extern const pb_msgdesc_t fd_exec_test_seed_address_t_msg;
     240             : extern const pb_msgdesc_t fd_exec_test_acct_state_t_msg;
     241             : extern const pb_msgdesc_t fd_exec_test_vote_account_t_msg;
     242             : extern const pb_msgdesc_t fd_exec_test_inflation_t_msg;
     243             : extern const pb_msgdesc_t fd_exec_test_epoch_context_t_msg;
     244             : extern const pb_msgdesc_t fd_exec_test_slot_context_t_msg;
     245             : 
     246             : /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
     247             : #define FD_EXEC_TEST_FEATURE_SET_FIELDS &fd_exec_test_feature_set_t_msg
     248             : #define FD_EXEC_TEST_SEED_ADDRESS_FIELDS &fd_exec_test_seed_address_t_msg
     249             : #define FD_EXEC_TEST_ACCT_STATE_FIELDS &fd_exec_test_acct_state_t_msg
     250             : #define FD_EXEC_TEST_VOTE_ACCOUNT_FIELDS &fd_exec_test_vote_account_t_msg
     251             : #define FD_EXEC_TEST_INFLATION_FIELDS &fd_exec_test_inflation_t_msg
     252             : #define FD_EXEC_TEST_EPOCH_CONTEXT_FIELDS &fd_exec_test_epoch_context_t_msg
     253             : #define FD_EXEC_TEST_SLOT_CONTEXT_FIELDS &fd_exec_test_slot_context_t_msg
     254             : 
     255             : /* Maximum encoded size of messages (where known) */
     256             : /* fd_exec_test_FeatureSet_size depends on runtime parameters */
     257             : /* fd_exec_test_SeedAddress_size depends on runtime parameters */
     258             : /* fd_exec_test_AcctState_size depends on runtime parameters */
     259             : /* fd_exec_test_VoteAccount_size depends on runtime parameters */
     260             : /* fd_exec_test_EpochContext_size depends on runtime parameters */
     261             : #define FD_EXEC_TEST_INFLATION_SIZE              45
     262             : #define FD_EXEC_TEST_SLOT_CONTEXT_SIZE           117
     263             : #define ORG_SOLANA_SEALEVEL_V1_CONTEXT_PB_H_MAX_SIZE FD_EXEC_TEST_SLOT_CONTEXT_SIZE
     264             : 
     265             : /* Mapping from canonical names (mangle_names or overridden package name) */
     266             : #define org_solana_sealevel_v1_FeatureSet fd_exec_test_FeatureSet
     267             : #define org_solana_sealevel_v1_SeedAddress fd_exec_test_SeedAddress
     268             : #define org_solana_sealevel_v1_AcctState fd_exec_test_AcctState
     269             : #define org_solana_sealevel_v1_VoteAccount fd_exec_test_VoteAccount
     270             : #define org_solana_sealevel_v1_Inflation fd_exec_test_Inflation
     271             : #define org_solana_sealevel_v1_EpochContext fd_exec_test_EpochContext
     272             : #define org_solana_sealevel_v1_SlotContext fd_exec_test_SlotContext
     273             : #define ORG_SOLANA_SEALEVEL_V1_FEATURE_SET_INIT_DEFAULT FD_EXEC_TEST_FEATURE_SET_INIT_DEFAULT
     274             : #define ORG_SOLANA_SEALEVEL_V1_SEED_ADDRESS_INIT_DEFAULT FD_EXEC_TEST_SEED_ADDRESS_INIT_DEFAULT
     275             : #define ORG_SOLANA_SEALEVEL_V1_ACCT_STATE_INIT_DEFAULT FD_EXEC_TEST_ACCT_STATE_INIT_DEFAULT
     276             : #define ORG_SOLANA_SEALEVEL_V1_VOTE_ACCOUNT_INIT_DEFAULT FD_EXEC_TEST_VOTE_ACCOUNT_INIT_DEFAULT
     277             : #define ORG_SOLANA_SEALEVEL_V1_INFLATION_INIT_DEFAULT FD_EXEC_TEST_INFLATION_INIT_DEFAULT
     278             : #define ORG_SOLANA_SEALEVEL_V1_EPOCH_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_EPOCH_CONTEXT_INIT_DEFAULT
     279             : #define ORG_SOLANA_SEALEVEL_V1_SLOT_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_SLOT_CONTEXT_INIT_DEFAULT
     280             : #define ORG_SOLANA_SEALEVEL_V1_FEATURE_SET_INIT_ZERO FD_EXEC_TEST_FEATURE_SET_INIT_ZERO
     281             : #define ORG_SOLANA_SEALEVEL_V1_SEED_ADDRESS_INIT_ZERO FD_EXEC_TEST_SEED_ADDRESS_INIT_ZERO
     282             : #define ORG_SOLANA_SEALEVEL_V1_ACCT_STATE_INIT_ZERO FD_EXEC_TEST_ACCT_STATE_INIT_ZERO
     283             : #define ORG_SOLANA_SEALEVEL_V1_VOTE_ACCOUNT_INIT_ZERO FD_EXEC_TEST_VOTE_ACCOUNT_INIT_ZERO
     284             : #define ORG_SOLANA_SEALEVEL_V1_INFLATION_INIT_ZERO FD_EXEC_TEST_INFLATION_INIT_ZERO
     285             : #define ORG_SOLANA_SEALEVEL_V1_EPOCH_CONTEXT_INIT_ZERO FD_EXEC_TEST_EPOCH_CONTEXT_INIT_ZERO
     286             : #define ORG_SOLANA_SEALEVEL_V1_SLOT_CONTEXT_INIT_ZERO FD_EXEC_TEST_SLOT_CONTEXT_INIT_ZERO
     287             : 
     288             : #ifdef __cplusplus
     289             : } /* extern "C" */
     290             : #endif
     291             : 
     292             : #endif

Generated by: LCOV version 1.14