diff --git a/doc/read-the-docs-site/reference/cardano/language-changes.rst b/doc/read-the-docs-site/reference/cardano/language-changes.rst index e6b09155df1..047cf77917c 100644 --- a/doc/read-the-docs-site/reference/cardano/language-changes.rst +++ b/doc/read-the-docs-site/reference/cardano/language-changes.rst @@ -8,12 +8,12 @@ Language versions See the documentation on :ref:`language versions ` for an explanation of what they are. -Plutus V1 +PlutusV1 ~~~~~~~~~~ ``PlutusV1`` was the initial version of Plutus, introduced in the Alonzo hard fork. -Plutus V2 +PlutusV2 ~~~~~~~~~~ ``PlutusV2`` was introduced in the Vasil hard fork. @@ -29,7 +29,7 @@ The ``ScriptContext`` was extended to include the following information: Examples ------------ -- `Plutus V2 functionalities `_ +- `PlutusV2 functionalities `_ - `How to use reference inputs `_ - `How to use inline datums `_ - `How to reference scripts `_ @@ -53,6 +53,48 @@ Vasil All of the built-in types and functions from ``PlutusV1`` were added to ``PlutusV2``. -The following built-in function was added to ``PlutusV2`` only (i.e., it is not available in ``PlutusV1``). +The following built-in function was added to ``PlutusV2`` only (ie, it is not available in ``PlutusV1``). - ``serializeData`` (proposed in `CIP-42 `_) + +PlutusV3 +~~~~~~~~~ + +Plutus and cryptography teams at IOG, in collaboration with `MLabs `_, continue to develop Plutus capabilities. Starting with the release of `Cardano node v.8.8.0-pre `_, ``PlutusV3`` is available on `SanchoNet `_, introducing the Cardano community to governance features from `CIP-1694 `_ in a controlled testnet environment. + +``PlutusV3`` is the new ledger language that enhances Plutus Core's cryptographic capabilities, offering the following benefits for the smart contract developer community: + +- Providing an updated script context that will let users see `CIP-1694 `_ governance-related entities and voting features +- Interoperability between blockchains +- Advanced Plutus primitives +- Well-known and optimal cryptographic algorithms +- Support for porting of smart contracts from Ethereum +- Creating sidechain bridges +- Improving performance by adding a sums of products (SOPs) feature to support the direct encoding of differrent data types. + +Sums of products +~~~~~~~~~~~~~~~~ + +``PlutusV3`` introduces sums of products - a way of encoding data types that leads to smaller and cheaper scripts compared with `Scott encoding `_, a common way of encoding data types in Plutus Core. + +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, potentially running programs 30% faster. For an in-depth discussion, see `CIP-85 `_. + +New cryptographic primitives +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``PlutusV3`` provides new built-in primitives that expand the language's capabilities. + +- **BLS12-381**: A curve pairing that includes 17 primitives that support cryptographic curves. This is a benefit to sidechain specification implementation and `Mithril `_ integration. +- **Blake2b-224**: A cryptographic hash function for on-chain computation of public-key hashes for the validation of transaction signatures. Supports community projects and contributes to Cardano's versatility. +- **Keccak-256**: A cryptographic hash function that produces a 256-bit (32-byte) hash value, commonly used for secure data verification. Supports Ethereum signature verification within scripts and cross-chain solutions. + +Bitwise primitives +~~~~~~~~~~~~~~~~~~~ + +PlutusV3 initially brings several new bitwise primitives (with more to come at later stages). The introduction of `CIP-58 `_ bitwise primitives will enable the following features: + +- Very low-level bit manipulations within Plutus, supporting the ability to execute high-performance data manipulation operations. +- Supporting the implementation of secure and robust cryptographic algorithms within Plutus. +- Facilitating standard, high-performance implementations for conversions between integers and bytestrings. + +``PlutusV3`` adds two bitwise primitives: ``integerToByteString`` and ``byteStringToInteger``. The remaining primitives will be added to ``PlutusV3`` gradually and will not require a new ledger language.