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:
value = 1000 # 1000 milliseconds
String setting might be more readable:
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
— nanosecondsusec
,us
— microsecondsmsec
,ms
— millisecondsseconds
,second
,sec
,s
minutes
,minute
,min
,m
hours
,hour
,hr
,h
days
,day
,d
weeks
,week
,w
months
,month
,M
— defined as daysyears
,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:
value = 512 # 512 bytes
Byte size as a string:
# 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
private_key = { digest = "ed25519", payload = "" }
Type: Socket Address
TODO explain socket addresses
<host>:<port>
localhost:8080
127.0.0.1:1337
sample.com:9090
In TOML it should be specified as a string:
address = "localhost:8000"
Type: Metadata Limits
TODO
Default Metadata Limits
TODO Display the value here