Skip to Content
Product Information
Author's profile photo Rudramani Pandey

MultiChain on SAP Cloud Platform

Content:

  1. Introduction
  2. What is Multichain
  3. Pros and Cons of Private Blockchains
  4. Mining in Multichain
  5. Configuration of Blockchain in Multichain
  6. Implementation of MultiChain using SAP Cloud Platform
    1. Generic Architecture
    2. Setup of MultiChain on Cloud Platform

Introduction

With boom in bitcoin and expansion of blockchain based platforms, a private blockchain network was introduced by Multichain for Enterprises and finance sectors. In this blog, we will explore multichain and how SAP has integrated it in to its cloud platform. Before we start with Multichain, please read What is Blockchain?

What is Multichain

Multichain is a platform which uses integrated management of user permissions to create private blockchains. It is derived from bitcoin. It supports Windows, Linux and Mac servers. Multichain was developed to overcome shortcomings of Bitcoin such as generic mining, privacy and openness.

Pros and Cons of Private Blockchains

Private blockchains are the one that are controlled by single or multiple organizations that determines who can read it, submit transactions to it, and participate in the consensus or mining process. This brings both advantages and disadvantages with itself.

It does not support smart contracts. As per SAP, “Since they are 100% centralized, private blockchains are useful as sandbox environments, but not for actual production.”

Mining in Multichain

Unlike Bitcoin, from which it is derived, Multichain does not depend only upon the concept of Proof of Work that can be owned by a single person in some situation. It uses a round-robin schedule, in which the permitted/authorized miners must create blocks in rotation to generate a valid blockchain. This scheme is implemented using a parameter called Mining diversity.

A mining diversity is a value between 0(No restriction) and 1(Every permitted miner must be included into rotation). In general, mining diversity is kept 0.75 which means if some miners are inactive, still the mining and rotation is possible. Now, based upon mining diversity value fixed by the blockchain administrator, following are the steps for validations that are required to add a block in the blockchain:

  1. All the changes that a transaction defines should be applied successfully and in order (It means an incomplete and unordered transaction cannot be added into a block)
  2. Count the miners that are permitted to mine (suppose 10)
  3. Multiply the miner count to mining diversity (suppose 10 * .75 = 7.5), round it up to get spacing (here 8)
  4. If the miner of this block has already mined the previous spacing (spacing – 1, here 7) then the block is invalid

Miners in Multichain neither charge transaction fees nor block rewards. Hence, transaction is free between two parties. But, a miner can charge a fixed service fee from the network participants. SAP too applies this type of fees and charge a fixed amount for a Block per hour.

Configuration of Blockchain in Multichain

In a configuration file, Multichain allows a user to set all the blockchain’s parameter that are mentioned below:

  • Type of chain protocol (Private Blockchain or Bitcoin like Public Blockchain)
  • Target time for blocks (time taken to add block, e.g. 1 min)
  • Active permission types (e.g. Anyone can connect, only some can send/receive)
  • Mining diversity (as discussed above, it will be a value)
  • Level of consensus required (authorization) for creating/removing administrators and minors
  • Mining reward (as discussed above, it can be zero too)
  • IP ports for peer-to-peer connection and the JSON-RPC API (will discuss later)
  • Permitted transaction type (e.g. pay-to-address, etc.)
  • Maximum block size (e.g. 1 MB)
  • Maximum metadata per transaction (termed as OP_RETURN; e.g. 4096 bytes)

These configurations are maintained in the first node or Genesis block. To add a new node, Multichain requires to be run from another computer using a node address (e.g. chain1@12.34.56.78:8571) with three parameters:

  1. The destination blockchain name (here chain1)
  2. Its IP port number (here 8571)
  3. The IP address of an existing node (here 12.34.56.78)

Implementation of MultiChain using SAP Cloud Platform

Generic Architecture

This is a generic architecture where it is shown how a MultiChain network is setup and how SAP Cloud Platform communicates with a MultiChain Node. To learn more about Multichain Architecture please refer the references.

Setup of MultiChain on Cloud Platform

To Create a MultiChain on SAP Cloud Platform, initially we need to setup our Global Account on SAP Cloud Platform and create a MultiChain enabled sub-account. Then only we can proceed with development.

Follow the following steps to enable MultiChain on your Cloud Platform:

Step 01: Go to your SAP cloud platform [If you don’t have, go here and create one] and select region as Europe (Frankfurt).

Step 02: Create a sub account there [Give your desired Display name and Subdomain name].

Step 03: Click Entitlements button from the left menu bar.

Step 04: Inside Entitlements menu, you will see Edit button, click it to change the mode to editable and scroll down to multichain as shown below:

Step 05: Click your sub account to open it. Click Spaces and create a new space giving all authorization to that space as shown below:

Step 06: Click on the newly space created and select Service Marketplace and scroll down to MultiChain and click to open it as shown below:

Once the initial setup of MultiChain is done, you can create your own nodes and instances. Follow Hands on Exercise to create your own SAP MultiChain service.

 

References:

https://www.multichain.com/download/MultiChain-White-Paper.pdf

https://www.sap.com/india/products/leonardo/blockchain/what-is-blockchain.html

https://cloudplatform.sap.com/index.html

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Rudramani,

       

      trying to follow your instructions in step 01, but none of the three sites seem reachable from the US. are these services restricted to only certain geo's?

      This site can’t be reached

      accounttrial.int.sap.hana.ondemand.com took too long to respond.

      This site can’t be reached

      ism.int.sap.hana.ondemand.com took too long to respond.

      This page isn’t working

      int.controlcenter.ondemand.com didn’t send any data.

      ERR_EMPTY_RESPONSE
      Thank you, greg
      Author's profile photo Rudramani Pandey
      Rudramani Pandey
      Blog Post Author

      Hi Gregory,

      Well this is something that should not happen.
      You can try this link: https://account.hanatrial.ondemand.com/#/home/welcome

      or go here: https://cloudplatform.sap.com/index.html

      and click Free Trial.

      Let me know if these links are working for you or not.

      The links that I've added in my blog works fine for me(EMEA/ India).

      Author's profile photo Former Member
      Former Member

      Rudramani,

      Thank you for responding, but it seems that my id does not have access to anything with 'Canary' in its name, so maybe it's only accessible internally within SAP firewall. in any event, when going to another Frankfurt site in the hopes of following your step 03, I get this message:

      This global account does not yet have any subaccounts with an active Cloud Foundry environment.

      maybe, it would be easier to put a disclaimer on top of your blog saying that for certain trial accounts your instructions may not be applicable. in any event, everyone enjoy the multichain tile if they can use it.

      thank you, greg

       

      Author's profile photo Kunal Jauhari
      Kunal Jauhari

      Hi Rudra,

       

      Great work, was able to successfully set up the environment and now ready for kick-off.

      However had to pay some fees 🙂 

      Thanks once again

       

      Regards,

      Kunal