SlideShare a Scribd company logo
1 of 88
Download to read offline
R3 Corda
AICTE STTP 2020 on Blockchain Technology by https://twitter.com/gokulgaze
Corda - Basic Concepts
States - The states represent shared facts on the ledger
Transactions - The transactions update the ledger states
Contracts - The contracts govern the ways in which states can evolve over time
Flows - The flows describe the interactions that must occur between parties to achieve consensus
Nodes - Each node contains an instance of Corda, one or more CorDapps, and so on
Corda - Advanced Concepts
Consensus - How parties on the network reach consensus about shared facts on the ledger
Notaries - The component that assures uniqueness consensus (prevents double spends)
Vault - The component that stores on-ledger shared facts for a node
Corda - Novel Features
Time Windows -Transactions validated as having fallen after, before or within a particular time window
Oracles - Transactions can include off-ledger facts retrieved using Oracles
Transaction Tear-Offs - Transactions can be signed by parties who have access to only a limited view
Trade-Offs - Trade-offs that have been made in designing Corda and CorDapps
Nodes and Network Maps
The network map service maps each well-known node identity to an IP address. These IP addresses are
used for messaging between nodes.
Nodes can also generate confidential identities for individual transactions. The certificate chain linking a
confidential identity to a well-known node identity or real-world legal identity is only distributed on a
need-to-know basis. If confidential identities are being used, this ensures that even if an attacker gets
access to an unencrypted transaction, they cannot identify the transaction’s participants without
additional information.
Shared Facts
In Corda, there is no single central store of data. Instead, each node maintains its own database of those
facts that it is aware of. The result of this design is that each peer only sees a subset of facts on the ledger,
and no peer is aware of the ledger in its entirety.
On Corda, there is no central or general ledger operating with agency on behalf of all of the nodes on the
network. Instead, each node on the network maintains its own vault containing all of its known facts. You
can think of this vault as being a database or simple table.
Corda guarantees that whenever one of these facts is shared by multiple nodes on the network, it evolves
in lockstep in the database of every node that is aware of it.
States
A state is an immutable object representing a fact known by one or more Corda nodes at a specific point
in time.
States can contain arbitrary data, allowing them to represent facts of any kind (e.g. stocks, bonds, loans,
KYC data, identity information…).
As well as any information about the fact itself, the state also contains a reference to the contractthat
governs the evolution of the state over time.
State Sequences
As states are immutable, they cannot be modified directly to reflect a change in the state of the world.
Instead, the lifecycle of a shared fact over time is represented by a state sequence.
When a state needs to be updated, we create a new version of the state representing the new state of the
world, and mark the existing state as historic.
This sequence of state replacements gives us a full view of the evolution of the shared fact over time.
Reference States
Not all states need to be updated by the parties which use them. In the case of reference data, there is a
common pattern where one party creates reference data, which is then used (but not updated) by other
parties.
For this use-case, the states containing reference data are referred to as “reference states”. Syntactically,
reference states are no different to regular states. However, they are treated different by Corda
transactions
Transactions
Corda uses a UTXO (unspent transaction output) model where every state on the ledger is immutable.
The ledger evolves over time by applying transactions.
Transactions update the ledger by marking zero or more existing ledger states as historic (the inputs), and
producing zero or more new ledger states (the outputs).
Transactions represent a single link in the state sequences seen in States.
Transaction Dynamics
A transaction can contain any number of inputs, outputs and references of any type:
● They can include many different state types (states may represent cash or bonds, for example)
● They can be issuances (have zero inputs) or exits (have zero outputs)
● They can merge or split fungible assets (for example, they may combine a $2 state and a $5 state into a
$7 cash state)
Transaction Types
Transactions are atomic; either all of the transaction’s proposed changes are accepted, or none are.
There are two basic types of transactions:
● Notary-change transactions (used to change a state’s notary - see Notaries)
● General transactions (used for everything else)
Transaction Chains
When creating a new transaction, the output states that the transaction proposes do not exist yet, and must
therefore be created by the proposer or proposers of the transaction. However, the input states already exist as
the outputs of previous transactions. We therefore include them in the proposed transaction by reference.
These input states references are a combination of:
● The hash of the transaction that created the input
● The input’s index in the outputs of the previous transaction
Transaction Builders
Initially, a transaction is just a proposal to update the ledger. It represents the future state of the ledger that is
desired by the transaction builders:
To become reality, the transaction must receive signatures from all of the required signers (see Commands,
below). Each required signer appends their signature to the transaction to indicate that they approve the
proposal:
Transaction Validity
Each required signer should only sign the transaction if the following two conditions hold:
● Transaction validity: For both the proposed transaction, and every transaction in the chain of
transactions that created the current proposed transaction’s inputs:>
○ The transaction is digitally signed by all the required parties
○ The transaction is contractually valid
● Transaction uniqueness: There exists no other committed transaction that has consumed any of the
inputs to our proposed transaction
Other Transaction Components
As well as input states and output states, transactions contain:
● Commands
● Attachments
● Time-Window
● Notary
Transaction Components - Example
For example, suppose we have a transaction where Alice uses a £5 cash payment to pay off £5 of an IOU with
Bob.
This transaction comprises two commands: a settlement command which reduces the amount outstanding on
the IOU, and a payment command which changes the ownership of £5 from Alice to Bob.
It also has two supporting attachments, and will only be notarised by NotaryClusterA
if the notary pool receives it within the specified time-window.
Transaction Commands
Including a command in a transaction allows us to indicate the transaction’s intent, affecting how we
check the validity of the transaction.
Each command is also associated with a list of one or more signers. By taking the union of all the public
keys listed in the commands, we get the list of the transaction’s required signers.
Transaction Attachments
Sometimes, we have a large piece of data that can be reused across many different transactions.
Some examples: A calendar of public holidays, Supporting legal documentation, A table of currency codes
Each transaction can refer to zero or more attachments by hash.
These attachments are ZIP/JAR files containing arbitrary content.
The information in these files can then be used when checking the transaction’s validity.
Transaction Time Window
In some cases, we want a proposed transaction to only be approved during a certain time-window. For
example:
● An option can only be exercised after a certain date
● A bond may only be redeemed before its expiry date
In such cases, we can add a time-window to the transaction. Time-windows specify the time period during
which the transaction can be committed. The notary pool enforces time-window validity.
Transaction Notary
A notary pool is a network service that provides uniqueness consensus by attesting that, for a given
transaction, it has not already signed other transactions that consume any of the proposed transaction
input states. The notary pool provides the point of finality in the system.
Note that if the notary entity is absent then the transaction is not notarised at all. This is intended for
issuance/genesis transactions that don’t consume any other states and thus can’t double spend anything.
Transaction Verification
Recall that a transaction is only valid if it is digitally signed by all required signers. However, even if a
transaction gathers all the required signatures, it is only valid if it is also contractually valid.
Contract validity is defined as follows:
● Each transaction state specifies a contract type and a contract takes a transaction as input,
● states whether the transaction is considered valid based on the contract’s rules
● A transaction is only valid if the contract of every input state and every output state considers it to
be valid
Contract Capabilities
The contract code has access to the full capabilities of the language, including:
● Checking the number of inputs, outputs, commands, or attachments
● Checking whether there is a time window or not
● Checking the contents of any of these components
● Looping constructs, variable assignment, function calls, helper methods, and so on
● Grouping similar states to validate them as a group; for example, imposing a rule on the combined
value of all the cash states
Contract Sandbox
Transaction verification must be deterministic - a contract should either always accept or always reject a
given transaction.
For example, transaction validity cannot depend on the time at which validation is conducted, or the
amount of information the peer running the contract holds.
This is a necessary condition to ensure that all peers on the network reach consensus regarding the
validity of a given ledger update.
Deterministic Sandbox
The sandbox has a whitelist that prevents the contract from importing libraries that could be a source of
non-determinism.
This includes libraries that provide the current time, random number generators, libraries that provide
file system access or networking libraries, for example.
Ultimately, the only information available to the contract when verifying the transaction is the
information included in the transaction itself.
Corda Flows
● Flows automate the process of agreeing ledger updates
● Communication between nodes only occurs in the context of these flows, and is point-to-point
● Built-in flows are provided to automate common tasks
Flow Framework
Rather than having to specify these steps manually, Corda automates the process using flows. A flow is a
sequence of steps that tells a node how to achieve a specific ledger update, such as issuing an asset or
settling a trade.
Once a given business process has been encapsulated in a flow and installed on the node as part of a
CorDapp, the node’s owner can instruct the node to kick off this business process at any time using an
RPC call.
The flow abstracts all the networking, I/O and concurrency issues away from the node owner.
Flow Framework
All activity on the node occurs in the context of these flows. Unlike contracts, flows do not execute in a
sandbox, meaning that nodes can perform actions such as networking, I/O and use sources of randomness
within the execution of a flow.
Nodes communicate by passing messages between flows. Each node has zero or more flow classes that are
registered to respond to messages from a single other flow.
Flows can be composed by starting a flow as a subprocess in the context of another flow. The flow that is
started as a subprocess is known as a subflow. The parent flow will wait until the subflow returns.
Flow Library
Corda provides a library of flows to handle common tasks, meaning that developers do not have to
redefine the logic behind common processes such as:
● Notarising and recording a transaction
● Gathering signatures from counterparty nodes
● Verifying a chain of transactions
Concurrency in Flows
The flow framework allows nodes to have many flows active at once. These flows may last days, across
node restarts and even upgrades.
This is achieved by serializing flows to disk whenever they enter a blocking state (e.g. when they’re
waiting on I/O or a networking call). Instead of waiting for the flow to become unblocked, the node
immediately starts work on any other scheduled flows, only returning to the original flow at a later date.
Vault
Each node on the network maintains a vault - a database where it tracks all the current and historic states that it
is aware of, and which it considers to be relevant to itself:
Corda Nodes
Corda Consensus
Two Types of Consensus Algorithms
Determining whether a proposed transaction is a valid ledger update involves reaching two types of
consensus:
● Validity consensus - this is checked by each required signer before they sign the transaction
● Uniqueness consensus - this is only checked by a notary service
Corda Security
Corda Vault
Corda Apps
Corda Flows
Transaction Lifecycle
State Management
Corda Internals
Java Concurrency in Corda
Quasar is a Java library that uses clever byte-code rewriting and exceptions to provide continuations. The
main concept is a fiber – a thread like construct that runs code, but can decide to suspend itself, at which
point the state of it gets collected and stashed away, to be re-hydrated and continued later.
In order to achieve this, Quasar requires any method that can be suspended to be annotated with its
@Suspendable annotation. At start-up time/just before JIT, it rewrites the bytecode of all these methods.
To suspend a fiber, the code calls a specific quasar function (e.g. parkAndSerialize) which throws
aSuspendExecution exception. This exception passes through all user code and gets caught by Quasar,
which can extract the call stack to squirrel it away in serialized form.
Java Concurrency Libraries
Corda State Machine
The state machine is the core of what is called the Flow Framework in our user documentation. It wraps
quasar and uses it to turn the linear Kotlin or Java code inside the flow logic implementation in a CorDapp
into code that can be suspended, the current state of which can be checkpointed, and that can be rerun
from any checkpoint.
The state machine has an event feed, and one or more execution threads. Events trigger transitions
between the possible states. Every flow starts in the Pending state as a start flow message, and then
transitions to running. In the easiest case, it finally reaches the end of its run function and transitions to
success, the result gets returned and any checkpoint data cleaned up.
Corda State Machine
Corda Approach
Corda Integrations
Thank You!EPIC Knowledge Society
● Our Website - https://epicknowledgesociety.com
● Our GitHub - https://github.com/EPICKnowledgeSociety
● Our Telegram Group - https://t.me/EPICBlockchainCollective
● Our Twitter Handle - https://twitter.com/epic__knowledge
● Our Facebook Page - https://www.facebook.com/epicknowledgesociety
● Our SlideShare Profile - https://www.slideshare.net/EPICKnowledgeSociety
● Our Instagram Profile - https://www.instagram.com/epic_knowledge_society/
● Our LinkedIn Profile - https://www.linkedin.com/company/epicknowledgesociety/

More Related Content

What's hot

Block chain - Applicability in Capital Market
Block chain  - Applicability in Capital MarketBlock chain  - Applicability in Capital Market
Block chain - Applicability in Capital MarketAdarsh Panda
 
Bitcoin cash standards
Bitcoin cash standardsBitcoin cash standards
Bitcoin cash standardsnoyenmaih
 
Blockchain Fundamentals
Blockchain FundamentalsBlockchain Fundamentals
Blockchain FundamentalsBruno Lowagie
 
Introduction to Consensus techniques
Introduction to Consensus techniques Introduction to Consensus techniques
Introduction to Consensus techniques Vasiliy Suvorov
 
The problem with blockchains
The problem with blockchainsThe problem with blockchains
The problem with blockchainsGurkirat Singh
 
Boolberry reduces blockchain bloat
Boolberry reduces blockchain bloatBoolberry reduces blockchain bloat
Boolberry reduces blockchain bloatboolberry
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain TechnologyShubhAm RaWat
 
Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rezrezeva
 

What's hot (10)

Block chain - Applicability in Capital Market
Block chain  - Applicability in Capital MarketBlock chain  - Applicability in Capital Market
Block chain - Applicability in Capital Market
 
bitcoin_presentation
bitcoin_presentationbitcoin_presentation
bitcoin_presentation
 
