near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.3k stars 600 forks source link

Test chunk validator rewards for stateless validation #11371

Open tayfunelmas opened 1 month ago

tayfunelmas commented 1 month ago

Task is to make sure validator rewards are working as intended in mocknet.

Relevant PR: https://github.com/near/nearcore/pull/11121/files

tayfunelmas commented 1 month ago

RE rewards calculation: the problem with reward calculation not working is due to inflation rate set to 0 in genesis for mocknet. similar to the protocol_reward_rate problem, that the code is picking it from genesis config instead of hard-coded value or 1/20 (mainnet uses hard-coded but mocknet using genesis because protocol version starts from the genesis version): https://github.com/near/nearcore/blob/f7617f0aadb1d961cd40573a1c48ec44d2cdbcd1/chain/epoch-manager/src/reward_calculator.rs#L56