Skip to content

Commit

Permalink
Promote and improve the glossary page (#6493)
Browse files Browse the repository at this point in the history
  • Loading branch information
zliu41 authored Sep 19, 2024
1 parent 4b372ec commit 59db346
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 156 deletions.
153 changes: 0 additions & 153 deletions doc/docusaurus/docs/delve-deeper/glossary.md

This file was deleted.

4 changes: 2 additions & 2 deletions doc/docusaurus/docs/essential-concepts/ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ So a transaction that sends 5 USD from Alice to Bob would do so by spending some

UTXO-based ledgers are more complicated, but avoid some of the issues of account-based ledgers, since any transaction deals only with the inputs that it spends.
Cardano is a UTXO-based ledger, and we heavily rely on this.
For example, [Hydra](../delve-deeper/glossary.md#hydra), Cardano's scalability solution, uses the fact that independent parts of the transaction graph can be processed in parallel to improve throughput.
For example, Hydra, Cardano's scalability solution, uses the fact that independent parts of the transaction graph can be processed in parallel to improve throughput.

## Scripts and the Extended UTXO Model

UTXO-based ledgers typically start out with a very simple model of "ownership" of UTXOs.
An output will have a public key (strictly, the hash of a public key) attached to it, and in order to spend this output, the spending transaction must be signed by the corresponding private key.
We call this a "pay-to-pubkey" output.

Cardano uses an extended model called the [Extended UTXO Model](../delve-deeper/glossary.md#extended-utxo-model) (EUTXO).
Cardano uses an extended model called the [Extended UTXO Model](../glossary.md#extended-utxo-model) (EUTXO).
In the EUTXO model, an output can be locked by (the hash of) a *script*.
We call this a "pay-to-script" output.
A script is a *program* that decides whether or not the transaction which spends the output is
Expand Down
2 changes: 1 addition & 1 deletion doc/docusaurus/docs/essential-concepts/plutus-platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 15

# Plutus platform

The Plutus platform is a platform for writing *applications* that interact with a *distributed ledger* featuring *scripting* capabilities, in particular the [Cardano](../delve-deeper/glossary.md#cardano) blockchain.
The Plutus platform is a platform for writing *applications* that interact with a *distributed ledger* featuring *scripting* capabilities, in particular the [Cardano](../glossary.md#cardano) blockchain.

## Example application

Expand Down
166 changes: 166 additions & 0 deletions doc/docusaurus/docs/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
---
sidebar_position: 15
---

# Glossary

### Address

Each UTXO has an address, which stipulates the conditions for spending the UTXO.

An address on Cardano can be based on either a public key hash, which requires a private key signature corresponding to the public key hash to spend the UTXO, or a script hash, which requires the script with that particular hash to be executed to spend the UTXO.
These are referred to as public key address and script address, respectively.

### Cardano

The blockchain system for which Plutus Core and Plutus Tx are built.

### Contract Blueprint

A contract blueprint enables communication between on-chain code and off-chain code written in different languages.
It is introduced in [CIP-57](https://developers.cardano.org/docs/governance/cardano-improvement-proposals/cip-0057/).
Also see [Producing a Plutus Contract Blueprint](./working-with-scripts/producing-a-blueprint.md).

### Currency Symbol and Token Name

On Cardano, each class of tokens (or asset class) is identified by its currency symbol (also known as currency, or asset group) along with the token name.
The minting and burning of a token are controlled by the Plutus script whose hash corresponds to the token's currency symbol.

Ada/Lovelace is a special asset class where the currency symbol and token name are both empty strings, and it cannot be minted or burned via transactions.

See [_UTXOma: UTXO with Multi-Asset Support_](https://iohk.io/en/research/library/papers/utxomautxo-with-multi-asset-support/).

### Datum

A piece of data attached to a UTXO at a script address.
The datum serves as an input to the script, and is often used to represent the state of a smart contract.

### Extended UTXO Model (EUTXO)

An extended version of the UTXO model, where each UTXO can carry additional data (or "datum"), and be associated with a Plutus script that specifies the conditions under which the UTXO can be spent.
See [_The Extended UTXO Model_](https://iohk.io/en/research/library/papers/the-extended-utxo-model/).

### Guardrail Script

A guardrail script, sometimes referred to as a consitution script or a proposing script, is a Plutus V3 script used to validate two kinds of governance actions: parameter change and treasury withdrawal.
See [Script Purposes](./working-with-scripts/script-purposes.md).

### Hard Fork

A hard fork is an update of the major protocol version, i.e., transitioning the protocol version from `x.y` to `x+1.0`.
A hard fork is required when a backwards incompatible change to the Cardano node is made, causing the old node to reject some blocks produced by the new node.
As a result, old nodes are no longer able to validate the chain, and all participants must upgrade to the new version.
A hard fork is initiated by a transaction that updates the protocol version.
The protocoal version is one of the protocol parameters, and like other protocol parameter changes, a hard fork always takes effect at an epoch boundary.

A hard fork may or may not introduce a new ledger era.
The latter is called an intra-era hard fork.
For example, the Vasil hard fork introduced the Babbage era, and the Chang hard fork introduced the Conway era.
The Valentine hard fork is an example of an intra-era hard fork.

### Ledger Era

A ledger era marks a specific period where new features are added to the Cardano ledger, for instance

- The Alonzo era, which followed the Alonzo hard fork, introduced smart contracts and Plutus V1.
- The Babbage era, which followed the Vasil hard fork, introduced Plutus V2 along with features such as reference scripts and inline datum.
- The Conway era, which followed the Chang hard fork, introduced Plutus V3 and features such as governance actions and voting.

A hard fork is required to introduce a new ledger era, but a hard fork does not necessarily introduce a new ledger era.

### Ledger Language Version

This is what "Plutus V1", "Plutus V2", "Plutus V3" refer to.
See [Different Notions of Version](./essential-concepts/versions) and [Plutus Ledger Language Version](./working-with-scripts/ledger-language-version).

### Minting Policy Script

A Plutus script which must be satisfied in order for a transaction to mint tokens of the corresponding currency.

### Off-chain Code

Code executed by individual applications rather than Cardano nodes.
This includes functions like building, signing, and submitting transactions.
Off-chain code can be developed using libraries like [Mesh](https://meshjs.dev/), [PyCardano](https://pycardano.readthedocs.io/en/latest/) and [Cardano API](https://github.com/IntersectMBO/cardano-api).

### On-chain Code

Code executed directly on the Cardano blockchain by each participating node.
The main function of on-chain code is for nodes to validate transactions, such as checking if a transaction is permitted to spend a UTXO or mint a token.
On-chain code is usually written in a high level language like Plutus Tx, and compiled into Untyped Plutus Core (UPLC).
The Cardano node includes an evaluator that runs UPLC programs.

### The Plugin

The compiler from Plutus Tx to Untyped Plutus Core, which is implemented as a GHC plugin.

### Plutus

The term "Plutus" can refer to Untyped Plutus Core, Typed Plutus Core, or, prior to its renaming to Plinth, Plutus Tx.
To avoid ambiguity, it is advisable not to use "Plutus" on its own.

### Plutus Core

The term "Plutus Core" can refer either to Untyped Plutus Core or Typed Plutus Core, depending on the context.
To avoid confusion, it is recommended to use UPLC for Untyped Plutus Core and TPLC for Typed Plutus Core.

### Plutus IR

An intermediate language that compiles to Plutus Core.
See [Plutus Core and Plutus Tx](./essential-concepts/plutus-core-and-plutus-tx.md).

### Plutus Metatheory

The formalization of typed and untyped Plutus Core.
In the future we may add Plutus IR to the formalization.
It is "meta" in the sense that it is a framework for reasoning about the Plutus Core languages themselves.

### Plutus Script/Validator

A Plutus script, or Plutus validator, is a UPLC program executed on-chain.
Sometimes a program written in a high level language that compiles to UPLC, such as Plutus Tx, is also referred to as a Plutus script.

### Plutus Tx

Plutus Tx is a high-level language for writing the validation logic of transactions. See [Plutus Core and Plutus Tx](./essential-concepts/plutus-core-and-plutus-tx.md).

### Protocol Parameters

Various settings that control the behavior of the Cardano blockchain.

### Protocol Version

A key protocol parameter that indicates the current version of the blockchain protocol in use.
It is in the form of `x.y`, where `x` is the major protocol version and `y` is the minor protocol version.
A hard fork bumps the major protocol version, while a soft fork bumps the minor protocol version.

Protocol versions are closely tied to Cardano node versions.
A node of major version `x` supports up to major protocol version `x`.
Thus after a hard fork that bumps the major protocol version to `x+1`, node version `x` or older will become obsolete, requiring all participants to upgrade their nodes.

### Redeemer

A piece of data included in a transaction that serves as an input to a Plutus script that needs to be executed to validate this transaction.

If a smart contract is regarded as a state machine, the redeemer would be the input that ticks the state machine.

### Script Context

An input to a Plutus script created by the ledger.
It includes details of the transaction being validated.
Additionally, since a transaction may do multiple things, each of which needs to be validated by a separate script, the script context also specifies what exactly the current script is responsible for validating.

### Typed Plutus Core

The typed counterpart of Untyped Plutus Core, and can serve as a low-level IR for compilers targeting Untyped Plutus Core.
See [Plutus Core and Plutus Tx](./essential-concepts/plutus-core-and-plutus-tx.md).

### Untyped Plutus Core

A low-level language for on-chain code, based on untyped lambda calculus, a well-studied formalism for computing.
See [Plutus Core and Plutus Tx](./essential-concepts/plutus-core-and-plutus-tx.md).

### UTXO

UTXO stands for unspent transaction output.
Cardano adopts the UTXO model, one of the two popular ledger models for blockchains, the other one being the account model.

1 comment on commit 59db346

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 59db346 Previous: 4b372ec Ratio
validation-future-pay-out-2 754.1 μs 523 μs 1.44
validation-future-pay-out-3 634.6 μs 546.1 μs 1.16
validation-prism-2 485.9 μs 397.7 μs 1.22
validation-prism-3 512.6 μs 419 μs 1.22
validation-uniswap-4 367.4 μs 324.1 μs 1.13
validation-uniswap-5 1614 μs 1206 μs 1.34
validation-vesting-1 485.3 μs 426.8 μs 1.14
validation-decode-auction_1-4 277.1 μs 193.1 μs 1.44
validation-decode-auction_2-1 274.5 μs 193.2 μs 1.42
validation-decode-auction_2-2 572.3 μs 530.9 μs 1.08
validation-decode-auction_2-3 563.8 μs 529.5 μs 1.06
validation-decode-auction_2-4 753.4 μs 531.9 μs 1.42
validation-decode-auction_2-5 255.5 μs 193.9 μs 1.32
validation-decode-future-pay-out-4 968.9 μs 675.6 μs 1.43
validation-decode-future-settle-early-1 330.5 μs 232.5 μs 1.42
validation-decode-future-settle-early-2 456.1 μs 391.7 μs 1.16
validation-decode-game-sm-success_1-3 605.3 μs 518.3 μs 1.17
validation-decode-game-sm-success_1-4 232.5 μs 165.2 μs 1.41
validation-decode-game-sm-success_2-1 738.8 μs 520.3 μs 1.42
validation-decode-game-sm-success_2-2 233.3 μs 164.2 μs 1.42
validation-decode-game-sm-success_2-3 580.4 μs 519.2 μs 1.12
validation-decode-multisig-sm-10 819.2 μs 674.7 μs 1.21
validation-decode-ping-pong-1 640.8 μs 480.5 μs 1.33
validation-decode-ping-pong-2 515.9 μs 483.3 μs 1.07
validation-decode-stablecoin_2-1 1210 μs 856.5 μs 1.41
validation-decode-stablecoin_2-2 235.3 μs 165.5 μs 1.42
validation-decode-stablecoin_2-3 1206 μs 856.9 μs 1.41
validation-decode-stablecoin_2-4 231.3 μs 162.7 μs 1.42
validation-decode-token-account-1 333 μs 234.1 μs 1.42
validation-decode-token-account-2 238.3 μs 214.1 μs 1.11
validation-decode-uniswap-1 286.9 μs 236.6 μs 1.21
validation-decode-uniswap-2 263.6 μs 233.9 μs 1.13
validation-decode-uniswap-3 1030 μs 727.3 μs 1.42
validation-decode-uniswap-4 255.8 μs 179.9 μs 1.42
validation-decode-uniswap-5 1032 μs 725.9 μs 1.42
validation-decode-uniswap-6 255.2 μs 179.6 μs 1.42
validation-decode-vesting-1 456 μs 322.8 μs 1.41
nofib-clausify/formula2 5821 μs 4446 μs 1.31
nofib-clausify/formula3 15930 μs 11540 μs 1.38
nofib-clausify/formula5 77150 μs 54570 μs 1.41
nofib-knights/4x4 24930 μs 17580 μs 1.42
nofib-knights/6x6 65180.00000000001 μs 46080 μs 1.41
nofib-knights/8x8 114600 μs 80960 μs 1.42
nofib-primetest/05digits 14550 μs 10290 μs 1.41
nofib-primetest/10digits 28430 μs 20480 μs 1.39
nofib-primetest/30digits 86830 μs 61480 μs 1.41
nofib-primetest/50digits 143200 μs 101200 μs 1.42
nofib-queens4x4/bt 7531 μs 5587 μs 1.35
nofib-queens5x5/bjbt1 119700 μs 84640 μs 1.41
nofib-queens5x5/bjbt2 116000 μs 81950 μs 1.42
nofib-queens5x5/fc 245500 μs 173300 μs 1.42
marlowe-semantics/a9a853b6d083551f4ed2995551af287880ef42aee239a2d9bc5314d127cce592 730.4 μs 520 μs 1.40
marlowe-role-payout/0100000100010000000001000100010101000101000001000000010000010000 366.8 μs 259 μs 1.42
marlowe-role-payout/0101000100000101010000010101000100010101000001000001000000010101 282 μs 199.9 μs 1.41
marlowe-role-payout/01dcc372ea619cb9f23c45b17b9a0a8a16b7ca0e04093ef8ecce291667a99a4c 232.1 μs 164 μs 1.42
marlowe-role-payout/371c10d2526fc0f09dbe9ed59e44dcd949270b27dc42035addd7ff9f7e0d05e7 283 μs 260.3 μs 1.09
marlowe-role-payout/452e17d16222a427707fa83f63ffb79f606cc25c755a18b1e3274c964ed5ec99 291.4 μs 268.1 μs 1.09
marlowe-role-payout/46f8d00030436e4da490a86b331fa6c3251425fb8c19556080e124d75bad7bd6 238.5 μs 168.5 μs 1.42
marlowe-role-payout/47364cfaf2c00f7d633283dce6cf84e4fd4e8228c0a0aa50e7c55f35c3ecaa1c 239 μs 169 μs 1.41
marlowe-role-payout/49b8275d0cb817be40865694ab05e3cfe5fc35fb43b78e7de68c1f3519b536bd 246.8 μs 175.4 μs 1.41
marlowe-role-payout/4dd7755b6ca1f0c9747c1fc0ee4da799f6f1c07108e980bd9f820911ad711ff2 319.8 μs 226.9 μs 1.41
marlowe-role-payout/4fbcfdb577a56b842d6f6938187a783f71d9da7519353e3da3ef0c564e1eb344 295.4 μs 209.5 μs 1.41
marlowe-role-payout/5a0725d49c733130eda8bc6ed5234f7f6ff8c9dd2d201e8806125e5fbcc081f9 252 μs 178.5 μs 1.41
marlowe-role-payout/5a2aae344e569a2c644dd9fa8c7b1f129850937eb562b7748c275f9e40bed596 238.5 μs 168.6 μs 1.41
marlowe-role-payout/5ade103e9530dd0d572fe1b053ea65ad925c6ebbe321e873ace8b804363fa82c 332.2 μs 234.9 μs 1.41
marlowe-role-payout/5d4c62a0671c65a14f6a15093e3efc4f1816d95a5a58fd92486bedaae8d9526b 279 μs 198.1 μs 1.41
marlowe-role-payout/5efe992e306e31cc857c64a62436ad2f9325acc5b4a74a8cebccdfd853ce63d2 245.2 μs 173.8 μs 1.41
marlowe-role-payout/622a7f3bc611b5149253c9189da022a9ff296f60a5b7c172a6dc286faa7284fa 285.6 μs 202.5 μs 1.41
marlowe-role-payout/6621a69217f09d91f42876a9c0cecf79de0e29bdd5b16c82c6c52cf959092ec4 268.2 μs 189.8 μs 1.41
marlowe-role-payout/674b0577409957172ad85223c765d17e94c27714276c49c38dfae0a47a561a1e 234.8 μs 165.7 μs 1.42
marlowe-role-payout/6b7bc2b9002a71b33cfd535d43f26334a283d0b9ad189b7cd74baac232c3b9fc 229.1 μs 162.4 μs 1.41
marlowe-role-payout/6c364699767a84059ffd99cf718562a8c09d96e343f23dc481e8ffda13af424f 238.7 μs 169.1 μs 1.41
marlowe-role-payout/6d66bddb4269bdf77392d3894da5341cf019d39787522af4f83f01285991e93c 239.2 μs 169.5 μs 1.41
marlowe-role-payout/73f044f34a30f26639c58bafe952047f74c7bf1eafebab5aadf5b73cfb9024ed 238.7 μs 168.9 μs 1.41
marlowe-role-payout/7b1dd76edc27f00eb382bf996378155baf74d6a7c6f3d5ec837c39d29784aade 239.6 μs 169.7 μs 1.41
marlowe-role-payout/803eae94d62e2afc0e835c204af8362170301bc329e2d849d5f5a47dddf479ec 269.4 μs 190.6 μs 1.41
marlowe-role-payout/87167fc5469adac97c1be749326fa79a6b7862ce68aa4abcb438e3c034bd0899 280 μs 198.8 μs 1.41
marlowe-role-payout/8c0fa5d9d6724c5c72c67e055d4bfc36a385ded7c3c81c08cdbd8705829af6e6 286.5 μs 202.3 μs 1.42
marlowe-role-payout/962c2c658b19904372984a56409707401e64e9b03c1986647134cfd329ec5139 258.2 μs 182.9 μs 1.41
marlowe-role-payout/996804e90f2c75fe68886fc8511304b8ab9b36785f8858f5cb098e91c159dde9 248.9 μs 176 μs 1.41
marlowe-role-payout/a004a989c005d59043f996500e110fa756ad1b85800b889d5815a0106388e1d7 255.1 μs 180.9 μs 1.41
marlowe-role-payout/a0fba5740174b5cd24036c8b008cb1efde73f1edae097b9325c6117a0ff40d3b 265.9 μs 196.2 μs 1.36
marlowe-role-payout/a1b25347409c3993feca1a60b6fcaf93d1d4bbaae19ab06fdf50cedc26cee68d 230.1 μs 162.7 μs 1.41
marlowe-role-payout/a27524cfad019df45e4e8316f927346d4cc39da6bdd294fb2c33c3f58e6a8994 239.2 μs 169 μs 1.42
marlowe-role-payout/a6664a2d2a82f370a34a36a45234f6b33120a39372331678a3b3690312560ce9 288.3 μs 203.8 μs 1.41
marlowe-role-payout/a6f064b83b31032ea7f25921364727224707268e472a569f584cc6b1d8c017e8 239 μs 203.8 μs 1.17
marlowe-role-payout/a7cb09f417c3f089619fe25b7624392026382b458486129efcff18f8912bf302 238.5 μs 168.8 μs 1.41
marlowe-role-payout/a92b4072cb8601fa697e1150c08463b14ffced54eb963df08d322216e27373cb 239.5 μs 169.5 μs 1.41
marlowe-role-payout/af2e072b5adfaa7211e0b341e1f7319c4f4e7364a4247c9247132a927e914753 284.6 μs 201.9 μs 1.41
marlowe-role-payout/b43564af5f13cc5208b92b1ad6d45369446f378d3891e5cb3e353b30d4f3fb10 238.9 μs 169.5 μs 1.41
marlowe-role-payout/b6243a5b4c353ce4852aa41705111d57867d2783eeef76f6d59beb2360da6e90 320.4 μs 227.3 μs 1.41
marlowe-role-payout/b869f3928200061abb1c3060425b9354b0e08cbf4400b340b8707c14b34317cd 354.7 μs 251.1 μs 1.41
marlowe-role-payout/bcdbc576d63b0454100ad06893812edafc2e7e4934fec1b44e2d06eb34f36eb8 239 μs 170 μs 1.41
marlowe-role-payout/bd460b7549b70c52e37b312a4242041eac18fe4a266f018bcea0c78a9085a271 276.7 μs 196.2 μs 1.41
marlowe-role-payout/bd79f4a84db23b7c4cd219d498bd581e085cbc3437957e74a8862281a700700b 274.6 μs 194.9 μs 1.41
marlowe-role-payout/c11490431db3a92efdda70933ba411a0423935e73a75c856e326dbcf6672f3bf 241.9 μs 171.9 μs 1.41
marlowe-role-payout/c4d4c88c5fe378a25a034025994a0d0b1642f10c8e6e513f872327fa895bfc7e 257.1 μs 182 μs 1.41
marlowe-role-payout/c78eeba7681d2ab51b4758efa4c812cc041928837c6e7563d8283cce67ce2e02 256.8 μs 181.6 μs 1.41
marlowe-role-payout/c99ecc2146ce2066ba6dffc734923264f8794815acbc2ec74c2c2c42ba272e4d 290.4 μs 208.4 μs 1.39
marlowe-role-payout/ec4712ee820eb959a43ebedfab6735f2325fa52994747526ffd2a4f4f84dd58e 272 μs 234.6 μs 1.16
marlowe-role-payout/ee3962fbd7373360f46decef3c9bda536a0b1daf6cda3b8a4bcfd6deeb5b4c53 275 μs 194.9 μs 1.41
marlowe-role-payout/f1a1e6a487f91feca5606f72bbb1e948c71abf043c6a0ea83bfea9ec6a0f08d8 239.1 μs 168.8 μs 1.42
marlowe-role-payout/f2932e4ca4bbb94b0a9ffbe95fcb7bd5639d9751d75d56d5e14efa5bbed981df 237.4 μs 168 μs 1.41
marlowe-role-payout/f53e8cafe26647ccce51e4c31db13608aea1f39034c0f52dee2e5634ef66e747 262.4 μs 185.7 μs 1.41
marlowe-role-payout/f7275afb60e33a550df13a132102e7e925dd28965a4efbe510a89b077ff9417f 239.9 μs 169.5 μs 1.42
marlowe-role-payout/fc8c5f45ffcdb024c21e0f34b22c23de8045a94d5e1a5bda1555c45ddb059f82 252.5 μs 178.2 μs 1.42
marlowe-role-payout/ff38b1ec89952d0247630f107a90cbbeb92ecbfcd19b284f60255718e4ec7548 290.9 μs 205 μs 1.42

This comment was automatically generated by workflow using github-action-benchmark.

CC: @IntersectMBO/plutus-core

Please sign in to comment.