Bitcoin cash standards
Bitcoin cash standardsBitcoin cash standards
Bitcoin cash standards
 
Blockchain Fundamentals
Blockchain FundamentalsBlockchain Fundamentals
Blockchain Fundamentals
 
Introduction to Consensus techniques
Introduction to Consensus techniques Introduction to Consensus techniques
Introduction to Consensus techniques
 
The problem with blockchains
The problem with blockchainsThe problem with blockchains
The problem with blockchains
 
Bitcoins Math
Bitcoins MathBitcoins Math
Bitcoins Math
 
Boolberry reduces blockchain bloat
Boolberry reduces blockchain bloatBoolberry reduces blockchain bloat
Boolberry reduces blockchain bloat
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rez
 

Similar to Corda Blockchain Technology STTP

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
 
Introduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrenciesIntroduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrenciesAurobindo Nayak
 
Introducing r3 corda™ a distributed ledger designed for financial services
Introducing r3 corda™  a distributed ledger designed for financial servicesIntroducing r3 corda™  a distributed ledger designed for financial services
Introducing r3 corda™ a distributed ledger designed for financial servicesRazi Rais
 
Primer to smart contracts, smart property, trustless asset management
Primer to smart contracts, smart property, trustless asset managementPrimer to smart contracts, smart property, trustless asset management
Primer to smart contracts, smart property, trustless asset managementTim Swanson
 
