<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Hyperledger Iroha Contributors - Medium]]></title>
        <description><![CDATA[Independent community of people who believe that blockchain can be simple to understand and working on Hyperledger Iroha - Medium]]></description>
        <link>https://medium.com/iroha-contributors?source=rss----c911075fd17e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Hyperledger Iroha Contributors - Medium</title>
            <link>https://medium.com/iroha-contributors?source=rss----c911075fd17e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 22:02:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/iroha-contributors" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Status Streaming In HL Iroha]]></title>
            <link>https://medium.com/iroha-contributors/status-streaming-in-hl-iroha-5503487ffcfd?source=rss----c911075fd17e---4</link>
            <guid isPermaLink="false">https://medium.com/p/5503487ffcfd</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[dlt]]></category>
            <category><![CDATA[iroha]]></category>
            <category><![CDATA[hyperledger-iroha]]></category>
            <category><![CDATA[hyperledger]]></category>
            <dc:creator><![CDATA[Sara Garifullina]]></dc:creator>
            <pubDate>Thu, 01 Aug 2019 10:05:55 GMT</pubDate>
            <atom:updated>2019-08-26T10:42:08.760Z</atom:updated>
            <content:encoded><![CDATA[<h3>Status Streaming In Hyperledger Iroha</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eubSgKKAPK_GwyXLYUDVHg.jpeg" /></figure><p>So, you have created your first transaction or batch of transactions in Iroha, and treasure it so much. Congratulations!</p><p>And now, you want to monitor each step of your transaction’s life? Let’s go for it.</p><p>To eliminate the need to poll a transaction’s status, we created the StatusStream feature to subscribe to a transaction’s status, and keep you up-to-date about what’s going on inside this magic box called Iroha.</p><p>The general scheme of using StatusStream is pretty straightforward:</p><ol><li>You create a transaction</li><li>You subscribe to its StatusStream</li><li>You send the transaction</li><li>You begin to receive updates on its status</li></ol><p>Easy, right?</p><p>You can also subscribe after the transaction has been sent, but beware that quite logically, in this case you might not receive the initial statuses, only those after you subscribed.</p><p>Let’s see what it looks like in Kotlin, using Iroha’s Java library:</p><pre>val tx = Transaction.builder(adminId)<br>    .transferAsset(adminId, &quot;test@test&quot;, &quot;coin#test&quot;, &quot;&quot;, &quot;0.1&quot;)<br>    .sign(adminKeypair)<br>    .build()<br>thread(start = true) {<br>    irohaAPI.txStatus(Utils.hash(tx)).blockingSubscribe {<br>        println(it)<br>    }<br>}<br>irohaAPI.transactionSync(tx)</pre><p>And here is what we will get in the logs with that:</p><pre>tx_status: NOT_RECEIVED<br>tx_hash:&quot;f286893cd029b19b11172ff01b3d07579041ccf61da2a716ee026e8f5f2ec542&quot;</pre><pre>tx_status: STATELESS_VALIDATION_SUCCESS<br>tx_hash:&quot;f286893cd029b19b11172ff01b3d07579041ccf61da2a716ee026e8f5f2ec542&quot;</pre><pre>tx_status: ENOUGH_SIGNATURES_COLLECTED<br>tx_hash:&quot;f286893cd029b19b11172ff01b3d07579041ccf61da2a716ee026e8f5f2ec542&quot;</pre><pre>tx_status: STATEFUL_VALIDATION_FAILED<br>tx_hash:&quot;f286893cd029b19b11172ff01b3d07579041ccf61da2a716ee026e8f5f2ec542&quot;<br>err_or_cmd_name: &quot;TransferAsset&quot;<br>error_code: 2</pre><pre>tx_status: REJECTED<br>tx_hash:&quot;f286893cd029b19b11172ff01b3d07579041ccf61da2a716ee026e8f5f2ec542&quot;</pre><h3>So, what do these statuses mean?</h3><p>There is a ‘status pipeline’ for a transaction in Iroha and it looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9qMpDqmKbmTFpVoz-QzMTw.png" /></figure><p>First of all, it is important to note that there are only <strong>3 final statuses</strong> that will be sent from a non-malicious node:</p><p>STATELESS_VALIDATION_FAILED,</p><p>COMMITTED,</p><p>and REJECTED.</p><p>These statuses are final for the status stream, meaning that once one of these statuses is reached, status streaming stops.</p><p>This doesn’t necessarily mean that the transaction itself has stopped: statuses can be skipped for a particular node (peer), for instance if it’s too slow and the consensus was reached without it. <br>In this situation, the transaction’s lifecycle is not over on the network, even if the status stream for one particular node has stopped, and it is therefore normal to get NOT_RECEIVED or STATELESS_VALIDATION_SUCCESS statuses, and then COMMITTED. <br>So it is possible to receive the status MST_EXPIRED for your node, while the transaction was still received in time by other nodes and confirmed by them. In this case, your own node is not required for consensus, and will simply synchronise with other nodes on COMMITTED or REJECTED.</p><p>Now, let’s review the various statuses StatusStream can send:</p><p><strong>NOT_RECEIVED</strong>: The requested peer does not have information about this transaction. At least not yet ;)<br><strong>Followed by</strong>: any other status.</p><p><strong>ENOUGH_SIGNATURES_COLLECTED</strong>: This means a multisignature transaction has received enough signatures, and is now going to be validated by the peer.<br><strong>Followed by</strong>: stateless validation, that can be either STATELESS_VALIDATION_SUCCESS, or STATELESS_VALIDATION_FAILED.</p><p><strong>MST_PENDING</strong>: This means a multisignature transaction still has to be signed by more keys, as requested in the quorum field.<br><strong>Followed by</strong>: ENOUGH_SIGNATURES_COLLECTED, or MST_EXPIRED.</p><p><strong>MST_EXPIRED</strong>: This means a multisignature transaction is no longer valid, and is going to be deleted by the peer.<br><strong>Followed by</strong>: COMMITTED (especially in the case where the node is too slow and have the transaction expired, but other nodes have validated it), or REJECTED.</p><p><strong>STATELESS_VALIDATION_SUCCESS</strong>: The transaction has successfully passed stateless validation, meaning that it was produced correctly by the client.<br>This status is returned to the client that produced the transaction, immediately after the transaction was sent.<br><strong>Followed by:</strong> STATEFUL_VALIDATION_SUCCESS, or STATEFUL_VALIDATION_FAILED.</p><p><strong>STATELESS_VALIDATION_FAILED</strong>: The transaction was produced with some errors by the client, and therefore doesn’t meet stateless validation constraints.<br>This status is returned to the client that produced the transaction, immediately after the transaction was sent. It will also return the reason of failure, meaning what stateless validation constraint was not met.<br>As this is one of the final statuses in status streaming, after this status is received, the stream will close. Only in the case of a malicious node, will this status not be final.</p><p><strong>STATEFUL_VALIDATION_SUCCESS</strong>: The transaction has successfully passed stateful validation. <br><strong>Followed by</strong>: COMMITTED, or REJECTED.</p><p><strong>STATEFUL_VALIDATION_FAILED</strong>: The transaction includes commands that violate validation rules because they contradict the state of the chain: for instance, asset balances, account permissions, etc.<br>The status will also return the reason of failure, meaning what rule was violated.<br><strong>Followed by</strong>: COMMITTED, or REJECTED.</p><p><strong>COMMITTED</strong>: The transaction received enough votes and is now part of a block, waiting in the block store at the moment. Final status.</p><p><strong>REJECTED</strong>: The transaction was rejected during the stateful validation step, in the previous consensus rounds. Final status.<br>To prevent replay attacks, rejected transactions’ hashes are stored in the block store.</p><p>Finally, you must know that there are<strong> 2 reasons why the StatusStream can be terminated:</strong></p><ol><li>If one of the 3 final statuses (i.e., STATELESS_VALIDATION_FAILED, COMMITTED, or REJECTED) is reached.</li><li>If there were no changes in the transaction’s status for several rounds.</li></ol><p>In either of these cases, StatusStream will stop.</p><p>I hope this was useful and that transaction status streaming in Hyperledger Iroha is now all clear to you!</p><p>If you have any questions about Hyperledger Iroha or StatusStream, please always feel free to contact the community in the chat:<a href="https://chat.hyperledger.org/channel/iroha"> https://chat.hyperledger.org/channel/iroha, </a>or on <a href="https://t.me/hyperledgeriroha">telegram</a>, or leave your questions or topic suggestions for future articles in the comments below.</p><p><strong>More information:<br></strong>About Decentralized Autonomous Economy Sora, based on Hyperledger Iroha: <a href="http://www.sora.org/">www.sora.org</a><br>About Soramitsu, creator of Sora and main contributor of Hyperledegr Iroha: <a href="http://www.soramitsu.co.jp/">www.soramitsu.co.jp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5503487ffcfd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iroha-contributors/status-streaming-in-hl-iroha-5503487ffcfd">Status Streaming In HL Iroha</a> was originally published in <a href="https://medium.com/iroha-contributors">Hyperledger Iroha Contributors</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batches in Iroha]]></title>
            <link>https://medium.com/iroha-contributors/batches-in-iroha-117614cf1e88?source=rss----c911075fd17e---4</link>
            <guid isPermaLink="false">https://medium.com/p/117614cf1e88</guid>
            <category><![CDATA[hyperledger-iroha]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[hyperledger]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sara Garifullina]]></dc:creator>
            <pubDate>Thu, 18 Apr 2019 14:14:14 GMT</pubDate>
            <atom:updated>2019-10-29T14:31:58.871Z</atom:updated>
            <content:encoded><![CDATA[<h3>Transaction Batches in Hyperledger Iroha</h3><p>Hello!</p><p>Today we would like to share Iroha use-case in which you should be very cautious — with atomic and ordered batches.</p><h3>What batches of transactions are available in Iroha?</h3><p>As you probably know, if you are an advanced user of Iroha, or will learn now if you are not, yet:</p><p><strong>Atomic batch</strong> is a batch of transactions, in which all of the transactions should pass stateful validation to be committed. If any of the transactions did not pass, the whole batch will be rejected.</p><p><strong>Ordered batch</strong> is a batch, in which the transactions will be committed in the exact order, set in the batch.</p><p>Batches are a great way to encode some business logic if, for example, you want to exchange something — an atomic batch will only work if both of the transactions are validated.</p><p>Or if you want the commands to follow in the exact order — you can use an ordered batch.</p><h3>Let’s try it out</h3><p>As great as the feature might be, you need to use it carefully. Iroha will store the information that it was a batch of transaction — but not the type of the batch. Let’s try to run a <a href="https://github.com/hyperledger/iroha/blob/master/example/python/batch-example.py">batch example</a>. It will result in the following block being created:</p><pre>{<br>  &quot;blockV1&quot;: {<br>    &quot;payload&quot;: {<br>      &quot;transactions&quot;: [<br>        {<br>          &quot;payload&quot;: {<br>            &quot;reducedPayload&quot;: {<br>              &quot;commands&quot;: [<br>                {<br>                  &quot;transferAsset&quot;: {<br>                    &quot;srcAccountId&quot;: &quot;alice@test&quot;,<br>                    &quot;destAccountId&quot;: &quot;bob@test&quot;,<br>                    &quot;assetId&quot;: &quot;bitcoin#test&quot;,<br>                    &quot;amount&quot;: &quot;1&quot;<br>                  }<br>                }<br>              ],<br>              &quot;creatorAccountId&quot;: &quot;alice@test&quot;,<br>              &quot;createdTime&quot;: &quot;1554800002453&quot;,<br>              &quot;quorum&quot;: 2<br>            },<br>            <strong>&quot;batch&quot;: {<br>              &quot;reducedHashes&quot;: [<br>                &quot;f813bd0590cebfaa5b2bea0bd79ef53e49a946ea4c77a55be1414906dea7a725&quot;,<br>                &quot;215667fc2453ddc055b07cb559c68e25ac7248d190c20784e3c152ad6992541e&quot;<br>              ]<br>            }</strong><br>          },<br>          &quot;signatures&quot;: [<br>            {<br>              &quot;publicKey&quot;: &quot;afbe0a34fbab84e49670a4c7b374a2841ddcd9c1abef70a8de2e513ba8d9db16&quot;,<br>              &quot;signature&quot;: &quot;72f5b2adb812c55ca3577a6beb999aeb4ab558c71706c05940bf8fb47870bcf7515d300729a3ed2954d4054570ccddbb80feddf92189dd77a834dc8f0698bc0c&quot;<br>            },<br>            {<br>              &quot;publicKey&quot;: &quot;ba9c645853baf7718dfa39689a0faca505bf4c0d50f74d2ee4afb200aee8bc19&quot;,<br>              &quot;signature&quot;: &quot;43a068d6a9d308c4685e3d1a36af412c679ff64f920a3784e6bc91c533df6ad128401c05f497429c7b31e61655bf6c13e74f88a004e63a0b6f5ab82cf4705c03&quot;<br>            }<br>          ]<br>        },<br>        {<br>          &quot;payload&quot;: {<br>            &quot;reducedPayload&quot;: {<br>              &quot;commands&quot;: [<br>                {<br>                  &quot;transferAsset&quot;: {<br>                    &quot;srcAccountId&quot;: &quot;bob@test&quot;,<br>                    &quot;destAccountId&quot;: &quot;alice@test&quot;,<br>                    &quot;assetId&quot;: &quot;dogecoin#test&quot;,<br>                    &quot;amount&quot;: &quot;2&quot;<br>                  }<br>                }<br>              ],<br>              &quot;creatorAccountId&quot;: &quot;bob@test&quot;,<br>              &quot;createdTime&quot;: &quot;1554800002453&quot;,<br>              &quot;quorum&quot;: 1<br>            },<br>            <strong>&quot;batch&quot;: {<br>              &quot;reducedHashes&quot;: [<br>                &quot;f813bd0590cebfaa5b2bea0bd79ef53e49a946ea4c77a55be1414906dea7a725&quot;,<br>                &quot;215667fc2453ddc055b07cb559c68e25ac7248d190c20784e3c152ad6992541e&quot;<br>              ]<br>            }</strong><br>          },<br>          &quot;signatures&quot;: [<br>            {<br>              &quot;publicKey&quot;: &quot;63a873f9298e813dbe95b96ffdceae649289180dabe04841a78138c31fa8e518&quot;,<br>              &quot;signature&quot;: &quot;059416bb5eb0321c5e191c709c2ff30d262e65c1a813b84717105eac5bf8ff56d9f4e59867a9ebe9619676b5efcf61715eb81786f4994170e8bb29778287f909&quot;<br>            },<br>            {<br>              &quot;publicKey&quot;: &quot;b3d0b7513a3cac2bc2c25158cb7bbfdb5dda518d92a8fc1070ac217118d87994&quot;,<br>              &quot;signature&quot;: &quot;f7e7feae58c0c4390f9acaf8a8fb0dcbeea543e43fb2294d388ddd23f2926b1c7208dd86296facf8edf18a706cbc59087bde4cac9d92957efd2fbdf80d40bc0c&quot;<br>            }<br>          ]<br>        }<br>      ],<br>      &quot;height&quot;: &quot;5&quot;,<br>      &quot;prevBlockHash&quot;: &quot;567d89b8f73024a7e186cfda8d7b92ba602f05735ae284ef9c41d960b8ebc4fa&quot;,<br>      &quot;createdTime&quot;: &quot;1554800006546&quot;<br>    },<br>    &quot;signatures&quot;: [<br>      {<br>        &quot;publicKey&quot;: &quot;bddd58404d1315e0eb27902c5d7c8eb0602c16238f005773df406bc191308929&quot;,<br>        &quot;signature&quot;: &quot;9c4eb4aa3b111a98265617942a26eb680792794c91ac068255be9c5683b5a62b80f57e8ec502504712406c0e704f1da891fb72918aaa11a5f198b7131a874100&quot;<br>      }<br>    ]<br>  }<br>}%</pre><p>As you can see — the type of the batch is not determined.</p><p>And here is what a block with single transactions will look like if we run a <a href="https://github.com/hyperledger/iroha/blob/master/example/python/tx-example.py">single transaction</a>:</p><pre>{<br>  &quot;blockV1&quot;: {<br>    &quot;payload&quot;: {<br>      &quot;transactions&quot;: [<br>        {<br>          &quot;payload&quot;: {<br>            &quot;reducedPayload&quot;: {<br>              &quot;commands&quot;: [<br>                {<br>                  &quot;addSignatory&quot;: {<br>                    &quot;accountId&quot;: &quot;bob@test&quot;,<br>                    &quot;publicKey&quot;: &quot;63a873f9298e813dbe95b96ffdceae649289180dabe04841a78138c31fa8e518&quot;<br>                  }<br>                },<br>                {<br>                  &quot;setAccountQuorum&quot;: {<br>                    &quot;accountId&quot;: &quot;bob@test&quot;,<br>                    &quot;quorum&quot;: 2<br>                  }<br>                }<br>              ],<br>              &quot;creatorAccountId&quot;: &quot;bob@test&quot;,<br>              &quot;createdTime&quot;: &quot;1554800001380&quot;,<br>              &quot;quorum&quot;: 1<br>            }<br>          },<br>          &quot;signatures&quot;: [<br>            {<br>              &quot;publicKey&quot;: &quot;b3d0b7513a3cac2bc2c25158cb7bbfdb5dda518d92a8fc1070ac217118d87994&quot;,<br>              &quot;signature&quot;: &quot;fc16ebeaeef97821bbf56e0d817f30b85349ba4252e1fdc0fb54b8d78e2f6c0d767c48f58ebe09238bfa049ea7c5a785a9af7ac243657cfc9df85d9f2367ec04&quot;<br>            }<br>          ]<br>        }<br>      ],<br>      &quot;height&quot;: &quot;4&quot;,<br>      &quot;prevBlockHash&quot;: &quot;00f701ff6aed7fbdfbf2998fb403de47e4c1ab83a933fa6d18137cddebd44996&quot;,<br>      &quot;createdTime&quot;: &quot;1554800002380&quot;<br>    },<br>    &quot;signatures&quot;: [<br>      {<br>        &quot;publicKey&quot;: &quot;bddd58404d1315e0eb27902c5d7c8eb0602c16238f005773df406bc191308929&quot;,<br>        &quot;signature&quot;: &quot;de28b5afb1830b8834d5b4551ff7761f937cc9b53c55d25f611b0ffb1c0033b5a10b6971cc491a21d65bd5da62dc5a089050aea6c61fe48092dcef3da8c2b30c&quot;<br>      }<br>    ]<br>  }<br>}%</pre><h3>How to use batches safely in production?</h3><p>This means that you must validate ordered and atomic batches separately on your client side if in your use case this might be an issue.</p><p>For example, if you use a <a href="https://github.com/hyperledger/iroha-java">Java library</a>, validation might look like this:</p><pre>iroha.protocol.TransactionOuterClass.Transaction transaction;</pre><pre>// …</pre><pre>if (transaction.getPayload().getBatch().getType() == TransactionOuterClass.Transaction.Payload.BatchMeta.BatchType.ATOMIC) {</pre><pre>// this is ATOMIC</pre><pre>}</pre><p>I hope you found this interesting!</p><p><strong><em>You are welcome to subscribe to the blog for new posts like this one</em></strong></p><p>🖖</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=117614cf1e88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iroha-contributors/batches-in-iroha-117614cf1e88">Batches in Iroha</a> was originally published in <a href="https://medium.com/iroha-contributors">Hyperledger Iroha Contributors</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>