Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Sending Iroha Queries

Conceptual View

This section describes the object model of the design.

Layers

According to Dan Boneh Blockchain applications may be divided into four layers:

3User Interface
2Applications
1.5Compute Layer
1Consensus Layer

We will use this classifications to group Iroha components and 3rd party components that can be integrated with Iroha components.

Components

LayerComponentsDescription
User Interface

Iroha Clients + 3rd Party Clients

Web/Mobile/CLI

User Facing Services
ApplicationsIroha Modules + Custom Iroha Special InstructionsRun on blockchain computer
Compute LayerIroha + Iroha Modules + Iroha Special InstructionsApplication logic is encoded in a program that runs on blockchain
• Rules are enforced by a public program (public source code)
➔ transparency: no single trusted 3rd party
• The APP program is executed by parties who create new blocks
➔ public verifiability: anyone can verify state transitions
Consensus Layer

Iroha

Sumeragi

A public data structure (ledger) that provides:

  • Persistence: once added, data can never be removed
  • Consensus: all honest participants have the same data
  • Liveness: honest participants can add new transactions
  • Open(?): anyone can be a participant (no authentication)


Expand
titlePlant UML


No Format
nopaneltrue
@startuml
cloud "User Interface" {
  [Mobile Application]
  [Web Application]
  [Command Line Interface]
}


database "Compute Layer" {
  [Iroha]

  node "Applications" {
    [Iroha Substrate]
  }

  folder "Consensus" {
    [Sumeragi]
  }
}


[Mobile Application] --> [Iroha]
[Web Application] --> [Iroha]
[Command Line Interface] --> [Iroha]
@enduml



Application Programming Interface

FunctionalityProviderDescription
Submission of Iroha Special InstructionsClients

Clients receive declaration of desired actions from users in form of Iroha Special Instructions.

They build a Transaction from them, use User's cryptographics keys to Sign it (optionally?) and send them to Iroha.

Sending of Iroha QueriesClients

Clients receive declaration of desired search results from users in form of Iroha Queries.

They build a Request from them, use User's cryptographics keys to Sign it (optionally) and send them to Iroha.

Execution of Iroha Special InstructionsIroha

Iroha receives Transactions from Clients and process them in cooperation with Applications and Consensus.

More on that in Process View Section.

Execution of Iroha QuerisIrohaIroha receives Queries from Clients and execute them. More on that in Process View Section.

Process View

This section describes the activities of the system, captures the concurrency and synchronization aspects of the design.

Clients ↔ Peers Communications

Let's start with Iroha Peers - as described in WhitePaper, Iroha as a system is build on top of a Peer to Peer Network.

So by Peer we will assume every Iroha instance  up and running.

Expand
titlePlant UML


No Format
nopaneltrue
@startuml
'default
top to bottom direction
:User Interface: --> (Submit Iroha Special Instruction)
:User Interface: --> (Send Iroha Query)
@enduml


So basically we have two main interaction scenarios:

Submission of Iroha Special Instructions

Every User Interface will use `iroha-client` under the hood, so we will look at the sequence with it:

PlantUML diagram

Expand
titlePlant UML


No Format
nopaneltrue
@startuml
actor "User" as user
participant "Iroha Clinet" as client
participant "Iroha Network" as network
participant "Iroha" as iroha
participant "Transactions Queue" as queue

user -> client: submit(Instruction) 
client -> client: build_transaction(Instruction)
client -> client: sign(Transaction)
client -> network: send(Transaction)
network -> iroha: request
iroha -> iroha: accept(Transaction)
alt successful case
  iroha -> queue: push(Transaction)
  iroha -> network: response(Ok)
  network -> client: Ok
  client -> user: Confirmation
else some kind of failure
  iroha -> network: response(Error)
  network -> client: Error
  client -> user: Error Message
end
@enduml


Sending Iroha Queries

PlantUML diagramImage Added

Expand
titlePlant UML


No Format
nopaneltrue
@startuml
actor "User" as user
participant "Iroha Clinet" as client
participant "Iroha Network" as network
participant "Iroha" as iroha
participant "World State View" as view

user -> client: request(Query) 
client -> client: sign(Query)
client -> network: send(Query)
network -> iroha: request
iroha -> view: execute(Query)
alt successful case
  view -> iroha: QueryResult
  iroha -> network: response(Ok(QueryResult))
  network -> client: Ok(QueryResult)
  client -> user: Result
else some kind of failure
  iroha -> network: response(Error)
  network -> client: Error
  client -> user: Error Message
end
@enduml


Physical View

This section describes the mapping of software onto hardware and reflects its distributed aspect.

Development View

This section describes the static organization or structure of the software in its development of environment.

Scenarios


Table of Contents
maxLevel2
outlinetrue
absoluteUrltrue

Contributors
includeauthors, comments
showCounttrue

Change History
limit10