hyperledger sawtooth deploying and managing€¦ · hyperledger sawtooth duncan johnston-watt &...

32
Deploying and managing Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners

Upload: others

Post on 21-May-2020

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Deploying and managing Hyperledger SawtoothDuncan Johnston-Watt & Kai DavenportBlockchain Technology Partners

Page 2: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Agenda

▪BTP Introduction

▪Hyperledger Sawtooth

▪Demo

2@blockchaintpOctober 2018

Page 3: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Value

“BTP has a clear value proposition — bringing the benefits of blockchain to business — and its

leadership team has the necessary expertise to bring together the components to deliver”

Csilla Zsigri & William Fellows, 451 Research Impact Report

October 2018 3@blockchaintp

Page 4: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Focus

▪We provide our customers with a blockchain management platform that leverages world class open source components Hyperledger Sawtooth and Kubernetes (CNCF) backed by the Linux Foundation

▪We work with our customers to co-create blockchain-based solutions that differentiate their business from their competitors

▪We support our customers and in collaboration with them create an operational model that meets their needs now and in the future

4@blockchaintpOctober 2018

Page 5: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Platform

▪ BTP Sextant▪ Hyperledger Sawtooth distribution▪ Leveraging cloud native Kubernetes▪ Fully curated and hardened platform▪ Providing unified user experience

▪ BTP Sextant Editions▪ Standard▪ Professional▪ Enterprise

▪ AWS Marketplace (Q4 18)▪ Standard & Professional Editions▪ Easy to fire up and get started▪ Industry standard PAYG pricing▪ With upgrade option to subscription

▪ Future Targets▪ Google Cloud Platform Marketplace▪ Azure Marketplace▪ Alibaba Cloud Marketplace

October 2018 @blockchaintp 5

Page 6: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sawtooth v1.0Dan MiddletonHyperledger Sawtooth Maintainer

February 2018

Licensed under Creative Commons Attribution 4.0 International Licensehttps://creativecommons.org/licenses/by/4.0/

Page 7: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sawtooth Design Philosophy

Keep Distributed Ledgers Distributed

Make Smart Contracts Safe

Design for Scale

Ease-of-use for Development & Deployment

@blockchaintp 7

Page 8: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Hyperledger Sawtooth 1.0Architecture & Features

1.0 Released January 2018

8

Page 9: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Clients

Sawtooth Hosts

Basic Concept

Transaction Processors

Submits transactions;Queries the database

Business logic;Validates transactions

Validator ProcessValidator Process

State

Mediates access to the database

@blockchaintp 9

Page 10: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sawtooth Host

Validator Process

A Couple More Pieces

REST Service

Transaction Processor(s)Transaction

Processor(s)Transaction Processor(s)

Clients

Other Validators

State

@blockchaintp 10

Page 11: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sawtooth Host

Validator

High-level Sawtooth Architecture

Block Management

Consensus

Transaction Handling

State

InterconnectREST Service

Transaction Processor(s)Transaction

Processor(s)Transaction Processor(s)

P2P Network

Clients

Other Validators

@blockchaintp 11

Page 12: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

ClientsClients

Sawtooth Host

Validator

v1.0 Features: Parallel Execution

Block Management

Consensus

Transaction Handling

State

InterconnectREST Service

Transaction Processor(s)Transaction

Processor(s)Transaction Processor(s)

P2P Network

Clients

Other Validators

Multiple transactions per block can effect the same state

Parallel scheduling

Multi-process “smart contracts”

@blockchaintp 12

Page 13: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

ClientsClients

Sawtooth Host

Validator

v1.0 Features: Multi-Language Support

Block Management

Consensus

Transaction Handling

State

InterconnectREST Service

Transaction Processor(s)Transaction

Processor(s)Transaction Processor(s)

P2P Network

Clients

Other Validators

@blockchaintp 13

Choose from: Python,

JavaScript, Go,

Rust*

Choose from: Go, JavaScript,

Python, C++*, Java*,

Rust*

Page 14: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Seth client

Sawtooth Host

Validator

v1.0 Features: Seth

State

REST Service

Identity

Seth Transaction Processor

Seth RPC PoET

Settings

Remix

Truffle

BlockInfo

Ethereum Contract

Interpreter

@blockchaintp 14

Page 15: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

v1.0 Features: On-chain Governance

Control the blockchain on the blockchain

Settings Transaction Family enables participants to agree on network policies

For example, vote on changing consensus parameters using registered public keys of consortia members.

Settings are extensible – they can be added after genesis.

Setting (Examples) Value

sawtooth.poet.target_wait_time 5

sawtooth.validator.max_transactions_per_block 100000

sawtooth.validator.transaction_families [{ "family": "intkey", "version": "1.0"},{ "family": "xo", "version": "1.0"}]

@blockchaintp 15

Page 16: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

client

Sawtooth Host

Validator

v1.0 Features: Dynamic Consensus

