filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.83k stars 1.26k forks source link

[lotus-miner]The Available value in "lotus-miner info" seems not right #11951

Open OneilYang opened 5 months ago

OneilYang commented 5 months ago

Checklist

Lotus component

Lotus Version

lotus-miner -v
lotus-miner version 1.26.3+mainnet+git.560826d5c.dirty

Repro Steps

  1. Run 'lotus-miner info'
  2. Check 'Available'
  3. The value is not same to any block explorer like fliscan

Describe the Bug

  1. Run 'lotus-miner info'
  2. Check 'Available'
  3. The value is not same to any block explorer like fliscan

Logging Information

1. Run 'lotus-miner info'
2. Check 'Available'
3. The value is not same to any block explorer like fliscan
beck-8 commented 4 months ago

Please submit evidence.

beck-8 commented 4 months ago

image It is just because StateMinerAvailableBalance also takes into account the locked positions to be released, types.BigAdd(abal, vested)

OneilYang commented 4 months ago

Hi beck,

Yes, as you said, the available should be: yesterday's value+released vesting. for example, if today avalilable = 1.23; and if no reward and no withdraw happened, tomorrow the avaliable still = 1.23; (it should be 1.23+released vest, more than 1.23)

v1.25 seems good and only 1.26.3 found this problem;

(And I heard someone found other bugs like this one in the chat group, the winningreward and withdraw will trigger the update )

if anything unclear please feel free to let me know, thanks~