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 <stddef.h> /* offsetof */
6 :
7 : #include "../fd_circq.h"
8 : #include "../fd_event_client.h"
9 : #include "../fd_event_report.h"
10 :
11 : /* Slot that was voted on */
12 : struct fd_event_signed_vote_tower {
13 : ulong slot; /* Slot being voted on / locked out for */
14 : uchar confirmation_count; /* Confirmation count (higher = closer to root) */
15 : };
16 : typedef struct fd_event_signed_vote_tower fd_event_signed_vote_tower_t;
17 :
18 : /* The validator generated a vote transaction */
19 : struct fd_event_signed_vote {
20 : uchar signed_txn[ 1232UL ]; /* Serialized signed vote transaction */
21 : ulong signed_txn_len; /* Length of signed_txn (<= 1232) */
22 : uchar vote_account[ 32UL ]; /* The public key of the vote account */
23 : uchar vote_authority[ 32UL ]; /* The public key that authorized the vote */
24 : uchar fee_payer[ 32UL ]; /* The public key that pays for transaction fees */
25 : uchar signature[ 64UL ]; /* Signature identifying the transaction */
26 : ulong vote_slot; /* Slot being voted on (top of tower) */
27 : uchar vote_bank_hash[ 32UL ]; /* Bank hash of the slot being voted on */
28 : uchar vote_block_id[ 32UL ]; /* Block ID of the slot being voted on */
29 : uchar txn_blockhash[ 32UL ]; /* Recent blockhash parameter of the vote transaction */
30 : fd_event_signed_vote_tower_t tower[ 31UL ]; /* Tower of slots being voted on (oldest to newest) */
31 : ulong tower_cnt; /* Number of tower entries (<= 31) */
32 : };
33 : typedef struct fd_event_signed_vote fd_event_signed_vote_t;
34 :
35 : /* Worst-case encoded size of a signed_vote event (envelope + Event
36 : submsg + inner submsg + all fields, padded for encoder slack). */
37 6 : #define FD_EVENT_SIGNED_VOTE_BUF_MAX (2780UL)
38 :
39 : /* Commitment level reached, weakest to strongest: processed, propagated, duplicate, optimistic, super, rooted. ignored is a terminal outcome, not a level. A block never named directly by any vote emits no propagated/duplicate/optimistic/super rows even when confirmed transitively through a descendant, and the transitive walk stops at it, so voted ancestors above it can miss those rows too; all still emit processed and rooted rows. */
40 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_IGNORED (1) /* Replay finished a block consensus had already pruned, so no processed row is emitted. Forward vote-level rows for the block may precede this. */
41 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_PROCESSED (2) /* Replayed locally, on any fork; no cluster stake required. Solana's 'processed' commitment. */
42 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_PROPAGATED (3) /* More than a third of stake observed the block or a descendant. */
43 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_DUPLICATE (4) /* More than 52% of stake voted for this exact block or a descendant; the cluster converges on it even if the slot equivocates. */
44 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_OPTIMISTIC (5) /* More than two thirds of stake voted for the block or a descendant. Solana's 'confirmed' commitment. */
45 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_SUPER (6) /* More than four fifths of stake voted for the block or a descendant. Used when waiting for a supermajority at boot. */
46 0 : #define FD_EVENT_SLOT_CONFIRMED_LEVEL_ROOTED (7) /* The block or a descendant reached maximum lockout and cannot be rolled back. The strongest level; Solana's 'finalized' commitment. */
47 :
48 : /* A block reached a commitment level. One row per block per level: a level crossed while the block is not tracked by local consensus (not yet replayed, or already discarded) reports once with forward true and bank_seq 0 and is not re-reported. Join to block_completed on bank_seq, or on slot and block_id (the only keys on forward rows). */
49 : struct fd_event_slot_confirmed {
50 : ulong bank_seq; /* Bank sequence number, counting from 1 within a run; the join key to block_completed. Not meaningful across restarts: scope by the stream's instance id from the connection's authentication metadata (the boot id identifies the host kernel boot and survives validator restarts). 0 on forward rows. The boot bank (bank_seq 1) emits confirmations but no block_completed row. Forward confirmations for blocks never completely received join to no row on any key. */
51 : ulong slot; /* Slot number of the block. */
52 : uchar block_id[ 32UL ]; /* Block identifier; with slot, the alternate join key to block_completed. */
53 : ulong stake; /* Stake in lamports voted for this exact block when the row was emitted. Only the row that triggered a propagated/duplicate/optimistic/super confirmation crossed the level's threshold; ancestors confirmed transitively report their own smaller tally. processed rows carry 0: no replay votes exist yet at the block's own completion. rooted rows carry replay-observed vote stake for the block plus descendants, no threshold. 0 if unavailable. */
54 : ulong total_stake; /* Total cluster stake in lamports for the epoch the tally was made in (captured at replay completion for processed and rooted rows). 0 if unavailable. */
55 : int valid; /* Whether the block is eligible for fork choice. An equivocating block becomes eligible again once duplicate confirmed. Always true on forward and ignored rows; validity is not assessed for blocks consensus is not tracking. */
56 : int level; /* Commitment level reached, weakest to strongest: processed, propagated, duplicate, optimistic, super, rooted. ignored is a terminal outcome, not a level. A block never named directly by any vote emits no propagated/duplicate/optimistic/super rows even when confirmed transitively through a descendant, and the transitive walk stops at it, so voted ancestors above it can miss those rows too; all still emit processed and rooted rows. */
57 : int forward; /* Whether the level was crossed by cluster votes (gossip, TPU, or replayed blocks) while the block was not tracked by local consensus: not yet replayed, or already discarded (pruned losing fork, or completed after the root passed it). Always false for processed, ignored, and rooted rows, which local replay or rooting triggers. */
58 : };
59 : typedef struct fd_event_slot_confirmed fd_event_slot_confirmed_t;
60 :
61 : /* Worst-case encoded size of a slot_confirmed event (envelope + Event
62 : submsg + inner submsg + all fields, padded for encoder slack). */
63 6 : #define FD_EVENT_SLOT_CONFIRMED_BUF_MAX (236UL)
64 :
65 : /* 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. */
66 : struct fd_event_accdb_compaction_completed {
67 : ulong partition_idx; /* Index of the partition that was compacted, identifying its slot in the accdb partition pool. */
68 : 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. */
69 : uchar dest_layer; /* Storage tier the surviving live records were relocated into, normally src_layer+1, clamped at the coldest tier. */
70 : 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. */
71 : 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. */
72 : ulong accounts_relocated; /* Number of still-live account records copied forward into dest_layer this pass. */
73 : 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. */
74 : 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. */
75 : ulong start_time; /* Wall-clock time at which this compaction pass began, in nanoseconds since the Unix epoch. */
76 : 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. */
77 : };
78 : typedef struct fd_event_accdb_compaction_completed fd_event_accdb_compaction_completed_t;
79 :
80 : /* Worst-case encoded size of a accdb_compaction_completed event (envelope + Event
81 : submsg + inner submsg + all fields, padded for encoder slack). */
82 6 : #define FD_EVENT_ACCDB_COMPACTION_COMPLETED_BUF_MAX (252UL)
83 :
84 : /* 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. */
85 : struct fd_event_accdb_partition_added {
86 : 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. */
87 : 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). */
88 : 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. */
89 : ulong old_partition_max; /* Number of allocated partitions before this grow. */
90 : ulong new_partition_max; /* Number of allocated partitions after this grow, always old_partition_max+1. */
91 : ulong partition_sz; /* Size of a single partition in bytes; the increment by which the backing file grows. */
92 : 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. */
93 : };
94 : typedef struct fd_event_accdb_partition_added fd_event_accdb_partition_added_t;
95 :
96 : /* Worst-case encoded size of a accdb_partition_added event (envelope + Event
97 : submsg + inner submsg + all fields, padded for encoder slack). */
98 6 : #define FD_EVENT_ACCDB_PARTITION_ADDED_BUF_MAX (212UL)
99 :
100 : /* How the equivocation was detected. */
101 0 : #define FD_EVENT_BLOCK_EQUIVOCATED_DETECTION_DUPLICATE_REPLAY (1) /* A second, different block for the slot finished replaying locally. */
102 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. */
103 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. */
104 :
105 : /* 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. */
106 : struct fd_event_block_equivocated {
107 : 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). */
108 : ulong slot; /* The slot that equivocates (has more than one block). */
109 : ulong parent_slot; /* The slot number of the parent block. */
110 : ulong epoch; /* The epoch this slot belongs to. */
111 : uchar block_id[ 32UL ]; /* Identifier of the block this validator replayed for the slot. */
112 : uchar sibling_block_id[ 32UL ]; /* Identifier of the conflicting block for the same slot; zero if not known (shred-proof detection). */
113 : uchar bank_hash[ 32UL ]; /* This validator's bank hash for the block it replayed; zero if the block was not replayed locally. */
114 : uchar block_hash[ 32UL ]; /* Last microblock header hash of the block this validator replayed; zero if not replayed locally. */
115 : int is_leader; /* Whether this validator produced the equivocating block it replayed. */
116 : int our_block_voted; /* Whether this validator had voted for its replayed block when the equivocation was detected. */
117 : int our_block_confirmed; /* Whether this validator's replayed block had been duplicate confirmed when the equivocation was detected. */
118 : 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. */
119 : ulong sibling_stake; /* Stake in lamports on the conflicting (typically confirmed) block at detection; zero if not known. */
120 : ulong total_stake; /* Total cluster stake in lamports at detection; the denominator for the stake fields. Zero if not known. */
121 : int detection; /* How the equivocation was detected. */
122 : };
123 : typedef struct fd_event_block_equivocated fd_event_block_equivocated_t;
124 :
125 : /* Worst-case encoded size of a block_equivocated event (envelope + Event
126 : submsg + inner submsg + all fields, padded for encoder slack). */
127 6 : #define FD_EVENT_BLOCK_EQUIVOCATED_BUF_MAX (413UL)
128 :
129 : /* Transaction execution error */
130 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_SUCCESS (1) /* Transaction succeeded */
131 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ACCOUNT_LOADED_TWICE (2) /* A Pubkey appears twice in the transaction's account_keys */
132 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 */
133 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_PROGRAM_ACCOUNT_NOT_FOUND (4) /* Attempt to load a program that does not exist */
134 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INSUFFICIENT_FUNDS_FOR_FEE (5) /* Fee payer has insufficient lamports to cover the transaction fee */
135 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ACCOUNT_FOR_FEE (6) /* This account may not be used to pay transaction fees */
136 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ALREADY_PROCESSED (7) /* The bank has seen this transaction before */
137 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. */
138 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 */
139 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_SIGNATURE_FAILURE (10) /* Transaction did not pass signature verification */
140 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_PROGRAM_FOR_EXECUTION (11) /* This program may not be used for executing instructions */
141 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_SANITIZE_FAILURE (12) /* Transaction failed to sanitize accounts offsets correctly */
142 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT (13) /* Transaction would exceed max Block Cost Limit */
143 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT (14) /* Transaction would exceed max account limit within the block */
144 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT (15) /* Transaction would exceed account data limit within the block */
145 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_TOO_MANY_ACCOUNT_LOCKS (16) /* Transaction locked too many accounts */
146 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_ADDRESS_LOOKUP_TABLE_NOT_FOUND (17) /* Transaction loads an address table account that doesn't exist */
147 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER (18) /* Transaction loads an address table account with an invalid owner */
148 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ADDRESS_LOOKUP_TABLE_DATA (19) /* Transaction loads an address table account with invalid data */
149 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX (20) /* Transaction address table lookup uses an invalid index */
150 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT (21) /* Transaction would exceed max Vote Cost Limit */
151 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT (22) /* Transaction would exceed total account data limit */
152 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_DUPLICATE_INSTRUCTION (23) /* Transaction contains a duplicate instruction that is not allowed */
153 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INSUFFICIENT_FUNDS_FOR_RENT (24) /* Transaction results in an account with insufficient funds for rent */
154 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED (25) /* Transaction exceeded max loaded accounts data size cap */
155 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT (26) /* Transaction requested a zero loaded-accounts-data-size limit */
156 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_UNBALANCED_TRANSACTION (27) /* Sum of account balances before and after transaction do not match */
157 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BUNDLE_PEER (28) /* Transaction was part of a bundle in which another transaction failed */
158 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 */
159 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_BLOCKHASH_FAIL_ADVANCE_NONCE_INSTR (30) /* Durable-nonce txn failed to advance its nonce account */
160 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 */
161 0 : #define FD_EVENT_RUNTIME_TXN_TXN_ERR_UNSUPPORTED_VERSION (32) /* Transaction uses a message version that is not supported */
162 :
163 : /* Instruction execution error; success unless txn_err = instruction_error */
164 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_SUCCESS (1) /* instruction succeeded */
165 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_GENERIC_ERR (2) /* The program instruction returned an error */
166 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ARG (3) /* The arguments provided to a program were invalid */
167 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_INSTR_DATA (4) /* An instruction's data contents were invalid */
168 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ACC_DATA (5) /* An account's data contents was invalid */
169 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_DATA_TOO_SMALL (6) /* An account's data was too small */
170 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INSUFFICIENT_FUNDS (7) /* An account's balance was too small to complete the instruction */
171 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INCORRECT_PROGRAM_ID (8) /* The account did not have the expected program id */
172 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MISSING_REQUIRED_SIGNATURE (9) /* A signature was required but not found */
173 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. */
174 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNINITIALIZED_ACCOUNT (11) /* An attempt to operate on an account that hasn't been initialized. */
175 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNBALANCED_INSTR (12) /* Program's instruction lamport balance does not equal the balance after the instruction */
176 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MODIFIED_PROGRAM_ID (13) /* Program illegally modified an account's program id */
177 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 */
178 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 */
179 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_READONLY_LAMPORT_CHANGE (16) /* Read-only account's lamports modified */
180 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_READONLY_DATA_MODIFIED (17) /* Read-only account's data was modified */
181 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_EXECUTABLE_MODIFIED (18) /* Executable bit on account changed, but shouldn't have */
182 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_NOT_ENOUGH_ACC_KEYS (19) /* The instruction expected additional account keys */
183 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 */
184 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_BORROW_FAILED (21) /* Failed to borrow a reference to account data, already borrowed */
185 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_BORROW_OUTSTANDING (22) /* Account data has an outstanding reference after a program's execution */
186 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. */
187 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ERR (24) /* The return value from the program was invalid. */
188 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT (25) /* Executable accounts must be rent exempt */
189 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNSUPPORTED_PROGRAM_ID (26) /* Unsupported program id */
190 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_CALL_DEPTH (27) /* Cross-program invocation call depth too deep */
191 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MISSING_ACC (28) /* An account required by the instruction is missing */
192 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_REENTRANCY_NOT_ALLOWED (29) /* Cross-program invocation reentrancy not allowed for this instruction */
193 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_SEED_LENGTH_EXCEEDED (30) /* Length of the seed is too long for address generation */
194 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_SEEDS (31) /* Provided seeds do not result in a valid address */
195 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_REALLOC (32) /* Failed to reallocate account data of this length */
196 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_COMPUTE_BUDGET_EXCEEDED (33) /* Computational budget exceeded */
197 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_PRIVILEGE_ESCALATION (34) /* Cross-program invocation with unauthorized signer or writable account */
198 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_PROGRAM_ENVIRONMENT_SETUP_FAILURE (35) /* Failed to create program execution environment */
199 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_PROGRAM_FAILED_TO_COMPLETE (36) /* Program failed to complete */
200 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_IMMUTABLE (37) /* Account is immutable */
201 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INCORRECT_AUTHORITY (38) /* Incorrect authority provided */
202 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_BORSH_IO_ERROR (39) /* Failed to serialize or deserialize account data */
203 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ACC_NOT_RENT_EXEMPT (40) /* An account does not have enough lamports to be rent-exempt */
204 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_INVALID_ACC_OWNER (41) /* Invalid account owner */
205 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ARITHMETIC_OVERFLOW (42) /* Program arithmetic overflowed */
206 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_UNSUPPORTED_SYSVAR (43) /* Unsupported sysvar */
207 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_ILLEGAL_OWNER (44) /* Provided owner is not allowed */
208 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_ACCS_DATA_ALLOCS_EXCEEDED (45) /* Account data allocation exceeded the maximum accounts data size limit */
209 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_ACCS_EXCEEDED (46) /* Max accounts exceeded */
210 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_MAX_INSN_TRACE_LENS_EXCEEDED (47) /* Max instruction trace length exceeded */
211 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_BUILTINS_MUST_CONSUME_CUS (48) /* Builtin programs must consume compute units */
212 :
213 : /* Source kind of exec_err; none unless txn_err = instruction_error */
214 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_NONE (1) /* no instruction error */
215 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_EBPF (2) /* eBPF VM error */
216 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_SYSCALL (3) /* Syscall error */
217 0 : #define FD_EVENT_RUNTIME_TXN_EXEC_ERR_KIND_INSTR (4) /* Instruction error */
218 :
219 : /* Per-account diff entry */
220 : struct fd_event_runtime_txn_account_diffs {
221 : uchar pubkey[ 32UL ]; /* Account pubkey */
222 : uchar owner[ 32UL ]; /* Post-state owner pubkey */
223 : uchar prev_owner[ 32UL ]; /* Pre-state owner pubkey */
224 : ulong lamports; /* Post-state lamports */
225 : ulong prev_lamports; /* Pre-state lamports */
226 : ulong data_sz; /* Post-state data size in bytes */
227 : ulong prev_data_sz; /* Pre-state data size in bytes */
228 : int is_executable; /* True if the post-state account is executable */
229 : int is_stake_update; /* True if this write touched the stake cache */
230 : int is_vote_update; /* True if this write touched the vote cache */
231 : int is_new_vote; /* True if this write created a new vote account */
232 : int is_rm_vote; /* True if this write removed a vote account */
233 : };
234 : typedef struct fd_event_runtime_txn_account_diffs fd_event_runtime_txn_account_diffs_t;
235 :
236 : /* One row per dispatched transaction (committable or not), with the execution results */
237 : struct fd_event_runtime_txn {
238 : ulong bank_seq; /* Bank sequence number, counting from 1 within a run; the join key to block_completed. Not meaningful across restarts: scope by the stream's instance id from the connection's authentication metadata. 0 if unavailable. */
239 : ulong slot; /* Bank slot in which this transaction was executed */
240 : ulong index_in_slot; /* 0-indexed position of this transaction within its block */
241 : ulong commit_index_in_slot; /* 0-indexed commit-completion order within this slot */
242 : uchar fec_merkle_root[ 32UL ]; /* FEC merkle root that was the current block_id of the bank when this txn was dispatched. All-zero on the leader path, which executes without FEC context. */
243 : ulong epoch; /* Epoch the transaction was executed in */
244 : uchar signature[ 64UL ]; /* First signature of the transaction (64 bytes) */
245 : uchar blockhash[ 32UL ]; /* Blockhash referenced by the transaction */
246 : uchar fee_payer[ 32UL ]; /* Fee-payer pubkey */
247 : int is_simple_vote; /* True if the transaction was classified as a simple vote, false otherwise */
248 : int is_bundle; /* True if the transaction is part of a bundle, false otherwise */
249 : int is_committable; /* True if the transaction was committable (landed on-chain) */
250 : int is_fees_only; /* True if the transaction landed but only fees were charged (e.g. account loading failure) */
251 : int txn_err; /* Transaction execution error */
252 : int exec_err; /* Instruction execution error; success unless txn_err = instruction_error */
253 : int exec_err_kind; /* Source kind of exec_err; none unless txn_err = instruction_error */
254 : uint exec_err_idx; /* Instruction index that failed (UINT_MAX if not applicable) */
255 : uint custom_err; /* Custom error code returned by the program (UINT_MAX if not applicable) */
256 : ulong compute_unit_limit; /* Compute unit limit requested by the transaction */
257 : ulong compute_unit_price; /* Compute unit price (micro-lamports per CU) requested by the transaction */
258 : ulong compute_units_consumed; /* compute_unit_limit minus the remaining compute meter at commit */
259 : ulong heap_size; /* Requested heap size for the VM */
260 : ulong num_builtin_instrs; /* Number of builtin program instructions in the transaction */
261 : ulong num_non_builtin_instrs; /* Number of BPF (non-builtin) program instructions */
262 : ulong loaded_accounts_data_size; /* Total bytes of account data loaded for this transaction */
263 : ulong loaded_accounts_data_size_limit; /* Configured loaded-accounts-data-size limit for this transaction */
264 : long accounts_resize_delta; /* Net delta in writable account data sizes during execution (negative when the writable account data net shrunk) */
265 : ulong execution_fee; /* Execution (base) fee charged to the fee payer, pre-burn (50% is burned at settlement) */
266 : ulong priority_fee; /* Priority fee charged to the fee payer, pre-burn (priority fees are not burned) */
267 : ulong tips; /* Gross tips credited to tip accounts by this transaction, before the block-level tip commission */
268 : ulong signature_count; /* Number of signatures in the transaction */
269 : uint cost_signature; /* Cost-tracker signature cost */
270 : uint cost_write_lock; /* Cost-tracker write-lock cost */
271 : uint cost_data_bytes; /* Cost-tracker data-bytes cost */
272 : uint cost_programs_execution; /* Cost-tracker programs-execution cost */
273 : uint cost_loaded_accounts_data_size; /* Cost-tracker loaded-accounts-data-size cost */
274 : ulong cost_allocated_accounts_data_size; /* Allocated accounts data size from the cost tracker */
275 : fd_event_runtime_txn_account_diffs_t account_diffs[ 64UL ]; /* Per-account diffs for writable accounts that were modified */
276 : ulong account_diffs_cnt; /* Number of account_diffs entries (<= 64) */
277 : uchar writable_accounts[ 64UL ][ 32UL ]; /* Every account the transaction locked as writable */
278 : ulong writable_accounts_cnt; /* Number of writable_accounts entries (<= 64) */
279 : uchar readonly_accounts[ 64UL ][ 32UL ]; /* Every account the transaction locked as readonly, in account-order */
280 : ulong readonly_accounts_cnt; /* Number of readonly_accounts entries (<= 64) */
281 : uchar program_ids[ 64UL ][ 32UL ]; /* Distinct program pubkeys invoked at the top level of this transaction */
282 : ulong program_ids_cnt; /* Number of program_ids entries (<= 64) */
283 : };
284 : typedef struct fd_event_runtime_txn fd_event_runtime_txn_t;
285 :
286 : /* Worst-case encoded size of a runtime_txn event (envelope + Event
287 : submsg + inner submsg + all fields, padded for encoder slack). */
288 6 : #define FD_EVENT_RUNTIME_TXN_BUF_MAX (23249UL)
289 :
290 : /* Why the block was ruled invalid; not_dead otherwise. Blocks this validator produced are never dead: they do not go through replay's block checks. A block invalid for several independent reasons records the first one detected locally, which can differ across validators for the same block. */
291 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_NOT_DEAD (1) /* Not ruled invalid. */
292 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_PARENT_DEAD (2) /* The block went down with its lineage: an ancestor was ruled invalid, so this block cannot be replayed. */
293 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_UNPARSEABLE_CONTENT (3) /* Bytes at the head of the stream failed to parse as any structure (transaction, microblock header, or count) within the largest size a valid block allows: malformed content. */
294 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_SHORT_BLOCK (4) /* Block bytes ended short of the microblocks and transactions declared. */
295 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TRAILING_ENTRY (5) /* Block did not end on a tick; a transaction entry trailed the final tick. Checked before tick-count verification, so a block Agave rules TooFewTicks can report trailing_entry here. */
296 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TOO_MANY_MICROBLOCKS (6) /* More microblocks than a valid block can hold. */
297 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TICK_HASHES_OVERFLOW (7) /* More hashes since the last tick than hashes per tick allows, detected at tick verification. */
298 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TICK_HASHES_OVERFLOW_INGEST (8) /* A microblock header declared more hashes than fit before the next tick, detected at FEC ingest. */
299 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_INCONSISTENT_TICK_HASHES (9) /* A tick's hash count differs from the block's preceding ticks, detected at FEC ingest. */
300 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ZERO_HASH_TICK (10) /* A tick advanced zero hashes, detected at tick verification because proof-of-history parameters were unknown when the tick parsed. */
301 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ZERO_HASH_TICK_INGEST (11) /* A tick advanced zero hashes, detected at FEC ingest. */
302 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ZERO_MICROBLOCKS (12) /* A batch header declared zero microblocks. */
303 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TOO_MANY_TXNS (13) /* More transactions than a valid block can hold. */
304 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TOO_MANY_TICKS (14) /* More ticks than allowed. */
305 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_WRONG_HASHES_PER_TICK (15) /* Tick hash count did not advance the expected hashes per tick. */
306 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TOO_FEW_TICKS (16) /* Fewer ticks than required. */
307 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TICK_HASH_MISMATCH (17) /* Proof-of-history hash of a tick did not verify. */
308 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ENTRY_HASH_MISMATCH (18) /* Proof-of-history hash of a transaction entry did not verify, detected when the entry's hashing task completed. */
309 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ENTRY_HASH_MISMATCH_INGEST (19) /* Proof-of-history hash of a transaction entry did not verify, detected at FEC ingest when a later FEC set completed the entry's transactions. */
310 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_SIGVERIFY_FAILED (20) /* A transaction failed signature verification. */
311 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_TXN_FAILED_TO_LOAD (21) /* A transaction failed a pre-execution check: already processed, expired or unknown recent blockhash, address lookup table resolution failure, account lock limit, compute budget error, unsupported transaction version or sanitization failure, or fee-payer validation failure. */
312 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_BLOCK_COST_LIMIT (22) /* A transaction pushed the block over its compute limit. */
313 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ACCOUNT_COST_LIMIT (23) /* A transaction pushed one account over its per-block compute limit. */
314 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_VOTE_COST_LIMIT (24) /* A vote transaction pushed the block over its vote compute limit. */
315 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ACCOUNT_DATA_LIMIT (25) /* A transaction pushed the block over its account data size limit. */
316 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_DUPLICATE_ACCOUNT (26) /* A transaction referenced the same account more than once. */
317 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_BAD_FOOTER (27) /* An Alpenglow block's footer could not be applied or declared a bank hash that did not match execution. */
318 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ALPENGLOW_HASH_CNT (28) /* An Alpenglow block had an entry whose hash count was not exactly one. */
319 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_MISSING_PARENT_MARKER (29) /* An Alpenglow block carried an entry batch or footer before any block header. */
320 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_MULTIPLE_BLOCK_HEADERS (30) /* An Alpenglow block carried more than one block header. */
321 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_GENESIS_CERT_OUT_OF_ORDER (31) /* An Alpenglow genesis certificate marker did not immediately follow the block header. */
322 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_MULTIPLE_BLOCK_FOOTERS (32) /* An Alpenglow block carried more than one block footer. */
323 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_ENTRY_AFTER_BLOCK_FOOTER (33) /* An Alpenglow block carried an entry batch other than the alpentick after its footer. */
324 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_INVALID_ALPENTICK_POSITION (34) /* An Alpenglow block ended without the alpentick directly after its footer. */
325 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_MISSING_BLOCK_FOOTER (35) /* An Alpenglow block ended without a block footer. */
326 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_SPURIOUS_UPDATE_PARENT (36) /* An Alpenglow block carried an UpdateParent marker where none is valid: before the header or after the footer. */
327 0 : #define FD_EVENT_BLOCK_COMPLETED_DEAD_REASON_BAD_BLOCK_MARKER (37) /* An Alpenglow block marker (header, footer, genesis certificate or update parent) failed to parse or had an unknown kind. */
328 :
329 : /* Why this validator gave up on the block before it completed; not_abandoned otherwise. Independent of dead. */
330 0 : #define FD_EVENT_BLOCK_COMPLETED_ABANDONED_REASON_NOT_ABANDONED (1) /* Not abandoned; the block completed or was ruled invalid. */
331 0 : #define FD_EVENT_BLOCK_COMPLETED_ABANDONED_REASON_PRUNED (2) /* A block on another fork was rooted, discarding this fork before replay finished. */
332 0 : #define FD_EVENT_BLOCK_COMPLETED_ABANDONED_REASON_EVICTED (3) /* Dropped for lack of room to track in-progress blocks. The row is emitted once the block's in-flight verification has drained without ruling it invalid; a block ruled invalid while draining emits a dead row instead. May be replayed later, producing a second row for the same slot and block id under a new bank_seq; the retry usually completes but can itself end dead, evicted, or pruned. Blocks evicted after freezing already emitted a completed row and emit nothing further. Dedup on slot and block_id, keeping the highest bank_seq. */
333 0 : #define FD_EVENT_BLOCK_COMPLETED_ABANDONED_REASON_RESET (4) /* Production of this leader block was abandoned mid-slot: consensus reset block production onto another fork before the slot completed. Only on blocks this validator produced; pack_end_reason is abandoned on the same row. The partial block never finished shredding, so block_id holds the merkle root of the last piece that had returned through reassembly when production was abandoned (may trail the last piece actually shredded), or 0 if none had. */
334 :
335 : /* Why block production stopped; not_leader for blocks this validator did not produce. */
336 0 : #define FD_EVENT_BLOCK_COMPLETED_PACK_END_REASON_NOT_LEADER (1) /* Not produced by this validator. */
337 0 : #define FD_EVENT_BLOCK_COMPLETED_PACK_END_REASON_TIME (2) /* The leader slot's time window ended, the normal case. Blocks that filled a consensus limit also end here; measure saturation via pack_block_cost and pack_data_bytes against the protocol caps. */
338 0 : #define FD_EVENT_BLOCK_COMPLETED_PACK_END_REASON_MICROBLOCK_LIMIT (3) /* Microblock count limit reached. */
339 0 : #define FD_EVENT_BLOCK_COMPLETED_PACK_END_REASON_ABANDONED (4) /* Production was abandoned mid-slot by a reset onto another fork; only on abandoned leader blocks (abandoned_reason reset). Pack ends the block early and its summary rides on the terminating message, so microblock_count, pack costs, pack timings, and bundle_txn_count reflect what was produced before the abandonment. */
340 :
341 : /* Timestamps for one transaction. A zero timestamp means the stage did not occur on this path, was never reached, or its stamp was unavailable. */
342 : struct fd_event_block_completed_txn_timing {
343 : ulong received_time; /* Earliest time attributable to the transaction. Replayed blocks: network arrival of the shred completing the FEC set carrying the transaction; gap to parsed_time is the internal latency to parse. Leader blocks: entry into this validator — TPU network arrival, block engine receipt (bundles), gossip receipt (votes), or creation time (self-originated). */
344 : ulong parsed_time; /* When the scheduler parsed the transaction out of received data, including address lookup table resolution. Gap from received_time covers the pipeline hop, in-order delivery waits, and parse position within the FEC set. 0 for leader blocks. */
345 : ulong dispatched_time; /* Replayed blocks: when the scheduler handed the transaction to an execution tile. Leader blocks: when an execution tile began executing it; transactions of one bundle share the stamp. */
346 : ulong replayed_time; /* When execution finished and results were committed to the block's state, on whichever path executed it. */
347 : ulong sigverify_dispatched_time; /* When the scheduler dispatched signature verification, which runs in parallel with execution. 0 for leader blocks (verified upstream of pack). */
348 : ulong sigverify_done_time; /* When the signature verification result returned to the scheduler. 0 for leader blocks. */
349 : ulong poh_mixed_time; /* When the transaction was mixed into the PoH stream, fixing its position in the block; transactions of one microblock share the stamp. 0 for blocks this validator did not produce. */
350 : };
351 : typedef struct fd_event_block_completed_txn_timing fd_event_block_completed_txn_timing_t;
352 :
353 : /* A block finished production, or replay on this validator, or was marked dead, or was abandoned before completing. A block gets a row if it was ever replayed or produced (had a bank), or if it finished reception on a fork that had already died or been discarded; a block dropped before reception finished gets no row. Delivery is best-effort: rows travel a lossy telemetry link, and a large burst of simultaneous rows (mass death of a fork) can drop some. On-chain data is deliberately not part of this event. Reception and repair tallies are best-effort: they restart if repair transiently stopped tracking the block (forest eviction), and on equivocated slots they are slot-scoped — shreds from all observed versions of the slot merge into the same counts on every version's row. */
354 : struct fd_event_block_completed {
355 : ulong bank_seq; /* Bank sequence number, counting from 1 within a run; the join key to confirmation events. Not meaningful across restarts. 0 means no bank was ever allocated (a block completing reception under a dead or discarded lineage without ever getting a bank), leaving nothing to join on bank_seq; any forward confirmations for such a block join on slot and block_id. The boot bank (bank_seq 1) emits confirmation events but no block_completed row. */
356 : ulong bank_idx; /* Bank pool index the block was tracked under: the identifier log lines print. Instance-local and recycled across blocks within a run; correlate with logs only within one validator instance and time window. Reported whenever a bank existed (any row with nonzero bank_seq). The *_fork_id and cost_tracker_pool_idx columns are debug identifiers with the same scope, reported as held when the row was emitted, and 0 unless the block began replay or production (preparation_begin_time set). */
357 : ushort txncache_fork_id; /* Transaction cache fork handle held by the bank. See bank_idx for scope. */
358 : ulong progcache_fork_id; /* Program cache fork handle held by the bank. See bank_idx for scope. */
359 : ushort accdb_fork_id; /* Account database fork handle held by the bank. See bank_idx for scope. */
360 : ulong vote_stakes_fork_id; /* Vote stakes fork handle held by the bank. See bank_idx for scope. */
361 : ushort collector_overrides_fork_id; /* Collector overrides fork handle held by the bank. See bank_idx for scope. */
362 : ushort stake_rewards_fork_id; /* Stake rewards fork handle held by the bank. See bank_idx for scope. */
363 : ushort epoch_credits_fork_id; /* Epoch credits fork handle held by the bank. See bank_idx for scope. */
364 : ushort stake_delegations_fork_id; /* Stake delegations fork handle held by the bank. See bank_idx for scope. */
365 : ulong cost_tracker_pool_idx; /* Cost tracker pool index the bank held: snapshotted just before the freeze releases it on completed rows, read live on dead and abandoned rows; 0 if the block never began replay or production. See bank_idx for scope. */
366 : ulong slot; /* Slot number of the block. */
367 : ulong epoch; /* Epoch containing the slot. */
368 : ulong parent_slot; /* Slot number of the parent block. 0 if the parent was no longer locally known when the row was emitted; on genesis-booted clusters, 0 is also the genuine parent slot of blocks chaining directly off genesis. */
369 : ulong root_slot; /* Finalized root slot when the row was emitted. */
370 : ulong storage_slot; /* Lowest slot still held in memory when the row was emitted. */
371 : ulong turbine_slot; /* Highest slot observed in completed FEC sets from the network (own leader blocks excluded) when the row was emitted: the validator's estimate of the cluster tip. Minus slot: how far behind this row was - 0 to 2 in steady state, large during boot catch-up and while racing back after any stall, re-detecting mid-run lag that caught_up cannot. 0 before any shred has been observed. */
372 : int caught_up; /* Whether the validator considered itself caught up to the cluster when the row was emitted. False from boot until replay closes on the network tip (set immediately for genesis bootstrap); never cleared within a run. */
373 : ulong fork_width; /* Number of forks executing concurrently when the row was emitted. 1 in calm operation; higher values mark fork storms, explaining replay contention, evictions, and prune bursts on the rows that suffered them. */
374 : int snapshot_in_progress; /* Whether this validator was writing a snapshot when the row was emitted; snapshot creation periodically stalls replay, so timing outliers on these rows are expected. Always false when snapshot creation is unsupported or disabled. */
375 : ulong live_bank_count; /* Banks allocated when the row was emitted: executing, awaiting replay, and completed or dead awaiting prune. Bank tracking pressure; blocks are evicted when this reaches the pool bound. fork_width isolates the concurrently-executing component. */
376 : uchar block_id[ 32UL ]; /* Block identifier. For blocks that never completed reception (dead or abandoned early): the merkle root of the latest piece received. */
377 : uchar parent_block_id[ 32UL ]; /* Block id of the parent this block chained from, recovered from the reception chain; disambiguates the parent version when the parent slot equivocated. 0 if the reception chain could not be walked to the parent: reassembly no longer tracked the block, or an abandoned leader block that shredded nothing; parent_slot can still be known on such rows. */
378 : uchar bank_hash[ 32UL ]; /* Bank hash computed by replaying the block; the state commitment consensus votes on. Rows sharing slot and block_id but differing here indicate state divergence. 0 if the block never froze (dead or abandoned). */
379 : int dead; /* Whether the block was ruled invalid. Blocks merely given up on are not dead; see abandoned_reason. State accumulated before the ruling is still reported, so execution fields may be partially filled. */
380 : int dead_reason; /* Why the block was ruled invalid; not_dead otherwise. Blocks this validator produced are never dead: they do not go through replay's block checks. A block invalid for several independent reasons records the first one detected locally, which can differ across validators for the same block. */
381 : ulong dead_time; /* When the block was ruled invalid; 0 if not dead. */
382 : int abandoned; /* Whether this validator gave up on the block before it completed. Independent of dead: an abandoned block was not invalid. Equivalent to abandoned_reason != not_abandoned. State accumulated before abandonment is still reported, so execution fields may be partially filled. */
383 : int abandoned_reason; /* Why this validator gave up on the block before it completed; not_abandoned otherwise. Independent of dead. */
384 : ulong abandoned_time; /* When the block was abandoned; 0 if not abandoned. */
385 : int is_leader; /* Whether this validator produced the block as leader. */
386 : ulong first_shred_received_time; /* Network arrival at the shred tile of the block's first shred, stamped before signature verification. Leader blocks: when the first entry batch reached the shredding stage, before any network send. 0 if repair pruned the block before completion. */
387 : ulong last_shred_received_time; /* Network arrival of the shred that made the block contiguous; not necessarily the highest-numbered shred. Minus first_shred_received_time: reception duration, valid only when this is nonzero. Leader blocks: when the final entry batch reached the shredding stage. 0 if the block never became fully contiguous (dead or abandoned mid-reception) or repair pruned it before completion. */
388 : ulong first_repair_request_time; /* First repair request for a specific missing shred (window request); highest-shred and orphan requests do not stamp this, so it can be 0 while their request counts are not. 0 if no window request was sent or repair pruned the block; always 0 for leader blocks. */
389 : ulong last_repair_received_time; /* Arrival of the last repair response matched to an outstanding specific-shred request; shreds from highest-shred and orphan responses do not stamp this. 0 if none was matched or repair pruned the block; always 0 for leader blocks. */
390 : ulong first_fec_set_received_time; /* When the block's first complete FEC set reached replay, after verification and reassembly. Minus first_shred_received_time: internal pipeline latency from network to replay, valid only when both are nonzero. Leader blocks: when the block's own first FEC set returned to replay through reassembly; follows rather than precedes preparation_begin_time, since production shreds the block as it goes. 0 if no bank was ever allocated, and on abandoned leader blocks whose first FEC set had not returned through reassembly when production was abandoned. */
391 : ulong preparation_begin_time; /* When replay began setting up the block's execution state: cloning from the parent and applying start-of-block updates (epoch boundary processing, fee and rent state). Follows first_fec_set_received_time on replayed blocks; leader blocks reverse that order (see that field). Gap to first_transaction_scheduled_time: setup cost, which for leader blocks includes waiting for pack to schedule the first transaction; valid only when first_transaction_scheduled_time is nonzero. 0 if the block was dropped before setup. */
392 : ulong first_transaction_scheduled_time; /* When replay dispatched the block's first transaction to an execution tile. Leader blocks: when an execution tile began the first packed transaction. Execution and verification run from here to last_transaction_finished_time; equal to it if the block executed no transactions or, for leader blocks, if production timing was unavailable (see txn_timing). 0 on dead and abandoned rows if no transaction was ever dispatched. */
393 : ulong last_transaction_finished_time; /* When the block became fully executed and verified and end-of-block processing began: all execution and signature-verification results returned, the final FEC set received, PoH verified. At the live tip this trails the last execution result by trailing-tick reception and verification; per-transaction execution end is txn_timing.replayed_time. Leader blocks: when the block was fully produced (final PoH hash received, block id returned through reassembly), trailing the last execution result by the PoH tail and final-entry shredding, most visibly when a limit ended the block early. 0 if the block never finished executing (dead or abandoned). */
394 : ulong block_completed_time; /* When end-of-block processing finished and the block froze: state hashing complete, no further changes. Minus last_transaction_finished_time: finalization cost. 0 if the block never completed (dead or abandoned). */
395 : ulong parent_block_completed_time; /* The parent's block_completed_time, denormalized to avoid a self-join; for blocks chaining directly off the snapshot or genesis boot bank, when the boot bank finished loading. 0 if the parent's completion was never observed: parent untracked, or parent never froze (dead or abandoned lineage). Slot-time queries (block_completed_time minus this) should filter on caught_up, parent_slot = slot - 1, and a nonzero value here. */
396 : ulong fec_set_count; /* Number of FEC sets in the block; for blocks that never completed reception, the number delivered to replay when the row was emitted. 0 if reassembly no longer tracked the block when the row was emitted. */
397 : uint data_shred_count; /* Data shreds received or recovered. Leader blocks: shreds produced. 0 if repair pruned the block before completion. */
398 : uint parity_shred_count; /* Parity (recovery) shreds received. Near 0 for leader blocks: only network echoes of the block's own parity shreds land here. 0 if repair pruned the block before completion. */
399 : uint turbine_shred_count; /* Shreds received over the network via turbine, plus repair deliveries whose provenance could not be verified (failed nonce) and coding shreds arriving in repair responses (nonconformant: repair serves only data shreds). Pieces cleared and re-fetched after a wrong-version detection or eviction count once per delivery, so source tallies can exceed the block's shred counts. Near 0 for leader blocks. 0 if repair pruned the block before completion. */
400 : uint repair_shred_count; /* Shreds obtained from peers via repair; nonce-verified deliveries only. Re-fetched pieces count once per delivery (see turbine_shred_count). Always 0 for leader blocks. 0 if repair pruned the block before completion. */
401 : uint recovered_shred_count; /* Shreds reconstructed locally from parity data. Re-recovered pieces count once per recovery (see turbine_shred_count). Always 0 for leader blocks, which produce rather than recover their shreds. 0 if repair pruned the block before completion. */
402 : int chain_confirmed; /* Whether every FEC set was verified to chain back to the confirmed block identity, i.e. the assembled data matches the block the cluster confirmed. Verification is confirmation-triggered and the value is snapshotted at the block's last received FEC set, so false means it had not run by then, not that it failed; at the live tip confirmation usually arrives later. True mainly when confirmation precedes reception completing, e.g. during catch-up. See lowest_verified_fec_index. */
403 : uint lowest_verified_fec_index; /* Lowest FEC set index reached by chain verification as of the block's last received FEC set; the walk anchors at the confirmed block identity and works backwards. 0 means the whole block verified. 4294967295 means no verification information (verification never ran, or repair pruned the block); not a FEC index. */
404 : uint last_completed_fec_set_index; /* FEC set index of the last piece of the block to complete reception, which with out-of-order repair need not be the block's final index. 4294967295 when the reception statistics are unpopulated; not a FEC index. */
405 : int slot_complete_flag; /* Whether the shred marking the block complete was received. False if repair pruned the block before completion. */
406 : int equivocation_detected_shred; /* Whether any of the block's FEC sets was ever quarantined by an equivocation hold: set when a conflicting version of a FEC set was assembled at that position, and inherited by everything chaining onto or arriving during an unresolved conflict, including from ancestor slots; persists after resolution. A lone conflicting shred discarded before reassembly does not register. False if reassembly no longer tracked the block when the row was emitted. */
407 : uint repair_requests_retransmitted; /* Repair requests re-sent after a response timeout. Always 0 for leader blocks. 0 if repair pruned the block before completion. */
408 : uint repair_responses_received; /* Repair responses matched to an outstanding specific-shred request. Shreds delivered by verified highest-shred and orphan responses count in repair_shred_count but are not matched here, so this can be 0 while repair_shred_count is not. Always 0 for leader blocks. 0 if repair pruned the block before completion. */
409 : uint repair_request_window_count; /* Repair requests for one specific missing shred, by index. Always 0 for leader blocks. 0 if repair pruned the block before completion. */
410 : uint repair_request_highest_window_count; /* Repair requests for the highest-numbered shred a peer holds, used to learn the block's length. Highest-shred requests seeded at boot, before the block was tracked, bypass this counter. Always 0 for leader blocks. 0 if repair pruned the block before completion. */
411 : uint repair_request_orphan_count; /* Repair requests for the block's ancestry when its parent is unknown; a response carries shreds from up to 11 ancestor blocks. Always 0 for leader blocks. 0 if repair pruned the block before completion. */
412 : int repair_failed_chain_verify; /* Whether chain verification against the confirmed block identity found a mismatched (wrong-version) FEC held for this block; the piece was cleared and re-repaired, but may have arrived by any route, turbine included. Always false for leader blocks. False if repair pruned the block before completion. */
413 : ulong cost_tracker_block_cost; /* Compute units used by all transactions, votes included; the vote/non-vote split is not part of this event (pack_vote_cost carries the producer-side vote reservation on leader rows). 0 if no cost tracker existed for the block (never prepared for replay, or no bank). */
414 : ulong cost_tracker_allocated_accounts_data_size; /* New account data allocated, in bytes. 0 if no cost tracker existed for the block. */
415 : ulong cost_tracker_block_cost_limit; /* Block compute unit limit. 0 if no cost tracker existed for the block (never prepared for replay, or no bank). */
416 : ulong cost_tracker_vote_cost_limit; /* Deprecated runtime vote compute unit limit. Always 0. */
417 : ulong cost_tracker_account_cost_limit; /* Per-account compute unit limit. 0 if no cost tracker existed for the block. */
418 : ulong became_leader_time; /* When replay began block production for the slot, all prerequisites (e.g. parent block identity) in hand. Minus leader_slot_start_time: local production start delay. 0 for blocks this validator did not produce. */
419 : ulong leader_slot_start_time; /* When the leader slot was scheduled to begin, estimated locally by projecting slot durations from the reset onto the parent fork; embeds upstream lateness rather than tracking a cluster-absolute timeline. 0 for blocks this validator did not produce. */
420 : ulong pack_start_time; /* When block production began. 0 for blocks this validator did not produce. */
421 : ulong pack_end_time; /* When block production ended. 0 for blocks this validator did not produce. */
422 : ulong microblock_count; /* Microblocks pack scheduled during production. A microblock whose transactions all failed execution is skipped at PoH mixin and absent from the block, so this can exceed block content. 0 for blocks this validator did not produce. */
423 : ulong pack_block_cost; /* Compute units pack reserved while building the block, votes included. Reservations are refunded as transactions finish, so this can exceed cost_tracker_block_cost (the charged amount) by refunds unsettled at slot end. 0 for blocks this validator did not produce. */
424 : ulong pack_vote_cost; /* Vote compute units pack reserved while building the block, less refunds settled by slot end. This is not a runtime consensus limit but gets populated by pack. 0 for blocks this validator did not produce. */
425 : ulong pack_data_bytes; /* Bytes pack's cost model reserved for block content: transaction payloads plus a 48-byte header per microblock, net of rebates settled by slot end. Excludes tick entries; can exceed the block's actual content by rebates unsettled at slot end. A size, not a compute measure. 0 for blocks this validator did not produce. */
426 : int pack_end_reason; /* Why block production stopped; not_leader for blocks this validator did not produce. */
427 : ulong bundle_txn_count; /* Bundled transactions pack scheduled during production, counted whether or not the bundle survived to the block (aborted bundles are skipped at PoH mixin). 0 for blocks this validator did not produce. */
428 : ulong txn_timing_cnt; /* Number of txn_timing entries (<= 98039) */
429 : fd_event_block_completed_txn_timing_t txn_timing[ 98039UL ]; /* Per-transaction timestamps, one entry per transaction in block order. Replayed blocks: stamped by the replay scheduler. Leader blocks: stamped by the production pipeline. Columns exclusive to the other path are 0. Empty on dead and abandoned replay rows; an abandoned leader block reports the transactions mixed into the block before production was abandoned. Otherwise best-effort: empty when no capture slot was free (more than 16 blocks replaying at once) or the production timing table was unavailable. Empty does not mean the block had no transactions. (dynamic: stored at end, shipped at used length) */
430 : };
431 : typedef struct fd_event_block_completed fd_event_block_completed_t;
432 :
433 6 : #define FD_EVENT_BLOCK_COMPLETED_PREFIX_SZ (offsetof(fd_event_block_completed_t, txn_timing))
434 :
435 0 : #define FD_EVENT_BLOCK_COMPLETED_TXN_TIMING_MAX (98039UL)
436 :
437 : FD_STATIC_ASSERT( sizeof(((fd_event_block_completed_t *)0)->txn_timing[0])%8UL==0UL, block_completed_txn_timing_align );
438 :
439 : /* Packed (wire) footprint of a block_completed event: prefix plus used
440 : dynamic array entries. msg may point at a full struct or at a
441 : packed event's prefix. */
442 : static inline ulong
443 3 : fd_event_block_completed_footprint( fd_event_block_completed_t const * msg ) {
444 3 : return FD_EVENT_BLOCK_COMPLETED_PREFIX_SZ
445 3 : + msg->txn_timing_cnt*sizeof(((fd_event_block_completed_t *)0)->txn_timing[0])
446 3 : ;
447 3 : }
448 :
449 : /* Worst-case encoded size of a block_completed event (envelope + Event
450 : submsg + inner submsg + all fields, padded for encoder slack). */
451 6 : #define FD_EVENT_BLOCK_COMPLETED_BUF_MAX (11275587UL)
452 :
453 : /* Snapshot production result. */
454 0 : #define FD_EVENT_SNAPSHOT_CREATED_RESULT_SUCCESS (1) /* The snapshot was produced and published to the local snapshot directory. */
455 0 : #define FD_EVENT_SNAPSHOT_CREATED_RESULT_TOO_MANY_INCREMENTAL_ACCOUNTS (2) /* The incremental snapshot could not be produced because more accounts changed than snapshots.max_incremental_snapshot_accounts permits. */
456 :
457 : /* Zstandard compression strategy. */
458 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_FAST (1) /* Zstandard fast strategy. */
459 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_DFAST (2) /* Zstandard double-fast strategy. */
460 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_GREEDY (3) /* Zstandard greedy strategy. */
461 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_LAZY (4) /* Zstandard lazy strategy. */
462 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_LAZY2 (5) /* Zstandard lazy2 strategy. */
463 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_BTLAZY2 (6) /* Zstandard binary-tree lazy2 strategy. */
464 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_BTOPT (7) /* Zstandard binary-tree optimal strategy. */
465 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_BTULTRA (8) /* Zstandard binary-tree ultra strategy. */
466 0 : #define FD_EVENT_SNAPSHOT_CREATED_ZSTD_STRATEGY_BTULTRA2 (9) /* Zstandard binary-tree ultra2 strategy. */
467 :
468 : /* The result of a snapshot production attempt. */
469 : struct fd_event_snapshot_created {
470 : int result; /* Snapshot production result. */
471 : ulong slot; /* The snapshot slot. The snapshot contains the chain state after replaying this slot. */
472 : ulong base_slot; /* For an incremental snapshot, the slot of the full snapshot it's based on. 0 for a full snapshot. */
473 : uchar filename[ 128UL ]; /* Final snapshot filename. */
474 : ulong filename_len; /* Length of filename (<= 128) */
475 : uchar hash[ 32UL ]; /* Raw 32-byte snapshot hash (currently blake3_256(accounts_lthash)). */
476 : uchar bank_hash[ 32UL ]; /* Bank hash of the snapshot slot. */
477 : uchar block_id[ 32UL ]; /* Block identifier (FEC set tree root) of the bank at the snapshot slot. */
478 : uchar bank_accounts_lthash[ 2048UL ]; /* Raw 2048-byte accounts LtHash from the bank. */
479 : ulong bank_accounts_lthash_len; /* Length of bank_accounts_lthash (<= 2048) */
480 : ulong epoch; /* Epoch number of snapshot slot. */
481 : ulong block_height; /* Block height at the snapshot slot (as seen in manifest). */
482 : ulong capitalization; /* Total capitalization in lamports (as seen in manifest). */
483 : ulong transaction_count; /* Cumulative number of historical transactions (as seen in manifest, unverified). */
484 : ulong account_count; /* Number of account records written to the snapshot. Full snapshots contain all live accounts; incremental snapshots contain accounts changed since base_slot. */
485 : ulong tombstone_count; /* Number of zero-lamport account records written to the snapshot. */
486 : ulong cached_accounts_count; /* Number of non-tombstone account records read from the accounts database cache. */
487 : ulong disk_accounts_count; /* Number of non-tombstone account records read from accounts database disk storage. */
488 : ulong manifest_size; /* Uncompressed serialized manifest payload size in bytes, excluding its TAR header and padding. */
489 : ulong accounts_size; /* Total uncompressed size in bytes of account records, including each record header and record alignment padding but excluding TAR headers and TAR padding. */
490 : ulong status_cache_size; /* Uncompressed serialized status-cache payload size in bytes, excluding its TAR header and padding. */
491 : ulong compressed_size; /* Final compressed snapshot file size in bytes, including archive data and skippable alignment frames. */
492 : ulong uncompressed_size; /* Total number of bytes produced by decompressing all Zstandard frames, including TAR headers and TAR padding but excluding skippable alignment frames. */
493 : ulong zstd_data_frame_count; /* Number of Zstandard data frames in the snapshot file. Excludes skippable frames used for alignment padding. */
494 : ulong zstd_padding_size; /* Total compressed-file bytes occupied by Zstandard skippable frames used for alignment padding, including their 8-byte frame headers. */
495 : ulong zstd_window_size; /* Zstandard compression window size in bytes. */
496 : int zstd_strategy; /* Zstandard compression strategy. */
497 : ulong duration_compress_nanos; /* Aggregate CPU time spent in Zstandard compression calls across snapshot producer threads, in nanoseconds. */
498 : ulong duration_io_blocked_nanos; /* Aggregate time snapshot producer threads spent blocked on snapshot file writes, in nanoseconds. */
499 : ulong start_time; /* Wall-clock time at which snapshot production began, in nanoseconds since the Unix epoch. */
500 : ulong accounts_start_time; /* Wall-clock time at which writing snapshot account records began, in nanoseconds since the Unix epoch. */
501 : ulong end_time; /* Wall-clock time at which snapshot production ended, in nanoseconds since the Unix epoch. */
502 : };
503 : typedef struct fd_event_snapshot_created fd_event_snapshot_created_t;
504 :
505 : /* Worst-case encoded size of a snapshot_created event (envelope + Event
506 : submsg + inner submsg + all fields, padded for encoder slack). */
507 6 : #define FD_EVENT_SNAPSHOT_CREATED_BUF_MAX (2799UL)
508 :
509 : /* The admin command that was processed. */
510 0 : #define FD_EVENT_ADMIN_COMMAND_TYPE_SET_IDENTITY (1) /* Change the running validator identity. */
511 3 : #define FD_EVENT_ADMIN_COMMAND_TYPE_GET_IDENTITY (2) /* Read the running validator identity. */
512 0 : #define FD_EVENT_ADMIN_COMMAND_TYPE_ADD_AUTHORIZED_VOTER (3) /* Add an authorized voter key. */
513 0 : #define FD_EVENT_ADMIN_COMMAND_TYPE_REMOVE_ALL_AUTHORIZED_VOTERS (4) /* Remove every authorized voter key. */
514 0 : #define FD_EVENT_ADMIN_COMMAND_TYPE_SNAPSHOT_CREATE (5) /* Request creation of a snapshot. */
515 :
516 : /* The result of processing the admin command. */
517 0 : #define FD_EVENT_ADMIN_COMMAND_RESULT_SUCCESS (1) /* The command completed successfully. */
518 : #define FD_EVENT_ADMIN_COMMAND_RESULT_UNKNOWN_COMMAND (2) /* The running validator does not recognize this command. */
519 0 : #define FD_EVENT_ADMIN_COMMAND_RESULT_ABI_VERSION_MISMATCH (3) /* The request used an unsupported admin command ABI version. */
520 0 : #define FD_EVENT_ADMIN_COMMAND_RESULT_ABI_SIZE_MISMATCH (4) /* The request size did not match the admin command ABI. */
521 0 : #define FD_EVENT_ADMIN_COMMAND_RESULT_UNSUPPORTED (5) /* The command is not supported by this validator configuration. */
522 3 : #define FD_EVENT_ADMIN_COMMAND_RESULT_CUSTOM (6) /* The command returned a command-specific result described by custom_result. */
523 :
524 : /* An admin command completed. Emitted once for every command processed by the running validator, whether it succeeded or failed. */
525 : struct fd_event_admin_command {
526 : int type; /* The admin command that was processed. */
527 : int result; /* The result of processing the admin command. */
528 : uchar custom_result[ 64UL ]; /* The command-specific result when result is custom. */
529 : ulong custom_result_len; /* Length of custom_result (<= 64) */
530 : ulong start_time; /* Wall-clock nanosecond unix timestamp at which the command started getting processed. */
531 : ulong end_time; /* Wall-clock nanosecond unix timestamp at which the command completed. */
532 : ulong payload_version; /* Payload version requested by the command. Valid only when has_payload_version is true. */
533 : int has_payload_version; /* Whether the command payload was large enough to contain payload_version. */
534 : ulong payload_size; /* Size of the received command payload in bytes. */
535 : uchar args_json[ 256UL ]; /* Command-specific public values serialized as JSON. Unavailable values are omitted. Private key material is never included. */
536 : ulong args_json_len; /* Length of args_json (<= 256) */
537 : };
538 : typedef struct fd_event_admin_command fd_event_admin_command_t;
539 :
540 : /* Worst-case encoded size of a admin_command event (envelope + Event
541 : submsg + inner submsg + all fields, padded for encoder slack). */
542 12 : #define FD_EVENT_ADMIN_COMMAND_BUF_MAX (538UL)
543 :
544 : /* Decoded Clock sysvar for this slot */
545 : struct fd_event_runtime_block_clock_sysvar {
546 : ulong slot; /* Clock sysvar slot (same as this row's slot) */
547 : long epoch_start_timestamp; /* Unix timestamp of the first slot of this epoch */
548 : ulong epoch; /* Clock sysvar epoch */
549 : ulong leader_schedule_epoch; /* Epoch whose leader schedule is currently being computed */
550 : long unix_timestamp; /* Stake-weighted cluster unix timestamp estimate for this slot */
551 : };
552 : typedef struct fd_event_runtime_block_clock_sysvar fd_event_runtime_block_clock_sysvar_t;
553 :
554 : /* RecentBlockhashes sysvar entry */
555 : struct fd_event_runtime_block_recent_blockhashes_sysvar {
556 : uchar blockhash[ 32UL ]; /* Blockhash */
557 : ulong lamports_per_signature; /* Fee calculator (lamports per signature) in effect when this blockhash was registered */
558 : };
559 : typedef struct fd_event_runtime_block_recent_blockhashes_sysvar fd_event_runtime_block_recent_blockhashes_sysvar_t;
560 :
561 : /* Post-state of an updated sysvar account */
562 : struct fd_event_runtime_block_sysvar_diffs {
563 : uchar pubkey[ 32UL ]; /* Sysvar account pubkey */
564 : uchar owner[ 32UL ]; /* Post-state owner pubkey */
565 : uchar prev_owner[ 32UL ]; /* Pre-state owner pubkey */
566 : ulong lamports; /* Post-state lamports */
567 : ulong prev_lamports; /* Pre-state lamports */
568 : ulong data_sz; /* Post-state data size in bytes */
569 : ulong prev_data_sz; /* Pre-state data size in bytes */
570 : int is_executable; /* True if the post-state account is executable */
571 : };
572 : typedef struct fd_event_runtime_block_sysvar_diffs fd_event_runtime_block_sysvar_diffs_t;
573 :
574 : /* Post-state of an updated account */
575 : struct fd_event_runtime_block_other_diffs {
576 : uchar pubkey[ 32UL ]; /* Account pubkey */
577 : uchar owner[ 32UL ]; /* Post-state owner pubkey */
578 : uchar prev_owner[ 32UL ]; /* Pre-state owner pubkey */
579 : ulong lamports; /* Post-state lamports */
580 : ulong prev_lamports; /* Pre-state lamports */
581 : ulong data_sz; /* Post-state data size in bytes */
582 : ulong prev_data_sz; /* Pre-state data size in bytes */
583 : int is_executable; /* True if the post-state account is executable */
584 : };
585 : typedef struct fd_event_runtime_block_other_diffs fd_event_runtime_block_other_diffs_t;
586 :
587 : /* One row per block emitted with all the block-level diffs and results */
588 : struct fd_event_runtime_block {
589 : ulong bank_seq; /* Monotonic sequence number identifying this block within the current run; the join key from runtime_txn / slot_confirmed / block_equivocated. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
590 : ulong slot; /* Block slot number */
591 : uchar block_id[ 32UL ]; /* Block id of the slot. Under Tower this is the merkle root of the last FEC set (the last fec_merkle_roots entry). Under Alpenglow it is the block's double merkle root (DMR), which is not any FEC set's merkle root */
592 : ulong parent_slot; /* Slot of the parent block */
593 : uchar parent_block_id[ 32UL ]; /* Parent slot's block id */
594 : ulong epoch; /* Epoch this block belongs to */
595 : ulong block_height; /* Block height (count of ancestor blocks) of this block in the chain */
596 : uchar leader[ 32UL ]; /* Scheduled leader identity pubkey for this block */
597 : uchar bank_hash[ 32UL ]; /* Bank hash of this slot */
598 : uchar prev_bank_hash[ 32UL ]; /* Bank hash of the parent slot */
599 : uchar accounts_lt_hash_checksum[ 32UL ]; /* Accounts lattice hash after this slot */
600 : uchar poh_hash[ 32UL ]; /* Proof-of-history hash at the end of the slot (same as blockhash) */
601 : fd_event_runtime_block_clock_sysvar_t clock_sysvar; /* Decoded Clock sysvar for this slot */
602 : uchar recent_blockhashes[ 151UL ][ 32UL ]; /* Newest 151 entries of the blockhash queue at the end of this slot, newest first: exactly the blockhashes a transaction in a child block may reference (age <= 150 inclusive, matching the agave off-by-one in the transaction age check). The first entry is this block's blockhash. */
603 : ulong recent_blockhashes_cnt; /* Number of recent_blockhashes entries (<= 151) */
604 : fd_event_runtime_block_recent_blockhashes_sysvar_t recent_blockhashes_sysvar[ 150UL ]; /* Decoded RecentBlockhashes sysvar account content at the end of this slot, newest first (the newest 150 blockhash queue entries with their fee calculators) */
605 : ulong recent_blockhashes_sysvar_cnt; /* Number of recent_blockhashes_sysvar entries (<= 150) */
606 : ulong last_restart_slot_sysvar; /* Highest hard fork slot less than or equal to bank slot */
607 : ulong num_transactions; /* Total number of transactions committed in this block */
608 : ulong num_failed_txns; /* Number of transactions that committed with an error */
609 : ulong num_nonvote_txns; /* Number of non-vote transactions committed in this block */
610 : ulong num_nonvote_failed_txns; /* Number of non-vote transactions that committed with an error */
611 : ulong num_signatures; /* Total number of signatures processed in the block */
612 : ulong num_shreds; /* Number of data shreds making up this block */
613 : ulong tick_height; /* Cumulative tick height at the end of this block */
614 : ulong execution_fees; /* Total execution (base) fees collected in this block, pre-burn */
615 : ulong priority_fees; /* Total priority fees collected in this block (priority fees are not burned) */
616 : ulong tips; /* Total gross tips credited to tip accounts in this block, before block-level tip commission */
617 : ulong fees_burned; /* Lamports burned at fee settlement per the fee schedule (50% of execution fees). If the resolved fee collector fails validation the reward portion is also burned; that case shows up as leader_fee_reward with no matching other_diffs credit. */
618 : ulong leader_fee_reward; /* Lamports owed for block production at fee settlement per the fee schedule (priority fees plus unburned execution fees). The actual credit is an other_diffs entry for the resolved fee collector: the leader identity, or the leader vote account's block-revenue collector when custom_commission_collector is active. If the collector fails validation this amount is burned instead and the collector's other_diffs entry shows no balance change. */
619 : ulong capitalization; /* Total lamport supply */
620 : ulong total_effective_stake; /* Effective stake from stake delegations */
621 : ulong total_activating_stake; /* Stake activating during this slot's epoch */
622 : ulong total_deactivating_stake; /* Stake deactivating during this slot's epoch */
623 : ulong total_epoch_stake; /* Total stake delegated to active vote accounts this epoch */
624 : fd_event_runtime_block_sysvar_diffs_t sysvar_diffs[ 16UL ]; /* Final per-account diff of every sysvar account written this block; repeated writes to the same sysvar (e.g. the stake history update then its rent-exemption top-up at an epoch boundary) are coalesced into one entry keeping the first pre-state and last post-state. Ordinary slots carry ~4 entries (Clock, SlotHashes, RecentBlockhashes, SlotHistory; LastRestartSlot only when it changes), boundary/PER slots 5-6. Overflow past the 16-account bound drops the entry with a validator log warning */
625 : ulong sysvar_diffs_cnt; /* Number of sysvar_diffs entries (<= 16) */
626 : fd_event_runtime_block_other_diffs_t other_diffs[ 32UL ]; /* Final per-account diff of non-txn account updates that are not sysvar writes or epoch reward credits (both vote and stake epoch-reward credits are excluded here; see the runtime_reward table). Includes: the block fee credit at settlement (pubkey is the resolved fee collector: the leader identity unless custom_commission_collector routes it to the leader vote account's block-revenue collector; a zero-delta entry means collector validation failed and the reward burned), feature accounts at activation, core-BPF migration writes, and builtin program provisioning. Repeated writes to one account coalesce as in sysvar_diffs. Deliberately excluded as unbounded per-account floods: the per-account VAT-burn debits (see runtime_epoch.vat_burn_per_vote_account) and the per-block alpenglow cert-signer vote state rewrites. Steady state is one entry per block; 32 is an operational bound, not protocol-derived; overflow drops the entry with a validator log warning */
627 : ulong other_diffs_cnt; /* Number of other_diffs entries (<= 32) */
628 : ulong fec_count; /* Total number of FEC sets observed while assembling this block (not capped by fec_merkle_roots) */
629 : uchar fec_merkle_roots[ 1024UL ][ 32UL ]; /* Merkle roots of the FEC sets observed while assembling this block, in order. Truncated to the first 1024 roots — exact for fixed-size FECs (a block has at most 1024), a prefix for legacy variable-size FECs when fec_count exceeds 1024. Under Tower the last entry equals block_id; under Alpenglow block_id is the separate DMR and is not present in this list */
630 : ulong fec_merkle_roots_cnt; /* Number of fec_merkle_roots entries (<= 1024) */
631 : };
632 : typedef struct fd_event_runtime_block fd_event_runtime_block_t;
633 :
634 : /* Worst-case encoded size of a runtime_block event (envelope + Event
635 : submsg + inner submsg + all fields, padded for encoder slack). */
636 6 : #define FD_EVENT_RUNTIME_BLOCK_BUF_MAX (69947UL)
637 :
638 : /* Type of reward credit */
639 0 : #define FD_EVENT_RUNTIME_REWARD_KIND_VOTE (1) /* Vote commission credit in the first replayed bank that crosses the epoch boundary (not necessarily the epoch's nominal first slot when slots were skipped). Credited to the vote account itself, or, with custom_commission_collector active, to its inflation collector (possibly system-owned; one row per collector, rewards aggregated across the vote accounts routing to it) */
640 0 : #define FD_EVENT_RUNTIME_REWARD_KIND_STAKE (2) /* Stake-account credit during the partitioned-epoch-rewards window */
641 :
642 : /* One row per epoch-reward credit to an account */
643 : struct fd_event_runtime_reward {
644 : ulong bank_seq; /* Monotonic sequence number identifying this block within the current run; the join key to runtime_block. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
645 : ulong slot; /* Slot in which the credit was applied */
646 : ulong epoch; /* Epoch the slot belongs to */
647 : int kind; /* Type of reward credit */
648 : uchar pubkey[ 32UL ]; /* Credited account pubkey: the stake account, the vote account, or the vote account's inflation collector (see kind) */
649 : uchar owner[ 32UL ]; /* Owner program of the credited account */
650 : ulong prev_lamports; /* Lamports before the credit */
651 : ulong lamports; /* Lamports after the credit */
652 : ulong partition_idx; /* Partitioned-rewards partition index this credit belongs to (0 for vote rewards) */
653 : ulong credits_observed; /* New credits_observed stored on the stake account (0 for vote rewards) */
654 : ulong stake; /* Post-payout delegated stake written to the stake-delegations cache (0 for vote rewards) */
655 : };
656 : typedef struct fd_event_runtime_reward fd_event_runtime_reward_t;
657 :
658 : /* Worst-case encoded size of a runtime_reward event (envelope + Event
659 : submsg + inner submsg + all fields, padded for encoder slack). */
660 6 : #define FD_EVENT_RUNTIME_REWARD_BUF_MAX (326UL)
661 :
662 : /* Type of the cache entry mutation */
663 0 : #define FD_EVENT_RUNTIME_STAKE_DELEGATION_KIND_UPSERT (1) /* Entry fully rewritten from the post-txn account state */
664 0 : #define FD_EVENT_RUNTIME_STAKE_DELEGATION_KIND_REMOVE (2) /* Entry removed, either by a transaction (has signature and index_in_slot) or by epoch-boundary inactive-stake pruning (non-transaction; index_in_slot is UInt64 max) */
665 0 : #define FD_EVENT_RUNTIME_STAKE_DELEGATION_KIND_BOOTUP (3) /* Post-reconciliation baseline entry: emitted once at boot from the finalized root delegation cache (after snapshot verification/refresh, or genesis load), not from the raw snapshot account stream */
666 0 : #define FD_EVENT_RUNTIME_STAKE_DELEGATION_KIND_REWARD (4) /* Entry fully rewritten by an epoch-reward payout during the partitioned-rewards window */
667 :
668 : /* The complete history of the stake-delegations cache, one row per mutation: the baseline entries emitted once at boot (kind = bootup, one row per delegation in the finalized root cache after snapshot verification/refresh or genesis load, not the raw snapshot account stream), the entry rewrites applied by epoch-reward payouts (kind = reward), and the transaction-driven mutations emitted as the cache is updated at txn commit (kind = upsert / remove). */
669 : struct fd_event_runtime_stake_delegation {
670 : ulong bank_seq; /* Monotonic sequence number identifying this block within the current run; the join key to runtime_block. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
671 : ulong slot; /* Slot in which the mutating transaction was committed (the snapshot slot for bootup baseline entries; 0 for genesis-boot baselines) */
672 : ulong epoch; /* Epoch the slot belongs to */
673 : ulong index_in_slot; /* 0-indexed position of the mutating transaction within its block. UInt64 max for the non-transaction rows (bootup or reward kind) */
674 : uchar signature[ 64UL ]; /* First signature of the mutating transaction (64 bytes; zero for the non-transaction rows, bootup or reward kind) */
675 : int kind; /* Type of the cache entry mutation */
676 : uchar stake_account[ 32UL ]; /* Stake account pubkey */
677 : uchar vote_account[ 32UL ]; /* Vote account pubkey */
678 : ulong stake; /* Delegated lamports written to the cache */
679 : ulong activation_epoch; /* Delegation activation epoch written to the cache */
680 : ulong deactivation_epoch; /* Delegation deactivation epoch written to the cache */
681 : ulong credits_observed; /* Vote credits_observed written to the cache */
682 : };
683 : typedef struct fd_event_runtime_stake_delegation fd_event_runtime_stake_delegation_t;
684 :
685 : /* Worst-case encoded size of a runtime_stake_delegation event (envelope + Event
686 : submsg + inner submsg + all fields, padded for encoder slack). */
687 6 : #define FD_EVENT_RUNTIME_STAKE_DELEGATION_BUF_MAX (400UL)
688 :
689 : /* One row per root advance with the post-apply cache invariants */
690 : struct fd_event_runtime_rooted {
691 : ulong bank_seq; /* Monotonic sequence number identifying this block within the current run; the join key to runtime_block. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
692 : ulong slot; /* Slot of the newly rooted block */
693 : ulong epoch; /* Epoch the rooted slot belongs to */
694 : ulong prev_root_slot; /* Slot of the previous root */
695 : ulong stake_delegations_upserts; /* Number of stake-delegations delta entries (non-tombstone) applied into the root map by this root advance. The advance covers every bank on (prev_root_slot, slot]. Each bank keeps at most one delta entry per stake account (last update wins), so this can be lower than the count of runtime_stake_delegation rows with kind upsert or reward whose slot is in that range when one account is mutated multiple times in a block. */
696 : ulong stake_delegations_removes; /* Number of root stake-delegations removed by this root advance: tombstone delta entries (counted per account per bank, tombstones for accounts absent from the root map still count) plus any epoch-boundary inactive-stake prunes. Matches the count of runtime_stake_delegation rows with kind remove whose slot is in (prev_root_slot, slot] except when one account is removed more than once in a block. */
697 : ulong stake_delegations_cnt; /* Total entries in the root stake-delegations cache after this advance */
698 : ulong effective_stake; /* Root stake-delegations effective-stake total after this advance */
699 : ulong activating_stake; /* Root stake-delegations activating-stake total after this advance */
700 : ulong deactivating_stake; /* Root stake-delegations deactivating-stake total after this advance */
701 : uchar block_id[ 32UL ]; /* Block id (final FEC merkle root) of the newly rooted block */
702 : };
703 : typedef struct fd_event_runtime_rooted fd_event_runtime_rooted_t;
704 :
705 : /* Worst-case encoded size of a runtime_rooted event (envelope + Event
706 : submsg + inner submsg + all fields, padded for encoder slack). */
707 6 : #define FD_EVENT_RUNTIME_ROOTED_BUF_MAX (304UL)
708 :
709 : /* Decoded StakeHistory sysvar entry appended at this boundary */
710 : struct fd_event_runtime_epoch_stake_history_sysvar {
711 : ulong epoch; /* Epoch that just completed */
712 : ulong effective; /* Effective stake recorded for the completed epoch */
713 : ulong activating; /* Activating stake recorded for the completed epoch */
714 : ulong deactivating; /* Deactivating stake recorded for the completed epoch */
715 : };
716 : typedef struct fd_event_runtime_epoch_stake_history_sysvar fd_event_runtime_epoch_stake_history_sysvar_t;
717 :
718 : /* Decoded EpochSchedule sysvar */
719 : struct fd_event_runtime_epoch_epoch_schedule_sysvar {
720 : ulong slots_per_epoch; /* Slots per epoch */
721 : ulong leader_schedule_slot_offset; /* Slots before an epoch's start at which its leader schedule is computed */
722 : int warmup; /* True if epochs ramp up from a shorter initial length, false otherwise */
723 : ulong first_normal_epoch; /* First epoch of full slots per epoch length */
724 : ulong first_normal_slot; /* First slot of first normal epoch */
725 : };
726 : typedef struct fd_event_runtime_epoch_epoch_schedule_sysvar fd_event_runtime_epoch_epoch_schedule_sysvar_t;
727 :
728 : /* Decoded EpochRewards sysvar as initialized at this boundary */
729 : struct fd_event_runtime_epoch_epoch_rewards_sysvar {
730 : ulong total_rewards; /* Total lamports minted for this epoch's rewards (vote + stake) */
731 : ulong distributed; /* Lamports already distributed when the sysvar was initialized */
732 : ulong distribution_starting_block_height; /* Block height at which the stake rewards distribution starts */
733 : ulong num_partitions; /* Number of stake reward partitions */
734 : uint128 total_points; /* Total reward points (sum of credits earned times stake across all delegations) */
735 : uchar parent_blockhash[ 32UL ]; /* Parent blockhash seeding the partition hasher */
736 : };
737 : typedef struct fd_event_runtime_epoch_epoch_rewards_sysvar fd_event_runtime_epoch_epoch_rewards_sysvar_t;
738 :
739 : /* One row per epoch boundary with all the epoch-level diffs and results */
740 : struct fd_event_runtime_epoch {
741 : ulong bank_seq; /* Monotonic sequence number identifying this block within the current run; the join key to runtime_block. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
742 : ulong slot; /* First replayed slot of the epoch-boundary bank (the bank that crosses into this epoch); with skipped slots this is not necessarily the epoch's nominal first slot */
743 : ulong parent_slot; /* Parent slot on this fork (the last replayed slot of the previous epoch) */
744 : ulong epoch; /* The new epoch being entered; the boundary snapshot captures stakes as of the end of epoch - 1 */
745 : ulong total_effective_stake; /* Effective stake across all delegations, recomputed with warmup/cooldown math at this boundary */
746 : ulong total_activating_stake; /* Stake activating during the new epoch, recomputed at this boundary */
747 : ulong total_deactivating_stake; /* Stake deactivating during the new epoch, recomputed at this boundary */
748 : ulong total_epoch_stake; /* Total stake delegated to the valid vote accounts snapshotted at this boundary */
749 : ulong num_staked_vote_accounts; /* Vote accounts seen while accumulating delegations at this boundary */
750 : ulong num_vote_accounts; /* Vote accounts in the final boundary snapshot */
751 : ulong num_top_votes_eligible; /* Vote accounts that passed the validator-admission-ticket filters and were offered to the top-votes set */
752 : ulong top_votes_min_stake; /* Smallest stake in the final boundary snapshot - the effective admission threshold */
753 : fd_event_runtime_epoch_stake_history_sysvar_t stake_history_sysvar; /* Decoded StakeHistory sysvar entry appended at this boundary */
754 : fd_event_runtime_epoch_epoch_schedule_sysvar_t epoch_schedule_sysvar; /* Decoded EpochSchedule sysvar */
755 : uchar feature_activations[ 16UL ][ 32UL ]; /* Feature ids newly activated at this boundary. The 16-entry bound is operational, not protocol-derived (no boundary on a real cluster has come close); overflow drops the entry with a validator log warning */
756 : ulong feature_activations_cnt; /* Number of feature_activations entries (<= 16) */
757 : fd_event_runtime_epoch_epoch_rewards_sysvar_t epoch_rewards_sysvar; /* Decoded EpochRewards sysvar as initialized at this boundary */
758 : ulong vat_burn_per_vote_account; /* Lamports burned from every admitted vote account at this boundary (SIMD-0357 VAT; alpenglow only, 0 otherwise). The burned set is exactly this boundary's runtime_vote_account rows, so the aggregate burned is this value times that row count. The debits are not emitted as account diffs, and the incinerator credit is not observable in runtime_block.other_diffs either: the incinerator is drained to zero later in the same block by fd_runtime_freeze, so its coalesced diff is 0 -> 0 */
759 : };
760 : typedef struct fd_event_runtime_epoch fd_event_runtime_epoch_t;
761 :
762 : /* Worst-case encoded size of a runtime_epoch event (envelope + Event
763 : submsg + inner submsg + all fields, padded for encoder slack). */
764 6 : #define FD_EVENT_RUNTIME_EPOCH_BUF_MAX (1263UL)
765 :
766 : /* One row per vote account per epoch boundary: the per-account vote-cache snapshot taken as the boundary is crossed */
767 : struct fd_event_runtime_vote_account {
768 : ulong bank_seq; /* Monotonic sequence number identifying this block within the current run; the join key to runtime_block. Restarts at 1 each time a snapshot is loaded, so pair it with the stream's boot id. 0 means unavailable. */
769 : ulong slot; /* First replayed slot of the new epoch */
770 : ulong epoch; /* The new epoch being entered; the snapshot captures this account's stake as of the end of epoch - 1 */
771 : uchar pubkey[ 32UL ]; /* Vote account */
772 : uchar node_account[ 32UL ]; /* Validator identity pubkey */
773 : ulong stake; /* Effective stake delegated to this vote account at this boundary */
774 : uint commission_bps; /* Commission read from the vote account at this boundary (basis points) */
775 : int has_commission_t_2; /* True if the account existed in the snapshot taken one boundary earlier */
776 : uint commission_t_2_bps; /* Commission recorded one boundary earlier (0 unless has_commission_t_2) */
777 : int has_commission_t_3; /* True if the account existed in the snapshot taken two boundaries earlier */
778 : uint commission_t_3_bps; /* Commission recorded two boundaries earlier (0 unless has_commission_t_3) */
779 : uint reward_commission_bps; /* Commission the reward calculation will actually use for this epoch's vote rewards: the oldest available of t-3 / t-2 / current when delay_commission_updates is active, current otherwise */
780 : ulong credits; /* Cumulative vote credits at this boundary */
781 : ulong prev_credits; /* Cumulative vote credits at the start of the latest epoch-credits ladder entry */
782 : ulong epoch_credits_cnt; /* Entries in the vote account's epoch-credits ladder at this boundary */
783 : };
784 : typedef struct fd_event_runtime_vote_account fd_event_runtime_vote_account_t;
785 :
786 : /* Worst-case encoded size of a runtime_vote_account event (envelope + Event
787 : submsg + inner submsg + all fields, padded for encoder slack). */
788 6 : #define FD_EVENT_RUNTIME_VOTE_ACCOUNT_BUF_MAX (353UL)
789 :
790 : /* Largest generated event struct; a consumer can stage any incoming
791 : event in a buffer of this size, aligned to
792 : FD_EVENT_GEN_STRUCT_ALIGN. */
793 : #define FD_EVENT_GEN_STRUCT_MAX (sizeof (union { fd_event_signed_vote_t signed_vote_; fd_event_slot_confirmed_t slot_confirmed_; fd_event_accdb_compaction_completed_t accdb_compaction_completed_; fd_event_accdb_partition_added_t accdb_partition_added_; fd_event_block_equivocated_t block_equivocated_; fd_event_runtime_txn_t runtime_txn_; fd_event_block_completed_t block_completed_; fd_event_snapshot_created_t snapshot_created_; fd_event_admin_command_t admin_command_; fd_event_runtime_block_t runtime_block_; fd_event_runtime_reward_t runtime_reward_; fd_event_runtime_stake_delegation_t runtime_stake_delegation_; fd_event_runtime_rooted_t runtime_rooted_; fd_event_runtime_epoch_t runtime_epoch_; fd_event_runtime_vote_account_t runtime_vote_account_; }))
794 : #define FD_EVENT_GEN_STRUCT_ALIGN (alignof(union { fd_event_signed_vote_t signed_vote_; fd_event_slot_confirmed_t slot_confirmed_; fd_event_accdb_compaction_completed_t accdb_compaction_completed_; fd_event_accdb_partition_added_t accdb_partition_added_; fd_event_block_equivocated_t block_equivocated_; fd_event_runtime_txn_t runtime_txn_; fd_event_block_completed_t block_completed_; fd_event_snapshot_created_t snapshot_created_; fd_event_admin_command_t admin_command_; fd_event_runtime_block_t runtime_block_; fd_event_runtime_reward_t runtime_reward_; fd_event_runtime_stake_delegation_t runtime_stake_delegation_; fd_event_runtime_rooted_t runtime_rooted_; fd_event_runtime_epoch_t runtime_epoch_; fd_event_runtime_vote_account_t runtime_vote_account_; }))
795 :
796 : FD_PROTOTYPES_BEGIN
797 :
798 : /* Serialize a signed_vote event into the circq, reserving an event id
799 : from the client and writing the standard event envelope. Mirrors
800 : the hand-written fd_pb_* path. */
801 : void
802 : fd_event_signed_vote_serialize( fd_circq_t * circq,
803 : fd_event_client_t * client,
804 : long timestamp_nanos,
805 : ulong link_seq,
806 : fd_event_signed_vote_t const * msg );
807 :
808 : /* Serialize a slot_confirmed event into the circq, reserving an event id
809 : from the client and writing the standard event envelope. Mirrors
810 : the hand-written fd_pb_* path. */
811 : void
812 : fd_event_slot_confirmed_serialize( fd_circq_t * circq,
813 : fd_event_client_t * client,
814 : long timestamp_nanos,
815 : ulong link_seq,
816 : fd_event_slot_confirmed_t const * msg );
817 :
818 : /* Serialize a accdb_compaction_completed event into the circq, reserving an event id
819 : from the client and writing the standard event envelope. Mirrors
820 : the hand-written fd_pb_* path. */
821 : void
822 : fd_event_accdb_compaction_completed_serialize( fd_circq_t * circq,
823 : fd_event_client_t * client,
824 : long timestamp_nanos,
825 : ulong link_seq,
826 : fd_event_accdb_compaction_completed_t const * msg );
827 :
828 : /* Serialize a accdb_partition_added event into the circq, reserving an event id
829 : from the client and writing the standard event envelope. Mirrors
830 : the hand-written fd_pb_* path. */
831 : void
832 : fd_event_accdb_partition_added_serialize( fd_circq_t * circq,
833 : fd_event_client_t * client,
834 : long timestamp_nanos,
835 : ulong link_seq,
836 : fd_event_accdb_partition_added_t const * msg );
837 :
838 : /* Serialize a block_equivocated event into the circq, reserving an event id
839 : from the client and writing the standard event envelope. Mirrors
840 : the hand-written fd_pb_* path. */
841 : void
842 : fd_event_block_equivocated_serialize( fd_circq_t * circq,
843 : fd_event_client_t * client,
844 : long timestamp_nanos,
845 : ulong link_seq,
846 : fd_event_block_equivocated_t const * msg );
847 :
848 : /* Serialize a runtime_txn event into the circq, reserving an event id
849 : from the client and writing the standard event envelope. Mirrors
850 : the hand-written fd_pb_* path. */
851 : void
852 : fd_event_runtime_txn_serialize( fd_circq_t * circq,
853 : fd_event_client_t * client,
854 : long timestamp_nanos,
855 : ulong link_seq,
856 : fd_event_runtime_txn_t const * msg );
857 :
858 : /* Serialize a block_completed event into the circq, reserving an event id
859 : from the client and writing the standard event envelope. Mirrors
860 : the hand-written fd_pb_* path. */
861 : void
862 : fd_event_block_completed_serialize( fd_circq_t * circq,
863 : fd_event_client_t * client,
864 : long timestamp_nanos,
865 : ulong link_seq,
866 : fd_event_block_completed_t const * msg );
867 :
868 : /* Serialize a snapshot_created event into the circq, reserving an event id
869 : from the client and writing the standard event envelope. Mirrors
870 : the hand-written fd_pb_* path. */
871 : void
872 : fd_event_snapshot_created_serialize( fd_circq_t * circq,
873 : fd_event_client_t * client,
874 : long timestamp_nanos,
875 : ulong link_seq,
876 : fd_event_snapshot_created_t const * msg );
877 :
878 : /* Serialize a admin_command event into the circq, reserving an event id
879 : from the client and writing the standard event envelope. Mirrors
880 : the hand-written fd_pb_* path. */
881 : void
882 : fd_event_admin_command_serialize( fd_circq_t * circq,
883 : fd_event_client_t * client,
884 : long timestamp_nanos,
885 : ulong link_seq,
886 : fd_event_admin_command_t const * msg );
887 :
888 : /* Serialize a runtime_block event into the circq, reserving an event id
889 : from the client and writing the standard event envelope. Mirrors
890 : the hand-written fd_pb_* path. */
891 : void
892 : fd_event_runtime_block_serialize( fd_circq_t * circq,
893 : fd_event_client_t * client,
894 : long timestamp_nanos,
895 : ulong link_seq,
896 : fd_event_runtime_block_t const * msg );
897 :
898 : /* Serialize a runtime_reward event into the circq, reserving an event id
899 : from the client and writing the standard event envelope. Mirrors
900 : the hand-written fd_pb_* path. */
901 : void
902 : fd_event_runtime_reward_serialize( fd_circq_t * circq,
903 : fd_event_client_t * client,
904 : long timestamp_nanos,
905 : ulong link_seq,
906 : fd_event_runtime_reward_t const * msg );
907 :
908 : /* Serialize a runtime_stake_delegation event into the circq, reserving an event id
909 : from the client and writing the standard event envelope. Mirrors
910 : the hand-written fd_pb_* path. */
911 : void
912 : fd_event_runtime_stake_delegation_serialize( fd_circq_t * circq,
913 : fd_event_client_t * client,
914 : long timestamp_nanos,
915 : ulong link_seq,
916 : fd_event_runtime_stake_delegation_t const * msg );
917 :
918 : /* Serialize a runtime_rooted event into the circq, reserving an event id
919 : from the client and writing the standard event envelope. Mirrors
920 : the hand-written fd_pb_* path. */
921 : void
922 : fd_event_runtime_rooted_serialize( fd_circq_t * circq,
923 : fd_event_client_t * client,
924 : long timestamp_nanos,
925 : ulong link_seq,
926 : fd_event_runtime_rooted_t const * msg );
927 :
928 : /* Serialize a runtime_epoch event into the circq, reserving an event id
929 : from the client and writing the standard event envelope. Mirrors
930 : the hand-written fd_pb_* path. */
931 : void
932 : fd_event_runtime_epoch_serialize( fd_circq_t * circq,
933 : fd_event_client_t * client,
934 : long timestamp_nanos,
935 : ulong link_seq,
936 : fd_event_runtime_epoch_t const * msg );
937 :
938 : /* Serialize a runtime_vote_account event into the circq, reserving an event id
939 : from the client and writing the standard event envelope. Mirrors
940 : the hand-written fd_pb_* path. */
941 : void
942 : fd_event_runtime_vote_account_serialize( fd_circq_t * circq,
943 : fd_event_client_t * client,
944 : long timestamp_nanos,
945 : ulong link_seq,
946 : fd_event_runtime_vote_account_t const * msg );
947 :
948 : /* Serialize an event of the given type id (the schema id carried in the
949 : report frag's sig) from a fully-formed fd_event_<name>_t at ev. */
950 : void
951 : fd_event_serialize_by_type( ulong type,
952 : fd_circq_t * circq,
953 : fd_event_client_t * client,
954 : long timestamp_nanos,
955 : ulong link_seq,
956 : void const * ev,
957 : ulong ev_sz );
958 :
959 : /* Report a signed_vote event (SignedVote, id 3) to the event tile via
960 : the thread-local reporter (no-op when the tile has no event link). */
961 : static inline void
962 0 : fd_event_report_signed_vote( fd_event_signed_vote_t const * msg ) {
963 0 : fd_event_report_( 3UL, msg, sizeof(fd_event_signed_vote_t) );
964 0 : }
965 :
966 : /* Report a slot_confirmed event (SlotConfirmed, id 4) to the event tile via
967 : the thread-local reporter (no-op when the tile has no event link). */
968 : static inline void
969 0 : fd_event_report_slot_confirmed( fd_event_slot_confirmed_t const * msg ) {
970 0 : fd_event_report_( 4UL, msg, sizeof(fd_event_slot_confirmed_t) );
971 0 : }
972 :
973 : /* Report a accdb_compaction_completed event (AccdbCompactionCompleted, id 5) to the event tile via
974 : the thread-local reporter (no-op when the tile has no event link). */
975 : static inline void
976 3 : fd_event_report_accdb_compaction_completed( fd_event_accdb_compaction_completed_t const * msg ) {
977 3 : fd_event_report_( 5UL, msg, sizeof(fd_event_accdb_compaction_completed_t) );
978 3 : }
979 :
980 : /* Report a accdb_partition_added event (AccdbPartitionAdded, id 6) to the event tile via
981 : the thread-local reporter (no-op when the tile has no event link). */
982 : static inline void
983 63 : fd_event_report_accdb_partition_added( fd_event_accdb_partition_added_t const * msg ) {
984 63 : fd_event_report_( 6UL, msg, sizeof(fd_event_accdb_partition_added_t) );
985 63 : }
986 :
987 : /* Report a block_equivocated event (BlockEquivocated, id 7) to the event tile via
988 : the thread-local reporter (no-op when the tile has no event link). */
989 : static inline void
990 0 : fd_event_report_block_equivocated( fd_event_block_equivocated_t const * msg ) {
991 0 : fd_event_report_( 7UL, msg, sizeof(fd_event_block_equivocated_t) );
992 0 : }
993 :
994 : /* Report a runtime_txn event (RuntimeTxn, id 8) to the event tile via
995 : the thread-local reporter (no-op when the tile has no event link). */
996 : static inline void
997 0 : fd_event_report_runtime_txn( fd_event_runtime_txn_t const * msg ) {
998 0 : fd_event_report_( 8UL, msg, sizeof(fd_event_runtime_txn_t) );
999 0 : }
1000 :
1001 : /* Report a block_completed event (BlockCompleted, id 9) to the event tile via
1002 : the thread-local reporter (no-op when the tile has no event link).
1003 : The event travels packed: fixed prefix followed by the used entries
1004 : of each dynamic array. */
1005 : static inline void
1006 0 : fd_event_report_block_completed( fd_event_block_completed_t const * msg ) {
1007 0 : FD_TEST( msg->txn_timing_cnt<=98039UL );
1008 0 : fd_event_report_iov_t iov[] = {
1009 0 : { (void const *)msg, FD_EVENT_BLOCK_COMPLETED_PREFIX_SZ },
1010 0 : { (void const *)msg->txn_timing, msg->txn_timing_cnt*sizeof(msg->txn_timing[0]) },
1011 0 : };
1012 0 : fd_event_report_gather_( 9UL, iov, sizeof(iov)/sizeof(iov[0]) );
1013 0 : }
1014 :
1015 : /* Report a snapshot_created event (SnapshotCreated, id 11) to the event tile via
1016 : the thread-local reporter (no-op when the tile has no event link). */
1017 : static inline void
1018 0 : fd_event_report_snapshot_created( fd_event_snapshot_created_t const * msg ) {
1019 0 : fd_event_report_( 11UL, msg, sizeof(fd_event_snapshot_created_t) );
1020 0 : }
1021 :
1022 : /* Report a admin_command event (AdminCommand, id 12) to the event tile via
1023 : the thread-local reporter (no-op when the tile has no event link). */
1024 : static inline void
1025 0 : fd_event_report_admin_command( fd_event_admin_command_t const * msg ) {
1026 0 : fd_event_report_( 12UL, msg, sizeof(fd_event_admin_command_t) );
1027 0 : }
1028 :
1029 : /* Report a runtime_block event (RuntimeBlock, id 13) to the event tile via
1030 : the thread-local reporter (no-op when the tile has no event link). */
1031 : static inline void
1032 0 : fd_event_report_runtime_block( fd_event_runtime_block_t const * msg ) {
1033 0 : fd_event_report_( 13UL, msg, sizeof(fd_event_runtime_block_t) );
1034 0 : }
1035 :
1036 : /* Report a runtime_reward event (RuntimeReward, id 14) to the event tile via
1037 : the thread-local reporter (no-op when the tile has no event link). */
1038 : static inline void
1039 0 : fd_event_report_runtime_reward( fd_event_runtime_reward_t const * msg ) {
1040 0 : fd_event_report_( 14UL, msg, sizeof(fd_event_runtime_reward_t) );
1041 0 : }
1042 :
1043 : /* Report a runtime_stake_delegation event (RuntimeStakeDelegation, id 15) to the event tile via
1044 : the thread-local reporter (no-op when the tile has no event link). */
1045 : static inline void
1046 0 : fd_event_report_runtime_stake_delegation( fd_event_runtime_stake_delegation_t const * msg ) {
1047 0 : fd_event_report_( 15UL, msg, sizeof(fd_event_runtime_stake_delegation_t) );
1048 0 : }
1049 :
1050 : /* Report a runtime_rooted event (RuntimeRooted, id 16) to the event tile via
1051 : the thread-local reporter (no-op when the tile has no event link). */
1052 : static inline void
1053 0 : fd_event_report_runtime_rooted( fd_event_runtime_rooted_t const * msg ) {
1054 0 : fd_event_report_( 16UL, msg, sizeof(fd_event_runtime_rooted_t) );
1055 0 : }
1056 :
1057 : /* Report a runtime_epoch event (RuntimeEpoch, id 17) to the event tile via
1058 : the thread-local reporter (no-op when the tile has no event link). */
1059 : static inline void
1060 0 : fd_event_report_runtime_epoch( fd_event_runtime_epoch_t const * msg ) {
1061 0 : fd_event_report_( 17UL, msg, sizeof(fd_event_runtime_epoch_t) );
1062 0 : }
1063 :
1064 : /* Report a runtime_vote_account event (RuntimeVoteAccount, id 18) to the event tile via
1065 : the thread-local reporter (no-op when the tile has no event link). */
1066 : static inline void
1067 0 : fd_event_report_runtime_vote_account( fd_event_runtime_vote_account_t const * msg ) {
1068 0 : fd_event_report_( 18UL, msg, sizeof(fd_event_runtime_vote_account_t) );
1069 0 : }
1070 :
1071 : FD_PROTOTYPES_END
1072 :
1073 : #endif
|