Description
Hyperledger Iroha 1 has a great set of commands and queries, but some useful commands and queries are missing. Iroha 1 blockchain can be the core of banking systems, because it supports transactions, multiple currencies, etc. Nevertheless, advanced filtering of transactions is only partially available in Iroha 1, and it is necessary for banking systems. Currently to filter transactions, we need to return many of them and filter with our code - it is much heavier for both Iroha's node and client application.
During the internship project, queries should be extended with optional arguments:
what | which queries | extra information | reason |
---|---|---|---|
Add optional argument, description | GetAccountAssetTransaction | Not present in WSV. Probably the most important param. | Sometimes we need to find transactions containing some text/words. It would be great if it would be possible to have multiple fragments in the query (e.g. when we want to find transactions in the bank, we use some words which we think would be there, but we are not sure what order). |
Add optional argument, destinationAccount | GetAccountAssetTransaction | Not present in the WSV database. Probably the most important param. | Sometimes we need to check all transactions sent to a specific account. |
Add optional argument, sourceAccount | GetAccountAssetTransaction | Not present in the WSV database. | Sometimes we need to check all transactions sent from a specific account. |
Add an optional argument, creatorAccount | Not present in the WSV database. This parameter is probably the easiest to implement. | It is allowed to grant permission using can_transfer_my_asset . Also, the root user can transfer something from one account to another. We want to be able to list such transactions with a creatorAccount call. | |
Add optional argument, commandName | GetAccountTransactions | Not present in the WSV database. | Sometimes we need to get a history of a specific command, e.g. AddAssetQuantity, GrantPermission. |
GetAccountAssetTransaction has a parameter account_id, which returns all transactions for the account; it is currently impossible to specify only the destination/source/tx creator account, so it needs to be fixed.
Optionally - there is a bug in Iroha 1 when we use ordering. However, this internship is connected to querying databases, so the mentee may be able to fix it.
If the mentee is unable to implement queries, they can add an optional description to commands as an alternative: AddAssetQuantity
and SubtractAssetQuantity;
Currently the information on why it was added or subtracted is unavailable. It can be hard to get help, though: HL Iroha 1 is not under active development.
After applying changes to queries/commands, Iroha client libraries should also be updated (probably regenerate code from the protocol buffers).
Client libraries:
- Iroha-python library
- Iroha-java library
- Iroha-javascript library
- Iroha-ios library
- Iroha-cpp (embedded in Iroha core repository)
It would also be helpful if the queries would be updated for Smart Contracts in solidity.
Additional Information
- Hyperledger Iroha 1 and 2 (documentation, wiki, source code, API documentation)
- Iroha-python library
- Iroha-java library
- Iroha-javascript library
- Iroha-ios library
- Iroha-cpp library
- Iroha 1 is not under active development anymore. It is not sure if the project will be active after a year. Iroha 1 has a community that is using the framework.
Learning Objectives
The mentee will be able to learn the following:
- the architecture of Iroha (1.x),
- work in the true spirit of open-source, communicating with the Iroha community, joining calls, etc.
- writing documentation,
- following rules of the open-source code of Hyperledger Iroha
- creating automatic tests of code
Expected Outcome
- Implementation according to description and plan of documentation and tests.
- Added the possibility of running modified queries from Iroha's client libraries.
- Present changes during the Iroha bi-weekly meeting at the end of the internship.
Relation to Hyperledger
Hyperledger Iroha (documentation, wiki)
Internship project adding Iroha-cpp library in 2022: Implement iroha-cpp library for Hyperledger Iroha 1
Internship project to add extra params to queries GetAccountTransactions and GetAccountAssetTransactions in 2021: Extend HL Iroha queries with optional arguments
Internship project which was adding extra command and queries in 2020: Making HL Iroha Data Model Modular for Interoperability with Other Projects
Mentee Skills
- Reading English documentation
- C++ advanced
- Git
- basic knowledge of Protobuf
- CMake
- Python, Java or JavaScript
- JSON
- Postgres and RocksDB
Mentee Open Source Contribution Experience
This project is dedicated to C++ developers, so candidates should attach a short video where they would say something about one of their previous projects.
Future plans
Adding those optional arguments would make it easier for future mentees to modify existing commands and queries or add more to Iroha 1.
Links
"Iroha 1: extend queries with optional arguments" mentorship page on the LFX platform.
Mentor(s) Names and Contact Info
Andrzej Gruntowski
email: andrzejggru@gmail.com
Discord: Byte#5828
Grzegorz Bazior (AGH University of Science and Technology and Yonix Digital Systems)
email: bazior[you know what]agh.edu.pl
Telegram: @baziorek - preferred
Discord: baziorek#9186
Aleksandr Petrosyan
email: petrosyan@soramitsu.co.jp
Telegram: @m3lcore