Iroha 2 requirements

Iroha 2 requirements

General info

Target release

Iroha 2.0 MVP

Document status

DRAFT

Document owner

@Vadim Reutskiy

Tech lead

TBD

Developers

@Nikita Puzankov @Egor Ivkov @Михаил Болдырев

Blockchain advisors

@Kamil Salakhiev, @Andrei Lebedev, Bulat Nasrullin,

Stakeholders

@Yuriy Vinogradov , @武宮誠 , @Zilya Yagafarova , @Pavel Golovkin , Anton Khvorov

QA

Stephan Lavrentev

Goals

  • TBD

Background and strategic fit

TBD

Sources

Assumptions

  • TBD

Table of contents

Changes history

Version Date Comment
Current Version (v. 101) Oct 07, 2020 03:03 Vadim Reutskiy
v. 100 Sept 22, 2020 23:39 Vadim Reutskiy
v. 99 Sept 22, 2020 23:37 Vadim Reutskiy
Reviewed and fixed some FRs, added links to related FRs.
v. 98 Sept 22, 2020 22:54 Vadim Reutskiy
v. 97 Sept 22, 2020 22:51 Vadim Reutskiy
v. 96 Sept 19, 2020 06:07 Vadim Reutskiy
v. 95 Sept 19, 2020 05:55 Vadim Reutskiy
Added NFR0103 about flexibility of permissions
v. 94 Sept 19, 2020 05:30 Vadim Reutskiy
v. 93 Sept 19, 2020 05:28 Vadim Reutskiy
v. 92 Sept 19, 2020 05:21 Vadim Reutskiy
v. 91 Sept 19, 2020 05:20 Vadim Reutskiy
Added NFR0103 about convenient API
v. 90 Sept 19, 2020 03:44 Vadim Reutskiy
Added FR0217 with custom query language
v. 89 Sept 19, 2020 03:43 Vadim Reutskiy
v. 88 Sept 19, 2020 03:35 Vadim Reutskiy
v. 87 Sept 19, 2020 03:25 Vadim Reutskiy
Added NFR0400 with requirement to verifiable and repeatable documentation about decisions
v. 86 Sept 19, 2020 03:18 Vadim Reutskiy
Added NFR0300 about documentation
v. 85 Sept 19, 2020 02:45 Vadim Reutskiy
Added NFD0004 about network capacity for accounts
v. 84 Sept 19, 2020 02:44 Vadim Reutskiy
v. 83 Sept 19, 2020 02:30 Vadim Reutskiy
Filled FR0902 about access delegation
v. 82 Sept 19, 2020 02:19 Vadim Reutskiy
v. 81 Sept 19, 2020 02:09 Vadim Reutskiy
Added FR0114 and FR0216 about non-fungible assets
v. 80 Sept 19, 2020 01:08 Vadim Reutskiy
Added FR0114 about operations with non-fungible assets
v. 79 Sept 19, 2020 00:50 Vadim Reutskiy
v. 78 Sept 16, 2020 04:29 Vadim Reutskiy
v. 77 Sept 16, 2020 04:08 Vadim Reutskiy
v. 76 Sept 16, 2020 04:06 Vadim Reutskiy
v. 75 Sept 16, 2020 03:52 Vadim Reutskiy
v. 74 Sept 11, 2020 05:29 Vadim Reutskiy
v. 73 Sept 11, 2020 05:22 Vadim Reutskiy
Add FR0907 with non-fungible tokens
v. 72 Sept 11, 2020 02:51 Vadim Reutskiy
Update FR0300: add note about reusing the same state.
v. 71 Sept 11, 2020 02:46 Vadim Reutskiy
Update FR0904 according to comments by Iurii
v. 70 Sept 11, 2020 02:28 Vadim Reutskiy
v. 69 Sept 11, 2020 01:17 Vadim Reutskiy
Add NFR0102 about DSL flexibility
v. 68 Sept 11, 2020 00:53 Vadim Reutskiy
Added FR0906 for parliament voting
v. 67 Sept 10, 2020 23:50 Vadim Reutskiy
v. 66 Sept 10, 2020 23:47 Vadim Reutskiy
Added FR0905 with management of MST signatories
v. 65 Sept 10, 2020 05:52 Vadim Reutskiy
v. 64 Sept 10, 2020 05:30 Vadim Reutskiy
v. 63 Sept 10, 2020 05:05 Vadim Reutskiy
Added NFR0102 with requirements to system performance flexibility
v. 62 Sept 10, 2020 04:59 Vadim Reutskiy
Added performance requirements from Sora 2
v. 61 Sept 10, 2020 04:57 Vadim Reutskiy
Added NFR0003 with requirements to the minimal machine configuration
v. 60 Sept 10, 2020 01:22 Vadim Reutskiy
Added NFR0101 for network scalability
v. 59 Sept 10, 2020 01:02 Vadim Reutskiy
Added security requirements NFR0200
v. 58 Sept 09, 2020 23:46 Vadim Reutskiy
Added quality attribute for SDK availability for platforms (NFR0100)
v. 57 Sept 08, 2020 23:36 Vadim Reutskiy
v. 56 Sept 08, 2020 23:32 Vadim Reutskiy
Added details to the FR0903
v. 55 Sept 08, 2020 22:36 Vadim Reutskiy
Added response and measure to the NFR0002
v. 54 Sept 08, 2020 05:30 Vadim Reutskiy
v. 53 Sept 03, 2020 23:49 Vadim Reutskiy
v. 52 Sept 03, 2020 23:48 Vadim Reutskiy
v. 51 Sept 03, 2020 23:47 Vadim Reutskiy
Add FR0113 - sending instructions with payload
v. 50 Sept 03, 2020 23:34 Vadim Reutskiy
v. 49 Sept 03, 2020 05:26 Vadim Reutskiy
v. 48 Sept 03, 2020 04:46 Vadim Reutskiy
v. 47 Sept 03, 2020 04:26 Vadim Reutskiy
v. 46 Sept 03, 2020 04:00 Vadim Reutskiy
v. 45 Sept 03, 2020 03:23 Vadim Reutskiy
v. 44 Sept 03, 2020 01:03 Vadim Reutskiy
Added section for high-level use cases and FR0900 and FR0901 about the fees configuration and application
v. 43 Sept 02, 2020 23:32 Vadim Reutskiy
v. 42 Sept 02, 2020 23:27 Vadim Reutskiy
Added use case for selecting list of transactions FR0214
v. 41 Sept 02, 2020 23:19 Vadim Reutskiy
Update list of participants and roles
v. 40 Sept 02, 2020 23:16 Vadim Reutskiy
v. 39 Sept 02, 2020 23:14 Vadim Reutskiy
Added use cases for CRUD operations of data associated with the account: FR0212, FR0213, FR0112
v. 38 Sept 02, 2020 22:54 Vadim Reutskiy
v. 37 Sept 02, 2020 02:03 Vadim Reutskiy
v. 36 Sept 02, 2020 01:13 Vadim Reutskiy
v. 35 Sept 01, 2020 23:53 Vadim Reutskiy
Added FR0211
v. 34 Sept 01, 2020 23:31 Vadim Reutskiy
v. 33 Sept 01, 2020 23:24 Vadim Reutskiy
Added trigger-related use cases: FR0300-FR0302
v. 32 Sept 01, 2020 04:43 Kamil Salakhiev
v. 31 Aug 30, 2020 04:41 Vadim Reutskiy
v. 30 Aug 30, 2020 04:01 Vadim Reutskiy
v. 29 Aug 30, 2020 02:49 Vadim Reutskiy
v. 28 Aug 30, 2020 02:45 Vadim Reutskiy
v. 27 Aug 30, 2020 02:43 Vadim Reutskiy
v. 26 Aug 27, 2020 04:44 Kamil Salakhiev
v. 25 Aug 27, 2020 04:25 Bogdan Mingela
v. 24 Aug 27, 2020 00:56 Vadim Reutskiy
v. 23 Aug 26, 2020 23:52 Vadim Reutskiy
Added "source" field to all use cases
v. 22 Aug 26, 2020 02:52 Bogdan Mingela
v. 21 Aug 26, 2020 02:19 Iurii Vinogradov
v. 20 Aug 26, 2020 02:14 Iurii Vinogradov
v. 19 Aug 26, 2020 02:02 Kamil Salakhiev
v. 18 Aug 26, 2020 02:00 Kamil Salakhiev
v. 17 Aug 25, 2020 03:57 Vadim Reutskiy
Added FR0208, Subscribing on the query results
v. 16 Aug 25, 2020 03:46 Vadim Reutskiy
v. 15 Aug 25, 2020 03:45 Vadim Reutskiy
v. 14 Aug 25, 2020 03:45 Vadim Reutskiy
v. 13 Aug 25, 2020 03:41 Vadim Reutskiy
v. 12 Aug 25, 2020 03:41 Bogdan Mingela
blocks and pending transactions cases
v. 11 Aug 25, 2020 01:01 Vadim Reutskiy
v. 10 Aug 25, 2020 00:42 Vadim Reutskiy
v. 9 Aug 24, 2020 23:53 Vadim Reutskiy
v. 8 Aug 24, 2020 23:30 Vadim Reutskiy
v. 7 Aug 24, 2020 23:06 Vadim Reutskiy
v. 6 Aug 24, 2020 23:04 Vadim Reutskiy
v. 5 Aug 24, 2020 05:26 Vadim Reutskiy
v. 4 Aug 24, 2020 05:24 Vadim Reutskiy
v. 3 Aug 24, 2020 05:22 Vadim Reutskiy
v. 2 Aug 24, 2020 01:05 Vadim Reutskiy
v. 1 Aug 24, 2020 00:00 Vadim Reutskiy

