[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    [Haskell-cafe] [ANN] plutus-simple-model - unit test linrary for plutus with resource estimation
From:       Anton Kholomiov <anton.kholomiov () gmail ! com>
Date:       2022-01-11 14:12:10
Message-ID: CADDxdqPZ8BY4HbazZ2fy659-6f6UeoYx9wSU2GK+eVuJStj2fw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi!

I'd like to announce the unit test library plutus-simple-model
<https://github.com/mlabs-haskell/plutus-simple-model> for plutus that is a
joy to use [1].
It's simple and easy to grasp and it can estimate resource usage for TX
(size and execution units).

Main idea is to implement a simple blockchain model that updates UTXOs
inside a pure State monad if
TX is valid. To check TX cardano node functions are used so the check is
the same as if node would check it and it produces useful stats for
resource usage.

Benefits comparing to EmulatorTrace to me:

   - I find resource usage stats are useful to know in production and this
   is missing in Emulator tests
   - EmulatorTrace approach makes it hard to query run-time information and
   with given lib it's super easy
   - Having to define separate API and use lookups/constraints seems clumsy
   to me. It often leads to writing lots of boilerplate code.
   - it's much faster to run

I've tested it successfully in one project and using it for the second one.
It has great docs and tutorials.
Enjoy! I hope it will improve your testing experience with plutus.

[1] plutus-simple-model
<https://github.com/mlabs-haskell/plutus-simple-model>
https://github.com/mlabs-haskell/plutus-simple-model

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail-cooked"><p>Hi!</p>
<p>I'd like to announce the unit test library <a \
href="https://github.com/mlabs-haskell/plutus-simple-model" rel="noopener nofollow \
ugc">plutus-simple-model</a> for plutus that is a joy to use [1].<br> It's simple and \
easy to grasp and it can estimate resource usage for TX (size and execution \
units).</p> <p>Main idea is to implement a simple blockchain model that updates UTXOs \
inside a pure State monad if<br> TX is valid. To check TX cardano node functions are \
used so the check is<br> the same as if node would check it and it produces useful \
stats for resource usage.</p> <p>Benefits comparing to EmulatorTrace to me:</p>
<ul><li>I find resource usage stats are useful to know in production and this is \
missing in Emulator tests</li><li>EmulatorTrace approach makes it hard to query \
run-time information and with given lib it's super easy</li><li>Having to define \
separate API and use lookups/constraints seems  clumsy to me. It often leads to \
writing lots of boilerplate code.</li><li>it's much faster to run</li></ul> <p>I've \
tested it successfully in one project and using it for the second one.<br> It has \
great docs and tutorials.<br> Enjoy! I hope it will improve your testing experience \
with plutus.</p> <p>[1] <a \
href="https://github.com/mlabs-haskell/plutus-simple-model" rel="noopener nofollow \
ugc">plutus-simple-model</a>   <a \
href="https://github.com/mlabs-haskell/plutus-simple-model">https://github.com/mlabs-haskell/plutus-simple-model</a></p></div></div>



[Attachment #6 (text/plain)]

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic