Servers - Mainframe

IBM Blockchain on IBM z Systems: Streamlining business processes

Share this post:

The concept behind blockchain technology borrows from the age-old business practice of using ledgers to record transactions.

In the case of blockchain, the parties have a replicated electronic ledger. Each party can access their authorized data on those replicated ledgers.

Blockchain could lead to sweeping changes in our economy when implemented along with modern technology. It has the potential to streamline the way payments are verified and contracts are validated. Blockchain could affect the process for everything from real estate and car title transfers to financial settlements and corporate debt offerings.

Earlier this month, IBM joined the Hyperledger Project formed by the Linux Foundation to encourage collaboration and create common structures around blockchain. Today, as part of the IBM Blockchain initiative, IBM announced it is contributing code to the project, opening new IBM Blockchain labs and offering new services to advance the technology.

As part of the announcement, IBM is offering IBM Blockchain code on IBM z Systems that will allow developers to create blockchain solutions with unprecedented speed, scale and security.

IBM z Systems and blockchain

IBM z Systems is poised to play a significant role in blockchain development because of its unique capabilities and position in the IT world. IBM z Systems is the system of record for major organizations around the globe, handling the most sensitive data and most critical transactions. Blockchain is a natural extension of IBM z Systems’ role and can utilize data and transactions already on the platform.

IBM z Systems has the potential to take blockchain performance to new levels with the world’s fastest commercial processor, a highly scalable I/O system to handle massive numbers of transactions, ample memory for blockchain operations and an optimized network between z virtual systems in a z box cloud that can speed up blockchain peer communications

Blockchain also can take advantage of IBM z Systems’ security capabilities. IBM z Systems has hardware accelerators which can speed encryption and hashing and tamper-proof security cards for key management. Isolated partitions can also be created in memory to keep ledgers separate and secure.

IBM Research is already exploring the ways IBM z Systems’ capabilities can provide new sophisticated enterprise solutions for blockchain. Smart contracts, in particular, are an area of focus with great promise. These contracts require that a series of actions are completed and agreed upon before a final transaction is validated. APIs can be used to securely access data and transactions on z, building on mission-critical applications already in place.

Blockchain and real-world challenges

Let’s take a look at how these smart contracts could solve a real-world challenge–simplifying the importation of parts in a global supply chain. The traditional process can involve more than 10 parties, 30 documents and weeks to verify. In addition to the companies buying and selling the goods, port authorities, customs, banks and transportation companies are involved.

A smart contract using blockchain can be used to verify each step of the process, allowing the transaction to be completed and payment sent as soon as the final step is completed. Using IBM z Systems for blockchain can speed each step, keep the data secure and leverage processes already in place at the parties involved by connecting them to the blockchain through APIs.

This is just one example of how blockchain and IBM z Systems can streamline the transaction process. The technology could be used for complex corporate finance deals, real estate transactions or tracking medical records–anywhere that transactions need to be validated with scale, speed and the highest levels of security.

If you’re not already exploring blockchain, you should be looking at how it could apply to your organization and finding out how you can use your existing IT infrastructure to support new blockchain initiatives. We’ve just begun to scratch the surface of what this new technology can do, but the potential is immense.

 

Update:  Please visit this link on github for open-source code related to this post: “Building Open Ledger

 

You can find out more about the IBM Blockchain initiative in this IBM announcement.

Add Comment
12 Comments

Leave a Reply

Your email address will not be published.Required fields are marked *


Harry van Irsel

“As part of the announcement, IBM is offering IBM Blockchain code on IBM z Systems that will allow developers to create blockchain solutions with unprecedented speed, scale and security.”

Can I just start playing around with it? Where can I download the code? Is it for free and does it run in a Docker container on SLES 12?


Alex de Carvalho

Harry – please have a look at this blockchain page for developers for more information and to get started: http://www.ibm.com/blockchain/for_developers.html


Donna Dillenberger

URL to download, install and test Blockchain on Z:
https://github.com/linux-on-ibm-z/docs/wiki/Building-Open-Ledger


Donna Dillenberger

Yes, blockchain/z is free. Yes, it runs on SUSE and Redhat. Yes, you can also configure it to run in a Docker container. See URL in 3/6/16 1:12 am post.


Eric

Hi, We are trying to install blockchain/z on RHEL 7.2 on z Systems and everything works ok until we encounter the dockers part. It looks like the instructions are made for a Debian system (Ubuntu probably).

We also tried to follow other openledger instructions to create a docker image, but it failed as follows.

[eric@linuxonz64 container]$ pwd
/home/eric/opwk/src/github.com/openblockchain/obc-peer/openchain/container
[eric@linuxonz64 container]$ go test -run BuildImage_Peer
2016/05/17 08:49:09 Log level not recognized ”, defaulting to ERROR: logger: invalid log level
2016/05/17 08:49:09 setting Number of procs to 2, was 2
2016/05/17 08:49:09 Creating VM with endpoint: unix:///var/run/docker.sock
2016/05/17 08:49:09 rootDirectory = /home/eric/opwk/src
2016/05/17 08:49:13 Failed Peer docker build:

— FAIL: TestVM_BuildImage_Peer (3.63s)
vm_test.go:75: Error building Peer container: dial unix /var/run/docker.sock: connect: no such file or directory

FAIL
exit status 1
FAIL github.com/openblockchain/obc-peer/openchain/container 3.652s

Where can we get some support to help us over this hurdle?
/Eric


Volodymyr Paprotski

