olalonde / proof-of-liabilities

Proof of Liabilities (PoL) is a scheme designed to let companies that accept monetary deposits from consumers (e.g. Bitcoin exchanges, gambling websites, online Bitcoin wallets, etc.) prove their total amount of deposits (their liabilities) without compromising the privacy of individual users.

Home Page:http://olalonde.github.io/proof-of-liabilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sum representation problem

alesl opened this issue · comments

For very small values I believe hashes are not calculated correctly because big.js
toString formats it in scientific notation if value is less than 1e-7 or greater than 1e21.
Affected functions are combine_nodes and generate_leaf_hash. Simple solution would be to call toFixed method on big.js.