Concordium/concordium-node

GetBakersRewardPeriod gives incorrect data

td202 opened this issue · 1 comments

Bug Description

The GetBakersRewardPeriod gives incorrect data concerning the pool commission rates, baker equity capital and delegated capital. The values presented are based on the active staking, whereas they should be based on the staking that applies to the current epoch (i.e. the snapshot of the active values that was taken one epoch before the last payday).

Steps to Reproduce

Compare the results from GetBakersRewardPeriod (aka GetValidatorsRewardPeriod in the client) and GetPoolInfo.

Expected Result

  • equityCapital should match currentPaydayStatus/bakerEquityCapital
  • commissionRates should match currentPaydayStatus/commissionRates
  • delegatedCapital should match currentPaydayStatus/delegatedCapital

Actual Result

  • equityCapital matches bakerEquityCapital
  • commissionRates matchespoolInfo/commissionRates
  • delegatedCapital matches delegatedCapital

Versions

  • Software Version: 6.*
  • OS: All

This will be addressed as part of the API changes for cooldown (#1146).