Requirements

Actors

Actor name

Role definition

Actor name

Role definition

The Iroha peer

One of active peers of the Iroha network, accessible by network for the current user.

The administrator

The user of the Iroha network with the extended rights towards manipulating the peers and network configuration

The user

Generic user of the Iroha network with common list of permissions (required permissions are always mentioned in the use case Preconditions)

Functional requirements

For describing functional requirements, we should follow the default use case template by example:

Use case title

[FR0000] Example use-case; ID should be unique

Use case title

[FR0000] Example use-case; ID should be unique

Status

discuss

Reviewed

decided

postpone

Source

Source (or list of sources) of the function: project name / stakeholder name / document title (e.g., whitepaper) / etc.

Preconditions

  • List of preconditions which must be satisfied before the use case can be applied

  • Each precondition should be defined as the point in the list

Use case flow

  1. The enumerated list of actions, which describes the interaction between actors step by step

  2. Each step should involve a single actor as an object of the action

  3. Each step can involve one or more actors as a subject of the action

  4. Each use case can involve other use cases as dependencies by include or extend relationships

Post-conditions

  • List of post-conditions, one or more results of successfully finished use case

Alternative flow

  • List of alternative flows that can happen with the use case.

  • Each entry should have the link to the step of the main use case flow when the alternative can occur

    • If needed, each entry can contain sub-entries

  • Each entry should describe the consequences of the alternative flow

