0LNetworkCommunity / libra-framework

8 stars 30 forks source link

[bug] miner reward given could be lower than the entry fee #144

Open 0xzoz opened 7 months ago

0xzoz commented 7 months ago

Describe the bug @Nima2(Discord) found a potential issue in the codebase.

We might not be awarding miners with any rewards atm, because of this little issue. In the case that the thermostat lowers the reward, and the entry fees are already super high, we might hit the scenario where the reward given will be lower than the entry fee. Now, that should not really happen logically, but it does happen sometimes, as it did in some previous epochs (this was the cause of the last halt)..

To Reproduce The lowest bid from a validator is above the reward value at the end of an epoch.

Expected behavior

Screenshots get_consensus_reward returns these values reward, entry_fee, clearing_bid, median_win_bid respectively.

[
  "3491003643",
  "3582872158",
  "975",
  "995"
]

Additional context Observed in version 6.9.1

0o-de-lally commented 5 months ago

@nonast I believe this was resolved?