Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_rewards_fd_rewards_base_h 2 : #define HEADER_fd_src_flamenco_rewards_fd_rewards_base_h 3 : 4 : #include "../fd_flamenco_base.h" 5 : 6 : /* https://github.com/anza-xyz/agave/blob/cbc8320d35358da14d79ebcada4dfb6756ffac79/sdk/program/src/native_token.rs#L6 */ 7 0 : #define LAMPORTS_PER_SOL (1000000000UL) 8 : 9 : /* Number of blocks for reward calculation and storing vote accounts. 10 : Distributing rewards to stake accounts begins AFTER this many blocks. 11 : 12 : https://github.com/anza-xyz/agave/blob/9a7bf72940f4b3cd7fc94f54e005868ce707d53d/runtime/src/bank/partitioned_epoch_rewards/mod.rs#L27 */ 13 4 : #define REWARD_CALCULATION_NUM_BLOCKS (1UL) 14 : 15 : /* stake accounts to store in one block during partitioned reward 16 : interval. Target to store 64 rewards per entry/tick in a block. 17 : A block has a minimum of 64 entries/tick. This gives 4096 total 18 : rewards to store in one block. 19 : 20 : NOTE: This constant is not enforced and a block can have more than 21 : 4096 rewards per block. */ 22 4 : #define STAKE_ACCOUNT_STORES_PER_BLOCK (4096UL) 23 : 24 : /* https://github.com/anza-xyz/agave/blob/2316fea4c0852e59c071f72d72db020017ffd7d0/runtime/src/bank/partitioned_epoch_rewards/mod.rs#L219 */ 25 2 : #define MAX_FACTOR_OF_REWARD_BLOCKS_IN_EPOCH (10UL) 26 : 27 : #define MAX_PARTITIONS_PER_EPOCH (43200UL) 28 : 29 : #endif /* HEADER_fd_src_flamenco_rewards_fd_rewards_base_h */