Closed ruseinov closed 2 months ago
These look identical to me. What am I missing?
These look identical to me. What am I missing?
big.Div
is actually BigInt::div_euclid
and not div_floor
.
Oh, I see. Both the numerator and the denominator should be non-negative, so this shouldn't matter as far as I can tell. We could change the Lotus version to call Quo
, but if we have negative numbers here, something is very wrong.
Oh, I see. Both the numerator and the denominator should be non-negative, so this shouldn't matter as far as I can tell. We could change the Lotus version to call
Quo
, but if we have negative numbers here, something is very wrong.
Yeah, I guess you are right. Still, it would be nice to see aligned implementations. I have found this discrepancy while working on Filecoin.StateDealProviderCollateralBounds
RPC endpoint and the outputs of Lotus and Forest don't match. This particular issue does not seem to affect the output though. I had to analyse every single line of code related to state_deal_provider_collateral_bounds
calculation and having different division strategies is just another thing that needs to be eliminated from the list of potential causes.
In that case, feel free to make a PR to change the version in go-state-types to Quo
.
(closing because this isn't really a bug)
In that case, feel free to make a PR to change the version in go-state-types to
Quo
.(closing because this isn't really a bug)
Will do.
Lotus:
rust builtin-actors:
Happy to contribute a fix if the above seems reasonable.