SlideShare a Scribd company logo
1 of 24
Proprietary and Confidential © 2019 1
Syahrul Nizam, Developer Advocate
Quorum meetup
How do private transactions
work on Quorum?
Proprietary and Confidential © 2019 2
Presented by
Syahrul Nizam
Developer Advocate
Blockchain enthusiast with experience
in creating & deploying Smart
Contracts on Ethereum
Proprietary and Confidential © 2019 2
Presented by
Syahrul Nizam
Developer Advocate
Blockchain enthusiast with experience
in creating & deploying Smart
Contracts on Ethereum
Proprietary and Confidential © 2019 3
The innerworkings of Ethereum
The Ethereum network is made up of nodes, each running an
Ethereum client like Geth
Miners
Ethereum Node
Blockchain Storage
Genesis
block
Block 1 Block (n-1) Block n
Interface
Developers
Proprietary and Confidential © 2019 4
What is Quorum?
1. Quorum is a Ethereum based blockchain, designed for use by
Enterprises.
2. It provides smart contract capability, much like Ethereum
3. What makes Quorum special is that it has support for private
transactions, which is impossible on Ethereum (somewhat)
Proprietary and Confidential © 2019 5
Transactions in Ethereum
A graphical representation of how transactions are propagated in a
regular Ethereum network
Application creates a
transaction payload
Transaction payload
is compiled into
solidity bytecode
Transaction payload
is sent via RPC or
Websockets to an
Etheruem node
Ethereum node
converts this solidity
bytecode to EVM
opcodes
Opcodes are a set of
instructions for the EVM
to execute
Stored on the Blockchain
Proprietary and Confidential © 2019 6
Quorum nodes
A quorum node consists of two things….
A minimalist Geth node to provide
EVM functionality
A Tessera node for private
transaction support
Public DB PrivateState DB Private DB
Connected Connected
Proprietary and Confidential © 2019 7
Let’s visualize the private transaction
Application Layer
Quorum transaction payloads are identical to Ethereum’s transaction payloads with an additional
privateFor parameter
Alice wishes to make a private transaction to Bob
She supplies Bob’s Tessera public key in the privateFor
parameter of the transaction payload:
Proprietary and Confidential © 2019 8
Sending the transaction payload
The application then sends the transaction payload to Alice’s Quorum node
Application Layer
Proprietary and Confidential © 2019 9
Quorum node
The Quorum node detects the presence of the privateFor parameter in the transaction payload.
Each Quorum node comes with it’s own paired Tessera Node ( Transaction Manager + Enclave )
Transaction Payload
Geth Client
Transaction Manager Enclave
Quorum Node
Geth Client Transaction Manager Enclave
Quorum Node
Tessera Node
Tessera Node
Proprietary and Confidential © 2019 10
Tessera node (Alice’s)
Transaction manager makes a
call to the Enclave with the
transaction payload
Enclave verifies the transaction payload
Enclave
Enclave generates a random nonce(an
arbitrary number) and a RMK (an
arbitrary password)
Transaction Manager
Enclave
Proprietary and Confidential © 2019 11
Tessera node (Alice’s)
Enclave
EncodedABI payload is
encrypted using the nonce and
RMK
Proprietary and Confidential © 2019 12
Tessera node (Alice’s)
Enclave
Alice’s Tessera Private Key and
Bob’s Tessera Public Key
(supplied in transaction payload)
and a random Number is used
to encrypt the RMK itself
Encrypted RMK and encrypted
payload sent back to Alice’s TMTransaction Manager
Proprietary and Confidential © 2019 13
Tessera Node (Alice’s)
Transaction Manager
The transaction manager (Alice) hashes
the encrypted payload, and uses the hash
as a key to store the encrypted payload &
encrypted RMK in the private database
This same information is sent to Bob’s
transaction manager and stores in his
own private database
Bob’s Transaction manager
acknowledges receipt
Alice’s transaction manager
then returns hash to Alice’s
Quorum node Bob’s Transaction
Manager
Proprietary and Confidential © 2019 14
Quorum node (Alice’s)
Alice’s Quorum node then replaces the data parameter in the transaction payload with the hash
received from Alice’s transaction manager
It also replaces the v value in the transactional receipt to tell other quorum nodes that it is a
private transaction, and not a normal transaction with nonsensical bytecode
Now the transaction can be propagated by the node into the blockchain normally as per standard
Ethereum protocol. Every quorum node will receive this private transaction.
Note the change in the data
parameter
Proprietary and Confidential © 2019 15
Quorum network
1. All parties will receive the private transactions
2. Everyone will try to decrypt it
How do nodes know that they are party to the private transaction??
Proprietary and Confidential © 2019 16
Quorum Node (Bob’s)
Bob is party to the private transaction
Bob’s quorum node receives a
transaction receipt with a V value
of 37 or 38.
Bob’s quorum node then obtains
the hash in the data parameter of
the transaction payload
Bob’s transaction manager will
do a lookup for this hash and see
if it exists!
Transaction ManagerQuorum Node
Proprietary and Confidential © 2019 17
Tessera Node (Bob’s)
Decryption
Since Bob holds the transaction,
he can obtain the encrypted
payload and encrypted RMK in
his private database
Using his Tessera Private
Key, he can first unencrypt
the encrypted RMK
Using this unencrypted RMK, he
can now decrypt the encrypted
transaction payload
The decrypted payload is valid bytecode
Bytecode sent back to Bob’s
transaction manager
Proprietary and Confidential © 2019 18
Quorum Node (Bob’s)
Using the unencrypted bytecode, the EVM can now do
computations as per normal.
Bytecode is discarded once it’s used and privateStateDB is
updated accordingly to the instructions in the opcodes
Proprietary and Confidential © 2019 19
Quorum Nodes (Candice)
Candice is not party to the transaction sent by Alice
Candice’s quorum node receives a
transaction payload with a V value of 37 or
38
Candice’s quorum node then obtains the hash
in the data parameter of the transaction
payload
Candice’s transaction manager will look up this
hash, and the corresponding encrypted data
does not exist.
Candice’s node skips this transaction.
Proprietary and Confidential © 2019 20
Demonstration & Code
1. Create a project on Chainstack
2. Download this repository :
https://github.com/chainstack/quorum-iot-tutorial
3. Install Node.JS
4. Enjoy!
Let’s spin up a Quorum network using Chainstack
Proprietary and Confidential © 2019 21
Summary
Transaction Payload Quorum Node Transaction Manager Enclave
TxPayload sent
Send txPayload to TM Send to Enclave
Return encrypted data
Update
PrivateDB
Returns Tessera Hash
Quorum Node Transaction Manager Enclave
Propagates transaction
with v value of 37/38
Send Encrypted data
Return decrypted data
as bytecode
Returns Bytecode
Checks
for hash PrivateDB
Send txPayload to TM
Returns Encrypted Data
(1)
(2)
(7)
(3)
(4)
(5)
(6)
(8)
(9)
(10)
(12)
(13)
(11)
Send to Bob’s TM
(14)
Proprietary and Confidential © 2019 22
What’s next?
1. Visit our documentation site to quickly create your own Dapp
platforms
https://docs.chainstack.com
2. Create an account on Chainstack (2 week trial)
https://console.chainstack.com
3. Have fun!
Get started with Chainstack
Proprietary and Confidential © 2019 23
Q & A
Proprietary and Confidential © 2019 24
Contact
syahrul.nizam@chainstack.com
Helpful links
https://docs.chainstack.com
https://console.chainstack.com

