8000 Releases · tweag/cooked-validators · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: tweag/cooked-validators

Version 6.0.0

19 May 09:40
Compare
Choose a tag to compare

This is the release that updates cardano-api and cardano-node-emulator to the latest standards. Full change log below.

Added

  • Module Cooked.Pretty.Hashable has been brought back from
    Cooked.Conversion.ToHash since it has no purpose being in
    plutus-script-utils.
  • It is now possible to use TxSkelOutNoDatum when paying to scripts, as
    PlutusV3 allows for it. As a consequence, providing no datum in a Payable will
    result in the generation of TxSkelOutDatum () for scripts of version 1 or 2,
    and in the generation of TxSkelOutNoDatum for scripts of version 3.
  • New define primitive in MonadBlockChainBalancing which allows to bind an
    alias while defining a variable. This is used by the pretty printer to render
    names that are dynamic, i.e. depend on on-chain data, like utxos.
  • The list of MockChainLogEntry has been integrated into a MockChainBook
    which also stores the aliases exported using define.
  • The testing framewok now allows to predicate over the number of resulting
    traces using new Test field testSizeProp and new helper withExactSize.
  • Support for multi-purpose scripts post CIP69 and Chang hard fork.
  • A test over multi-purpose scripts with Minting + Spending purposes.
  • Constructor Mint with smart constructors mint and burn to populate the
    TxSkelMints field of our skeleton.
  • New helper addHashNames to add alias in the pretty cooked options without
    overriding the existing default names.
  • OwnerConstraints and ReferenceScriptConstraints for output to clarify some
    types and allow to reuse those constraints in other parts of the code, such as
    attacks or tweaks.
  • New helper txSkelOutReferenceScript to retrieve the optional reference script
    from an output.
  • New testing helpers isInWallets and isInWallet to ensure wallets have the
    right amount of certain tokens at the end of a mockchain run. New testing
    helpers happened and didNotHappen to test for the occurrence of a specific
    log event.

Removed

  • Modules Validators.hs and Currencies.hs. Their content has been moved to
    plutus-script-utils directly with some improvements and adaptations.
  • Modules Cooked.Conversion.*** which have been integrated to
    plutus-script-utils.
  • Two helpers from Skeleton.hs that were only used once in MockChain.Direct:
    txSkelValidatorsInOutputs, txSkelReferenceScripts
  • walletCredential, walletAddress replaced by toCredential and
    toAddress from the classes ToCredential and ToAddress.
  • txOptAutoReferenceScripts replaced by local option txSkelRedeemerAutoFill
    which can be turned on and off in each TxSkelRedeemer.

Changed

  • Update cardano-api to version 10.10, post Chang hard fork.
  • Datum hijacking attack now branches on each modified outputs.
  • Datum hijacking attack has a simpler interface, no longer relying on optics.
  • Datum hijacking can now redirect output to any suitable party, the type of can
    be different from the original owner of the utxo.
  • The link to explicit typed validators, validators and minting policies has
    been reduced, relying on conversion type classes whenever possible.
  • TxSkelMints is now built from a list of dedicated Mint constructs instead
    of tuples. This allows to use any kind of scripts that can be seen as
    versioned minting policies, such as multipurpose scripts.
  • The default way of building TxSkelMints now does not pushes for specifying
    multiple redeemers for the same minting policy.
  • validatorFromHash changed to scriptFromHash
  • Token names can now be seen as hashables by the pretty printer and thus giving
    a dynamic alias during mockchain runs using define.
  • Default hash names map in the pretty printer option have been updated.
  • The removeLabelTweak now fails if the label is absent from the skeleton.
  • TxSkelRedeemer has been improved: it directly contains a redeemer content
    (no longer needed type Redeemer) and it now contains locally an option to
    either automatically assign a reference input or not.
  • The CI now ensures the documentation is filled up properly.
  • Modules under Pretty.Cooked have been revamped. All pretty functions are now
    instances of either PrettyCooked, PrettyCookedList or PrettyCookedMaybe
    and are adequately placed in the Pretty.Cooked.XXX submodules. This offers
    both more consistency and flexibility to define Pretty instances for cooked.
  • The testing framework has been slightly improved and homogenized.

Fixed

  • A bug where reference inputs given in the withdrawal redeemer would not be put
    in the set of reference inputs of the generated transaction.
  • A bug where hashes were not properly displayed by pretty cooked when involving
    leading zeros in the hexadecimal conversion of their digits.
  • Size of reference scripts is now taken into account when computing the maximal
    possible fee for a transaction. As a consequence, our dychotomic balancing
    mechanism now iterates within the proper fee bounds for Conway.
  • A bug where awaitDurationFromUpperBound would actually wait from the lower
    bound of the slot, similarly to awaitDurationFromLowerBound.

Version 5.0.0

19 Mar 12:19
9cb8081
Compare
Choose a tag to compare