Blockchain intro - the basics
Blockchain intro - the basicsBlockchain intro - the basics
Blockchain intro - the basicsZakir Hoosen
 
Blockchain-intro (2)
Blockchain-intro (2)Blockchain-intro (2)
Blockchain-intro (2)Zakir Hoosen
 
trestor-whitepaper-voting
trestor-whitepaper-votingtrestor-whitepaper-voting
trestor-whitepaper-votingKunal Dixit
 
North Atlanta Blockchain - Hyperledger A Brief Overview
North Atlanta Blockchain -  Hyperledger A Brief OverviewNorth Atlanta Blockchain -  Hyperledger A Brief Overview
North Atlanta Blockchain - Hyperledger A Brief OverviewPrasadh Kannan
 
The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained Flexsin
 
IRJET- Blockchain-A Secure Mode for Transaction
IRJET- Blockchain-A Secure Mode for TransactionIRJET- Blockchain-A Secure Mode for Transaction
IRJET- Blockchain-A Secure Mode for TransactionIRJET Journal
 
Iata blockchain presentation icaew suisse branch
Iata blockchain presentation   icaew suisse branchIata blockchain presentation   icaew suisse branch
Iata blockchain presentation icaew suisse branchTim Moss
 
Hyperledger Architecture Vol 2 > Smart Contracts
Hyperledger Architecture Vol 2 > Smart ContractsHyperledger Architecture Vol 2 > Smart Contracts
Hyperledger Architecture Vol 2 > Smart ContractsVIJAY MUTHU
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchainPriyab Satoshi
 
Ripple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout WhitepaperRipple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout WhitepaperTrung Vu
 
Understanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologyUnderstanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologySuraj Kumar Jana
 

Similar to Corda Blockchain Technology STTP (20)

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
 
Introduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrenciesIntroduction to blockchain & cryptocurrencies
Introduction to blockchain & cryptocurrencies
 
Introducing r3 corda™ a distributed ledger designed for financial services
Introducing r3 corda™  a distributed ledger designed for financial servicesIntroducing r3 corda™  a distributed ledger designed for financial services
Introducing r3 corda™ a distributed ledger designed for financial services
 
Ethereum vs fabric vs corda
Ethereum vs fabric vs cordaEthereum vs fabric vs corda
Ethereum vs fabric vs corda
 
Primer to smart contracts, smart property, trustless asset management
Primer to smart contracts, smart property, trustless asset managementPrimer to smart contracts, smart property, trustless asset management
Primer to smart contracts, smart property, trustless asset management
 
