Getting started with Ethereum VMware Blockchain

Rahul Agarwal
5 min readSep 8, 2022

--

On the Mississippi

Previously I had used the public blockchain network to learn about Ethereum including deploying my own client. Essentially Ethereum and other such distributed ledgers (DLT) provide a replicated multi-node data stores. The special feature is that different nodes maybe owned and operated by different owners with no central control, and with the possibility of some malicious nodes as well. So maintaining data integrity and trust is critical.

In this post I will similarly look at the Ethereum VMware Blockchain (VMBC) for similar outcomes. Full disclosure, I work at VMware. However, I am not part of the VMBC team. I did get some insider access in preparing this article, but you can try everything described here on your own!

Simplified Overview

VMware Blockchain provides a decentralized trust platform for permissioned distributed ledgers. This is a permissioned network and utilizes a Byzantine Fault Tolerant (BFT) replication mechanism. It is open sourced as the concord project. Details of that are beyond my scope but essentially given 3f+1 replicas where f is number of failed/malicious replicas in the network, BFT ensures consistent state across all replicas.

With support added for Ethereum, we can now use the same public Ethereum interface and Solidity based smart contracts to create enterprise dapps with concord providing the blockchain and consensus mechanism. This brings the existing broad Ethereum ecosystem to the enterprise.

Similar to the public Ethereum process, a dapp submits a web3 API request. This request is processed in each replica node EVM independently. Concord provides the consensus and state storage is in RocksDB.

Where things differ is the addition of a client node(s) that provide a subset of the authorized state for each client. For example, this could be different participants in a consortium similar to channels in Hyperledger Fabric but without the overhead of separate blockchains. This can be visualized as follows (adapted from VMBC docs). Additionally we can setup our network to not require gas payments since this is a permissioned network.

Figure 1: Ethereum VMBC Deployment
Figure 1: Ethereum VMBC Deployment

Running a Local Network

The simplest way to get setup is to deploy the provided sample starter in a Kubernetes cluster and I will do this in minikube. You can enable no gas payments by setting the vmbc/config/genesis.json file as shown in this PR. Follow the readme steps for minikube and only do the first k8s-launch.sh step.

Once complete you should see the pods running as such (not showing system):

% kubectl get pods -ANAMESPACE NAME READY STATUS RESTARTS AGE
vmbc-client1 clientservice1–54f558c9c4-npllt 1/1 Running 0 11d
vmbc-client1 ethrpc1–8b446f689-l8p65 1/1 Running 0 11d
vmbc-replica1 concord1–55c755664d-nhvdr 1/1 Running 0 11d
vmbc-replica2 concord2–5bb4855c9b-2vw5f 1/1 Running 0 11d
vmbc-replica3 concord3–55c4656896–26l8f 1/1 Running 0 11d
vmbc-replica4 concord4–5b99545dfb-6jwm8 1/1 Running 0 11d

There are 4 vmbc-replica namespaces each running the Concord Replica node and the vmbc-client namespace running the Client node as shown in the diagram above.

Note: it may take few minutes depending on your internet download speed. A number of large images are downloaded, and you can minikube ssh and then docker images to see:

vmwaresaas.jfrog.io/vmwblockchain/clientservice 0.0.0.0.6162 efb511e9ef24 8 weeks ago 1.09GBvmwaresaas.jfrog.io/vmwblockchain/ethrpc 0.0.0.0.6162 22661ddf4437 8 weeks ago 578MBvmwaresaas.jfrog.io/vmwblockchain/concord-core 0.0.0.0.6162 371d6c24e69a 8 weeks ago 2.91GB

Writing and deploying a Smart Contract

As with public Ethereum you can use Meta Mask and Remix! For this first install MetaMask and point it to your local network. Under networks select “Add Network” and fill as follows:

  • Network name: VMBC
  • New RPC URL: This is the VMBC_URL that your launch command displays in the end. Something like: http://192.168.59.104:30545
  • Chain Id: 5000 (from your genesis file)
  • Currency symbol: ETH (can be anything)

Now goto https://remix.ethereum.org/ and we can use the 1_Storage.sol contract to store and retrieve a number with this state being maintained on the underlying concord blockchain.

Figure 2: Open the 1_Storage.sol file
Figure 2: Open the 1_Storage.sol file

Switch to compiler tab and compile.

Figure 3: Compile solidity contract
Figure 3: Compile solidity contract

Switch to the deploy tab and pick “Injected Web3” and MetaMask will provide the connection.

Figure 4: Deploy to local VMBC client
Figure 4: Deploy to local VMBC client

MetaMask will prompt confirmation of transaction. Since I am running with no cost gas it is zero.

Figure 5: MetaMask transaction confirmation
Figure 5: MetaMask transaction confirmation

We can now use the deployed contracts to interact to store and retrieve.

Figure 6: Interacting with the contract
Figure 6: Interacting with the contract

Additionally, if you deploy the VMBC explorer (See further instructions in the starter readme)you can see limited details similar to Etherscan.

Figure 7: VMBC Ethereum explorer
Figure 7: VMBC Ethereum explorer

It is exactly similar to how you can interact with any public Ethereum network! This concludes the hello world example. You can look at other more complex examples in Remix and also the provided ERC20 (fungible tokens) test.

If these topics interest you then reach out to me and I will appreciate any feedback. If you would like to work on such problems you will generally find open roles as well! Please refer to LinkedIn.

--

--