Install Hyperledger Burrow on AWS


Install Hyperledger Burrow on AWS

Recipe ID: hsts-r10


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 one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Burrow was originally contributed by Monax and co-sponsored by Intel. Hyperledger Burrow provides a modular blockchain client with a permissioned smart contract interpreter partially developed to the specification of the Ethereum Virtual Machine (EVM).
For those who are not familiar with Hyperledger project, reading Blockchain Overview, Intro to Hyperledger Family and Hyperledger Blockchain Ecosystem, Hyperledger Design Philosophy and Framework Architecture, and Overview of Building Blockchain Smart Contracts in Hyperledger articles are strongly recommended beforehand.

In our previous recipe, we reviewed Ethereum, Solidity and how to use Hyperledger Seth to build blockchain application with Ethereum. Here are 2 follow-up recipes:How to write smart contracts with Solidity and How to Deploy and Call Ethereum Smart Contracts on Hyperledger Burrow


Hyperledger Burrow Overview
Burrow (formerly known as eris-db) is a permissionable smart contract machine. The first of its kind when released in December, 2014, Burrow provides a modular blockchain client with a permissioned smart contract interpreter built in part to the specification of the Ethereum Virtual Machine (EVM).
Initially licensed under GPLv3 and as of version 0.16 relicensed to Apache 2.0, Monax’s permissioned EVM is functionally separate from the Ethereum protocol or any of the codebases implementing it. Burrow’s users can operate any smart contract that has been compiled by any EVM language compiler in their own permissioned blockchain environments.
Burrow extends previous work within the Hyperledger Project by providing a strongly deterministic smart contract focused blockchain design to the Project’s overall effort. Burrow’s architecture opens a range of interesting cross-project collaborations within the Hyperledger umbrella.

Given that Monax’s permissioned EVM is built to the specification of Ethereum’s active blockchain development community, and that Burrow has active enterprise users, some of whom are existing members of the Hyperledger Project, we feel that Burrow has significant potential to play an important role within the quickly-growing Hyperledger community.

Hyperledger Burrow Architecture
The below diagram depicts the architecture behind Hyperledger Burrow:
Burrow Architecture

Hyperledger Burrow Business Applications
Burrow’s primary users are businesses aiming at value chain level optimization amongst other blockchain and smart contract benefits. These users require permissions on their blockchain deployments in order to fulfill numerous legal and/or commercial requirements for their applications.
Burrow was designed to be a general-purpose smart contract machine and is not optimized for the requirements of any single industry; rather Burrow has been optimized for general-purpose, cross-industry smart contract use cases.
Startups to enterprises are using Burrow’s permissioned EVM so that they may leverage smart contract innovations from the open source world in a more secure, legally compliant, cryptocurrency-free, enterprise-grade setting.
In this recipe, we will learn how to install Hyperledger Burrow on the AWS Cloud platform. To install and run this recipe, you need an EC2 instance on AWS with the following configuration:

Hyperledger Burrow Installation
Execute the following steps to install Hyperledger Burrow:
1. Install Go version 1.10 or higher. The following commands can be used to install Go on an EC2 instance:
sudo apt update
sudo apt install golang-go

If you have an old version of Go on AWS, you can install Go with the Personal Package Archive (PPA), which is provided by the community and not an official source, at https://launchpad.net/ubuntu/+ppas:
sudo add-apt-repository ppa:gophers/archive sudo apt-get update
sudo apt-get install golang-1.10-go

2. Add Go into your environment. Create a Go project in the go folder in your home directory and make two sub-folders, named src and bin, using the mkdir command under go. Set GOPATH to the go folder and add Go into the PATH environment.
export GOROOT=/usr/lib/go-1.10/
export GOPATH=$HOME/go
PATH="$HOME/bin:$HOME/.local/bin:$PATH:$GOROOT/bin:$GOPATH/bin:"
Verify Go install and setup
ubuntu@ip-172-31-90-67:~/go/src$ go version go version go1.10 linux/amd64

3. Implement Go helloworld.go as follows:

package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}

4. Build and run helloworld.go:
ubuntu@ip-172-31-90-67:~/go/src/hello$ go run helloworld.go hello, world

5. Get the Burrow source code and build Burrow:
ubuntu@ip-172-31-90-67:~/go/src/hello$ go get github.com/hyperledger/burrow/...
cd github.com/hyperledger/burrow
make install_burrow

This will build Burrow and install its execution in the go/bin directory. Since the go/bin directory is configured in your PATH, you can now run the burrow command directly.

6. Configure and start Burrow by creating a directory for Burrow under your home directory, such as ~/burrow. To generate a burrow.toml file with one participant and a full account, enter the following command:
burrow spec -p1 -f1 | burrow configure -s- > burrow.toml
burrow.toml is the configuration file for the Burrow validator node. The address and keys for the validator are defined in the file as follows:
[[GenesisDoc.Validators]]
Address = "54EF1517D97E7A653D5FA5B05060A82A8856515D" PublicKey = "{\"CurveType\":\"ed25519\",\"PublicKey \":\"FF4E4B9D3FB3B4CC0F113661E2E298C7DD7355A1207CA398496550BC162C04 F3\"}"
Amount = 9999999999
Name = "Full_0"

7. Once burrow.toml is generated, in the same folder, enter the following command to start Burrow:
burrow start --validator-index=0 >burrow.log 2>&1 &
Enter the following command to view the Burrow log:
less burrow.log

Putting Things Together
Burrow is implemented with Go. In this recipe, we installed Go on the Ubuntu host and used go to download the Burrow source code and its dependencies. Once we built Burrow from source, we generated its configuration file with burrow spec and started Burrow on the instance.
The most important feature from Burrow is that Burrow is a permissioned EVM. It can execute Ethereum smart contracts when the correct permissions have been granted. Unlike Ethereum, no real ether or cryptocurrency is required to execute smart contracts on Burrow. An arbitrary but finite amount of gas is handed out for every transaction to ensure that the transaction is executed in a finite time. According to the documentation on the Burrow GitHub repository, Burrow's principle is you don't need money to play when you have permission to play.

The following recipes are excellent resources for installing other Hyperledger tools:

Blockchain Developer Guide- How to Install and work with Hyperledger Sawtooth
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 Iroha on AWS
Blockchain Developer Guide- How to Install Hyperledger Indy and Indy CLI on AWS
Blockchain Developer Guide- How to Install Hyperledger Seth and Docker on AWS

To conclude this recipe, we like to recommend our Blockchain Hyperledger Development in 30 hours course 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 recipe 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.

Related Training Courses

Hands-on Node.JS, MongoDB and Express.js Training
Advance JavaScript, jQuery Using JSON and Ajax
Learn Hands-on Blockchain Ethereum Development & Get Certified in 30 Hrs
Learn Blockchain Hyperledger Development & Get Certified in 30 Hrs
Become Blockchain Certified Security Architect in 30 hours
Blockchain Certified Solution Architect in 30 hours
Introduction to Python Programming
Object Oriented Programming with UML


Private and Custom Coding Classes

We offer private coding classes for beginners online and offline (at our Virginia site) with custom curriculum for most of our classes for $59 per hour online or $95 per hour in virginia. Give us a call or submit our Private Coding Classes for Beginners form to discuss your needs.


View Other Classes!