Smart contract and smart contract oracles
Smart contract and smart contract oraclesSmart contract and smart contract oracles
Smart contract and smart contract oracles
 
Smart contract and smart contract oracles
Smart contract and smart contract oraclesSmart contract and smart contract oracles
Smart contract and smart contract oracles
 
Smart contract and smart contracts oracles
Smart contract and smart contracts oracles Smart contract and smart contracts oracles
Smart contract and smart contracts oracles
 
Blockchain intro - the basics
Blockchain intro - the basicsBlockchain intro - the basics
Blockchain intro - the basics
 
Blockchain-intro (2)
Blockchain-intro (2)Blockchain-intro (2)
Blockchain-intro (2)
 
trestor-whitepaper-voting
trestor-whitepaper-votingtrestor-whitepaper-voting
trestor-whitepaper-voting
 
North Atlanta Blockchain - Hyperledger A Brief Overview
North Atlanta Blockchain -  Hyperledger A Brief OverviewNorth Atlanta Blockchain -  Hyperledger A Brief Overview
North Atlanta Blockchain - Hyperledger A Brief Overview
 
The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained
 
IRJET- Blockchain-A Secure Mode for Transaction
IRJET- Blockchain-A Secure Mode for TransactionIRJET- Blockchain-A Secure Mode for Transaction
IRJET- Blockchain-A Secure Mode for Transaction
 
Iata blockchain presentation icaew suisse branch
Iata blockchain presentation   icaew suisse branchIata blockchain presentation   icaew suisse branch
Iata blockchain presentation icaew suisse branch
 
STELLAR.pptx
STELLAR.pptxSTELLAR.pptx
STELLAR.pptx
 
Hyperledger Architecture Vol 2 > Smart Contracts
Hyperledger Architecture Vol 2 > Smart ContractsHyperledger Architecture Vol 2 > Smart Contracts
Hyperledger Architecture Vol 2 > Smart Contracts
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
 
Ripple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout WhitepaperRipple - XRP we know how XRP blockchain throughout Whitepaper
Ripple - XRP we know how XRP blockchain throughout Whitepaper
 
Understanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologyUnderstanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger Technology
 

More from Amritha Antony

EPIC Knowledge Society - Digital Innovation Service Catalog
EPIC Knowledge Society - Digital Innovation Service CatalogEPIC Knowledge Society - Digital Innovation Service Catalog
EPIC Knowledge Society - Digital Innovation Service CatalogAmritha Antony
 
EPIC Knowledge Society Hackathons - Creative Concepts
EPIC Knowledge Society Hackathons - Creative ConceptsEPIC Knowledge Society Hackathons - Creative Concepts
EPIC Knowledge Society Hackathons - Creative ConceptsAmritha Antony
 
Digital Business Technology Platform for Government 2.0.
Digital Business Technology Platform for Government 2.0.Digital Business Technology Platform for Government 2.0.
Digital Business Technology Platform for Government 2.0.Amritha Antony
 
EPIC Knowledge Society - Digital Internship Programs
EPIC Knowledge Society - Digital Internship ProgramsEPIC Knowledge Society - Digital Internship Programs
EPIC Knowledge Society - Digital Internship ProgramsAmritha Antony
 
Blockchain for Business - A Point of View
Blockchain for Business - A Point of ViewBlockchain for Business - A Point of View
Blockchain for Business - A Point of ViewAmritha Antony
 
EPIC Knowledge Society - Blockchain Developer Workshop
EPIC Knowledge Society - Blockchain Developer WorkshopEPIC Knowledge Society - Blockchain Developer Workshop
EPIC Knowledge Society - Blockchain Developer WorkshopAmritha Antony
 

More from Amritha Antony (6)

EPIC Knowledge Society - Digital Innovation Service Catalog
EPIC Knowledge Society - Digital Innovation Service CatalogEPIC Knowledge Society - Digital Innovation Service Catalog
EPIC Knowledge Society - Digital Innovation Service Catalog
 
EPIC Knowledge Society Hackathons - Creative Concepts
EPIC Knowledge Society Hackathons - Creative ConceptsEPIC Knowledge Society Hackathons - Creative Concepts
EPIC Knowledge Society Hackathons - Creative Concepts
 
Digital Business Technology Platform for Government 2.0.
Digital Business Technology Platform for Government 2.0.Digital Business Technology Platform for Government 2.0.
Digital Business Technology Platform for Government 2.0.
 
