Skip to main content

7 posts tagged with "plutus-core"

View All Tags

· 2 min read
Ziyang Liu

High level summary

Plutus Core

  • Following the support for case analysis on booleans and integers, we have now also merged the support for case analysis on lists. This allows UPLC programs to destruct lists using case expressions instead of built-in functions, which is more efficient.

  • Supporting case analysis on bulit-in pairs and unit is in progress.

  • We are working on enabling all built-in functions, as well as sums-of-products, in all Plutus ledger languages (Plutus V1, V2 and V3) at the upcoming intra-era hard fork.

  • We are working on adding a new built-in type representing Value, along with built-in functions operating on Values.

  • We continue to work on adding the multi-scalar multiplization primitive.

Plinth

  • We added a utility to generate .plutus file from CompiledCode. This has the same behavior as Cardano API's writeFileTextEnvelope. It allows one to generate .plutus conveniently without depending on Cardano API.

  • We added a new emitter mode logWithCallTraceEmitter, which uses trace messages generated by the profile-all flag of the Plinth compiler to create call trace of the functions that led to the evaluation failure.

  • We added more realistic scripts in plutus-benchmark written in Plinth, including the open oracle protocol scripts and the cardano-loans scripts, providing improved coverage for evaluating the impact of language and compiler changes.

  • We are working on compiling Haskell's Bool into UPLC's built-in boolean type, instead of Scott or sums-of-products encoded boolean.

Formal Methods

  • We added built-in arrays to the Plutus metatheory.

Low level summary

Key Pull Requests Merged

Issues and Pull Requests In Progress

· 2 min read
Ziyang Liu

High level summary

Plutus Core

  • We merged the PR adding support for case analysis on booleans and integers. Our current focus is extending this support to built-in lists.

  • Several improvements have also been made to the Plutus Core specification.

  • A new tool was merged and released to dump cost model parameters in the format expected by the node. It supports multiple output formats and can be particularly useful when adding new primitives or updating cost model parameters for other reasons.

Plinth

  • We implemented and merged a compiler optimization that pushes force nodes into case branches. This often enables subsequent optimizations by eliminating adjacent force and delay pairs.

  • To benchmark the Plinth compiler and identify further optimization opportunities, we reimplemented in plutus-benchmarks the linear vesting script (originally written in Plutarch) in Plinth.

Formal Methods

  • We are now releasing plutus-metatheory on CHaP, which is a prerequisite for releasing the compiler certifier alongside the Plinth compiler.

Low level summary

Key Pull Requests Merged

Issues and Pull Requests In Progress

· 2 min read
Ziyang Liu

High level summary

Over the past two weeks, the Plutus Core team has completed the implementation of case analysis for booleans and integers. The PR is currently pending merge.

On the Plinth side, we've made several improvements:

  • Added support for evaluating CompiledCode using the CEK machine. A new user guide page explains how to use this functionality.
  • Enhanced ToData and FromData instance generation: product types can now use the List constructor of Data instead of Constr, resulting in improved efficiency.
  • Expanded the API for builtin lists with additional utility functions.

We’ve completed the Plutus section of the blueprint, which we hope will be helpful for those implementing alternative Plutus evaluators. We invite the community to give it a read and share feedback.

Finally, we’ve begun releasing plutus-metatheory on CHaP, paving the way for integrating the certifier into the Plinth compiler.

Low level summary

Key Pull Requests Merged

Issues and Pull Requests In Progress

· 2 min read
Ziyang Liu

High level summary

Over the past two weeks, the Plutus Core team made a range of improvements across Plutus, Plinth, and supporting documentation.

On the Plutus side, we completed conformance tests for the modular exponentiation primitive and added builtin arrays to the Plutus Core specification. We also enhanced error reporting in the CEK machine, making evaluation failures easier to diagnose.

On the Plinth side, we added support for integer equality using (==) from base, which allows for more idiomatic pattern matching on integer literals, such as f 5 = ....

We also made several documentation updates. The Haddock documentation for builtin functions was expanded in PlutusTx.Builtins.Internal. We contributed a new landing page for Plutus to the Cardano Blueprint site to help external teams get started. Lastly, we updated the Builtins Overview to reflect recent changes.

Low level summary

Key Pull Requests Merged

Issues and Pull Requests In Progress

· 2 min read
Ziyang Liu

High level summary

Over the past two weeks, we’ve been working on the Plutus section of the Cardano blueprint, adding documentation to make it easier for developers to implement alternative Plutus Core evaluators.

We’ve also continued improving the Plutus language itself, completing the costing and property-based testing for the modular exponentiation primitive, and thte costing for new built-in array primitives.

For case analysis on Bool, we’re currently evaluating different approaches to ensure we choose the most robust and forward-compatible solution.

On the formal methods side, we made further progress toward the initial release of the certifier. This includes integrating it with the Plinth compiler and exposing plutus-metatheory as a reusable library.

In our most recent Plutus working group meeting - which we've begun publishing publicly - we presented overviews and demos of both the certifier and the built-in arrays. Feel free to check it out.

Low level summary

Key Pull Requests Merged

Issues and Pull Requests In Progress

  • Allow casing on booleans
  • Review the Builtin Values CIP
  • Conformance tests for the modular exponentation primitive (in plutus-private)
  • Fix the certifier for two UPLC forceDelay tests (in plutus-private)
  • Write a landing page and a page about serialization/deserialization for the Cardano blueprint (in plutus-private)
  • Add MSM primitive to Plutus (in plutus-private)