Skip to content

Commit

Permalink
Point links to GitHub TIPs
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Feb 2, 2024
1 parent d02b54b commit a794b5b
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions tips/TIP-0038/tip-0038.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ Data types and subschemas used throughout this TIP are defined in [TIP-21](../TI

## Protocol Parameters

Protocol parameters used throughout this TIP are defined in [TIP-49](../TIP-0049/tip-0049.md).
Protocol parameters used throughout this TIP are defined in
[TIP-49](https://github.com/iotaledger/tips/blob/tip49/tips/TIP-0049/tip-0049.md).

## Transaction Payload

[TIP-45](../TIP-0045/tip-0045.md) is the basis for output validation in this TIP.
[TIP-45](https://github.com/iotaledger/tips/blob/tip45/tips/TIP-0045/tip-0045.md) is the basis for output validation in
this TIP.

# Output Design Primitives

Expand Down Expand Up @@ -347,7 +349,8 @@ validation rules are detailed in [TIP-20](../TIP-0020/tip-0020.md).

New additions are the <i>Account Address</i> and <i>NFT Address</i> types, which have to be unlocked with their
corresponding unlocks, as defined in [Unlocking Chain Script Locked Outputs](#unlocking-chain-script-locked-outputs),
and the [Account Output](../TIP-0042/tip-0042.md) and [NFT Output](../TIP-0043/tip-0043.md) TIPs.
and the [Account Output](https://github.com/iotaledger/tips/blob/tip42/tips/TIP-0042/tip-0042.md) and
[NFT Output](https://github.com/iotaledger/tips/blob/tip43/tips/TIP-0043/tip-0043.md) TIPs.

<details>
<summary>Address Unlock Condition</summary>
Expand Down Expand Up @@ -391,11 +394,11 @@ and the [Account Output](../TIP-0042/tip-0042.md) and [NFT Output](../TIP-0043/t
</details>
<details>
<summary>Multi Address</summary>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='../TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='https://github.com/iotaledger/tips/blob/tip52/tips/TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
</details>
<details>
<summary>Restricted Address</summary>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='../TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='https://github.com/iotaledger/tips/blob/tip50/tips/TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
</details>
</td>
</tr>
Expand All @@ -410,8 +413,8 @@ Condition</i> specified can only be consumed in a transaction that deposits `Ret
#### Additional Transaction Syntactic Validation Rules

- `Minimum Storage Deposit` is the storage deposit in the base currency required for a
[<i>Basic Output</i>](../TIP-0041/tip-0041.md) that only has an <i>Address Unlock Condition</i>, no additional unlock
conditions, no Mana and no features.
[<i>Basic Output</i>](https://github.com/iotaledger/tips/blob/tip41/tips/TIP-0041/tip-0041.md) that only has an
<i>Address Unlock Condition</i>, no additional unlock conditions, no Mana and no features.
- It must hold true, that `Minimum Storage Deposit``Return Amount``Amount`.

#### Additional Transaction Semantic Validation Rules
Expand Down Expand Up @@ -468,11 +471,11 @@ Condition</i> specified can only be consumed in a transaction that deposits `Ret
</details>
<details>
<summary>Multi Address</summary>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='../TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='https://github.com/iotaledger/tips/blob/tip52/tips/TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
</details>
<details>
<summary>Restricted Address</summary>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='../TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='https://github.com/iotaledger/tips/blob/tip50/tips/TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
</details>
</td>
</tr>
Expand All @@ -494,7 +497,8 @@ expiration.

Slot indices in the Tangle are introduced via slot commitments and represent a notion of time. Each such commitment
carries an index. When using any feature related to time, a
[_Commitment Input_](../TIP-0045/tip-0045.md#commitment-input) is needed as a reference of time.
[_Commitment Input_](https://github.com/iotaledger/tips/blob/tip45/tips/TIP-0045/tip-0045.md#commitment-input) is needed
as a reference of time.

An output that contains a <i>Timelock Unlock Condition</i> can not be unlocked before the specified lock has expired.
The lock is expired when the index of the slot to which the transaction belongs is equal to or past the slot index
Expand Down Expand Up @@ -628,11 +632,11 @@ is allowed to unlock the output containing the <i>Expiration Unlock Condition</i
</details>
<details>
<summary>Multi Address</summary>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='../TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='https://github.com/iotaledger/tips/blob/tip52/tips/TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
</details>
<details>
<summary>Restricted Address</summary>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='../TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='https://github.com/iotaledger/tips/blob/tip50/tips/TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
</details>
</td>
</tr>
Expand Down Expand Up @@ -707,11 +711,11 @@ transaction validation.
</details>
<details>
<summary>Multi Address</summary>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='../TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='https://github.com/iotaledger/tips/blob/tip52/tips/TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
</details>
<details>
<summary>Restricted Address</summary>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='../TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='https://github.com/iotaledger/tips/blob/tip50/tips/TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
</details>
</td>
</tr>
Expand Down Expand Up @@ -776,11 +780,11 @@ disclose their addresses to prove the authenticity of the NFT once it is in circ
</details>
<details>
<summary>Multi Address</summary>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='../TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
<blockquote>Defines a Multi Address that consists of addresses with weights and a threshold value. The Multi Address can be unlocked if the cumulative weight of all unlocked addresses is equal to or exceeds the threshold. Defined in <a href='https://github.com/iotaledger/tips/blob/tip52/tips/TIP-0052/tip-0052.md#multi-address'>TIP-52 (Multi Address)</a>.</blockquote>
</details>
<details>
<summary>Restricted Address</summary>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='../TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
<blockquote>An address that contains another address and allows for configuring its capabilities. Defined in <a href='https://github.com/iotaledger/tips/blob/tip50/tips/TIP-0050/tip-0050.md#restricted-address'>TIP-50 (Restricted Address)</a>.</blockquote>
</details>
</td>
</tr>
Expand Down Expand Up @@ -937,7 +941,7 @@ plugin.
<tr>
<td>Token ID</td>
<td>ByteArray[38]</td>
<td>Identifier of the native token. Its derivation is defined in <a href='../TIP-0044/tip-0044.md#foundry-output'>TIP-44 (Foundry Output)</a>.</td>
<td>Identifier of the native token. Its derivation is defined in <a href='https://github.com/iotaledger/tips/blob/tip44/tips/TIP-0044/tip-0044.md#foundry-output'>TIP-44 (Foundry Output)</a>.</td>
</tr>
<tr>
<td>Amount</td>
Expand Down Expand Up @@ -1013,12 +1017,13 @@ is not globally the same in this example). It shows how the choice of the commit

Suppose that `Minimum Committable Age` is 3 and `Maximum Committable Age` is 10, and there is an Expiration Unlock
Condition with `Slot Index` set to 20. Note the restrictions on the Commitment Input within a transaction relative to a
[Block's `Issuing Time`](../TIP-0046/tip-0046.md#syntactic-validation). If the current slot is 19, the oldest Commitment
the Address owner can pick as the Commitment Input is the one with index = 19-10 = 9 and can therefore unlock the
output, because 20 > 9+10. The newest Commitment the Return Address owner can pick is the one with index 19-3 = 16, and
because 20 <= 16+3 is not true, they cannot unlock. If the current slot is 20, the oldest Commitment the Address owner
can pick is the one with index = 20-10 = 10, but since 20 > 10+10 is not true, they cannot unlock. Now the newest
Commitment the Return Address owner can pick is 20-3 = 17, and because 20 <= 17+3 is true, they can unlock.
[Block's `Issuing Time`](https://github.com/iotaledger/tips/blob/tip46/tips/TIP-0046/tip-0046.md#syntactic-validation).
If the current slot is 19, the oldest Commitment the Address owner can pick as the Commitment Input is the one with
index = 19-10 = 9 and can therefore unlock the output, because 20 > 9+10. The newest Commitment the Return Address owner
can pick is the one with index 19-3 = 16, and because 20 <= 16+3 is not true, they cannot unlock. If the current slot is
20, the oldest Commitment the Address owner can pick is the one with index = 20-10 = 10, but since 20 > 10+10 is not
true, they cannot unlock. Now the newest Commitment the Return Address owner can pick is 20-3 = 17, and because 20 <=
17+3 is true, they can unlock.

If however, the current slot is 18, and both owners would use the same Commitment Input with index 13, within the range
of 8 and 15 of possible commitments, then neither one of them can unlock the output, as neither 20 > 13+10 nor 20 <=
Expand Down

0 comments on commit a794b5b

Please sign in to comment.