More Related Content

What's hot

Blockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventBlockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventAraf Karsh Hamid
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsTechracers
 
Blockchain and Internet of Things
Blockchain and Internet of ThingsBlockchain and Internet of Things
Blockchain and Internet of ThingsValerie Lampkin
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchainPriyab Satoshi
 
A Secure Model of IoT Using Blockchain
A Secure Model of IoT Using BlockchainA Secure Model of IoT Using Blockchain
A Secure Model of IoT Using BlockchainAltoros
 
Understanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologyUnderstanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologySuraj Kumar Jana
 
Decentralized applications 101: How and why to build a DApp
Decentralized applications 101: How and why to build a DAppDecentralized applications 101: How and why to build a DApp
Decentralized applications 101: How and why to build a DAppErik Trautman
 
How To Become A Blockchain Engineer
How To Become A Blockchain EngineerHow To Become A Blockchain Engineer
How To Become A Blockchain Engineer101 Blockchains
 
Blockchain 101 by imran bashir
Blockchain 101  by imran bashirBlockchain 101  by imran bashir
Blockchain 101 by imran bashirImran Bashir
 
Blockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in LibrariesBlockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in LibrariesNabi Hasan
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricAraf Karsh Hamid
 
Blockchain Powerpoint Presentation Slides
Blockchain Powerpoint Presentation SlidesBlockchain Powerpoint Presentation Slides
Blockchain Powerpoint Presentation SlidesSlideTeam
 
