Background
Iroha has a lot of configuration options, such as `TORII_URL` for client and peer-side web addresses, `BLOCK_STORE_PATH` for path to the blockstore in the OS and `TRANSACTION_RECEIPT_TIME` for peer-to-peer messaging timeouts.
All this parameters should be configured and a lot of them should have an ability to be changed in runtime.
Problem
The problem is to define a concept for Iroha Configuration management. Because parameters differ in their aim, ability to be managed during runtime and other aspects, we may need to have different mechanism for their management which in turn will bring additional complexity to our solution. To keep it simple we need to have a minimum options and differences in it.
To find such a solution we need to make a list of possible configurations first:
- Public and Private keys of Iroha Peer
- Kura configuration:
- Kura Mode (strict or fast)
- Block Store Path
- Sumeragi configuration:
- Peer Id
- Block Time
- List of Trusted Peers
- Maximum Amount of Faulty Peers
- Commit Time
- Transaction Receipt Time
- Torii configuration
- Client-side URL
- Peer-side URL
- Maintenance URL
- Block synchronization configuration:
- Gossip Period
- Batch Size
- Queue configuration:
- Maximum transactions in block
- Transactions time to live
- Logger configuration:
- Maximum Logging Level
- Terminal Color Enabled
- Date Time Format
- Initial configuration is out-of-scope because will be solved in Genesis Block and Network Setup
Now we can analyze each parameter with several criterias:
Parameter | Possible Values | Should it be synchronized between Peers | Should it pass consensus | Can it be applied without restart | Will it affect clients |
---|---|---|---|---|---|
Key Pair | Valid Key Hash | No | No | Yes | Yes |
Kura Mode | strict/fast | No | No | Yes | No |
Block Store Path | Valid Unix path | No | No | With additional development | No |
Peer Id | Valid URL + Key Hash | Yes (Other Peers should update old Id to the new one) | No | With additional development | Yes |
List of Trusted Peers | Valid URL + Key Hash | Yes | Yes | Yes | No |
Block Time | unsigned 128 bit integer | Yes | Yes | Yes | No |
Maximum amount of Faulty Peers | unsigned 32 bit integer | Yes | Yes | Yes | No |
Commit Time | unsigned 128 bit integer | Yes | Yes | Yes | No |
Transaction Receipt Time | unsigned 128 bit integer | Yes | Yes | Yes | No |
Client-side URL | Valid URL | No | No | Yes | Yes |
Peer-side URL | Valid URL | Yes | No | Yes | No |
Maintenance URL | Valid URL | No | No | Yes | Yes |
Gossip Period | unsigned 128 bit integer | Yes | Yes | Yes | No |
Batch Size | unsigned 32 bit integer | Yes? | Yes | Yes | No |
Maximum Transactions Block | unsigned 32 bit integer | Yes? | Yes | Yes | No |
Transaction Time to Live | unsigned 128 bit integer | Yes? | Yes | Yes | No |
Maximum Logging Level | TRACE/INFO/DEBUG/WARN/ERROR | No | No | Yes | No |
Terminal Color Enabled | true/false | No | No | Yes | No |
Date Time Format | String | No | No | Yes | No |