Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

TIP-32 Shimmer Protocol Parameters #71

Merged
merged 8 commits into from
Jul 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions tips/TIP-0032/tip-0032.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
tip: 32
title: Shimmer Protocol Parameters
description: Describes the global protocol parameters for the Shimmer protocol
author: Wolfgang Welz (@Wollac) <wolfgang.welz@iota.org>, Levente Pap (@lzpap) <levente.pap@iota.org>
discussions-to: https://github.com/iotaledger/tips/pull/71
status: Draft
type: Standards
layer: Core
created: 2022-04-04
---

# Summary

This TIP describes the global protocol parameters for the Shimmer protocol.

# Motivation

Various other protocol TIPs rely on certain constants that need to be defined for an actual implementation of nodes or other applications using the protocol. This TIP serves as a single document to provide these parameters. It also serves as a historical record of protocol parameter changes.

# Detailed design

## Shimmer Units

The whole Shimmer genesis token supply has been distributed to IOTA token holders who staked their tokens to receive SMR during
the Shimmer staking event:
- Start date: Tuesday, December 28, 2021 3:00 PM CET ([Milestone #2102114](https://explorer.iota.org/mainnet/search/2102114))
- End date: Monday, March 28, 2022 8:12 PM CET ([Milestone #2879714](https://explorer.iota.org/mainnet/search/2879714))
- Results: https://github.com/iotaledger/participation-events/blob/master/results/staking/shimmer.json

[Rewards](https://raw.githubusercontent.com/iotaledger/participation-events/master/results/staking/shimmer.json) are recorded in the base unit of the Shimmer network, `glow`. 1 `SMR` token equals 1,000,000 `glow`.

| Amount in `glow` | Amount in `SMR` |
|------------------------|-----------------|
| 1 glow | 0.000001 SMR |
| 10 glow | 0.00001 SMR |
| 100 glow | 0.0001 SMR |
| 1,000 glow | 0.001 SMR |
| 10,000 glow | 0.01 SMR |
| 100,000 glow | 0.1 SMR |
| 1,000,000 glow | 1 SMR |
| 10,000,000 glow | 10 SMR |
| 100,000,000 glow | 100 SMR |
| 1,000,000,000 glow | 1,000 SMR |
| 10,000,000,000 glow | 10,000 SMR |
| 100,0000,000,000 glow | 100,000 SMR |
| 1,000,000,000,000 glow | 1,000,000 SMR |

**On protocol level, all token amounts are recorded in `glow`. [Outputs](https://github.com/lzpap/tips/blob/master/tips/TIP-0018/tip-0018.md#output-design)
of a [transaction](https://github.com/lzpap/tips/blob/tx-updates/tips/TIP-0020/tip-0020.md#structure) specify the
transfer amounts in `glow`. Graphical user interfaces of explorers, wallets and other tools are recommended to display
transfer amounts in `SMR` denomination.**

## Global Parameters

- Dynamic parameters can be changed via fluid upgrades through [Milestone Announcement](https://github.com/iotaledger/tips/blob/milestone-with-signature-blocks/tips/TIP-0029/tip-0029.md#protocol-parameters-milestone-option).

| Name | Value | Class | Type | Description |
|---------------------------------------|------------------|---------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Network Name | "shimmer" | dynamic | string | Identifier string of the network. Its hash it used for the `Network ID` field in transactions. |
| Protocol Version | 2 | dynamic | uint8 | Protocol version currently used by the network. |
| Max Block Length | 32768 | dynamic | uint32 | Maximum length of a block in bytes. Limits Tangle storage size and communication costs. |
| Max Parents Count | 8 | dynamic | uint32 | Maximum number of parents of a block. |
| Min Parents Count | 1 | dynamic | uint32 | Maximum number of parents of a block. |
| Min PoW Score | 4000 | dynamic | uint32 | Minimum PoW score for blocks to pass syntactic validation. |
| Below Max Depth | 15 | dynamic | uint8 | Below Max Depth is the maximum allowed delta value between Oldest Cone Root Index (OCRI) of a given block in relation to the current Confirmed Milestone Index (CMI) before it gets lazy. |
| | | | | |
| Max Shimmer Genesis Supply | 1450896407249092 | static | uint64 | Total amount of Shimmer genesis supply denominated in `glow`. 1 `glow` = 0.000001 `SMR` |
| Max Inputs Count | 128 | dynamic | uint32 | Maximum number of inputs in a transaction payload. |
| Max Outputs Count | 128 | dynamic | uint32 | Maximum number of outputs in a transaction payload. |
| Max Native Token Count | 64 | dynamic | uint32 | Maximum number of different native tokens that can be referenced in one transaction. |
| | | | | |
| Max Tag Length | 64 | dynamic | uint8 | Maximum length of a `Tag` field in bytes. |
| Max Metadata Length | 8192 | dynamic | uint16 | Maximum length of a `Metadata` field in bytes. |
| | | | | |
| VByte Cost | 100 | dynamic | uint32 | Minimum amount of Shimmer (denominated in `glow`) that need to be deposited per vbyte of an output. |
| VByte Factor Data | 1 | dynamic | uint8 | Weight of `data` fields that determines the relation between actual byte size and virtual byte size. |
| VByte Factor Key | 10 | dynamic | uint8 | Weight of `key` fields that determines the relation between actual byte size and virtual byte size. |
| | | | | |
| SLIP-44 Coin Type (decimal) | 4219 | static | uint32 | Registered coin type (decimal) for usage in level 2 of [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) described in chapter "Coin type". |
| SLIP-44 Path Component (`coin_type'`) | 0x8000107b | static | string | Registered path component for usage in level 2 of [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) described in chapter "Coin type". |
| | | | | |
| Bech32 Human-Readable Part | `smr` | static | string | HRP prefix to use for Bech32 encoded Shimmer addresses. (e.g. `smr1qrhacyfwlcnzkvzteumekfkrrwks98mpdm37cj4xx3drvmjvnep6xhcazjh`) |
| Bech32 Human-Readable Part (Test) | `rms` | static | string | HRP prefix to use for Bech32 encoded Shimmer addresses on test- or development networks. (e.g. `rms1qrhacyfwlcnzkvzteumekfkrrwks98mpdm37cj4xx3drvmjvnep6xrlkcfw`) |

# Rationale for parameter choices

## Proof-of-work

The `Min PoW Score` has been chosen to roughly match the difficulty of a data transaction in the legacy IOTA protocol:
- The payload length (`signatureMessageFragment`) of a legacy transaction is 2187 trytes or 1100 - 1300 bytes depending on the encoding.
- With a minimum weight magnitude (trailing zero trits) of 14, this corresponds to a PoW score of about 4000.

## Transaction and block limits

The blocks parameters `Max Block Length` and `Max Parent Count`, as well as the transaction parameters `Max Inputs Count`, `Max Outputs Count`, `Max Native Token Count`, `Max Tag Length` and `Max Metadata Length` govern the block and transaction validity. Their values have been chosen to ensure functionality of the protocol within constrained resource restrictions. Furthermore, choosing more conservatives values here is preferable as increasing such limits can always been done preserving backward compatibility.

## Dust protection

The `VByte Cost` is the core parameter of the dust protection. The reasoning behind its value is explained in [draft TIP-19 Dust Protection](https://github.com/iotaledger/protocol-rfcs/pull/39).

# Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).