Web3 Infrastructure Thesis
Web3 Infrastructure Thesis Web3 Infrastructure Thesis
Web3 Infrastructure Thesis SeanStuart17
 
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...Alessandro Sanino
 
Disadvantages of Blockchain
Disadvantages of BlockchainDisadvantages of Blockchain
Disadvantages of Blockchain101 Blockchains
 
BLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.pptBLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.pptjishnub8
 

What's hot (20)

What is merkle tree
What is merkle treeWhat is merkle tree
What is merkle tree
 
Blockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventBlockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - Clavent
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 
Blockchain and Internet of Things
Blockchain and Internet of ThingsBlockchain and Internet of Things
Blockchain and Internet of Things
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
 
A Secure Model of IoT Using Blockchain
A Secure Model of IoT Using BlockchainA Secure Model of IoT Using Blockchain
A Secure Model of IoT Using Blockchain
 
Understanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologyUnderstanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger Technology
 
Decentralized applications 101: How and why to build a DApp
Decentralized applications 101: How and why to build a DAppDecentralized applications 101: How and why to build a DApp
Decentralized applications 101: How and why to build a DApp
 
How To Become A Blockchain Engineer
How To Become A Blockchain EngineerHow To Become A Blockchain Engineer
How To Become A Blockchain Engineer
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Blockchain 101 by imran bashir
Blockchain 101  by imran bashirBlockchain 101  by imran bashir
Blockchain 101 by imran bashir
 
Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain Basics
 
Blockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in LibrariesBlockchain Technology and Its Application in Libraries
Blockchain Technology and Its Application in Libraries
 
Blockchain in healthcare
Blockchain in healthcareBlockchain in healthcare
Blockchain in healthcare
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
 
Blockchain Powerpoint Presentation Slides
Blockchain Powerpoint Presentation SlidesBlockchain Powerpoint Presentation Slides
Blockchain Powerpoint Presentation Slides
 
Web3 Infrastructure Thesis
Web3 Infrastructure Thesis Web3 Infrastructure Thesis
Web3 Infrastructure Thesis
 
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...
 
Disadvantages of Blockchain
Disadvantages of BlockchainDisadvantages of Blockchain
Disadvantages of Blockchain
 
BLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.pptBLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.ppt
 

Similar to How Private Transactions Work on Quorum

Building Blockchain Application with Corda
Building Blockchain Application with CordaBuilding Blockchain Application with Corda
Building Blockchain Application with CordaMohammad Asif
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Simplilearn
 
How to run ethereum smart contracts on hyperledger fabric
How to run ethereum smart contracts on hyperledger fabric How to run ethereum smart contracts on hyperledger fabric
How to run ethereum smart contracts on hyperledger fabric Blockchain Council
 
Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts ArcBlock
 
Blockchain Tokenization
Blockchain TokenizationBlockchain Tokenization
Blockchain TokenizationBellaj Badr
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxWijdenBenothmen1
 
Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12cjchen22
 
