You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploying payouts from a csv requires a conversion of an f64 (in attofil units) -> u128 -> U256 value. This conversion becomes lossy for an f64 value >= 50000000000000000000000 (50,000 FIL * 10^18 ).
Example:
Converting 50000000000000000000000 from f64 to u128 in rust yields: 49999999999999995805696.
This means that in the case an earning is placed > 50,000 FIL the conversion will have a margin of error.
The text was updated successfully, but these errors were encountered:
A potential solution is to just store the values in the CSV as attofil units and convert to u128 directly. We already have attofil entries for our payout accounting. That way we avoid the lossy conversion from f64 -> u128
Description:
Deploying payouts from a csv requires a conversion of an
f64
(in attofil units) ->u128
->U256
value. This conversion becomes lossy for anf64
value >=50000000000000000000000
(50,000 FIL * 10^18 ).Example:
Converting
50000000000000000000000
fromf64
tou128
in rust yields:49999999999999995805696
.This means that in the case an earning is placed > 50,000 FIL the conversion will have a margin of error.
The text was updated successfully, but these errors were encountered: