Recipe ID: hsts-r11
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.
The primary goal of the Sawtooth-Ethereum integration project, affectionately dubbed “Seth”, is to add support for running Ethereum Virtual Machine smart contracts to the Hyperledger Sawtooth platform. To make this happen, the Hyperledger Sawtooth project worked with the Hyperledger Burrow project to integrate their EVM implementation, the Burrow EVM, into with the Hyperledger Sawtooth platform.
The secondary goal of Seth is to make it easy to port existing EVM smart contracts and DApps that depend on them to Sawtooth. This has been largely accomplished by replicating the Ethereum JSON RPC API.
Seth is composed of three components:
The seth client is the user-facing Command Line Interface or CLI tool for interacting with a Sawtooth network that has Seth deployed on it. The seth-tp transaction processor is the component that implements “Ethereum-like” functionality within the Sawtooth platform. Running Seth on a Sawtooth network is equivalent to connecting a seth-tp process to all validator nodes. The seth-rpc server is an HTTP server that acts as an adapter between the Ethereum JSON RPC API and the client interface provided by Sawtooth.
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.
Seth is packaged separately from the Hyperledger Sawtooth project. Seth provides Docker images to start up the Seth environment. In this recipe, we will install Docker on Ubuntu and start up the Seth Docker image.
The following is step-by-step installation of Docker and Hyperledger Seth on Amazon Web Services or AWS.
Docker and Hyperledger Seth Installation
1. Install the Docker Community Edition (CE) by following the Docker documentation. Update the apt package index as follows:
sudo apt-get update
2. Install the necessary packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
3. Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. Set up the stable repository:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
5. Install Docker CE:
sudo apt-get update
sudo apt-get install docker-ce
6. Verify that Docker CE has installed correctly by running the hello-world image:
ubuntu@ip-172-31-90-67:~$ sudo docker run hello-world Hello from Docker!
This message shows that your installation appears to be working correctly.
7. Install Docker Compose. Download the latest version of Docker Compose:
sudo curl -L
"https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
8. Modify the docker-compose executable:
sudo chmod +x /usr/local/bin/docker-compose
9. Verify the Docker Compose installation:
ubuntu@ip-172-31-90-67:~$ docker-compose --version docker-compose version 1.22.0, build f46880fe
10. Build and start Seth. Clone the sawtooth-seth GitHub repository:
git clone https://github.com/hyperledger/sawtooth-seth.git cd sawtooth-seth
Build and start up Seth containers:
sudo docker-compose up --build
11. Verify the Seth Docker installation. List the Docker container status, as follows:
ubuntu@ip-172-31-90-67:~/sawtooth-seth$ sudo docker container ls -- all
CONTAINER ID |
IMAGE |
NAMES |
a8e364431895 |
sawtooth-seth-rpc:latest |
seth- |
c0f26cde1222 |
sawtooth-seth-cli-go:latest |
seth- |
6ff3ce573f67 |
hyperledger/sawtooth-block-info-tp:1.0 |
block- |
c28309e8e5c7 |
sawtooth-seth-tp:latest |
seth- |
7babc1b8684b settings-tp |
hyperledger/sawtooth-settings-tp:1.0 |
|
9500edea282b |
hyperledger/sawtooth-rest-api:1.0 |
rest- |
dd65b46253c5 |
sawtooth-seth-cli:latest |
seth- |
6aba65d076ef sawtooth-validator |
hyperledger/sawtooth-validator:1.0 |
|
ubuntu@ip-172-31-90-67:~/sawtooth-seth$ sudo docker exec -it seth-cli-go bash
"LogPath":"/var/lib/docker/containers/c28309e8e5c77dd9839cef91bf2fca00d9b64f9dc2815ad85fd3ed18c86d32e7/c28309e8e5c77dd9839cef91bf2fca00d9b64f9dc2815ad85fd3ed18c86d32e7-json.log","Name": "/seth-tp",
Put Things Together
Docker is a platform for developers to develop, deploy, and run applications with containers. It provides a flexible approach to bundle applications and their dependencies into isolated containers with lightweight runtime environments.
Docker Composer is a Docker tool that's use to stack a set of applications or services together and manage multiple containers and their service links for your system. The Docker Compose YAML file is used to define each service and their mapping to the host.
Currently, the best way to install the Seth network is to build Seth Docker containers using the provided Docker composer file from the Seth GitHub repository. The Docker file can be found at https://github.com/hyperledger/sawtooth-seth/blob/master/docker-compose.yaml, which is used to build Seth Docker images and start Seth Docker containers for each Seth service.
After building the Seth Docker containers, you can easily set up and run the Seth network without manually installing each Seth service and library, and then configuring each service.
In this recipe, we provided a step-by-step guide to install Docker and Docker Composer, download the Seth repository, and build Seth Docker containers. The Seth network is now ready to launch and work on.
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 Burrow on AWS
Blockchain Developer Guide- How to Install Hyperledger Iroha on AWS
Blockchain Developer Guide- How to Install Hyperledger Indy and Indy CLI 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.
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
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.