Exception flow

  • List of exceptions that can happen during the use case flow, which can prevent it to be successfully finished

  • Each entry should have the link to the step of the main use case flow when the exception can occur

    • If needed, each entry can contain sub-entries

  • Each entry should describe the consequences of the exception

Use case ID formula

Assuming, that each section would not have more than 100 use cases, the use case ID should be formed using that template:

FR<section_number> <use_case_number_in_section_starting_from_zero>

For example, for second use case in section 02 it should be:

FR02 01

00. Iroha network operations

❇️❇️❇️

In this section all use cases related to generic operations with Iroha network and peers will be described



Use case title

[FR0001] Starting the Iroha network

Use case title

[FR0001] Starting the Iroha network

Status

discuss

Source

  • Generic blockchain functionality ( @Vadim Reutskiy)

Preconditions

  • The administrator has configured environment for running Iroha executable

  • The administrator has prepared the information for the network configuration (peer addresses and ports, consensus parameters, etc.)

  • The administrator generated key pairs for all accounts, which should be created at the start of the network, including root administrator account if it is required by business requirements

  • The administrator has prepared the genesis block configuration according to the network configuration and business requirements

Use case flow

  1. The administrator launches the command to run Iroha peer and providing the path to the genesis block description

  2. The Iroha peer read and validates the genesis block configuration

  3. The Iroha peer starts the Iroha network according to the configuration in the genesis block

  4. The Iroha peer provides "successfully started" report to the administrator

Post-conditions

  • The Iroha network is running

  • The administrator has access to the root account of the network

Alternative flow

N/A

Exception flow

  • At step 2, in case of the invalid genesis block, the Iroha peer shows corresponding error messages to the administrator and halts the network creation process

Use case title

[FR0002] Adding peer to the Iroha network

Use case title

[FR0002] Adding peer to the Iroha network

Status

discuss

Source

  • Generic functionality ( @Vadim Reutskiy)

Preconditions

  • The Iroha network is running

  • The administrator has access to the account with permissions of adding peers to the network

Use case flow

  1. The administrator configures and starts the new peer

  2. The administrator prepares the transaction with instruction to add the new peer

  3. The administrator sends the prepared transaction to the existing Iroha peer (<<include>> FR0100)

  4. The existing Iroha peer initiates connection with the new Iroha peer

  5. The new Iroha peer synchronizes the block-storage with existing Iroha peers

  6. The new Iroha peer start functioning as fully functional peer in the current Iroha network