EPIC Knowledge Society - Digital Internship Programs
EPIC Knowledge Society - Digital Internship ProgramsEPIC Knowledge Society - Digital Internship Programs
EPIC Knowledge Society - Digital Internship Programs
 
Blockchain for Business - A Point of View
Blockchain for Business - A Point of ViewBlockchain for Business - A Point of View
Blockchain for Business - A Point of View
 
EPIC Knowledge Society - Blockchain Developer Workshop
EPIC Knowledge Society - Blockchain Developer WorkshopEPIC Knowledge Society - Blockchain Developer Workshop
EPIC Knowledge Society - Blockchain Developer Workshop
 

Recently uploaded

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 

Recently uploaded (20)

CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 

Corda Blockchain Technology STTP

  • 1. R3 Corda AICTE STTP 2020 on Blockchain Technology by https://twitter.com/gokulgaze
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Corda - Basic Concepts States - The states represent shared facts on the ledger Transactions - The transactions update the ledger states Contracts - The contracts govern the ways in which states can evolve over time Flows - The flows describe the interactions that must occur between parties to achieve consensus Nodes - Each node contains an instance of Corda, one or more CorDapps, and so on
  • 13. Corda - Advanced Concepts Consensus - How parties on the network reach consensus about shared facts on the ledger Notaries - The component that assures uniqueness consensus (prevents double spends) Vault - The component that stores on-ledger shared facts for a node
  • 14. Corda - Novel Features Time Windows -Transactions validated as having fallen after, before or within a particular time window Oracles - Transactions can include off-ledger facts retrieved using Oracles Transaction Tear-Offs - Transactions can be signed by parties who have access to only a limited view Trade-Offs - Trade-offs that have been made in designing Corda and CorDapps
  • 15. Nodes and Network Maps The network map service maps each well-known node identity to an IP address. These IP addresses are used for messaging between nodes. Nodes can also generate confidential identities for individual transactions. The certificate chain linking a confidential identity to a well-known node identity or real-world legal identity is only distributed on a need-to-know basis. If confidential identities are being used, this ensures that even if an attacker gets access to an unencrypted transaction, they cannot identify the transaction’s participants without additional information.
  • 16. Shared Facts In Corda, there is no single central store of data. Instead, each node maintains its own database of those facts that it is aware of. The result of this design is that each peer only sees a subset of facts on the ledger, and no peer is aware of the ledger in its entirety. On Corda, there is no central or general ledger operating with agency on behalf of all of the nodes on the network. Instead, each node on the network maintains its own vault containing all of its known facts. You can think of this vault as being a database or simple table. Corda guarantees that whenever one of these facts is shared by multiple nodes on the network, it evolves in lockstep in the database of every node that is aware of it.
  • 17. States A state is an immutable object representing a fact known by one or more Corda nodes at a specific point in time. States can contain arbitrary data, allowing them to represent facts of any kind (e.g. stocks, bonds, loans, KYC data, identity information…). As well as any information about the fact itself, the state also contains a reference to the contractthat governs the evolution of the state over time.
  • 18. State Sequences As states are immutable, they cannot be modified directly to reflect a change in the state of the world. Instead, the lifecycle of a shared fact over time is represented by a state sequence. When a state needs to be updated, we create a new version of the state representing the new state of the world, and mark the existing state as historic. This sequence of state replacements gives us a full view of the evolution of the shared fact over time.
  • 19. Reference States Not all states need to be updated by the parties which use them. In the case of reference data, there is a common pattern where one party creates reference data, which is then used (but not updated) by other parties. For this use-case, the states containing reference data are referred to as “reference states”. Syntactically, reference states are no different to regular states. However, they are treated different by Corda transactions
  • 20. Transactions Corda uses a UTXO (unspent transaction output) model where every state on the ledger is immutable. The ledger evolves over time by applying transactions. Transactions update the ledger by marking zero or more existing ledger states as historic (the inputs), and producing zero or more new ledger states (the outputs). Transactions represent a single link in the state sequences seen in States.
  • 21. Transaction Dynamics A transaction can contain any number of inputs, outputs and references of any type: ● They can include many different state types (states may represent cash or bonds, for example) ● They can be issuances (have zero inputs) or exits (have zero outputs) ● They can merge or split fungible assets (for example, they may combine a $2 state and a $5 state into a $7 cash state)
  • 22. Transaction Types Transactions are atomic; either all of the transaction’s proposed changes are accepted, or none are. There are two basic types of transactions: ● Notary-change transactions (used to change a state’s notary - see Notaries) ● General transactions (used for everything else)
  • 23. Transaction Chains When creating a new transaction, the output states that the transaction proposes do not exist yet, and must therefore be created by the proposer or proposers of the transaction. However, the input states already exist as the outputs of previous transactions. We therefore include them in the proposed transaction by reference. These input states references are a combination of: ● The hash of the transaction that created the input ● The input’s index in the outputs of the previous transaction
  • 24.
  • 25. Transaction Builders Initially, a transaction is just a proposal to update the ledger. It represents the future state of the ledger that is desired by the transaction builders: To become reality, the transaction must receive signatures from all of the required signers (see Commands, below). Each required signer appends their signature to the transaction to indicate that they approve the proposal:
  • 26. Transaction Validity Each required signer should only sign the transaction if the following two conditions hold: ● Transaction validity: For both the proposed transaction, and every transaction in the chain of transactions that created the current proposed transaction’s inputs:> ○ The transaction is digitally signed by all the required parties ○ The transaction is contractually valid ● Transaction uniqueness: There exists no other committed transaction that has consumed any of the inputs to our proposed transaction
  • 27. Other Transaction Components As well as input states and output states, transactions contain: ● Commands ● Attachments ● Time-Window ● Notary
  • 28.
  • 29. Transaction Components - Example For example, suppose we have a transaction where Alice uses a £5 cash payment to pay off £5 of an IOU with Bob. This transaction comprises two commands: a settlement command which reduces the amount outstanding on the IOU, and a payment command which changes the ownership of £5 from Alice to Bob. It also has two supporting attachments, and will only be notarised by NotaryClusterA if the notary pool receives it within the specified time-window.
  • 30. Transaction Commands Including a command in a transaction allows us to indicate the transaction’s intent, affecting how we check the validity of the transaction. Each command is also associated with a list of one or more signers. By taking the union of all the public keys listed in the commands, we get the list of the transaction’s required signers.
  • 31. Transaction Attachments Sometimes, we have a large piece of data that can be reused across many different transactions. Some examples: A calendar of public holidays, Supporting legal documentation, A table of currency codes Each transaction can refer to zero or more attachments by hash. These attachments are ZIP/JAR files containing arbitrary content. The information in these files can then be used when checking the transaction’s validity.
  • 32. Transaction Time Window In some cases, we want a proposed transaction to only be approved during a certain time-window. For example: ● An option can only be exercised after a certain date ● A bond may only be redeemed before its expiry date In such cases, we can add a time-window to the transaction. Time-windows specify the time period during which the transaction can be committed. The notary pool enforces time-window validity.
  • 33. Transaction Notary A notary pool is a network service that provides uniqueness consensus by attesting that, for a given transaction, it has not already signed other transactions that consume any of the proposed transaction input states. The notary pool provides the point of finality in the system. Note that if the notary entity is absent then the transaction is not notarised at all. This is intended for issuance/genesis transactions that don’t consume any other states and thus can’t double spend anything.
  • 34. Transaction Verification Recall that a transaction is only valid if it is digitally signed by all required signers. However, even if a transaction gathers all the required signatures, it is only valid if it is also contractually valid. Contract validity is defined as follows: ● Each transaction state specifies a contract type and a contract takes a transaction as input, ● states whether the transaction is considered valid based on the contract’s rules ● A transaction is only valid if the contract of every input state and every output state considers it to be valid
  • 35. Contract Capabilities The contract code has access to the full capabilities of the language, including: ● Checking the number of inputs, outputs, commands, or attachments ● Checking whether there is a time window or not ● Checking the contents of any of these components ● Looping constructs, variable assignment, function calls, helper methods, and so on ● Grouping similar states to validate them as a group; for example, imposing a rule on the combined value of all the cash states
  • 36. Contract Sandbox Transaction verification must be deterministic - a contract should either always accept or always reject a given transaction. For example, transaction validity cannot depend on the time at which validation is conducted, or the amount of information the peer running the contract holds. This is a necessary condition to ensure that all peers on the network reach consensus regarding the validity of a given ledger update.
  • 37. Deterministic Sandbox The sandbox has a whitelist that prevents the contract from importing libraries that could be a source of non-determinism. This includes libraries that provide the current time, random number generators, libraries that provide file system access or networking libraries, for example. Ultimately, the only information available to the contract when verifying the transaction is the information included in the transaction itself.
  • 38. Corda Flows ● Flows automate the process of agreeing ledger updates ● Communication between nodes only occurs in the context of these flows, and is point-to-point ● Built-in flows are provided to automate common tasks
  • 39. Flow Framework Rather than having to specify these steps manually, Corda automates the process using flows. A flow is a sequence of steps that tells a node how to achieve a specific ledger update, such as issuing an asset or settling a trade. Once a given business process has been encapsulated in a flow and installed on the node as part of a CorDapp, the node’s owner can instruct the node to kick off this business process at any time using an RPC call. The flow abstracts all the networking, I/O and concurrency issues away from the node owner.
  • 40. Flow Framework All activity on the node occurs in the context of these flows. Unlike contracts, flows do not execute in a sandbox, meaning that nodes can perform actions such as networking, I/O and use sources of randomness within the execution of a flow. Nodes communicate by passing messages between flows. Each node has zero or more flow classes that are registered to respond to messages from a single other flow. Flows can be composed by starting a flow as a subprocess in the context of another flow. The flow that is started as a subprocess is known as a subflow. The parent flow will wait until the subflow returns.
  • 41. Flow Library Corda provides a library of flows to handle common tasks, meaning that developers do not have to redefine the logic behind common processes such as: ● Notarising and recording a transaction ● Gathering signatures from counterparty nodes ● Verifying a chain of transactions
  • 42. Concurrency in Flows The flow framework allows nodes to have many flows active at once. These flows may last days, across node restarts and even upgrades. This is achieved by serializing flows to disk whenever they enter a blocking state (e.g. when they’re waiting on I/O or a networking call). Instead of waiting for the flow to become unblocked, the node immediately starts work on any other scheduled flows, only returning to the original flow at a later date.
  • 43. Vault Each node on the network maintains a vault - a database where it tracks all the current and historic states that it is aware of, and which it considers to be relevant to itself:
  • 44.
  • 46.
  • 47.
  • 48.
  • 50. Two Types of Consensus Algorithms Determining whether a proposed transaction is a valid ledger update involves reaching two types of consensus: ● Validity consensus - this is checked by each required signer before they sign the transaction ● Uniqueness consensus - this is only checked by a notary service
  • 51.
  • 53.
  • 54.
  • 56.
  • 57.
  • 59.
  • 60.
  • 61.
  • 63.
  • 64.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 74.
  • 75.
  • 76.
  • 77.
  • 79. Java Concurrency in Corda Quasar is a Java library that uses clever byte-code rewriting and exceptions to provide continuations. The main concept is a fiber – a thread like construct that runs code, but can decide to suspend itself, at which point the state of it gets collected and stashed away, to be re-hydrated and continued later. In order to achieve this, Quasar requires any method that can be suspended to be annotated with its @Suspendable annotation. At start-up time/just before JIT, it rewrites the bytecode of all these methods. To suspend a fiber, the code calls a specific quasar function (e.g. parkAndSerialize) which throws aSuspendExecution exception. This exception passes through all user code and gets caught by Quasar, which can extract the call stack to squirrel it away in serialized form.
  • 81. Corda State Machine The state machine is the core of what is called the Flow Framework in our user documentation. It wraps quasar and uses it to turn the linear Kotlin or Java code inside the flow logic implementation in a CorDapp into code that can be suspended, the current state of which can be checkpointed, and that can be rerun from any checkpoint. The state machine has an event feed, and one or more execution threads. Events trigger transitions between the possible states. Every flow starts in the Pending state as a start flow message, and then transitions to running. In the easiest case, it finally reaches the end of its run function and transitions to success, the result gets returned and any checkpoint data cleaned up.
  • 84.
  • 86.
  • 87.
  • 88. Thank You!EPIC Knowledge Society ● Our Website - https://epicknowledgesociety.com ● Our GitHub - https://github.com/EPICKnowledgeSociety ● Our Telegram Group - https://t.me/EPICBlockchainCollective ● Our Twitter Handle - https://twitter.com/epic__knowledge ● Our Facebook Page - https://www.facebook.com/epicknowledgesociety ● Our SlideShare Profile - https://www.slideshare.net/EPICKnowledgeSociety ● Our Instagram Profile - https://www.instagram.com/epic_knowledge_society/ ● Our LinkedIn Profile - https://www.linkedin.com/company/epicknowledgesociety/