Research, design, and performance evaluation of blockchain-based enterprise applications

Diploma thesis


Author:

Bc. Matúš Revický

Supervisor:

doc. RNDr. Jozef Jirásek, PhD.

Goals:

  • Evaluate capabilities of existing enterprise blockchain frameworks.
  • Design of blockchain-based enterprise application for real-world use case.
  • Implement and evaluate a proof of concept solution.
  • Evaluate performance of developed solution.

Progress:

  • Explore - blockchain in cryptocurrencies, Explore - non-standard applications of blockchain technology. Looking for real life scenario that would benefit from blockchain technology.
  • Containerization technology - Docker: in depth review, some previous knowledge, unfortunately not good enough for distributed environment, required for development environment which consists of CA authorities, orderer(consensus), peer nodes, CouchDB for world state (similar to ledger) …
  • Testing flowchain in local environment. Installed successfully but due to limited documentation and no sample projects it was impossible to use for this thesis. https://github.com/flowchain/flowchain-ledger/wiki
  • Testing Hyperledger Fabric 2.2 in local environment (docker containers). When following documentation few errors occurred, required further understanding of Hyperledger, finally worked
  • Looking for ways on how to manage distributed environment. As the best solution came out Kubernetes - an open-source system for automating deployment, scaling, and management of containerized applications. Testing minikube implementation of kubernetes cluster in local environment (Virtual box with Ubuntu 20). Watching 5-hour tutorial to get overall idea what is possible to achieve with Kubernetes.
  • Integrating demo Hyperledger aplication in Kubernetes cluster, configuring kubernetes cluster... Distributed testing and production environment (simple demo application, this demo contains errors that prevent application from starting, error in chaincode + needed to change some settings in docker_compose.yaml).
  • First language for smart contracts is golang. Due to no previous experience with golang have to study 6-hour tutorial to get overall idea how to follow best practices in golang. There are a few simple samples in documentation, but mostly in golang.
  • First version of use case…
  • Specifing smart contracts in golang. (first version, no tests, later complete remake)
  • Calling smart contracts using Node js REST API. (Simple implementation, no authentication, no users…)
  • Writing aplication flow using Node red, also possibility to simulate sensors. (I stopped frontend development in NodeRed because it was not necessary to call rest api functions from NodeRed. During development it is sufficient to perform those calls using terminal)
  • Studying literature to gain ability to build more complex software solution. (Blockchain network design considerations, better chaincode design, dynamically adding new users with different roles, chaincode mocha testing to speed up development, connecting blockchain network with non-blockchain applications, more realistic use case …)
  • Testing IBM blockchain platform for VScode – without success
  • Automatization of network creation and teardown to speed up development
  • My own idea: Heating distributor + property management + final consumer (Multiple improvements needed, Manager insights (scenario, current processes, assets, participants)) + architectonical design
  • Implementation – enhanced version, complete chaincode revision, chaincode unit testing (Mocha), REST API using Node js + manual testing
  • Searching for possible performance testing solutions. Decided for Caliper, but this tool is not well documented and still in version 0.4. Multiple configurations needed and finally working solution for Hyperledger fabric 2.3 sample chaincode.
  • Multiple benchmarks for my chaincode written (read, update, create…) + problem with fast updating (possible solution implemented), multiple strategies tested. All in virtual box using Ubuntu 20.04
  • Documentation for every aspect of implemented solution. (Development + performance testing)
  • Writing this document
  • ONGOING: refactoring, thesis writing…

Literature:

  • R. Wattenhofer: The Science of the Blockchain, CreateSpace Independent Publishing Platform, 2016, ISBN-13: 978-1522751830
  • I. Bashir: Mastering Blockchain: A deep dive into distributed ledgers, consensus protocols, smart contracts, DApps, cryptocurrencies, Ethereum, and more, Packt Publishing, 2020, ISBN-13: 978-1839213199.
  • N. R. Thota: Mastering Hyperledger Fabric: Master The Art of Hyperledger Fabric on Kubernetes, Independently published, 2020, ISBN-13: 979-8650379720.
  • M. A. Khan, K. Salah: IoT security: Review, blockchain solutions, and open challenges, Future Generation Computer Systems 82 (2018) 395–411.
  • H. H. Pajooh, M. Rashid, F. Alam, S. Demidenko: Hyperledger Fabric Blockchain for Securing the Edge Internet of Things, Sensors 2021, 21, 359. https://doi.org/10.3390/s21020359