cardano-serialization-lib icon indicating copy to clipboard operation
cardano-serialization-lib copied to clipboard

legacy min_ada_required() is giving low values in CSL 11.0.

Open alice1989123 opened this issue 1 year ago • 1 comments

If I compare the two values given by CSL 10.0.04 with CSL 11 i get two different values, the 11.0 being lower my code:

const asset = [ { unit: "1579f5df1ff81b2a69c402d92dd5fe95bf8cb7129e4a0765ed64095e69726f6e6f726520202d203236333520", quantity: "1", }, { unit: "1579f5df1ff81b2a69c402d92dd5fe95bf8cb7129e4a0765ed64095e69726f6e6f726520202d2037343220", quantity: "1", }, ]; const min = wasm.min_ada_required( amountToValue(wasm, asset), true, wasm.BigNum.from_str( ${protocolParameters.coinsPerUtxoWord } ) );

I am not sure if it is an issue, because in testnet it correctly works, but in mainnet it does not. Is min_ada_required going down with Vasil HF?

alice1989123 avatar Aug 13 '22 02:08 alice1989123

Yes, min_ada_required got changed to a new protocol parameter that gives a lower value. Be sure to change what value you use for the protocol parameter value as well when updating. This is only for Vasil as Alonzo (mainnet) still requires the larger value

SebastienGllmt avatar Aug 13 '22 08:08 SebastienGllmt

@alice1989123 , this has been fixed in the later 11.* versions, please switch to using the latest version and it will work on both network versions.

vsubhuman avatar Sep 20 '22 11:09 vsubhuman