-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decimal precision #22
Comments
I did reduce the precision because the rewards table on the website was getting a bit full and there were some issues caused by the floats, where sometimes you'd see a number like 0.0032141000000001 . I figured 6 decimal places would be more than enough. Would it be sufficient for your usecase if the exported CSV contained the full precision (and the website still only showed the 6 decimal places)? |
I had been using the info in an attempt to accurately track the actual ETH reward, but I guess even 9 decimal places doesn't cut it for that purpose. Ideally accounting software like this would use the |
If you want to be completely accurate you'd need to track it in Wei, since validators can receive as little as 1 Wei as execution layer rewards (consensus layer is limited to units of Gwei). The numbers are stored in the database with sufficient precision at the moment:
So the indexing currently tracks every single Wei correctly. Presenting the data on the website however is not that precise currently and would require some slightly bigger changes:
I'm not sure if it is worth making those changes to gain that tiny bit of extra precision. For one validator I think the difference would add up to something you'd probably round off on a tax form anyway. |
You should convert the floats to a hexidecimal representation of a BigNumber, then you won't have any storage issues at all. What you will have is some function to convert to/from on the view/import/export layer. |
Recently it seems like the decimal precision has dropped from 9 places to 6. Is it possible to revert this behaviour back to the increased precision?
The text was updated successfully, but these errors were encountered: