Skip to content
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

Rounding inconsistency with valueZat? #117

Closed
Haaroon opened this issue May 30, 2018 · 1 comment
Closed

Rounding inconsistency with valueZat? #117

Haaroon opened this issue May 30, 2018 · 1 comment
Labels
bug fixed-in-v0.6 This issue has been resolved in the development version (available on the v0.6 branch)
Milestone

Comments

@Haaroon
Copy link

Haaroon commented May 30, 2018

Ran the ZCash chain through the BlockSci rpc parser.
Was looking at some tranasaction output values in blockscipy.
It seems that value out in one transaction was incorrect, (due to rounding precision?)
This damages the consistency when looking for transactions with absolute values.

For example, output 0 from this txid (30287c5c83f73dd0ab22c367cdd8ac8ba4e56dc135c84b8657026a02e3298d25) is 1.33767.

When searched for in blocksci it returns the first TxOut as value=133766999.

I haven't been able to find any other transactions like this, not sure if its my interpreter, the parsing process by blocksci or something gone wrong in my end.

Would appreciate any help, or to see if this is reproduced on other blocksci parsed zcash data chains.

@hkalodner
Copy link
Collaborator

Ah. I haven't seen this before. This appears to be a problem in https://github.com/minium/bitcoin-api-cpp. The RPC lists the output values as floating point numbers, and the RPC interface library interprets these as doubles, which introduces rounding errors. There's a page about this issue on the Bitcoin wiki (https://en.bitcoin.it/wiki/Proper_Money_Handling_(JSON-RPC)) along with a solution. I'll fix this in the next update. It'll require a re-parse to fix.

@hkalodner hkalodner added the bug label Jun 4, 2018
@maltemoeser maltemoeser added this to the v0.6 milestone Oct 22, 2018
@maltemoeser maltemoeser added the fixed-in-v0.6 This issue has been resolved in the development version (available on the v0.6 branch) label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed-in-v0.6 This issue has been resolved in the development version (available on the v0.6 branch)
Projects
None yet
Development

No branches or pull requests

3 participants