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
So serialization-lib treats zero very specifically for some reason.
This is the source to the problem that hashing any datum that contains Integer 0 gives a completely wrong result.
We really can't monkey-patch this in CTL, because to_bytes call recurses over WASM data on CSL side. So we really need to update our CSL fork and ask @ngua to upload a new version to NPM.
Quite a while ago I discovered an inconsistency between plutus and cardano-serialization-lib:
Output:
And in Plutus:
So serialization-lib treats zero very specifically for some reason.
This is the source to the problem that hashing any datum that contains
Integer 0
gives a completely wrong result.We really can't monkey-patch this in CTL, because
to_bytes
call recurses over WASM data on CSL side. So we really need to update our CSL fork and ask @ngua to upload a new version to NPM.https://github.com/ngua/cardano-serialization-lib
The ask:
Identify all affected types (CheckInt
,BigInt
,BigNum
in CSL)Fix the CBOR encoder so that it outputs results consistent with Plutus.Upstream the fixActually we just need to update CSL: this has already been fixed: Emurgo/cardano-serialization-lib#332
The text was updated successfully, but these errors were encountered: