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 : #include "../context/fd_exec_instr_ctx.h" 6 : 7 : /* FIXME: put these elsewhere */ 8 0 : #define FD_MIN_HEAP_FRAME_BYTES (32 * 1024) /* Min heap size */ 9 0 : #define FD_MAX_HEAP_FRAME_BYTES (256 * 1024) /* Max heap size */ 10 0 : #define FD_HEAP_FRAME_BYTES_GRANULARITY (1024) /* Heap frame requests must be a multiple of this number */ 11 0 : #define FD_MAX_COMPUTE_UNIT_LIMIT (1400000) /* Max compute unit limit */ 12 : 13 0 : #define FD_COMPUTE_BUDGET_PRIORITIZATION_FEE_TYPE_COMPUTE_UNIT_PRICE (0) 14 0 : #define FD_COMPUTE_BUDGET_PRIORITIZATION_FEE_TYPE_DEPRECATED (1) 15 : 16 : /* SIMD-170 defines new default compute units for builtin, non-builtin, and migrated programs: 17 : - Any non-migrated builtins have a conservative default CU limit of 3,000 CUs. 18 : - Any migrated and non-builtins have a default CU limit of 200,000 CUs. 19 : 20 : https://github.com/anza-xyz/agave/blob/v2.1.13/runtime-transaction/src/builtin_programs_filter.rs#L9-L19 */ 21 0 : #define FD_PROGRAM_KIND_NOT_BUILTIN (0) 22 0 : #define FD_PROGRAM_KIND_BUILTIN (1) 23 0 : #define FD_PROGRAM_KIND_MIGRATING_BUILTIN (2) 24 : 25 : FD_PROTOTYPES_BEGIN 26 : 27 : int fd_executor_compute_budget_program_execute_instructions( fd_exec_txn_ctx_t * ctx, fd_rawtxn_b_t const * txn_raw ); 28 : 29 : int fd_compute_budget_program_execute( fd_exec_instr_ctx_t * ctx ); 30 : 31 : FD_PROTOTYPES_END 32 : 33 : #endif /* HEADER_fd_src_flamenco_runtime_program_fd_compute_budget_program_h */