Skip to content

Glossary

This page contains the definitions and brief explanations of data types and topics shared across multiple configuration parameters.

Numeric Types

TODO Explain the limitations of different numeric types, like u8 and u64.

Type: Duration

Duration might be specified in two ways:

  • As a Number, which will be considered an amount in milliseconds
  • As a String, which will be parsed as a human-readable string

Numeric setting is straightforward:

toml
value = 1000 # 1000 milliseconds
value = 1000 # 1000 milliseconds

String setting might be more readable:

toml
value1 = "1sec"
value2 = "1hour 12min 5s"
value3 = "2years 2min 12us"
value1 = "1sec"
value2 = "1hour 12min 5s"
value3 = "2years 2min 12us"

The duration string is a concatenation of time spans. Each time span is an integer number and a suffix. Supported suffixes:

  • nsec, ns — nanoseconds
  • usec, us — microseconds
  • msec, ms — milliseconds
  • seconds, second, sec, s
  • minutes, minute, min, m
  • hours, hour, hr, h
  • days, day, d
  • weeks, week, w
  • months, month, M — defined as days
  • years, year, y — defined as days

TODO: put link to humantime crate? It is an implementation detail.

Type: Multi-hash

TODO Describe what the hell this is

Type: Byte Size

Byte size values might be set in two ways:

  • As a Number, which will be considered an amount in bytes
  • As a String, which will be parsed as a human-readable string

Byte size as a number:

toml
value = 512 # 512 bytes
value = 512 # 512 bytes

Byte size as a string:

toml
# 42 bytes
value1 = "42"
value2 = "42b"
value3 = "42bytes"

# 1 kilobyte = 1000 bytes
value4 = "1KB"

# 1 kilobyte (binary format) = 1024 bytes
value5 = "1KiB"

# Combination of multiple
value412 = "1GB 5MB"
# 42 bytes
value1 = "42"
value2 = "42b"
value3 = "42bytes"

# 1 kilobyte = 1000 bytes
value4 = "1KB"

# 1 kilobyte (binary format) = 1024 bytes
value5 = "1KiB"

# Combination of multiple
value412 = "1GB 5MB"

Iroha can parse sizes in bytes, kilobytes, megabytes, gigabytes, terabytes, and petabytes.

The format of suffixes:

  • {size}iB: Binary size
  • {size}B: Decimal size

TODO: haven't found a rust lib for that. There is a Python one (humanfriendly) I used for reference.

TODO: article explains kb, kB, KiB difference. Consider it for the format.

Type: Private Key

TODO explain private key

toml
private_key = { digest = "ed25519", payload = "" }
private_key = { digest = "ed25519", payload = "" }

Type: Socket Address

TODO explain socket addresses

<host>:<port>
<host>:<port>
localhost:8080
127.0.0.1:1337
sample.com:9090
localhost:8080
127.0.0.1:1337
sample.com:9090

In TOML it should be specified as a string:

toml
address = "localhost:8000"
address = "localhost:8000"

Type: Metadata Limits

TODO

Default Metadata Limits

TODO Display the value here