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 R3Corda - Architecture Overview - Concepts and Components

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 R3Corda - Architecture Overview - Concepts and Components (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 Gokul Alex

Blockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A ReviewBlockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A ReviewGokul Alex
 
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDFDEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDFGokul Alex
 
Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship Gokul Alex
 
Decentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An IntroductionDecentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An IntroductionGokul Alex
 
Covid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity ProtocolsCovid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity ProtocolsGokul Alex
 
Cybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way ForwardCybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way ForwardGokul Alex
 
Creative Careers for Post Pandemic Times
Creative Careers for Post Pandemic TimesCreative Careers for Post Pandemic Times
Creative Careers for Post Pandemic TimesGokul Alex
 
Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020Gokul Alex
 
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...Gokul Alex
 
A Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsA Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsGokul Alex
 
Applying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital TransformationApplying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital TransformationGokul Alex
 
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...Gokul Alex
 
Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies Gokul Alex
 
Cloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and TechniquesCloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and TechniquesGokul Alex
 
Quantum Computing - A History in the Making
Quantum Computing - A History in the Making Quantum Computing - A History in the Making
Quantum Computing - A History in the Making Gokul Alex
 
Future of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging TechnologiesFuture of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging TechnologiesGokul Alex
 
Cloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and FrontiersCloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and FrontiersGokul Alex
 
Introduction to Blockchain Business Models
Introduction to Blockchain Business ModelsIntroduction to Blockchain Business Models
Introduction to Blockchain Business ModelsGokul Alex
 
Blockchain and Cryptography - A Primer
Blockchain and Cryptography - A PrimerBlockchain and Cryptography - A Primer
Blockchain and Cryptography - A PrimerGokul Alex
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsGokul Alex
 

More from Gokul Alex (20)

Blockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A ReviewBlockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A Review
 
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDFDEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
 
Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship
 
Decentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An IntroductionDecentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An Introduction
 
Covid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity ProtocolsCovid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity Protocols
 
Cybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way ForwardCybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way Forward
 
Creative Careers for Post Pandemic Times
Creative Careers for Post Pandemic TimesCreative Careers for Post Pandemic Times
Creative Careers for Post Pandemic Times
 
Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020
 
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
 
A Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsA Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic Concepts
 
Applying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital TransformationApplying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital Transformation
 
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
 
Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies
 
Cloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and TechniquesCloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and Techniques
 
Quantum Computing - A History in the Making
Quantum Computing - A History in the Making Quantum Computing - A History in the Making
Quantum Computing - A History in the Making
 
Future of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging TechnologiesFuture of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging Technologies
 
Cloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and FrontiersCloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and Frontiers
 
Introduction to Blockchain Business Models
Introduction to Blockchain Business ModelsIntroduction to Blockchain Business Models
Introduction to Blockchain Business Models
 
Blockchain and Cryptography - A Primer
Blockchain and Cryptography - A PrimerBlockchain and Cryptography - A Primer
Blockchain and Cryptography - A Primer
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance Models
 

Recently uploaded

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 

Recently uploaded (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

R3Corda - Architecture Overview - Concepts and Components

  • 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/