Unlocking more opportunities with PlutusV3
PlutusV3 will elevate the developer experience by improving smart contract adoption, bringing support for governance and voting features, and fostering interoperability between blockchains
12 February 2024 5 mins read
PlutusV3, now available for testing on SanchoNet, introduces advanced Plutus primitives and so provides more tools for developers and unlocks more possibilities for writing smart contracts.
Improved developer experience and smart contract adoption are critical to the flourishing smart contract landscape on Cardano. Over the past year, the emergence and growth of a host of community-built developer tooling and alternative languages have added significantly to developer options and the vibrancy of the Cardano builder ecosystem. To continue building out capability, the Plutus and cryptography teams at Input Output Global (IOG) – in collaboration with MLabs – worked on PlutusV3, focusing on performance, throughput, smart contract size, and platform capabilities. With an enriched developer toolkit and better operational efficiency, this upgrade not only reduces costs but also helps bring in new developers.
What is PlutusV3?
PlutusV3 is the new ledger language that enhances Plutus Core's cryptographic capabilities, enabling Cardano to conform with the latest industry standards. The Valentine upgrade a year ago added support for SECP elliptic curves (ECDSA and Schnorr).
The introduction of new cryptographic primitives with V3 helps developers meet industry best practices, use well-known and optimal cryptographic algorithms, port smart contracts from Ethereum, and create sidechain bridges. Besides cryptographic primitives, PlutusV3 improves performance by adding a sums of products (SOPs) feature to support the direct encoding of different data types. Finally, V3 provides an updated script context that will let users see CIP-1694 governance-related entities.
Let’s take a closer look at the new functions.
Sums of products
A common way of encoding data types in Plutus Core is by using the Scott approach. PlutusV3 introduces sums of products – a way of encoding data types that leads to smaller and cheaper scripts compared with Scott encoding.
The sums of products approach aims to boost script efficiency and improve code generation for Plutus Core compilers. The changes involve new term constructors for packing fields into constructor values and efficient tag inspection for case branches. The benefit is the potential for programs to run 30% faster, which is a significant performance optimization, streamlining operations and ensuring swift execution of smart contracts. For more details, see CIP-85.
New cryptographic primitives
Central to every blockchain is the use of cryptographic primitives, encompassing hash functions, digital signatures, and zero-knowledge proof (ZKP) systems. These foundational elements are crafted for computational efficiency, ensuring robust security tailored to their respective applications. The outcome is a set of security assurances that establish a trustless ecosystem, facilitating smooth engagement with Cardano's peer-to-peer (P2P) network and its decentralized applications (DApps).
In the Plutus language, built-in functions are those not explicitly defined within the script but are part of the language's runtime environment. Using these functions allows the interpreter to furnish an optimized implementation specific to its system when executing the script. Built-in functions execute frequently-used, well-defined operations, encompassing arithmetic, control, and other crucial tasks. As we delve into PlutusV3, let's explore the new built-in primitives that will enrich the language's capabilities:
- BLS12-381 – this curve pairing includes 17 primitives that support cryptographic curves, which allows for efficient verification of zero-knowledge proofs. This can be used to check Mithril certificates, make sidechain checkpoints even more succinct, or create layer 2 solutions to provide scalability (through ZK rollups).
- Blake2b-224 – a cryptographic hash function for on-chain computation of public-key hashes for the validation of transaction signatures. Implementation of Blake2b-224 supports community projects, contributing to Cardano's versatility and adoption by accommodating various applications.
- Keccak-256 – a cryptographic hash function that produces a 256-bit (32-byte) hash value, commonly used for secure data verification. Keccak-256 supports Ethereum signature verification within scripts. This is crucial for cross-chain solutions and facilitates community projects by expanding use cases on Cardano.
Empowering developers with bitwise primitives
The introduction of CIP-58 bitwise primitives will provide developers with robust capabilities for low-level bit manipulations. This addition offers developers profound benefits in both performance optimization and cryptographic functionality. With their incremental deployment plan, bitwise primitives ensure a seamless integration process and foster a robust environment for developers to build powerful and efficient solutions on Cardano.
Bitwise primitives enable the following features:
- Performance boost. Bitwise primitives introduce the capability for very low-level bit manipulations within Plutus. This capability lays the foundation for executing high-performance data manipulation operations, a crucial aspect for developers seeking efficient solutions. CIP-58 will add a class of low-level functions for highly efficient algorithms and data structures.
- Cryptographic support. Bitwise primitives are essential for supporting cryptographic functions. These primitives allow the implementation of secure and robust cryptographic algorithms within Plutus.
- Integer-bytestring conversions for smooth integration. Bitwise primitives facilitate standard, high-performance implementations for conversions between integers and bytestrings. This ability is essential because the primitives require arguments in bytestring format, while data is often presented in integer format.
The Plutus upgrade will add two bitwise primitives: integerToByteString
and byteStringToInteger
. The remaining primitives will be added to PlutusV3 gradually. Going forward, such upgrades won’t require a new ledger language. This incremental deployment approach ensures a systematic integration of these powerful features into the Plutus language.
Starting with the release of Cardano node v.8.8.0-pre, PlutusV3 is now available on SanchoNet, introducing the Cardano community to governance features from CIP-1694 in a controlled testnet environment.
Conclusion
Among its benefits, PlutusV3 offers greater efficiency, optionality, and ease of use to the Cardano builder community – all key to nurturing developer adoption. Prioritizing aspects such as performance, throughput, smart contract size, and platform capabilities ensures that Cardano developers can use the latest standards. These improvements facilitate the smooth migration of smart contracts from Ethereum, enable the creation of sidechain bridges, and ultimately contribute to the expansion of the Cardano ecosystem.
Follow IOG X (Twitter) for further announcements.