• Ubuntu
  • Python
  • Windows
  • VirtualBox
  • Git
  • Docker
  • Windows
Chat
Writy.
No Result
View All Result
My Account
Writy.
No Result
View All Result
sxi
No Result
View All Result

Home OffChain Storage in Hyperledger Fabric

OffChain Storage in Hyperledger Fabric

SXI ADMIN by SXI ADMIN
February 28, 2020
in Blog
Reading Time: 5 mins read
A A
0
Share on FacebookShare on Twitter

In this article, I’ll try to explain the significance of OffChain Storage in Hyperledger Fabric and also the offchaindata application that I have built to demonstrate the offchain storage implementation using the Go Programming language for Hyperledger Fabric.

OnChain and OffChain Transaction

The transaction flow in any blockchain platform is performed in two different layers. The transactions committed to the distributed ledger in the blockchain network is considered to be OnChain transaction and the transactions that are executed outside of blockchain and stored into any collection database such as CouchDB, StateDB are considered to be OffChain.

Blockchain more than just a Storage solution

The concept of blockchain technology is to store a large set of data with the capability of providing the current state for each transaction. The blockchain network will maintain a transaction history log for any changes performed in the distributed ledger data. This kind of technique separates Blockchain from traditional database storage technologies that are only designed to store the data in an organized manner.

Problem with OnChain transaction

In general OnChain transaction takes a longer time to execute. The performance started to lag and takes much longer for the large queue of transactions that are waiting to be executed in the network. There is an extensive cost involved in terms of both business and storage space during OnChain transactions in Blockchain.

OnChain Storage Calculation

IBM has performed an analysis to determine the extensive costs involved in terms of Storage space.

Source: https://www.ibm.com/downloads/cas/RXOVXAPM

Facts

Bitcoin stores 1400 transactions per block.

Hyperledger blocks are 1 megabyte in size and have 1000 transactions per block.

Each blockchain transaction is of 5 KB of the size that creates 205 TPS (transaction per second)

Calculation of storage per TPS

The transaction calculation is performed by comparing a company average working 8 hours per day and 240 days per year.

(1 TPS/1000 TB)*1024 KB*3500 sec/hr*8 hr/day*240 days/year =

7,077,888 KB of data per transaction per year =

6,912 MB = 6.75 GB = .00659 TB/transaction/yr

OnChain Financial costs for Blockchain

IBM also provided the average enterprise-level costs for Hyperledger and Non-Permissioned blockchain such as Ethereum.

IBM Hyperledger costs $1000 per month plus an additional $1000 per active node, so in total cost $6000 per month.

The cost per transaction is Bitcoin is $1.30 and for Ethereum $0.25 per transaction.

In Non-Permissioned blockchain, the per-transaction cost will change based on the current value of cryptocurrency.

The cost for permission-based blockchain such as Hyperledger will vary by increasing of the number of nodes.

So, in comparison with transaction costs, All the non-transaction data such as Pictures, Videos, PDF and other documents should not be stored in the Blockchain ledger.

Solution with OffChain transaction

The OffChain transaction does not store a transaction for every node in the storage space. The peer who is willing to store specific transactions can use offchain storage. OffChain increases computational efficiency that the computation is executed in offchain is deterministic not consensus.

Design Implementation for OffChain Storage

There are many offchain databases available to integrate with Hyperledger Fabric to store transaction details. The offchaindata application that I have built is using CouchDB as offchain storage. There will be a GRPC event listener running that listens to the peers as GRPC client connection.
So, the event listener process each block’s KVWriteSet value into the OffChain storage(CouchDB). The MapReduce technique is used to query offchain data from the CouchDB storage.

Github: https://github.com/Deeptiman/offchaindata

What is MapReduce?

MapReduce is a programming model that is designed to process a large set of data parallelly on a large cluster.

MapReduce has two function

  1. Map — It provides the key-value pair list for a certain collection of documents.
  2. Reduce — It has a smaller set of key-value pairs that process multiple nodes in a collection.

CouchDB uses the MapReduce technique to filter all collection documents. In the following example, we will see how MapReduce works for a User model.

User Model

