LCOV - code coverage report
Current view: top level - flamenco/runtime/program - fd_compute_budget_program.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 7 0.0 %
Date: 2025-07-18 05:01:12 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_runtime_program_fd_compute_budget_program_h
       2             : #define HEADER_fd_src_flamenco_runtime_program_fd_compute_budget_program_h
       3             : 
       4             : #include "../../fd_flamenco_base.h"
       5             : 
       6             : /* FIXME: put these elsewhere */
       7           0 : #define FD_MIN_HEAP_FRAME_BYTES (32 * 1024)     /* Min heap size */
       8           0 : #define FD_MAX_HEAP_FRAME_BYTES (256 * 1024)    /* Max heap size */
       9           0 : #define FD_HEAP_FRAME_BYTES_GRANULARITY (1024)  /* Heap frame requests must be a multiple of this number */
      10           0 : #define FD_MAX_COMPUTE_UNIT_LIMIT (1400000)     /* Max compute unit limit */
      11             : 
      12             : /* SIMD-170 defines new default compute units for builtin, non-builtin, and migrated programs:
      13             :    - Any non-migrated builtins have a conservative default CU limit of 3,000 CUs.
      14             :    - Any migrated and non-builtins have a default CU limit of 200,000 CUs.
      15             : 
      16             :    https://github.com/anza-xyz/agave/blob/v2.1.13/runtime-transaction/src/builtin_programs_filter.rs#L9-L19 */
      17           0 : #define FD_PROGRAM_KIND_NOT_BUILTIN       (0)
      18           0 : #define FD_PROGRAM_KIND_BUILTIN           (1)
      19           0 : #define FD_PROGRAM_KIND_MIGRATING_BUILTIN (2)
      20             : 
      21             : FD_PROTOTYPES_BEGIN
      22             : 
      23             : /* Validates the requested compute budget limits. Returns an error if
      24             :    the requested heap size is invalid, or if the loaded accounts data
      25             :    size limit is 0. Also bounds the compute unit and loaded
      26             :    accounts data size limits to a specified min / max value.
      27             : 
      28             :    https://github.com/anza-xyz/agave/blob/v2.3.1/compute-budget-instruction/src/compute_budget_instruction_details.rs#L101-L153 */
      29             : int
      30             : fd_sanitize_compute_unit_limits( fd_exec_txn_ctx_t * ctx );
      31             : 
      32             : int
      33             : fd_executor_compute_budget_program_execute_instructions( fd_exec_txn_ctx_t * ctx );
      34             : 
      35             : int
      36             : fd_compute_budget_program_execute( fd_exec_instr_ctx_t * ctx );
      37             : 
      38             : FD_PROTOTYPES_END
      39             : 
      40             : #endif /* HEADER_fd_src_flamenco_runtime_program_fd_compute_budget_program_h */

Generated by: LCOV version 1.14