Hi Eric, are you sure you ran docker daemon? Please double-check.

I suspect your problem is actually that you are running `go test` as your own user. Myself, I typically just do everything as root, just to skip extra setup steps (since I am the only person on my VM and they are often short-lived, for whatever test I intend to perform).

It is possible to run docker as a regular user (I have done it on my Ubuntu laptop, not my VM), I recommend you look into Docker documentation here https://docs.docker.com/engine/installation/linux/fedora/#create-a-docker-group (typically, you need to add user eric to group docker, so not a big hurdle)


Eric

Thanks for your support!
I’m moving on and now I run into a problem starting Docker as a daemon from root. This is what happens:

docker daemon –dns 10.102.23.20 -s=aufs -r=true –api-enable-cors=true -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock –insecure-registry localhost:5000 &

Warning: ‘-r’ is deprecated, it will be removed soon. See usage.
Warning: ‘–api-enable-cors’ is deprecated, it will be removed soon. See usage.

WARN[0000] /!\ DON’T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON’T KNOW WHAT YOU’RE DOING /!\
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported

Two of the recommended options are deprecated.
When specifying aufs as storage driver I got the fatal error saying that it is not supported.

Any hints to make me move further with this is welcome!

Thanks in advance, Eric


John Harrison

Hi Eric.

There have been significant changes within the Hyperledger Fabric codebase, including instructions to “build out” your own environment. If you would like to build a complete Hyperledger Fabric environment from scratch on a RHEL Linux on z Systems machine/instance, I have recently put together a document that takes you through the process.

See https://github.com/harrijk/docs/blob/master/build-hyperledgerFabric-for-RHEL-linux-on-z.md

The information contained within this document could be used as a reference to wrap some automation around an all RHEL Hyperledger Fabric environment for Linux on z Systems.

If you would like to use Docker images that are Ubuntu-based then I would take a look at:
https://github.com/hyperledger/fabric/blob/master/devenv/setupRHELonZ.sh

The above script is contained within the Hyperledger codebase on Github, and it automates the building of the Hyperledger Fabric components with the assumption that you are starting with a base RHEL 7.x Linux on z Systems instance.

Hope this helps.


Eric

I’ve got difficulties adding to the conversation. I’ll try later.


Eric

Thanks John,

I’m now following your new instructions and I’ve got both the registry and docker up running! Now, when trying to build Hyperledger I get errors related to that go and ld cannot find what it needs to build it.

This is what happens when I run the go builder. I receive the same error for both the peer and the membersrvc.

[eric@linuxonz64 fabric]$ export GOOROOT=/home/lehe08/go
[eric@linuxonz64 fabric]$ export PATH=/home/leh08/go/bin:$PATH
[eric@linuxonz64 fabric]$ export CGO_LDFLAGS=”-lrocksdb -lstdc++ -lm -lbz2 -lsnappy”
[eric@linuxonz64 fabric]$ export CGO_CFLAGS=” ”

[eric@linuxonz64 peer]$ go build
# github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb
../vendor/github.com/tecbot/gorocksdb/backup.go:4:24: fatal error: rocksdb/c.h: No such file or directory
// #include “rocksdb/c.h”
^
compilation terminated.
# github.com/hyperledger/fabric/vendor/github.com/mattn/go-sqlite3
/usr/bin/ld: cannot find -lrocksdb
/usr/bin/ld: cannot find -lbz2
/usr/bin/ld: cannot find -lsnappy
collect2: error: ld returned 1 exit status
[eric@linuxonz64 peer]$

The rocksdb is previously installed and header file is located in my directory /home/eric/rocksdb/include/rocksdb but obviously it cannot be found by the compiler and not by the ld linker tool either. Do I also have to have bz2 and snappy somewhere? What do I have to do to make this work?

Thanks in advance, Eric


John Harrison

Hi Eric.

As part of the build for RocksDB you will need to install the following packages:
gcc-c++ zlib-devel snappy-devel bzip2-devel

I’m not sure if you were using the build document that I referred to or not, but it does take you through the whole process. I have since added manual DIY build documents for SLES and Ubuntu for zSystems which can be found at: https://github.com/harrijk/docs

As to your current setup, it looks like you need to append “-I/home/eric/rocksdb/include” to your CGO_CFLAGS environment variable and append “-L” to your CGO_LDFLAGS environment variable. In addition, you need to run the command “export LD_LIBRARY_PATH=:$LD_LIBRARY_PATH”.

My updated documentation installs RocksDB into /usr/lib. As a result there is no need to adjust the CGO_CFLAGS, CGO_LDFLAGS environment variables, or setup the LD_LIBRARY_PATH.

I have been working on an automation script that will build the entire Hyperledger Fabric environment on a Linux on z Systems instance. This assumes that you are starting from a fresh instance. The script detects which Linux distribution and z Systems model type you are using and builds out the appropriate components. The script also provides you with the ability to build your own “base” Docker image from your running Linux on z Systems instance, which is then used to build a Docker image used by the Hyperledger Fabric peer.

I will add the script to my documentation repository at: https://github.com/harrijk/docs

I hope this helps you out.

Cheers,
John


John Harrison

A couple of minor corrections to my previous post…

For the CGO_LDFLAGS environment variable, the correct value to append is: “-L/path/to-your-rocksdb-directory”.
The export command should have been: export LD_LIBRARY_PATH=”/path/to-your-rocksdb-directory:$LD_LIBRARY_PATH”

It appears that the use of angle brackets “” is interpreted as html. Sorry for the confusion.