|
1 | 1 | ---
|
2 | 2 | CIP: 33
|
3 | 3 | Title: Reference scripts
|
| 4 | +Status: Active |
| 5 | +Category: Plutus |
4 | 6 | Authors:
|
5 | 7 | - Michael Peyton Jones <[email protected]>
|
6 | 8 | Implementors:
|
7 | 9 | - Michael Peyton Jones <[email protected]>
|
8 | 10 | - Jared Corduan <[email protected]>
|
9 |
| -Status: Active |
10 |
| -Category: Plutus |
| 11 | +Discussions: |
| 12 | + - https://github.com/cardano-foundation/CIPs/pull/161 |
| 13 | + - https://github.com/cardano-foundation/CIPs/pull/213 |
11 | 14 | Created: 2021-11-29
|
12 | 15 | License: CC-BY-4.0
|
13 |
| -Requires: CIP-31 |
14 | 16 | ---
|
15 | 17 |
|
16 |
| -# Reference scripts |
17 |
| - |
18 | 18 | ## Abstract
|
19 | 19 |
|
20 | 20 | We propose to allow scripts ("reference scripts") to be attached to outputs, and to allow reference scripts to be used to satisfy script requirements during validation, rather than requiring the spending transaction to do so.
|
21 | 21 | This will allow transactions using common scripts to be much smaller.
|
22 | 22 |
|
23 |
| -## Motivation |
| 23 | +## Motivation: why is this CIP necessary? |
24 | 24 |
|
25 | 25 | Script sizes pose a significant problem. This manifests itself in two ways:
|
26 | 26 | 1. Every time a script is used, the transaction which caused the usage must supply the whole script as part of the transaction. This bloats the chain, and passes on the cost of that bloat to users in the form of transaction size fees.
|
@@ -64,7 +64,7 @@ transaction_output =
|
64 | 64 | ```
|
65 | 65 | TODO: can we use a more generic type that allows _any_ script in a forwards-compatible way?
|
66 | 66 |
|
67 |
| -## Rationale |
| 67 | +## Rationale: how does this CIP achieve its goals? |
68 | 68 |
|
69 | 69 | The key idea of this proposal is stop sending frequently-used scripts to the chain every time they are used, but rather make them available in a persistent way on-chain.
|
70 | 70 |
|
@@ -123,3 +123,17 @@ We can't really present the information about reference scripts to them in a fai
|
123 | 123 | We could omit the information entirely, but this is dangerous in a different way.
|
124 | 124 | Omitting information may lead scripts to make assumptions about the transaction that are untrue; for this reason we prefer not to silently omit information as a general principle.
|
125 | 125 | That leaves us only one option: reject transactions where we would have to present information about reference scripts to old scripts.
|
| 126 | + |
| 127 | +## Path to Active |
| 128 | + |
| 129 | +### Acceptance Criteria |
| 130 | + |
| 131 | +- [x] Fully implemented in Cardano as of the Vasil protocol upgrade. |
| 132 | + |
| 133 | +### Implementation Plan |
| 134 | + |
| 135 | +- [x] Passes all requirements of both Plutus and Ledger teams as agreed to improve Plutus script efficiency and usability. |
| 136 | + |
| 137 | +## Copyright |
| 138 | + |
| 139 | +This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode). |
0 commit comments