1. IBM Blockchain Platform: Technical Introduction
Get started with using IBM Blockchain Platform
V1.1, 4 October 2019
IBM Blockchain Platform Technical Series
Architectural Good Practices
Modeling Blockchain Applications
What’s New in Technology
Using IBM Blockchain Platform
Technical Introduction
2. Hyperledger Fabric
Concepts
Understand the technology that underpins
IBM Blockchain Platform
IBM Blockchain Platform
Concepts
Technical overview of
IBM Blockchain Platform
Tools
IBM Blockchain Platform tools that
simplify development and operations
3. 4
Blockchain concepts
• Consider the business concepts that comprise blockchain solutions:
– Assets modeled as data structures
– Contracts modeled as algorithms
– Transactions modeled as invocations of algorithms
– Business Networks modeled as peer-to-peer networks
– Participants modeled as nodes on these networks
• IBM Blockchain Platform is based around Hyperledger Fabric
• We will now look at how Hyperledger Fabric exposes these
business concepts to the blockchain developer
• We will also look at the IBM Blockchain Platform tools that
help developers implement these concepts in a solution
20. 21
Interacting with smart contracts and the ledger
• submitTransaction()
– Adds a fully signed new transaction to the ledger
– SDK manages entire multi-peer, ordering process
– Returns control when E/O/V complete (default)
• evaluateTransaction()
– Executes a transaction, but doesn't order it
– Typically used to query the ledger
– Only needs to interact with one peer
(pluggable handlers can be used for multi-peer query)
MagnetoCorp DigiBank
user
App channel: bond
Peer9
DigiBank
bonds
contract
ledger
Peer1
MagnetoCorp
bonds
contract
ledger
Orderer
1
MagnetoCorp
Orderer
2
DigiBank
Ordering service
Peer3
MagnetoCorp
ledger
Peer8
DigiBank
ledger
Peer2
MagnetoCorp
ledger
Peer7
DigiBank
ledger
bonds.submitTransaction('sell',
'BOND007');
bonds.evaluateTransaction('queryBond',
'BOND007');
1a 1b
1c1d
1e 1f
1
1
2
2a
2
21. 22
Ledger notification interactions
• Three listener types:
– contract.addContractListener()
• wait for all transactions of given contract
– contract.addBlockListener()
• wait for blocks
– transaction.addTransactionListener()
• wait for specific transaction to be committed
const transaction = contract.createTransaction('sell');
transaction.addCommitListener(`${transactionId}-listener`, (err, txId, status, blockHeight) => {
...
if (status === ‘VALID’) {
console.info(‘Transaction committed’);
} else {
...
}, {checkpointer: false});
await transaction.submit('ibm', '1000000', '2019-03-31’);
MagnetoCorp DigiBank
issuer
App channel: papernet
Peer9
DigiBank
paper
contract
ledger
Peer1
MagnetoCorp
paper
contract
ledger
Orderer
1
MagnetoCorp
Orderer
2
DigiBank
Ordering service
Peer3
MagnetoCorp
ledger
Peer8
DigiBank
ledger
Peer2
MagnetoCorp
ledger
Peer7
DigiBank
ledger
1b
1a
1c
APIs under development in
FABN-1100, slated 2.0
22. 23
Customizing behavior with
connectionOptions
• connectionOptions specifies gateway behaviour
– wallet: & identity: must be set by app
– All other options have sensible defaults
• Strategies codify most popular behaviour
– e.g. "wait for any/all peers in my organization"
• EventStrategies.MSPID_SCOPE_ANYFORTX
• EventStrategies.MSPID_SCOPE_ALLFORTX
• Handlers for programmable interactions
– User function gets control at appropriate point in transaction lifecycle with relevant topology, i.e.
peers
• e.g. startListening(), waitForEvents(), cancelListening()...
– Keeps separate from application business logic. Advanced feature; only required for special
scenarios
Gateway
“transfer”
application
Connection
options
Peer6
DealerCorp
channel: drivenet
ManCorp DealerCorp
Peer2
ManCorp
Peer7
DealerCorp
Isabella
Peer1
ManCorp
Peer3
ManCorp
ledger ledger ledger
ledger ledger
23. Hyperledger Fabric
Concepts
Understand the technology that underpins
IBM Blockchain Platform
IBM Blockchain Platform
Concepts
Technical overview of
IBM Blockchain Platform
Tools
IBM Blockchain Platform tools that
simplify development and operations
24. 25
IBM Blockchain Platform is a key part of IBM’s
Blockchain Strategy
Solutions
Services
Ecosystem
IBM Blockchain Platform
Collaborate
with services
teams from
ideation all the
way to
production
Tap into our diverse ecosystem to develop strategic
partnerships and create your competitive advantage
Solve critical industry challenges by building and
joining new business networks and applications
Build, operate and grow blockchain
networks in heterogeneous environments
A founding, premier member of Hyperledger, IBM is
committed to open source, standards & governance
25. 26
Advanced tooling
Create & manage smart contracts,
applications & networks
Open technology
Hyperledger Fabric,
Containers, Kubernetes
Deploy anywhere
Comprehensive cloud &
on-premises options
Introducing IBM Blockchain Platform
Build, operate and grow Hyperledger Fabric networks
Developer
tools
Operator
tools
kubernetes
Kubernetes
on
prem
IBM
Kubernetes
Service
Container virtualization &
orchestration
Multi-cloud deployment
kubernetes
26. 27
IBM Blockchain Platform Deployment Options
• There is just one IBM Blockchain Platform product
regardless of where it is deployed
– It sits on a Kubernetes container infrastructure on
your chosen provider
– Kubernetes provides common logging and
management services of the IBM Blockchain
Platform
• When run on IBM Cloud, the IBM Blockchain Platform
uses the IBM Cloud Kubernetes Service
– Use the free IBM Kubernetes tier for a free IBM
Blockchain Platform, or a paid IBM Kubernetes
tier for a paid IBM Blockchain Platform; free tiers
expire after 30 days
• When deployed on-premises or on any non-IBM cloud,
IBM Blockchain Platform uses Red Hat Openshift 3.11
– You provide your OpenShift instance
Developer
tools
Operator
tools
kubernetes
Kubernetes
on
prem
IBM
Kubernetes
Service
Container virtualization &
orchestration
Multi-cloud deployment
kubernetes
27. Hyperledger Fabric
Concepts
Understand the technology that underpins
IBM Blockchain Platform
IBM Blockchain Platform
Concepts
Technical overview of
IBM Blockchain Platform
Tools
IBM Blockchain Platform tools that
simplify development and operations
29. 30
IBM Blockchain Platform Admin Console
• Multi-cloud administration tool
– Web UI to manage all IBP
components
• Configure infrastructure on IBM Cloud
– Configure IKS network, storage,
compute
• Connect & Manage components
– Peer, Orderer, CA, channel...
• Policy & Identity management
– Create, update, display channel
policies
• Smart contract package management
– Install, instantiate, upgrade, discover
30. 31
On IBM Cloud, your blockchain components are
deployed to an IBM Kubernetes service
• Blockchain resources are deployed
into your own Kubernetes cluster
• This allows you to maintain control
over your resources (CPU, storage,
memory)
• Scale up or down as required for your
blockchain environment
• Start small, pay as you grow for what
you use with no upfront investment
• Maintain control of private keys
31. 32
• The IBM Kubernetes Service
within IBM Cloud has a free cluster
and a paid cluster.
• Pick the cluster that works for you!
Selecting your Kubernetes cluster
32. 33
• Intuitive console lets you manage network
components in one place, no matter where they
are deployed
• Manage nodes running in any environment (on-
premises, public, hybrid clouds)
• Easily connect a single peer to multiple industry
networks
• Deploy only the blockchain components you need
(Peer, Ordering Service, Certificate Authority)
• Different organizations can be hosted by different
consortium members in different clusters in
different geographies (zones)
Flexible deployment
33. 34
• It is possible to use your own
certificates for peers and orderers
Adding your own certificates
34. 35
• When using the paid
cluster, operational tools
will allow you to scale up or
down.
• Peers, orderers, and
certificate authorities can
be managed to balance
cost and performance.
https://www.ibm.com/blogs/blockchain/2019/01/answering-your-questions-on-hyperledger-fabric-performance-and-scale
Scaling up and down
35. 36
• Easily invite or add
members to the consortium
without having to learn
fabric commands
Governance: Managing the Orderer
36. 37
• Governing a consortium network takes
work, but operational tools make it easier
• Examples:
• Update members
• Update roles (who can read, who
can write)
• Update ACLs (who can perform
specific operations within the
smart contract)
• Update channel policy (who needs
to approve updates to the channel)
Governance: Managing channels
37. 38
• Set up endorsement policy
on smart contracts
Governance: Endorsement policies
42. 43
• Get Metrics information for IKS
using Grafana or Sysdig
Logging and monitoring
43. Your Blockchain Service Your Infrastructure Resources
IBM Blockchain Platform
The instance that lets you deploy and manage your
Hyperledger Fabric nodes.
Learn more: https://cloud.ibm.com/docs/containers?topic=containers-ibm-cloud-kubernetes-service-technology
Operational Console (UI)
Hyperledger Fabric Components
Certificate
Authority
Peer Ordering Service
Peer Couch
GRPC-
Web
Chaincode
CA
Orderer
Containers
IBP VS Code extension (Development Tools)
FluentdInit
Init
Init
GRPC-
Web
Deployment Overview: IBP & IKS & Storage
44. Your Blockchain Service Your Infrastructure Resources
IBM Blockchain Platform
The instance that lets you deploy and manage your
Hyperledger Fabric nodes.
IBM Cloud Kubernetes Service
Your compute and memory that you allocate to your blockchain
instance
Cluster (e.g. 2CPU x 4GB RAM)
Worker Node
Pod
App (Containers)
Learn more: https://cloud.ibm.com/docs/containers?topic=containers-ibm-cloud-kubernetes-service-technology
Persistent Storage
Operational Console (UI)
Hyperledger Fabric Components
Certificate
Authority
Peer Ordering Service
Peer Couch
GRPC-
Web
Chaincode
CA
Orderer
Containers
File Storage (Default)
IBP VS Code extension (Development Tools)
FluentdInit
Init
Init
GRPC-
Web
Deployment Overview: IBP & IKS & Storage
45. Your Blockchain Service Your Infrastructure Resources
IBM Blockchain Platform
The instance that lets you deploy and manage your
Hyperledger Fabric nodes.
IBM Cloud Kubernetes Service
Your compute and memory that you allocate to your blockchain
instance
Cluster (e.g. 2CPU x 4GB RAM)
Worker Node
Pod
App (Containers)
Learn more: https://cloud.ibm.com/docs/containers?topic=containers-ibm-cloud-kubernetes-service-technology
Persistent Storage
Operational Console (UI)
Hyperledger Fabric Components
Certificate
Authority
Peer Ordering Service
Peer Couch
GRPC-
Web
Chaincode
CA
Orderer
Containers
CPU & Memory
Storage
File Storage (Default)
IBP VS Code extension (Development Tools)
Containers for
each component
are within the
Kubernetes Pod
and can be
managed as
standalone items
Each Fabric
component is
deployed into an
individual Pod
FluentdInit
Init
Init
GRPC-
Web
1 2 3
1 2 3
Deployment Overview: IBP & IKS & Storage
46. 47
Summary
• The Hyperledger Fabric transaction
– Structure drives system design and application architecture
• Smart contract
– Contains transaction definitions for entire lifecycle of business
object(s) stored in a decentralized ledger
– built-in contract class makes programming easy
• Application
– Consensus is complex, but the SDK makes it easy for
applications
– submitTransaction(), evaluateTransaction(), addListener()
– gateway connectionOptions for ultimate customizability
• The IBM Blockchain Platform difference
– Multi-cloud networks, developer & operator tools, IBM service and
support