Skip to main content

19 posts tagged with "plutus-core"

View All Tags

Plutus Core Team Update

· 3 min read
Ziyang Liu
Software Engineering Lead

High level summary

In the past weeks the Plutus team has added new built-in functions, improved Value support in the ledger API, broadened the conformance test suite, and continued working on Plutus V4 script context and Plutus V4 language features like casing on Data.

Two built-ins from recent CIPs have landed: multiIndexArray (CIP-0156), which reads several elements of an array in one call, and policies (CIP-0168), which returns the currency symbols in a Value. Both are gated behind a future protocol version and not yet costed, so they cannot be used on-chain until Dijkstra.

The conformance test suite now ships .flat files alongside the textual test cases, making it much easier to consume for implementations that do not parse the textual format. The asData pattern synonyms now use built-in list casing. The Value built-in type has been added to the metatheory as postulates, along with a fix to decEq that removed a normalization blowup consuming over 128GB of memory when checking certificates.

We've merged the Plutus V4 script context definition (though it is subject to change), and recently discussed its Data encoding during a Plutus Working Group meeting. You can find the meeting notes here. Implementers of alternative node clients, UPLC interpreters, and compilers targeting UPLC are encouraged to review the notes and contribute to the discussion.

Key Pull Requests Merged

Notable Pull Requests In Progress

Plutus Core Team Update

· 2 min read
Ziyang Liu
Software Engineering Lead

High level summary

In the past weeks, the Plutus team has continued to make improvements across performance, tooling, and assurance.

Performance and compiler improvements. We improved several parts of the Plutus optimization pipeline and ledger API implementation. This includes making common Value operations more efficient, adding a new compiler optimization for certain recursive functions, and fixing an optimization pass so that it preserves program behavior correctly.

Better benchmarking and tooling. We added lightweight benchmarking support to the uplc executable, making it easier to sanity-check execution-time measurements for UPLC scripts and compare results against existing benchmark infrastructure.

Specs and formal methods. We continued strengthening the foundations of Plutus by updating the UPLC specification for the built-in value type and related functions, and by improving the metatheory and certification infrastructure used to reason about compiler transformations. These changes make the formal-assurance workflow easier to maintain, debug, and scale to larger programs.

Key Pull Requests Merged

Plutus Core Team Update

· 2 min read
Ziyang Liu
Software Engineering Lead

High level summary

The Plutus team recently published a blog blog post about the improved uplc command-line tool.

Among other things, the tool can optimize Plutus scripts. Experiments on recent mainnet scripts indicate execution-cost savings of more than 10% on average. So, if you are not already using it, it is worth checking what you may be leaving on the table.

Feedback, bug reports, and ideas for further improvements are very welcome. Please share them by opening issues in the Plutus repository on GitHub.

Further improvements to UPLC optimization have been made in recent weeks and are now integrated into the uplc tool. These include a new --inline-unconditional-growth flag for tuning the aggressiveness of the inliner, Agda certifiers for several optimization passes, a new UPLC constant-folding pass, and a pass that hoists polymorphic builtins to reduce the use of force. Common subexpression elimination (CSE) has also been improved.

Low level summary

Key Pull Requests Merged

Plutus Core Team Update

· 2 min read
Ziyang Liu
Software Engineering Lead

High level summary

The Plutus team has recently made a number of significant improvements to the UPLC executable, including:

  • support for hex-encoded scripts as input (#7655).
  • support for blueprint JSON as input, with the ability to optimize all scripts it contains (#7685).
  • the ability to certify optimizations and generate a certifier report for each optimized validator (#7692).
  • a number of flags to give users control over optimization behavior (#7682).
  • allow evaluating a script using user-supplied input before and after optimization (#7695).

The UPLC executable is included with every Plutus release. While it supports a range of use cases, its most immediately useful feature for most developers is script optimization. Preliminary testing suggests that applying these optimizations to recent mainnet scripts yields, on average, a 10% reduction in execution cost and a 2% reduction in script size.

We are currently working on user documentation for the UPLC executable.

Low level summary

Key Pull Requests Merged

Plutus Core Team Update

· 2 min read
Ziyang Liu
Software Engineering Lead

High level summary

The Plutus team has recently made a number of significant improvements to Plinth, including:

  • Compiler improvements:
    • Added a type checker plugin that preserves source locations, resulting in significantly clearer error messages (#7640).
    • Added a second type checker plugin to detect unsupported Haskell features, further improving error reporting (#7659).
    • Added a driver plugin that automatically sets the required compiler flags and enables the Strict extension (#7687).
  • Language improvements:
    • AsData now generates a destructor function for the data type (#7664). For matching on sum types, the destructor function is more efficient than the pattern synonyms.

The Plinth user guide will be updated soon. In the meantime, please refer to the linked PR descriptions for further details.

Additionally, a new UPLC optimization has been implemented: applications with three or more arguments are now transformed into case-constr form.

Low level summary

Key Pull Requests Merged