Sia icon indicating copy to clipboard operation
Sia copied to clipboard

Better Handling of Dust Thresholds

Open DavidVorick opened this issue 7 years ago • 4 comments

Currently Sia does not include dust outputs when it calculates your balance. This dust-excluded balance is the balance that the UI displays to the users. The transaction history however does not indicate ever that a transaction has outputs which are below the dust threshold, which means summing up the balances of your transaction history will result in a different balance than what is in the UI for users with small numbers of SC or high numbers of dust transactions (rare).

One tricky bit is that the dust threshold changes over time, so if you poll the endpoint and see that the dust threshold has moved significantly (>33% vs. last check), you should update all the transactions because some which were not previously dust may now be dust, or vice-versa.

This issue is best tackled after https://github.com/NebulousLabs/Sia/issues/2291 is complete in the Sia repo.

DavidVorick avatar Sep 05 '17 13:09 DavidVorick

Should we close this, now that #2305 is merged?

avahowell avatar Sep 12 '17 19:09 avahowell

I think they are different, #2305 made the dust threshold variable and this issue is more about using it to mark the transactions that are considered dust. I am actually going to tackle #2291 right now (if no one is interested) that as David explains can be seen as a previous step.

aiorla avatar Sep 12 '17 19:09 aiorla

@aiorla now that #2291 has been merged in, are you planning on working on a fix for this issue? :)

tbenz9 avatar Dec 13 '17 00:12 tbenz9

@tbenz9 not really, I don't have much time now. Feel free to take it!

aiorla avatar Dec 13 '17 11:12 aiorla