Skip to main content

8 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, integers and lists, we are now working on supporting case analysis for unit, pairs, and Data.

  • The required changes to enable all built-in functions, as well as sums-of-products, in all Plutus ledger languages (Plutus V1, V2 and V3) have been implemented in preparation for the upcoming intra-era hard fork.

  • We started developing a surface language benchmark for UPLC, aimed to compare the performances of different surface languages targeting UPLC. We have introduced the first scenario for comparison - computing Fibonacci numbers. More scenarios will be added in the near future.

Plinth

  • The Plinth compiler now compiles Haskell Bool into UPLC's built-in boolean type, instead of sums-of-products or Scott encoded boolean. This makes many scripts smaller and faster.

  • We are planning additional performance and usability improvements, such as inlining recursive bindings, and showing line numbers in compilation errors.

Low level summary

Key Pull Requests Merged

Issues and Pull Requests In Progress

· 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