threshold-network / merkle-distribution

Threshold Network rewards generation and distribution
https://threshold.network
1 stars 6 forks source link

Fix rewards calc when invalid tBTCv2 version #78

Closed manumonti closed 12 months ago

manumonti commented 12 months ago

This bug affects the calculation of tBTCv2 staking reward earnings.

One of the requirements to be elegible for tBTCv2 staking rewards is to be running the last version of the tBTCv2 client. When a new version of the client is released, there is an update window in which staker can run either the new or the previous version in order to allow time for updating and maintenance. But in any case it should be possible to run an earlier version than these both.

However, up to now, earlier versions were not been properly checked during the update window. So, nodes that

  1. were running an invalid client version during the current month and
  2. updated to the last client version during the update window may be wrongly considered as eligible for tBTCv2 rewards.

This fix ensures that this requirement is properly checked.

dimpar commented 12 months ago

Confirming, nodes that happen to run older versions other than two latest (case for Sep 01 distribution) should not be eligible for rewards.