This document provides an overview of building blockchain applications with Corda Enterprise. It begins with recapping key concepts from previous discussions on blockchain architecture. It then provides an overview of the Corda platform, describing its key features such as private, point-to-point communication and recording states on the ledger as unspent transaction outputs. The document outlines Corda's architecture including its use of flows, states, transactions, and consensus model. It also describes core Corda components like the ledger, nodes, and notary service. Finally, it demonstrates deploying a single node Corda network on Microsoft Azure.
1. 2
Mohammad Asif Waquar
Senior Software Engineer
atABNAMRO Bank
@asifwaquar
Mohammad Asif Waquar
Senior Software Engineer
atABNAMRO Bank
@asifwaquar
BUILDING BLOCKCHAIN
APPLICATION WITH
CORDA ENTERPRISE
3. RoadMap
o Part-1 -Blockchain Introduction & Architecture on Azure.
o Part-2 -FabricArchitecture & Installation on Azure
o Part-3 - Block chain Hyper ledger deployment on Azure.
o Part-4 – BuildingBlockchainwithCordaEnterprise on Azure.
o Part-5 - Cordaworkflow & Swift paymentintegration.
o Part-6 - Blockchain with Ethereum & Quorum and deploying in DAPPSAzure.
o Part-7 - Handling Media & Documents in BlockChain
o Part-8 - Security in Blockchain.
o Part-9 - Block chain with IOT.
o Part-10 - Handson Workshop on Blockchain.
11. Corda features
11
• No blockchains, no mining; instead a permissioned network
• No broadcast: all communication is point-to-point
• We reject the notion that data should be broadcast to all participants – or to
cumbersome, predefined groups
• Message senders need to know the identity of recipients
• Data is shared on a need-to-know basis and peers only see what they need to
see
• Not sending is preferable to sending and encrypting
• Unspent Transaction Output (UTXO) for recording states (likeBitcoin)
• Platform is JVM-based, written in Kotlin (can use Java, Clojure, etc)
• Supports industry-standard protocols: AMQP, JDBC, PKIX, etc
• No cryptocurrency but can represent digital cash
12. The Corda Ledger
ALICE BOB
ED
CARL
DEMI
1
7
5
9
4 3
2
6
8
ALICE = { }1 7
BOB = { 1 7 6 5 }
CARL = { 9 4 6 5 2 3 }
}ED= { 9 4 38
}DEMI= { 2 3 8
12
The ledger from each peer’s point of view is the union of all
intersections with other network peers
(some of which may be the empty set)
Numbered circles
represent unique
shared facts
13. Anatomy of a bilateral ledger
ALICE BOB
1
7
• There is no “central ledger”
• Each network peer maintains a separate vault of facts
(akin to rows in a DB table)
• All peers to a shared fact store identical copies
• Not all on-ledger facts have to be shared with other
peers
• The black square “11” is an example of a on-ledger
fact not shared with any peers
• Immutable: easy to do analysis on a static snapshot of
the data and reason about the contents
• No accounts: easy to apply transactions in parallel
• Transaction ordering: impossible to mis-order
transactions due to reliance on hash functions to identify
previous states
• Consensus: conflict is the double spend problem
• Auditability: full history of all activity is recorded
6
5
Id Fact
1 “Much consensus”
7 “So bilateral”
11 “Wow ledger”
Id Fact
1 “Much consensus”
6 “Very fact”
7 “So bilateral”
5 “amaze network”
11
13
14. Flows
Flows are light-weight
processes used to
coordinate interactions
required for peers toreach
consensus about shared
facts.
State Object
States are immutable
objects that represent
(shared) facts such as a
financial agreement or
contract at a specificpoint
in time
Transaction
Transactions consume
input states and create
output states.
The newly created output
states replace the input
states which are marked
as historic.
Consensus
Parties reach consensus
on the evolution of a
shared fact. This is done
by testing the validity (by
way of contract code) and
uniqueness (by way of the
notary) of the transaction.
Corda: Key Concepts
IOU
CONTRACT
REF
IOU STATE
PROPERTIES
From: Alice
To: Bob
Amount: £10
Due: 01/03/2017
Paid: £5
Penalty: 20%
PARTICIPANTS
Alic e
Bob
OUTPUT
STATE
INPUT
STATE
ALICE
BOB
NOTARY
14
17. 13
5
4
2
2
•
•
Doorman: Enforces rules regarding the information nodes
must provide before being admitted to the network. If satisfied,
node’s identity is certified with a root-authority-signed TLS
certificate.
Nodes: JVM run-time with a unique network identity running
Corda with two interfaces: network layer (interacting with other
nodes) and RPC (interacting with node’s owner)
• Network Map Service: Publishes IP addresses throughwhich
all nodes can be reached along with certificates and services
provided by node
• Notary: Attest uniqueness, and possibility the validity, of ledger
updates.
• Oracles: Well-known service that signs transactions if they
state a fact and that fact is considered to be trust
Corda Network: Detailed Overview
A Corda Network includes a 1) doorman (“permissioning service”), 2) two or more Corda Nodes, 3) a
network map service, 4) one or more notary nodes and 5) zero or more oracles
17
1
3
2
4
5
18. • A Corda network is a fully connected graph
• No global broadcast or gossip network
• Communication occurs on a point-to point basis
only
• Peers communicate using AMQP/1.0 over TLS
• Network map service publishes list of peers
• Graph edges represent the potential to
communicate, not persistent connections
• Think Email and SMTP
A Corda Network
A Corda network is an authenticated peer-to-peer network of nodes where each node is a Java Virtual
Machine run-time environment hosting Corda services and executing applications known as CorDapps
Name: Network Map
Services: Network map service
Address: 192.168.0.2:10005
Public key: t453wv84bvt3cj5w3h
Name: Alice
Services: Cash Issuer, bond
issuer
Address: 192.168.0.3:10005
Public key: 5h54h5wv632vhy55
Name: Bob
Services: Cash Issuer, bond issuer
Address: 192.168.0.4:10005
Public key: 5hw03nnk43jknkj4n
NOTARY
NODE
PERMISSIONING SERVICE
CERTIFICATE SIGNING
18
1
19. What makes a Business Network?
We expect that single business networks will typically be set up by a
consortium of banks and a system delivery partner, and they will include:
• A ledger agreement / set ofrules
• An operating entity
• The specific ledger application for this ledger(CorDapp)
• Common network parameters that allow Nodes to transact
A network will comprise a number of CordaNodes:
• Bank nodes
• A Doorman Node
• At least one Notary node
• Oracles
• Messaging Gateways (e.g. SWIFT)
Bank A
Bank B
Bank C
Bank D
Bank E
Doorman
Notary
Oracle
Gateway
Peer-to-Peer
communications
Connectivity to rest of
bank
Connectivity to
external services
19
But of course we want many of these business networks, andour
primary objective is for them to be able to interoperate..
27. p15.
ALICE
BOB
transaction proposal
proposal and her
signature to Bob
3.Bob inspects the
proposal, verifies it and
then signs it
4.Bob sendsback the
transaction and his
signature to Alice
1.Alicecreates a new ce
5.Alice verifies the
transaction and checks
Bob’s signature
Uninvolved peers do not receiveany
of Alice’sor Bob’s transactions
and sign it.
2.Alice sends the
Flows
30. Single VM Ledger on Microsoft Azure
Step-1 Choose Corda Single Ledger
Network.
31. Single VM Ledger on Microsoft Azure
Step-2 Fill all user credentials details
Single VM Ledger on Microsoft Azure
32. Single VM Ledger on Microsoft Azure
Step-3 Choose no of nodes and notary
Services.
33. Single VM Ledger on Microsoft Azure
Step-4 Choose notary type validating /
Nonvalidating notary. Validating
Notary will verify all previous
transactions.