Post-conditions

  • The new peer is added into the network

Alternative flow

N/A

Exception flow

  • On step 5, if the synchronization cannot be finished for some reason, the new Iroha peer cannot join the network; use case stops

Use case title

[FR0003] Removing peer from the Iroha network

Use case title

[FR0003] Removing peer from the Iroha network

Status

discuss

Source

  • Basic blockchain functionality (@Vadim Reutskiy)

Preconditions

  • The administrator has access to the account with permission of removing peers form the network

Use case flow

  1. The administrator prepares the instruction to remove the peer from the Iroha network

  2. The administrator sends the transaction with the prepared instruction to the Iroha peer

  3. The Iroha peer confirms the execution of the instruction

Post-conditions

  • The target peer is removed from the current Iroha network and all processes in consensus continues without it

Alternative flow

N/A

Exception flow

N/A

Use case title

[FR0004] Configuring initial state of the Iroha network

Use case title

[FR0004] Configuring initial state of the Iroha network

Status

discuss

Source



Preconditions

  • The Iroha network is just started

Use case flow

TBD - questionable functionality

Post-conditions

  • The Iroha network is configured according to the requirements

Alternative flow

N/A

Exception flow

N/A

Use case title

[FR0005] Changing configuration of working Iroha network

Use case title

[FR0005] Changing configuration of working Iroha network

Status

discuss

Source

  • Sora 2 project

Preconditions

  • The administrator has access to account with permissions to change the network configuration by sending the corresponding instruction

Use case flow

  1. The administrator prepares the data for the instruction for changing the overall Iroha network configuration. Configuration may include

    1. Default time to life (TTL) for pending multi-signature transaction

    2. Maximum transactions in the single block

    3. Maximum time of block filling by transactions (in milliseconds)

    4. TBD

  2. The administrator sends the transaction with prepared instruction to the Iroha peer (<<include>> FR0100)

  3. The Iroha peer return the results of instruction execution to the administrator.

Post-conditions

  • The network configuration is changed correspondingly

Alternative flow

N/A

Exception flow

N/A

Use case title

[FR0006] Changing configuration of the particular peer

Use case title

[FR0006] Changing configuration of the particular peer

Status

discuss

Source

  • Generic peer functionality (@Vadim Reutskiy )

Preconditions

  • The administrator has access to the maintenance endpoint of the target Iroha peer

Use case flow

  1. The administrator connects to the maintenance endpoint of the target Iroha peer

  2. The administrator performs requests to change required parameters of the target Iroha peer

  3. The Iroha peer returns result of change operation to the administrator

Post-conditions

  • The configuration of the target Iroha peer was changed

Alternative flow

N/A

Exception flow

  • On step 3, if the value of changed configuration parameter is out of the limit, the Iroha peer will return "wrong parameter value" error status to the administrator; use case flow stops.

01. Making changes in Iroha network data by Iroha special instructions

❇️❇️❇️

In this section all use cases related to changing data in the Iroha network will be described



Use case title

[FR0100] Sending the transaction to the Iroha network

Use case title

[FR0100] Sending the transaction to the Iroha network

Status

discuss

Source

  • Iroha 2 whitepaper (@武宮誠)

Preconditions

  • The user has an account in the Iroha network

  • The user has prepared the transaction for sending; transactions can consist of several instructions

  • The user has permissions to execute all instruction included in the transaction

  • The Iroha network is working in normal condition

Use case flow

  1. The user sends the transaction to the Iroha peer through the API

  2. The Iroha peer receives the transaction and validates its contents

  3. The Iroha peer checks that the user's account have enough permissions to run all instructions included in the transaction

  4. The Iroha peer executes the transaction by applying it to the current block

  5. The Iroha peer returns the result of the operation to the user

Post-conditions

  • The transaction is successfully executed and applied to the network state

Alternative flow

  • On step 4, if the current user's account is multi-signature, the result of the transaction will be applied to the block-store only when the number of signatures will reach the current quorum value. In other cases, the Iroha peer will return "pending" status as a response on step 5.

Exception flow

  • On step 2, one of the instructions has invalid structure, the Iroha peer returns an error message with description to the user and stops the flow

  • On step 3, if the user's account does not have required permissions to execute one of the instructions, the Iroha peer returns information about that error and stops the flow

  • On step 3, in case of a multi-signature transaction, if the instruction signed using the key pair, which was already used for signing that instruction, the Iroha peer will return "already signed" error status and stop the flow

Use case title

[FR0101] Creation of the account in the Iroha network

Use case title

[FR0101] Creation of the account in the Iroha network

Status