Learn The Fundamentals of Corda Development at 101Blockchains
Learn The Fundamentals of Corda Development at 101BlockchainsLearn The Fundamentals of Corda Development at 101Blockchains
Learn The Fundamentals of Corda Development at 101BlockchainsJackSmith435850
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning NetworkShun Shiku
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruLennartF
 
Build your first blockchain application with Amazon Managed Blockchain - SVC2...
Build your first blockchain application with Amazon Managed Blockchain - SVC2...Build your first blockchain application with Amazon Managed Blockchain - SVC2...
Build your first blockchain application with Amazon Managed Blockchain - SVC2...Amazon Web Services
 
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.Qutomatic
 
DevDay: Mike Hearn Keynote, R3
DevDay: Mike Hearn Keynote, R3DevDay: Mike Hearn Keynote, R3
DevDay: Mike Hearn Keynote, R3R3
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshellDaniel Chan
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity FundamentalsEno Bassey
 
Kyber network de fi whitepaper
Kyber network de fi whitepaperKyber network de fi whitepaper
Kyber network de fi whitepaperBlockchainkuDotcom
 
Blockchain DeFi Innovation Insights from Patents
Blockchain DeFi Innovation Insights from PatentsBlockchain DeFi Innovation Insights from Patents
Blockchain DeFi Innovation Insights from PatentsAlex G. Lee, Ph.D. Esq. CLP
 
Bitcoin Overlays & Cloud Security in a World of Global Trade
Bitcoin Overlays & Cloud Security in a World of Global Trade Bitcoin Overlays & Cloud Security in a World of Global Trade
Bitcoin Overlays & Cloud Security in a World of Global Trade nChain
 

Similar to How Private Transactions Work on Quorum (20)

Building Blockchain Application with Corda
Building Blockchain Application with CordaBuilding Blockchain Application with Corda
Building Blockchain Application with Corda
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
 
How to run ethereum smart contracts on hyperledger fabric
How to run ethereum smart contracts on hyperledger fabric How to run ethereum smart contracts on hyperledger fabric
How to run ethereum smart contracts on hyperledger fabric
 
Ivy Block - technicals.pdf
Ivy Block - technicals.pdfIvy Block - technicals.pdf
Ivy Block - technicals.pdf
 
Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts
 
Blockchain Tokenization
Blockchain TokenizationBlockchain Tokenization
Blockchain Tokenization
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptx
 
Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12Network Enhancements on BitVisor for BitVisor Summit 12
Network Enhancements on BitVisor for BitVisor Summit 12
 
Learn The Fundamentals of Corda Development at 101Blockchains
Learn The Fundamentals of Corda Development at 101BlockchainsLearn The Fundamentals of Corda Development at 101Blockchains
Learn The Fundamentals of Corda Development at 101Blockchains
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru
 
Cloud Native SDN
Cloud Native SDNCloud Native SDN
Cloud Native SDN
 
Build your first blockchain application with Amazon Managed Blockchain - SVC2...
Build your first blockchain application with Amazon Managed Blockchain - SVC2...Build your first blockchain application with Amazon Managed Blockchain - SVC2...
Build your first blockchain application with Amazon Managed Blockchain - SVC2...
 
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.WHAT IS CRYPTOCURRENCY  EXPECTED APPLICATIONS.
WHAT IS CRYPTOCURRENCY EXPECTED APPLICATIONS.
 
DevDay: Mike Hearn Keynote, R3
DevDay: Mike Hearn Keynote, R3DevDay: Mike Hearn Keynote, R3
DevDay: Mike Hearn Keynote, R3
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshell
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
 
Kyber network de fi whitepaper
Kyber network de fi whitepaperKyber network de fi whitepaper
Kyber network de fi whitepaper
 
Blockchain DeFi Innovation Insights from Patents
Blockchain DeFi Innovation Insights from PatentsBlockchain DeFi Innovation Insights from Patents
Blockchain DeFi Innovation Insights from Patents
 
