Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_runtime_tests_fd_block_harness_h 2 : #define HEADER_fd_src_flamenco_runtime_tests_fd_block_harness_h 3 : 4 : #include "../../fd_executor.h" 5 : #include "../../program/fd_vote_program.h" 6 : #include "../../program/fd_stake_program.h" 7 : #include "../../sysvar/fd_sysvar_epoch_schedule.h" 8 : #include "../../sysvar/fd_sysvar_recent_hashes.h" 9 : #include "../../../rewards/fd_rewards.h" 10 : 11 : #include "fd_harness_common.h" 12 : #include "fd_txn_harness.h" 13 : #include "generated/block.pb.h" 14 : 15 : /* TODO: We should decide how many workers to use for the execution tpool. We might have a bunch of 16 : transactions within a single block, but increasing the worker cnt increases the memory requirements by 17 : 1 GB per additional worker (for spad memory allocation). We also fuzz block execution using 18 : multiple cores, so it may be possible to get away with only 1 worker. Additionally, Agave will more than 19 : likely always be the execution speed bottleneck, so we can play around with numbers and see what yields 20 : the best results. */ 21 0 : #define FD_BLOCK_HARNESS_TPOOL_WORKER_CNT (2UL) 22 0 : #define FD_BLOCK_HARNESS_MEM_PER_SPAD (1UL << 30) 23 : 24 : FD_PROTOTYPES_BEGIN 25 : 26 : /* 27 : Executes a block containing zero or more transactions. 28 : - All sysvars must be provided 29 : - This does not test sigverify or POH 30 : - Epoch boundaries are tested 31 : - Tested Firedancer code is `fd_runtime_block_execute_tpool()` and `fd_runtime_process_new_epoch()` 32 : - Associated entrypoint tested in Agave is `confirm_slot_entries` (except sigverify and verify_ticks are removed) 33 : - (idk about this yet) Recent blockhashes sysvar account must NOT be provided in the input account states. 34 : Instead, the sysvar is populated through the input blockhash queue. 35 : */ 36 : ulong 37 : fd_runtime_fuzz_block_run( fd_runtime_fuzz_runner_t * runner, 38 : void const * input_, 39 : void ** output_, 40 : void * output_buf, 41 : ulong output_bufsz ); 42 : 43 : FD_PROTOTYPES_END 44 : 45 : #endif /* HEADER_fd_src_flamenco_runtime_tests_fd_block_harness_h */