Consensus= DevMode

REST Service

Settings

DevMode

Permissioning

PoET PoET-SGX

Other Smart Contracts

Abstract Consensus

Raft*

Set Consensus := PoET

PBFT*

* Available in Sawtooth 1.1

@blockchaintp 16

Page 17: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

1.0 Released January 2018

Hyperledger Sawtooth 1.0Application Development

17

Page 18: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Validator Process

Client

Application Development

Transaction Processor

State

Transaction Family

Transaction Creation Data Model Business Logic

@blockchaintp 18

Page 19: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Validator Process

Client

Transaction Processor ≈ Smart Contracts

Transaction Processor

State

Transaction Family Transaction Families encapsulate business logic on Sawtooth

A Transaction Family can be as simple as a single transaction format, with associated validity and state update logic…

…or as complex as a VM with opcode accounting and bytecode stored in state -- ‘smart contracts’

The choice is up to the developer

Sawtooth allows these concepts to coexist in the same instance of the blockchain -- same blocks, same global state

@blockchaintp 19

Page 20: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Transaction Families: The Transaction Processor

All validators in the network run every authorized transaction processor

On receipt of a transaction the validator will call the TP’s Apply() method

Business logic simply goes in Apply() and gets and sets state as needed

Transaction Processor

Validator

Register()

Get/Set(value)

Apply(transaction)

Basic API

@blockchaintp 20

Page 21: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Hyperledger Sawtooth

21

Source: https://sawtooth.hyperledger.org/docs/core/releases/1.0/app_developers_guide/aws.html#overview-of-sawtooth-components

@blockchaintpOctober 2018

Page 22: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Check it outGive Sawtooth a try• Work through the tutorials• Build your own transaction family to explore use cases

Become a contributor• Join the community• Help with docs, code, examples• Become an expert and help others on chat

Links• Code: https://github.com/hyperledger/sawtooth-core• Docs: https://sawtooth.hyperledger.org/docs/• Chat: https://chat.hyperledger.org/channel/sawtooth

@blockchaintp 22

Page 23: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

▪ Infrastructure▪ Create a new Kubernetes cluster▪ Join an existing Kubernetes cluster▪ Failover for high availability

▪Sawtooth▪ Deploy managed version of sawtooth▪ Auto configure network and storage▪ Deploy and manage standard or custom transaction processors▪ Monitor deployment

Sextant

23@blockchaintpOctober 2018

Page 24: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sextant: Infrastructure

▪Provision a new Kubernetes cluster▪ From nothing to running cluster with a button click▪ Automate the setup across popular cloud providers▪ Handles multi-zone for high availability▪ Download “kubeconfig” for CLI “kubectl” access

▪Join an existing Kubernetes cluster▪ For bare metal or custom clusters - provide a “kubeconfig” file and sextant

can deploy to it

24@blockchaintpOctober 2018

Page 25: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sextant: Sawtooth

▪Deploy managed Sawtooth▪ Configuration of validators▪ Networking between validators▪ Connect to external seeds▪ Persistent storage for validators

▪High availability▪ k8s persistent volumes provide HA on node failure▪ k8s ingress provides static external access endpoint

25@blockchaintpOctober 2018

Page 26: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sextant: Sawtooth

▪Standard transaction processors▪ Deploy standard TP’s like RBAC with sensible configuration options▪ We can begin to curate a library of commonly used TP’s

▪Custom transaction processors▪ Deploy custom TP’s to the cluster▪ Any Docker image can be consumed▪ Easy network access to the validator (localhost:4004)

26@blockchaintpOctober 2018

Page 27: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sextant: Sawtooth

▪Monitoring▪ InfluxDB powering Grafana dashboards▪ Monitor things like “transactions per second”▪ Fully integrated into Sawtooth validators

▪Updates▪ We curate Kubernetes manifests and Docker images▪ The cluster can easily be upgraded in situ

27@blockchaintpOctober 2018

Page 28: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth
Page 29: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Sextant: Components

▪UI▪ Browser application for easy and intuitive management of clusters▪ Real time view on cluster status

▪Management server▪ Connects to cloud providers to provision of new clusters▪ Communicates to k8s api server for running cluster▪ Deploys and manages Sawtooth resources on k8s cluster

29@blockchaintpOctober 2018

Page 30: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

Browser

Sextant: Architecture

30@blockchaintpOctober 2018

Browsers

SextantServer

Kubernetes Controlplane

Api Server

Controllers

etcd

Sawtooth Validator

State

Transaction Processors

Settings

XO

Custom...

Sawtooth Node

Monitoring Dashboard

Kubernetes Cluster

Page 31: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth

DemoLet’s deploy sawtooth to AWS!

Page 32: Hyperledger Sawtooth Deploying and managing€¦ · Hyperledger Sawtooth Duncan Johnston-Watt & Kai Davenport Blockchain Technology Partners. Agenda BTP Introduction Hyperledger Sawtooth