Collection Documents in CouchDB

User details that stored in CouchDB

So, we will create a MapReduce function to query Emails from the collection.

So, in this way MapReduce works. We can also create a MapReduce function for other nodes to query from the CouchDB.

Conclusion

All the queries performed in the offchain storage space and completely ignoring the onchain ledger. This increases computational efficiency in terms of querying a large set of data. There is no transaction cost involved in performing an offchain query as a similar onchain query has higher transaction costs. In the case of Public Blockchain, OffChain storage can also be used to store sensitive private data as not all the participants in the blockchain network are aware of the additional separate layer of storage is used to store the data.

So, this is the overview of understanding the significant use-case of offchain storage in any blockchain network. Please check the offchaindata application at Github and share your feedback

I hope you find this article useful 🙂

Thanks

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
SXI ADMIN

SXI ADMIN

Related Stories

Hostbillapp Enterprise v2022-05-02 Nulled 2022 and 2019 Theme License Hostbill 2022 nulled

Hostbillapp Enterprise v2022-05-02 Nulled 2022 and 2019 Theme License Hostbill 2022 nulled

by SXI ADMIN
May 17, 2022
0

Demo : https://bitdom.org/ All modue : PowerDNS, SolusVM, Proxmox, OnApp, Openstack, Cloudstack, vSphere, Virtualizor Contact : https://t.me/sxillc Enable auto-charge by...

Link download Kali Linux 2021.2 torrent live cd and Installer

Link download Kali Linux 2021.2 torrent live cd and Installer

by SXI ADMIN
June 3, 2021
0

Live Run Kali Linux https://cdimage.kali.org/kali-2021.2/kali-linux-2021.2-live-amd64.iso Installer 4GB https://cdimage.kali.org/kali-2021.2/kali-linux-2021.2-installer-amd64.iso and full all : https://www.kali.org/get-kali/#kali-platforms

WHMCS 8.2 Beta Nulled

CentOS / RHEL 7 Restart / Stop / Start Networking Command

by SXI ADMIN
May 22, 2021
0

Say hello to systemctl command Use this command to control the systemd system and act as a service manager. CentOS...

WHMCS 8.2 Beta Nulled

WHMCS 8.2 Beta Nulled

by SXI ADMIN
May 20, 2021
0

We're excited to announce the beta release of WHMCS 8.2. Be among the first to try out the new features...

You have a Great  Business Idea?

How to create CentOS 7 and CentOS 8 bootable USB drive in Windows Step

by SXI ADMIN
May 19, 2021
0

Most of tools available to create bootable USB drive doesn’t worked on CentOS 7. Problems like unable to boot, unable to...

Wowza Streaming Engine 4.8.12+1 Crack

by SXI ADMIN
August 24, 2021
0

Tested and working in Windows and Linux. Exclusively for the forum, exactly one day before I post it on the...

Load More
Next Post
Let’s Encrypt? Let’s revoke 3 million HTTPS certificates on Wednesday, more like: Check code loop blunder strikes

Let's Encrypt? Let's revoke 3 million HTTPS certificates on Wednesday, more like: Check code loop blunder strikes

Popular Story

  • EMEDITOR PROFESSIONAL Full Key V11~V19

    645 shares
    Share 258 Tweet 161
  • Plesk Obsidian Lifetime license Key Version 18.0.15

    644 shares
    Share 258 Tweet 161
  • Plesk Onyx + Obsidian 18 Web Host Edition Nulled/Crack

    614 shares
    Share 246 Tweet 154
  • How To Start/Stop/Restart Cron Service In Linux Centos 7

    610 shares
    Share 244 Tweet 153
  • Download Windows Templates for Virtualizor KVM Windows server 2008,2012,2016,2019

    608 shares
    Share 243 Tweet 152
SXI.IO

© 2022 Vps giá rẻ

Navigate Site

  • Ubuntu
  • Python
  • Windows
  • VirtualBox
  • Git
  • Docker
  • Windows

Follow Us

No Result
View All Result
  • Ubuntu
  • Python
  • Windows
  • VirtualBox
  • Git
  • Docker
  • Windows

© 2022 Vps giá rẻ