Operate Ethereum Smart Contracts with Hyperledger Burrow


Operate Ethereum Smart Contracts with Hyperledger Burrow

Recipe ID: hsts-r21


Self-paced training

We offer blockchain introduction, Hyperledger for system admin, Ethereum, Solidity, Corda R3, Hyperledger for developers, blockchain cybersecurity and more classes in self-paced video format starting at $60. Click here to learn more and register. For complete self-paced blockchain training, visit our Complete Blockchain Development Training page.


Recipe Overview

Hyperledger Burrow is an enterprise blockchain network that provides a permissioned smart contract interpreter to execute business logic following the Ethereum Virtual Machine (EVM) specifications.

Hyperledger Seth is the Sawtooth-Ethereum integration project. It integrates the Hyperledger Burrow implementation of the EVM with Hyperledger Sawtooth to provide support for running Ethereum smart contracts on the Hyperledger Sawtooth platform.

For those who are not familiar with Hyperledger project Intro to Hyperledger Family and Hyperledger Blockchain Ecosystem and Hyperledger Design Philosophy and Framework Architecture articles are strongly recommended.

To better follow and understand this recipe, it is advisable to read Essential Hyperledger Sawtooth Features for Enterprise Blockchain Developers, Blockchain Developer Guide- How to Install and work with Hyperledger Sawtooth , Configuring Hyperledger Sawtooth Validator and REST API and Blockchain Developer Guide- How to Install Hyperledger Seth and Docker on AWS articles in advance.

This recipe shows you how to operate Ethereum smart contracts with Hyperledger Burrow and Seth. Specifically, it gives you more info on how different Hyperledger project components interact with Ethereum. After reading this recipe, you can move on to i- Installing Hyperledger Burrow on AWS, ii- Writing smart contracts with Solidity, and iii-Deploying and calling Ethereum smart contracts on Burrow recipes.

Introduction to Ethereum and Solidity

Ethereum is one of the most important public blockchain networks in terms of its impact and market cap. It is sometimes known as a world computer, as it is used to run decentralized applications (DApps) for everyone and has an open software platform powered by the global infrastructure. It allows different organizations and individuals to build and deploy DApps to execute smart contracts. Ethereum is the next generation of blockchain. It introduced the possibility for blockchain technology to develop from cryptocurrency cash systems to an open, flexible, and distributed global computing platform for a wide variety of applications.

The smart contract running on Ethereum is the application, which can be written in different programming languages to perform all sorts of business logic or fulfill predefined contracts when they are triggered. The EVM is the runtime environment to execute this smart contract. EVM is the heart of Ethereum and is Turing complete. Developers can build computer applications that run on the EVM to solve real-world problems or perform business activities with different programming languages. The EVM is a stack machine, on which all computations are performed on an area called the stack. It has a maximum size of 1,024 elements and contains words of 256 bits. The EVM executes the opcode compiled from the smart contract on the stack.

Solidity is the high-level and most adopted programming language to write smart contracts. It is contract-oriented and type-safe. It was influenced by C++, Python, and JavaScript, and is designed to target the EVM. Hyperledger Burrow was originally contributed by Monax and co-sponsored by Intel. It is a permissioned EVM that's developed with Golang.

Ethereum smart contracts and the Solidity language are predominate in implementing DApps in the public blockchain network. Burrow offers the permissioned EVM to allow thousands of DApps on the Ethereum network to operate in a permissioned EVM. Burrow is now integrated with Hyperledger Sawtooth and Hyperledger Fabric, and this provides the capability to migrate or run thousands of DApps on the Ethereum network in various blockchain networks in the Hyperledger family.

The Burrow network is composed of Validator peer nodes that run with the Byzantine fault-tolerant Tendermint protocol to reach a consensus. The Tendermint protocol provides high transaction throughput among permissioned validators and also prevents the blockchain from forking.

Introduction to Hyperledger Seth

Burrow is not only becoming more mature, easier to work with, and capable of building robust and fast Burrow networks—it has also started to integrate with other Hyperledger networks, such as Fabric or Sawtooth, to provide EVMs to run Ethereum contracts on these networks.

Seth is the integration between Burrow, Sawtooth, and Ethereum, which provides the capability to run Ethereum smart contracts on the Hyperledger Sawtooth blockchain. Like Burrow, to run an Ethereum smart contract on Sawtooth, you do not need to pay ether or cryptocurrencies as gas, but you do need permission.

Seth is primarily composed of three components on top of the Sawtooth platform, as shown in the following diagram:
hyperledger burrow and ethereum solidiity

 

The Seth client is a command-line interface tool (CLI) that's provided by Seth to interact with the Sawtooth platform, providing Seth-related functionalities such as deploying and calling smart contracts. The Seth CLI communicates with the Sawtooth platform using the normal Sawtooth RestAPI adaptor (more details can be found at https:/​/​sawtooth.hyperledger.​org/​docs/​seth/​releases/​latest/​cli_​reference.​html#seth-​cli-reference-​label).

Seth-TP is the transaction family that implements the EVM from Burrow within the Sawtooth platform. All business logic and smart contracts are handled and executed in Seth-TP (more details can be found at https:/​/​sawtooth.​hyperledger.​org/​docs/​seth/releases/​latest/​cli_​reference.​html#seth-​tp-​reference-​label).


The Seth-RPC server is an API gateway to allow existing Ethereum clients to interact with smart contracts on the Sawtooth platform with the Ethereum JSON RPC API (https:/​/github.​com/​ethereum/​wiki/​wiki/​JSON-​RPC). More details on API gateways can be found at https:/​/​sawtooth.​hyperledger.​org/​docs/​seth/​releases/​latest/​cli_​reference.html#seth-rpc​-reference​-label​.

The following recipes are excellent resources for installing other Hyperledger tools:
Blockchain Developer Guide- Overview of Hyperledger Explorer and its Development Environment
Blockchain Developer Guide- How to Install Hyperledger Fabric on AWS
Blockchain Hyperledger Composer Business Network Modeling and Environment Setup
Blockchain Developer Guide- How to Install Hyperledger Indy and Indy CLI on AWS

To conclude this recipe, we like to recommend our Learn Hands-on Blockchain Ethereum Development & Get Certified in 30 Hrs and Blockchain Hyperledger Development in 30 hours courses to those interested in pursuing a blockchain development career. Indeed, as of this writing, Hyperledger Foundation offers the following two Hyperledger certifications: The Certified Hyperledger Fabric Administrator (CHFA) and The Certified Hyperledger Sawtooth Administrator (CHSA), both of which are highly regarded in the industry. Hyperledger Foundation is in the process of creating Hyperledger Developer certification program, which may be released in early or middle of 2020. In short, by taking our hands-on online Hyperledger class, you would be able to obtain CHFA certification.

This tutorial is written by Brian Wu who is our senior Hyperledger instructor in Washington DC. His Hyperledger Cookbook with 40+ hands-on recipes is highly recommended.


Private and Custom Tutoring

We provide private tutoring classes online and offline (at our DC site or your preferred location) with custom curriculum for almost all of our classes for $50 per hour online or $75 per hour in DC. Give us a call or submit our private tutoring registration form to discuss your needs.


View Other Classes!