LCOV - code coverage report
Current view: top level - disco/events/generated - fd_event_gen.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 6 118 5.1 %
Date: 2026-08-14 04:54:57 Functions: 2 102 2.0 %

          Line data    Source code
       1             : /* THIS FILE WAS GENERATED BY gen_events.py. DO NOT EDIT BY HAND! */
       2             : #ifndef HEADER_fd_src_disco_events_generated_fd_event_gen_h
       3             : #define HEADER_fd_src_disco_events_generated_fd_event_gen_h
       4             : 
       5             : #include "../fd_circq.h"
       6             : #include "../fd_event_client.h"
       7             : #include "../fd_event_report.h"
       8             : 
       9             : /* Slot that was voted on */
      10             : struct fd_event_signed_vote_tower {
      11             :   ulong slot;               /* Slot being voted on / locked out for */
      12             :   uchar confirmation_count; /* Confirmation count (higher = closer to root) */
      13             : };
      14             : typedef struct fd_event_signed_vote_tower fd_event_signed_vote_tower_t;
      15             : 
      16             : /* The validator generated a vote transaction */
      17             : struct fd_event_signed_vote {
      18             :   uchar                        signed_txn[ 1232UL ];   /* Serialized signed vote transaction */
      19             :   ulong                        signed_txn_len;         /* Length of signed_txn (<= 1232) */
      20             :   uchar                        vote_account[ 32UL ];   /* The public key of the vote account */
      21             :   uchar                        vote_authority[ 32UL ]; /* The public key that authorized the vote */
      22             :   uchar                        fee_payer[ 32UL ];      /* The public key that pays for transaction fees */
      23             :   uchar                        signature[ 64UL ];      /* Signature identifying the transaction */
      24             :   ulong                        vote_slot;              /* Slot being voted on (top of tower) */
      25             :   uchar                        vote_bank_hash[ 32UL ]; /* Bank hash of the slot being voted on */
      26             :   uchar                        vote_block_id[ 32UL ];  /* Block ID of the slot being voted on */
      27             :   uchar                        txn_blockhash[ 32UL ];  /* Recent blockhash parameter of the vote transaction */
      28             :   fd_event_signed_vote_tower_t tower[ 31UL ];          /* Tower of slots being voted on (oldest to newest) */
      29             :   ulong                        tower_cnt;              /* Number of tower entries (<= 31) */
      30             : };
      31             : typedef struct fd_event_signed_vote fd_event_signed_vote_t;
      32             : 
      33             : /* Worst-case encoded size of a signed_vote event (envelope + Event
      34             :    submsg + inner submsg + all fields, padded for encoder slack). */
      35           0 : #define FD_EVENT_SIGNED_VOTE_BUF_MAX (2765UL)
      36             : 
      37             : /* The commitment level reached, from weakest to strongest: processed, propagated, duplicate, optimistic, super, rooted. ignored is a separate terminal outcome rather than a strengthening level. */
      38           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_IGNORED    (1) /* Replay finished a block that consensus had already pruned, so it never reached any commitment level. */
      39           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_PROCESSED  (2) /* Replayed locally on the majority fork, with no cluster stake required. Equivalent to Solana's 'processed' commitment. */
      40           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_PROPAGATED (3) /* More than a third of stake has observed the block, confirming it has propagated. */
      41           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_DUPLICATE  (4) /* At least 52% of stake voted for this exact block, guaranteeing the cluster converges on it even when a slot equivocates. */
      42           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_OPTIMISTIC (5) /* More than two thirds of stake voted for the block. Equivalent to Solana's 'confirmed' commitment. */
      43           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_SUPER      (6) /* More than four fifths of stake voted for the block. Used when waiting for a supermajority at boot. */
      44           0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_ROOTED     (7) /* The block or a descendant reached maximum lockout and can never be rolled back. The strongest level, equivalent to Solana's 'finalized' commitment. */
      45             : 
      46             : /* A slot reached a commitment level. Emitted once per slot per level reached. Join to block_completed on bank_seq, or on slot and block_id. */
      47             : struct fd_event_slot_confirmed {
      48             :   ulong bank_seq;         /* Monotonic sequence number identifying this block within the current run; the join key to block_completed. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable, which happens for forward confirmations where the block has not been replayed. */
      49             :   ulong slot;             /* The slot being confirmed. */
      50             :   uchar block_id[ 32UL ]; /* Unique identifier of the block being confirmed; the join key to block_completed. */
      51             :   ulong stake;            /* Stake in lamports supporting this confirmation. Divide by total_stake for the ratio that crossed the level's threshold. 0 means unavailable. */
      52             :   ulong total_stake;      /* Total cluster stake in lamports at confirmation time; the denominator for the confirmation ratio. 0 means unavailable. */
      53             :   int   valid;            /* Whether this block is eligible for fork choice. An equivocating block becomes eligible again only once duplicate confirmed. */
      54             :   int   level;            /* The commitment level reached, from weakest to strongest: processed, propagated, duplicate, optimistic, super, rooted. ignored is a separate terminal outcome rather than a strengthening level. */
      55             :   int   forward;          /* True when the block was confirmed by votes seen over gossip before it was replayed locally. Always false for processed and rooted, which require a local replay. */
      56             : };
      57             : typedef struct fd_event_slot_confirmed fd_event_slot_confirmed_t;
      58             : 
      59             : /* Worst-case encoded size of a slot_confirmed event (envelope + Event
      60             :    submsg + inner submsg + all fields, padded for encoder slack). */
      61           0 : #define FD_EVENT_SLOT_CONFIRMED_BUF_MAX (221UL)
      62             : 
      63             : /* A single accounts-database partition finished compacting. Compaction scans one partition, relocates its still-live account records forward into the next storage tier, and reclaims the partition. Emitted once per partition per compaction pass by the accdb tile. Partitions are large (e.g. 32 GiB) so this is a rare, coarse-grained event rather than a hot-path counter. */
      64             : struct fd_event_accdb_compaction_completed {
      65             :   ulong partition_idx;      /* Index of the partition that was compacted, identifying its slot in the accdb partition pool. */
      66             :   uchar src_layer;          /* Storage tier the partition was compacted from. Layer 0 is the hot tier that takes live execution writes; higher layers are progressively colder. Records are promoted one tier per compaction. */
      67             :   uchar dest_layer;         /* Storage tier the surviving live records were relocated into, normally src_layer+1, clamped at the coldest tier. */
      68             :   ulong bytes_scanned;      /* Total bytes of account records walked in the partition this pass, live and dead combined. Equals the partition's written extent at the time compaction started. */
      69             :   ulong bytes_freed;        /* Dead bytes in the partition that triggered compaction: space held by account records that had been superseded by newer versions. This is the space compaction reclaims. */
      70             :   ulong accounts_relocated; /* Number of still-live account records copied forward into dest_layer this pass. */
      71             :   ulong bytes_relocated;    /* Total bytes of live account records copied forward into dest_layer this pass. Compare to bytes_scanned for the live fraction of the partition. */
      72             :   ulong dead_records;       /* Number of records skipped because no live index entry referenced them, i.e. records that were already superseded. Together with accounts_relocated this accounts for every record scanned. */
      73             :   ulong start_time;         /* Wall-clock time at which this compaction pass began, in nanoseconds since the Unix epoch. */
      74             :   ulong end_time;           /* Wall-clock time at which this compaction pass completed, in nanoseconds since the Unix epoch. Subtract start_time for the pass duration. */
      75             : };
      76             : typedef struct fd_event_accdb_compaction_completed fd_event_accdb_compaction_completed_t;
      77             : 
      78             : /* Worst-case encoded size of a accdb_compaction_completed event (envelope + Event
      79             :    submsg + inner submsg + all fields, padded for encoder slack). */
      80           0 : #define FD_EVENT_ACCDB_COMPACTION_COMPLETED_BUF_MAX (237UL)
      81             : 
      82             : /* The accounts database grew its backing file by one partition. The accounts DB is a single file divided into fixed-size partitions; when a write head runs off the end of the allocated file, a new partition is fallocated and the file grows. Emitted once per grow by the accdb tile. Partitions are large (e.g. 32 GiB) so grows are infrequent and each one is a meaningful step in the database's on-disk footprint. */
      83             : struct fd_event_accdb_partition_added {
      84             :   ulong partition_idx;        /* Index of the newly allocated partition. Equals old_partition_max, i.e. it is appended at the end of the previously allocated range. */
      85             :   ulong prior_partition_idx;  /* Index of the partition the write head rotated off of to trigger this grow, i.e. the partition that just filled up. UINT64_MAX when there was no prior write head (the very first partition allocated on this layer). */
      86             :   uchar layer;                /* Storage tier whose write head triggered the grow. Layer 0 is the hot tier fed by live execution writes; higher layers are colder compaction-destination tiers. A layer-0 grow means live ingest outran reclamation; a higher-layer grow means compaction is staging more cold data. */
      87             :   ulong old_partition_max;    /* Number of allocated partitions before this grow. */
      88             :   ulong new_partition_max;    /* Number of allocated partitions after this grow, always old_partition_max+1. */
      89             :   ulong partition_sz;         /* Size of a single partition in bytes; the increment by which the backing file grows. */
      90             :   ulong disk_allocated_bytes; /* Total fallocated size of the accounts database file in bytes after this grow, equal to new_partition_max times partition_sz. Tracks the database's on-disk footprint over time. */
      91             : };
      92             : typedef struct fd_event_accdb_partition_added fd_event_accdb_partition_added_t;
      93             : 
      94             : /* Worst-case encoded size of a accdb_partition_added event (envelope + Event
      95             :    submsg + inner submsg + all fields, padded for encoder slack). */
      96           0 : #define FD_EVENT_ACCDB_PARTITION_ADDED_BUF_MAX (197UL)
      97             : 
      98             : /* How the equivocation was detected. */
      99           0 : #define FD_EVENT_BLOCK_EQUIVOCATED_DETECTION_DUPLICATE_REPLAY (1) /* A second, different block for the slot finished replaying locally. */
     100           0 : #define FD_EVENT_BLOCK_EQUIVOCATED_DETECTION_CONFIRM_MISMATCH (2) /* Votes confirmed a block id for the slot that differs from the one this validator replayed. */
     101           0 : #define FD_EVENT_BLOCK_EQUIVOCATED_DETECTION_SHRED_PROOF      (3) /* A duplicate-shred proof showed the slot equivocates; the conflicting block id is not known, so sibling_block_id is zero. */
     102             : 
     103             : /* Two different blocks (different block ids) were observed for the same slot. Emitted once when the validator first detects the equivocation, after both blocks are known. */
     104             : struct fd_event_block_equivocated {
     105             :   ulong bank_seq;                 /* Sequence number of this validator's replayed block, joining to block_completed; zero if there is no local replayed bank (forward-confirmed or shred-proof detection). */
     106             :   ulong slot;                     /* The slot that equivocates (has more than one block). */
     107             :   ulong parent_slot;              /* The slot number of the parent block. */
     108             :   ulong epoch;                    /* The epoch this slot belongs to. */
     109             :   uchar block_id[ 32UL ];         /* Identifier of the block this validator replayed for the slot. */
     110             :   uchar sibling_block_id[ 32UL ]; /* Identifier of the conflicting block for the same slot; zero if not known (shred-proof detection). */
     111             :   uchar bank_hash[ 32UL ];        /* This validator's bank hash for the block it replayed; zero if the block was not replayed locally. */
     112             :   uchar block_hash[ 32UL ];       /* Last microblock header hash of the block this validator replayed; zero if not replayed locally. */
     113             :   int   is_leader;                /* Whether this validator produced the equivocating block it replayed. */
     114             :   int   our_block_voted;          /* Whether this validator had voted for its replayed block when the equivocation was detected. */
     115             :   int   our_block_confirmed;      /* Whether this validator's replayed block had been duplicate confirmed when the equivocation was detected. */
     116             :   ulong block_stake;              /* Stake in lamports voted on the block this validator replayed at detection; zero if none/unknown. Typically small, as an equivocating block usually did not win confirmation. */
     117             :   ulong sibling_stake;            /* Stake in lamports on the conflicting (typically confirmed) block at detection; zero if not known. */
     118             :   ulong total_stake;              /* Total cluster stake in lamports at detection; the denominator for the stake fields. Zero if not known. */
     119             :   int   detection;                /* How the equivocation was detected. */
     120             : };
     121             : typedef struct fd_event_block_equivocated fd_event_block_equivocated_t;
     122             : 
     123             : /* Worst-case encoded size of a block_equivocated event (envelope + Event
     124             :    submsg + inner submsg + all fields, padded for encoder slack). */
     125           0 : #define FD_EVENT_BLOCK_EQUIVOCATED_BUF_MAX (398UL)
     126             : 
     127             : /* Transaction execution error */
     128           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_SUCCESS                                 (1) /* Transaction succeeded */
     129           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ACCOUNT_LOADED_TWICE                    (2) /* A Pubkey appears twice in the transaction's account_keys */
     130           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ACCOUNT_NOT_FOUND                       (3) /* Attempt to debit an account but found no record of a prior credit */
     131           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_PROGRAM_ACCOUNT_NOT_FOUND               (4) /* Attempt to load a program that does not exist */
     132           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INSUFFICIENT_FUNDS_FOR_FEE              (5) /* Fee payer has insufficient lamports to cover the transaction fee */
     133           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ACCOUNT_FOR_FEE                 (6) /* This account may not be used to pay transaction fees */
     134           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ALREADY_PROCESSED                       (7) /* The bank has seen this transaction before */
     135           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BLOCKHASH_NOT_FOUND                     (8) /* The bank has not seen the given recent_blockhash or the transaction is too old and the recent_blockhash has been discarded. */
     136           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INSTRUCTION_ERROR                       (9) /* An error occurred while processing an instruction, look at exec_err for more details */
     137           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_SIGNATURE_FAILURE                       (10) /* Transaction did not pass signature verification */
     138           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_PROGRAM_FOR_EXECUTION           (11) /* This program may not be used for executing instructions */
     139           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_SANITIZE_FAILURE                        (12) /* Transaction failed to sanitize accounts offsets correctly */
     140           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT       (13) /* Transaction would exceed max Block Cost Limit */
     141           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT     (14) /* Transaction would exceed max account limit within the block */
     142           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT   (15) /* Transaction would exceed account data limit within the block */
     143           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_TOO_MANY_ACCOUNT_LOCKS                  (16) /* Transaction locked too many accounts */
     144           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ADDRESS_LOOKUP_TABLE_NOT_FOUND          (17) /* Transaction loads an address table account that doesn't exist */
     145           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER      (18) /* Transaction loads an address table account with an invalid owner */
     146           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ADDRESS_LOOKUP_TABLE_DATA       (19) /* Transaction loads an address table account with invalid data */
     147           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX      (20) /* Transaction address table lookup uses an invalid index */
     148           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT        (21) /* Transaction would exceed max Vote Cost Limit */
     149           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT   (22) /* Transaction would exceed total account data limit */
     150           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_DUPLICATE_INSTRUCTION                   (23) /* Transaction contains a duplicate instruction that is not allowed */
     151           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INSUFFICIENT_FUNDS_FOR_RENT             (24) /* Transaction results in an account with insufficient funds for rent */
     152           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED  (25) /* Transaction exceeded max loaded accounts data size cap */
     153           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT (26) /* Transaction requested a zero loaded-accounts-data-size limit */
     154           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_UNBALANCED_TRANSACTION                  (27) /* Sum of account balances before and after transaction do not match */
     155           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BUNDLE_PEER                             (28) /* Transaction was part of a bundle in which another transaction failed */
     156           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BLOCKHASH_NONCE_ALREADY_ADVANCED        (29) /* Durable-nonce txn was rejected because its nonce account has already been advanced */
     157           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BLOCKHASH_FAIL_ADVANCE_NONCE_INSTR      (30) /* Durable-nonce txn failed to advance its nonce account */
     158           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BLOCKHASH_FAIL_WRONG_NONCE              (31) /* Durable-nonce txn's recent_blockhash did not match the stored nonce */
     159           0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_UNSUPPORTED_VERSION                     (32) /* Transaction uses a message version that is not supported */
     160             : 
     161             : /* Instruction execution error; success unless txn_err = instruction_error */
     162           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_SUCCESS                            (1) /* instruction succeeded */
     163           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_GENERIC_ERR                        (2) /* The program instruction returned an error */
     164           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ARG                        (3) /* The arguments provided to a program were invalid */
     165           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_INSTR_DATA                 (4) /* An instruction's data contents were invalid */
     166           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ACC_DATA                   (5) /* An account's data contents was invalid */
     167           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_DATA_TOO_SMALL                 (6) /* An account's data was too small */
     168           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INSUFFICIENT_FUNDS                 (7) /* An account's balance was too small to complete the instruction */
     169           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INCORRECT_PROGRAM_ID               (8) /* The account did not have the expected program id */
     170           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MISSING_REQUIRED_SIGNATURE         (9) /* A signature was required but not found */
     171           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_ALREADY_INITIALIZED            (10) /* An initialize instruction was sent to an account that has already been initialized. */
     172           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNINITIALIZED_ACCOUNT              (11) /* An attempt to operate on an account that hasn't been initialized. */
     173           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNBALANCED_INSTR                   (12) /* Program's instruction lamport balance does not equal the balance after the instruction */
     174           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MODIFIED_PROGRAM_ID                (13) /* Program illegally modified an account's program id */
     175           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_EXTERNAL_ACCOUNT_LAMPORT_SPEND     (14) /* Program spent the lamports of an account that doesn't belong to it */
     176           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_EXTERNAL_DATA_MODIFIED             (15) /* Program modified the data of an account that doesn't belong to it */
     177           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_READONLY_LAMPORT_CHANGE            (16) /* Read-only account's lamports modified */
     178           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_READONLY_DATA_MODIFIED             (17) /* Read-only account's data was modified */
     179           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_EXECUTABLE_MODIFIED                (18) /* Executable bit on account changed, but shouldn't have */
     180           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_NOT_ENOUGH_ACC_KEYS                (19) /* The instruction expected additional account keys */
     181           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_DATA_SIZE_CHANGED              (20) /* Program other than the account's owner changed the size of the account data */
     182           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_BORROW_FAILED                  (21) /* Failed to borrow a reference to account data, already borrowed */
     183           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_BORROW_OUTSTANDING             (22) /* Account data has an outstanding reference after a program's execution */
     184           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_CUSTOM_ERR                         (23) /* Allows on-chain programs to implement program-specific error types and see them returned by the runtime. */
     185           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ERR                        (24) /* The return value from the program was invalid. */
     186           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT (25) /* Executable accounts must be rent exempt */
     187           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNSUPPORTED_PROGRAM_ID             (26) /* Unsupported program id */
     188           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_CALL_DEPTH                         (27) /* Cross-program invocation call depth too deep */
     189           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MISSING_ACC                        (28) /* An account required by the instruction is missing */
     190           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_REENTRANCY_NOT_ALLOWED             (29) /* Cross-program invocation reentrancy not allowed for this instruction */
     191           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_SEED_LENGTH_EXCEEDED           (30) /* Length of the seed is too long for address generation */
     192           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_SEEDS                      (31) /* Provided seeds do not result in a valid address */
     193           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_REALLOC                    (32) /* Failed to reallocate account data of this length */
     194           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_COMPUTE_BUDGET_EXCEEDED            (33) /* Computational budget exceeded */
     195           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_PRIVILEGE_ESCALATION               (34) /* Cross-program invocation with unauthorized signer or writable account */
     196           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_PROGRAM_ENVIRONMENT_SETUP_FAILURE  (35) /* Failed to create program execution environment */
     197           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_PROGRAM_FAILED_TO_COMPLETE         (36) /* Program failed to complete */
     198           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_IMMUTABLE                      (37) /* Account is immutable */
     199           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INCORRECT_AUTHORITY                (38) /* Incorrect authority provided */
     200           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_BORSH_IO_ERROR                     (39) /* Failed to serialize or deserialize account data */
     201           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_NOT_RENT_EXEMPT                (40) /* An account does not have enough lamports to be rent-exempt */
     202           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ACC_OWNER                  (41) /* Invalid account owner */
     203           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ARITHMETIC_OVERFLOW                (42) /* Program arithmetic overflowed */
     204           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNSUPPORTED_SYSVAR                 (43) /* Unsupported sysvar */
     205           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ILLEGAL_OWNER                      (44) /* Provided owner is not allowed */
     206           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_ACCS_DATA_ALLOCS_EXCEEDED      (45) /* Account data allocation exceeded the maximum accounts data size limit */
     207           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_ACCS_EXCEEDED                  (46) /* Max accounts exceeded */
     208           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_INSN_TRACE_LENS_EXCEEDED       (47) /* Max instruction trace length exceeded */
     209           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_BUILTINS_MUST_CONSUME_CUS          (48) /* Builtin programs must consume compute units */
     210             : 
     211             : /* Source kind of exec_err; none unless txn_err = instruction_error */
     212           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_NONE    (1) /* no instruction error */
     213           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_EBPF    (2) /* eBPF VM error */
     214           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_SYSCALL (3) /* Syscall error */
     215           0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_INSTR   (4) /* Instruction error */
     216             : 
     217             : /* Per-account diff entry */
     218             : struct fd_event_runtime_txn_account_diffs {
     219             :   uchar pubkey[ 32UL ];     /* Account pubkey */
     220             :   uchar owner[ 32UL ];      /* Post-state owner pubkey */
     221             :   uchar prev_owner[ 32UL ]; /* Pre-state owner pubkey */
     222             :   ulong lamports;           /* Post-state lamports */
     223             :   ulong prev_lamports;      /* Pre-state lamports */
     224             :   ulong data_sz;            /* Post-state data size in bytes */
     225             :   ulong prev_data_sz;       /* Pre-state data size in bytes */
     226             :   int   is_executable;      /* True if the post-state account is executable */
     227             :   int   is_stake_update;    /* True if this write touched the stake cache */
     228             :   int   is_vote_update;     /* True if this write touched the vote cache */
     229             :   int   is_new_vote;        /* True if this write created a new vote account */
     230             :   int   is_rm_vote;         /* True if this write removed a vote account */
     231             : };
     232             : typedef struct fd_event_runtime_txn_account_diffs fd_event_runtime_txn_account_diffs_t;
     233             : 
     234             : /* One row per dispatched transaction (committable or not), with the execution results */
     235             : struct fd_event_runtime_txn {
     236             :   ulong                                bank_seq;                          /* Monotonic sequence number identifying this block within the current run; the join key to block_completed. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
     237             :   ulong                                slot;                              /* Bank slot in which this transaction was executed */
     238             :   ulong                                index_in_slot;                     /* 0-indexed position of this transaction within its block */
     239             :   ulong                                commit_index_in_slot;              /* 0-indexed commit-completion order within this slot */
     240             :   uchar                                fec_merkle_root[ 32UL ];           /* FEC merkle root that was the current block_id of the bank when this txn was dispatched; NULL on the leader path */
     241             :   ulong                                epoch;                             /* Epoch the transaction was executed in */
     242             :   uchar                                signature[ 64UL ];                 /* First signature of the transaction (64 bytes) */
     243             :   uchar                                blockhash[ 32UL ];                 /* Blockhash referenced by the transaction */
     244             :   uchar                                fee_payer[ 32UL ];                 /* Fee-payer pubkey */
     245             :   int                                  is_simple_vote;                    /* True if the transaction was classified as a simple vote, false otherwise */
     246             :   int                                  is_bundle;                         /* True if the transaction is part of a bundle, false otherwise */
     247             :   int                                  is_committable;                    /* True if the transaction was committable (landed on-chain) */
     248             :   int                                  is_fees_only;                      /* True if the transaction landed but only fees were charged (e.g. account loading failure) */
     249             :   int                                  txn_err;                           /* Transaction execution error */
     250             :   int                                  exec_err;                          /* Instruction execution error; success unless txn_err = instruction_error */
     251             :   int                                  exec_err_kind;                     /* Source kind of exec_err; none unless txn_err = instruction_error */
     252             :   uint                                 exec_err_idx;                      /* Instruction index that failed (UINT_MAX if not applicable) */
     253             :   uint                                 custom_err;                        /* Custom error code returned by the program (UINT_MAX if not applicable) */
     254             :   ulong                                compute_unit_limit;                /* Compute unit limit requested by the transaction */
     255             :   ulong                                compute_unit_price;                /* Compute unit price (micro-lamports per CU) requested by the transaction */
     256             :   ulong                                compute_units_consumed;            /* compute_unit_limit minus the remaining compute meter at commit */
     257             :   ulong                                heap_size;                         /* Requested heap size for the VM */
     258             :   ulong                                num_builtin_instrs;                /* Number of builtin program instructions in the transaction */
     259             :   ulong                                num_non_builtin_instrs;            /* Number of BPF (non-builtin) program instructions */
     260             :   ulong                                loaded_accounts_data_size;         /* Total bytes of account data loaded for this transaction */
     261             :   ulong                                loaded_accounts_data_size_limit;   /* Configured loaded-accounts-data-size limit for this transaction */
     262             :   long                                 accounts_resize_delta;             /* Net delta in writable account data sizes during execution (negative when the writable account data net shrunk) */
     263             :   ulong                                execution_fee;                     /* Execution (base) fee charged to the fee payer, pre-burn (50% is burned at settlement) */
     264             :   ulong                                priority_fee;                      /* Priority fee charged to the fee payer, pre-burn (priority fees are not burned) */
     265             :   ulong                                tips;                              /* Gross tips credited to tip accounts by this transaction, before the block-level tip commission */
     266             :   ulong                                signature_count;                   /* Number of signatures in the transaction */
     267             :   uint                                 cost_signature;                    /* Cost-tracker signature cost */
     268             :   uint                                 cost_write_lock;                   /* Cost-tracker write-lock cost */
     269             :   uint                                 cost_data_bytes;                   /* Cost-tracker data-bytes cost */
     270             :   uint                                 cost_programs_execution;           /* Cost-tracker programs-execution cost */
     271             :   uint                                 cost_loaded_accounts_data_size;    /* Cost-tracker loaded-accounts-data-size cost */
     272             :   ulong                                cost_allocated_accounts_data_size; /* Allocated accounts data size from the cost tracker */
     273             :   fd_event_runtime_txn_account_diffs_t account_diffs[ 64UL ];             /* Per-account diffs for writable accounts that were modified */
     274             :   ulong                                account_diffs_cnt;                 /* Number of account_diffs entries (<= 64) */
     275             :   uchar                                writable_accounts[ 64UL ][ 32UL ]; /* Every account the transaction locked as writable */
     276             :   ulong                                writable_accounts_cnt;             /* Number of writable_accounts entries (<= 64) */
     277             :   uchar                                readonly_accounts[ 64UL ][ 32UL ]; /* Every account the transaction locked as readonly, in account-order */
     278             :   ulong                                readonly_accounts_cnt;             /* Number of readonly_accounts entries (<= 64) */
     279             :   uchar                                program_ids[ 64UL ][ 32UL ];       /* Distinct program pubkeys invoked at the top level of this transaction */
     280             :   ulong                                program_ids_cnt;                   /* Number of program_ids entries (<= 64) */
     281             : };
     282             : typedef struct fd_event_runtime_txn fd_event_runtime_txn_t;
     283             : 
     284             : /* Worst-case encoded size of a runtime_txn event (envelope + Event
     285             :    submsg + inner submsg + all fields, padded for encoder slack). */
     286           0 : #define FD_EVENT_RUNTIME_TXN_BUF_MAX (23234UL)
     287             : 
     288             : /* Largest generated event struct; a consumer can stage any incoming
     289             :    event in a buffer of this size. */
     290             : #define FD_EVENT_GEN_STRUCT_MAX (( sizeof(fd_event_runtime_txn_t) > ( sizeof(fd_event_block_equivocated_t) > ( sizeof(fd_event_accdb_partition_added_t) > ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ? sizeof(fd_event_accdb_partition_added_t) : ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ) ? sizeof(fd_event_block_equivocated_t) : ( sizeof(fd_event_accdb_partition_added_t) > ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ? sizeof(fd_event_accdb_partition_added_t) : ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ) ) ? sizeof(fd_event_runtime_txn_t) : ( sizeof(fd_event_block_equivocated_t) > ( sizeof(fd_event_accdb_partition_added_t) > ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ? sizeof(fd_event_accdb_partition_added_t) : ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ) ? sizeof(fd_event_block_equivocated_t) : ( sizeof(fd_event_accdb_partition_added_t) > ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ? sizeof(fd_event_accdb_partition_added_t) : ( sizeof(fd_event_accdb_compaction_completed_t) > ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ? sizeof(fd_event_accdb_compaction_completed_t) : ( sizeof(fd_event_slot_confirmed_t) > sizeof(fd_event_signed_vote_t) ? sizeof(fd_event_slot_confirmed_t) : sizeof(fd_event_signed_vote_t) ) ) ) ) ))
     291             : 
     292             : FD_PROTOTYPES_BEGIN
     293             : 
     294             : /* Serialize a signed_vote event into the circq, reserving an event id
     295             :    from the client and writing the standard event envelope.  Mirrors
     296             :    the hand-written fd_pb_* path. */
     297             : void
     298             : fd_event_signed_vote_serialize( fd_circq_t *                   circq,
     299             :                                 fd_event_client_t *            client,
     300             :                                 long                           timestamp_nanos,
     301             :                                 ulong                          link_seq,
     302             :                                 fd_event_signed_vote_t const * msg );
     303             : 
     304             : /* Serialize a slot_confirmed event into the circq, reserving an event id
     305             :    from the client and writing the standard event envelope.  Mirrors
     306             :    the hand-written fd_pb_* path. */
     307             : void
     308             : fd_event_slot_confirmed_serialize( fd_circq_t *                      circq,
     309             :                                    fd_event_client_t *               client,
     310             :                                    long                              timestamp_nanos,
     311             :                                    ulong                             link_seq,
     312             :                                    fd_event_slot_confirmed_t const * msg );
     313             : 
     314             : /* Serialize a accdb_compaction_completed event into the circq, reserving an event id
     315             :    from the client and writing the standard event envelope.  Mirrors
     316             :    the hand-written fd_pb_* path. */
     317             : void
     318             : fd_event_accdb_compaction_completed_serialize( fd_circq_t *                                  circq,
     319             :                                                fd_event_client_t *                           client,
     320             :                                                long                                          timestamp_nanos,
     321             :                                                ulong                                         link_seq,
     322             :                                                fd_event_accdb_compaction_completed_t const * msg );
     323             : 
     324             : /* Serialize a accdb_partition_added event into the circq, reserving an event id
     325             :    from the client and writing the standard event envelope.  Mirrors
     326             :    the hand-written fd_pb_* path. */
     327             : void
     328             : fd_event_accdb_partition_added_serialize( fd_circq_t *                             circq,
     329             :                                           fd_event_client_t *                      client,
     330             :                                           long                                     timestamp_nanos,
     331             :                                           ulong                                    link_seq,
     332             :                                           fd_event_accdb_partition_added_t const * msg );
     333             : 
     334             : /* Serialize a block_equivocated event into the circq, reserving an event id
     335             :    from the client and writing the standard event envelope.  Mirrors
     336             :    the hand-written fd_pb_* path. */
     337             : void
     338             : fd_event_block_equivocated_serialize( fd_circq_t *                         circq,
     339             :                                       fd_event_client_t *                  client,
     340             :                                       long                                 timestamp_nanos,
     341             :                                       ulong                                link_seq,
     342             :                                       fd_event_block_equivocated_t const * msg );
     343             : 
     344             : /* Serialize a runtime_txn event into the circq, reserving an event id
     345             :    from the client and writing the standard event envelope.  Mirrors
     346             :    the hand-written fd_pb_* path. */
     347             : void
     348             : fd_event_runtime_txn_serialize( fd_circq_t *                   circq,
     349             :                                 fd_event_client_t *            client,
     350             :                                 long                           timestamp_nanos,
     351             :                                 ulong                          link_seq,
     352             :                                 fd_event_runtime_txn_t const * msg );
     353             : 
     354             : /* Serialize an event of the given type id (the schema id carried in the
     355             :    report frag's sig) from a fully-formed fd_event_<name>_t at ev. */
     356             : void
     357             : fd_event_serialize_by_type( ulong               type,
     358             :                             fd_circq_t *        circq,
     359             :                             fd_event_client_t * client,
     360             :                             long                timestamp_nanos,
     361             :                             ulong               link_seq,
     362             :                             void const *        ev,
     363             :                             ulong               ev_sz );
     364             : 
     365             : /* Report a signed_vote event (SignedVote, id 3) to the event tile via
     366             :    the thread-local reporter (no-op when the tile has no event link). */
     367             : static inline void
     368           0 : fd_event_report_signed_vote( fd_event_signed_vote_t const * msg ) {
     369           0 :   fd_event_report_( 3UL, msg, sizeof(fd_event_signed_vote_t) );
     370           0 : }
     371             : 
     372             : /* Report a slot_confirmed event (SlotConfirmed, id 4) to the event tile via
     373             :    the thread-local reporter (no-op when the tile has no event link). */
     374             : static inline void
     375           0 : fd_event_report_slot_confirmed( fd_event_slot_confirmed_t const * msg ) {
     376           0 :   fd_event_report_( 4UL, msg, sizeof(fd_event_slot_confirmed_t) );
     377           0 : }
     378             : 
     379             : /* Report a accdb_compaction_completed event (AccdbCompactionCompleted, id 5) to the event tile via
     380             :    the thread-local reporter (no-op when the tile has no event link). */
     381             : static inline void
     382           3 : fd_event_report_accdb_compaction_completed( fd_event_accdb_compaction_completed_t const * msg ) {
     383           3 :   fd_event_report_( 5UL, msg, sizeof(fd_event_accdb_compaction_completed_t) );
     384           3 : }
     385             : 
     386             : /* Report a accdb_partition_added event (AccdbPartitionAdded, id 6) to the event tile via
     387             :    the thread-local reporter (no-op when the tile has no event link). */
     388             : static inline void
     389          63 : fd_event_report_accdb_partition_added( fd_event_accdb_partition_added_t const * msg ) {
     390          63 :   fd_event_report_( 6UL, msg, sizeof(fd_event_accdb_partition_added_t) );
     391          63 : }
     392             : 
     393             : /* Report a block_equivocated event (BlockEquivocated, id 7) to the event tile via
     394             :    the thread-local reporter (no-op when the tile has no event link). */
     395             : static inline void
     396           0 : fd_event_report_block_equivocated( fd_event_block_equivocated_t const * msg ) {
     397           0 :   fd_event_report_( 7UL, msg, sizeof(fd_event_block_equivocated_t) );
     398           0 : }
     399             : 
     400             : /* Report a runtime_txn event (RuntimeTxn, id 8) to the event tile via
     401             :    the thread-local reporter (no-op when the tile has no event link). */
     402             : static inline void
     403           0 : fd_event_report_runtime_txn( fd_event_runtime_txn_t const * msg ) {
     404           0 :   fd_event_report_( 8UL, msg, sizeof(fd_event_runtime_txn_t) );
     405           0 : }
     406             : 
     407             : FD_PROTOTYPES_END
     408             : 
     409             : #endif

Generated by: LCOV version 1.14