Bitcoin Overlays & Cloud Security in a World of Global Trade
Bitcoin Overlays & Cloud Security in a World of Global Trade Bitcoin Overlays & Cloud Security in a World of Global Trade
Bitcoin Overlays & Cloud Security in a World of Global Trade
 

Recently uploaded

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

How Private Transactions Work on Quorum

  • 1. Proprietary and Confidential © 2019 1 Syahrul Nizam, Developer Advocate Quorum meetup How do private transactions work on Quorum?
  • 2. Proprietary and Confidential © 2019 2 Presented by Syahrul Nizam Developer Advocate Blockchain enthusiast with experience in creating & deploying Smart Contracts on Ethereum Proprietary and Confidential © 2019 2 Presented by Syahrul Nizam Developer Advocate Blockchain enthusiast with experience in creating & deploying Smart Contracts on Ethereum
  • 3. Proprietary and Confidential © 2019 3 The innerworkings of Ethereum The Ethereum network is made up of nodes, each running an Ethereum client like Geth Miners Ethereum Node Blockchain Storage Genesis block Block 1 Block (n-1) Block n Interface Developers
  • 4. Proprietary and Confidential © 2019 4 What is Quorum? 1. Quorum is a Ethereum based blockchain, designed for use by Enterprises. 2. It provides smart contract capability, much like Ethereum 3. What makes Quorum special is that it has support for private transactions, which is impossible on Ethereum (somewhat)
  • 5. Proprietary and Confidential © 2019 5 Transactions in Ethereum A graphical representation of how transactions are propagated in a regular Ethereum network Application creates a transaction payload Transaction payload is compiled into solidity bytecode Transaction payload is sent via RPC or Websockets to an Etheruem node Ethereum node converts this solidity bytecode to EVM opcodes Opcodes are a set of instructions for the EVM to execute Stored on the Blockchain
  • 6. Proprietary and Confidential © 2019 6 Quorum nodes A quorum node consists of two things…. A minimalist Geth node to provide EVM functionality A Tessera node for private transaction support Public DB PrivateState DB Private DB Connected Connected
  • 7. Proprietary and Confidential © 2019 7 Let’s visualize the private transaction Application Layer Quorum transaction payloads are identical to Ethereum’s transaction payloads with an additional privateFor parameter Alice wishes to make a private transaction to Bob She supplies Bob’s Tessera public key in the privateFor parameter of the transaction payload:
  • 8. Proprietary and Confidential © 2019 8 Sending the transaction payload The application then sends the transaction payload to Alice’s Quorum node Application Layer
  • 9. Proprietary and Confidential © 2019 9 Quorum node The Quorum node detects the presence of the privateFor parameter in the transaction payload. Each Quorum node comes with it’s own paired Tessera Node ( Transaction Manager + Enclave ) Transaction Payload Geth Client Transaction Manager Enclave Quorum Node Geth Client Transaction Manager Enclave Quorum Node Tessera Node Tessera Node
  • 10. Proprietary and Confidential © 2019 10 Tessera node (Alice’s) Transaction manager makes a call to the Enclave with the transaction payload Enclave verifies the transaction payload Enclave Enclave generates a random nonce(an arbitrary number) and a RMK (an arbitrary password) Transaction Manager Enclave
  • 11. Proprietary and Confidential © 2019 11 Tessera node (Alice’s) Enclave EncodedABI payload is encrypted using the nonce and RMK
  • 12. Proprietary and Confidential © 2019 12 Tessera node (Alice’s) Enclave Alice’s Tessera Private Key and Bob’s Tessera Public Key (supplied in transaction payload) and a random Number is used to encrypt the RMK itself Encrypted RMK and encrypted payload sent back to Alice’s TMTransaction Manager
  • 13. Proprietary and Confidential © 2019 13 Tessera Node (Alice’s) Transaction Manager The transaction manager (Alice) hashes the encrypted payload, and uses the hash as a key to store the encrypted payload & encrypted RMK in the private database This same information is sent to Bob’s transaction manager and stores in his own private database Bob’s Transaction manager acknowledges receipt Alice’s transaction manager then returns hash to Alice’s Quorum node Bob’s Transaction Manager
  • 14. Proprietary and Confidential © 2019 14 Quorum node (Alice’s) Alice’s Quorum node then replaces the data parameter in the transaction payload with the hash received from Alice’s transaction manager It also replaces the v value in the transactional receipt to tell other quorum nodes that it is a private transaction, and not a normal transaction with nonsensical bytecode Now the transaction can be propagated by the node into the blockchain normally as per standard Ethereum protocol. Every quorum node will receive this private transaction. Note the change in the data parameter
  • 15. Proprietary and Confidential © 2019 15 Quorum network 1. All parties will receive the private transactions 2. Everyone will try to decrypt it How do nodes know that they are party to the private transaction??
  • 16. Proprietary and Confidential © 2019 16 Quorum Node (Bob’s) Bob is party to the private transaction Bob’s quorum node receives a transaction receipt with a V value of 37 or 38. Bob’s quorum node then obtains the hash in the data parameter of the transaction payload Bob’s transaction manager will do a lookup for this hash and see if it exists! Transaction ManagerQuorum Node
  • 17. Proprietary and Confidential © 2019 17 Tessera Node (Bob’s) Decryption Since Bob holds the transaction, he can obtain the encrypted payload and encrypted RMK in his private database Using his Tessera Private Key, he can first unencrypt the encrypted RMK Using this unencrypted RMK, he can now decrypt the encrypted transaction payload The decrypted payload is valid bytecode Bytecode sent back to Bob’s transaction manager
  • 18. Proprietary and Confidential © 2019 18 Quorum Node (Bob’s) Using the unencrypted bytecode, the EVM can now do computations as per normal. Bytecode is discarded once it’s used and privateStateDB is updated accordingly to the instructions in the opcodes
  • 19. Proprietary and Confidential © 2019 19 Quorum Nodes (Candice) Candice is not party to the transaction sent by Alice Candice’s quorum node receives a transaction payload with a V value of 37 or 38 Candice’s quorum node then obtains the hash in the data parameter of the transaction payload Candice’s transaction manager will look up this hash, and the corresponding encrypted data does not exist. Candice’s node skips this transaction.
  • 20. Proprietary and Confidential © 2019 20 Demonstration & Code 1. Create a project on Chainstack 2. Download this repository : https://github.com/chainstack/quorum-iot-tutorial 3. Install Node.JS 4. Enjoy! Let’s spin up a Quorum network using Chainstack
  • 21. Proprietary and Confidential © 2019 21 Summary Transaction Payload Quorum Node Transaction Manager Enclave TxPayload sent Send txPayload to TM Send to Enclave Return encrypted data Update PrivateDB Returns Tessera Hash Quorum Node Transaction Manager Enclave Propagates transaction with v value of 37/38 Send Encrypted data Return decrypted data as bytecode Returns Bytecode Checks for hash PrivateDB Send txPayload to TM Returns Encrypted Data (1) (2) (7) (3) (4) (5) (6) (8) (9) (10) (12) (13) (11) Send to Bob’s TM (14)
  • 22. Proprietary and Confidential © 2019 22 What’s next? 1. Visit our documentation site to quickly create your own Dapp platforms https://docs.chainstack.com 2. Create an account on Chainstack (2 week trial) https://console.chainstack.com 3. Have fun! Get started with Chainstack
  • 23. Proprietary and Confidential © 2019 23 Q & A
  • 24. Proprietary and Confidential © 2019 24 Contact syahrul.nizam@chainstack.com Helpful links https://docs.chainstack.com https://console.chainstack.com

Editor's Notes

  1. I’m Syahrul– developer advocate for Chainstack. I’m pretty much a blockchain enthusiasts and I love experimenting with blockchain technologies. It's fun because everything about blockchain is always changing. Hey maybe this tutorial might be outdated in 6 months and it will no longer work! The space is moving at lightspeed and whats nice is that you can always learn new things