SlideShare uma empresa Scribd logo
1 de 16
Account Workshop
Questions we want to answered [Not shown]
• Where is Account stored?
• Who is really signing the transaction when I am an account?
• Am I visible to the participants on the network?
• Does the other participants required to have account, if one of the participants want to use
account.
• How is Account mapped/linked with the state?
• What are the problems accounts is trying to solve?
• Can I easily migrate from node based model to account based model and again migrate
from an account based model to a node based model?
• Typical life cycle of an account?
• How can offchain identity be mapped to onchain accounts identity?
• What are the typical use cases when we would want to use accounts?
• Roadmap of accounts
• Can tokens and accounts be integrated
The Problem We Had…
• Corda was not designed to deploy and operate by individuals and small businesses. (such
as, a local corner candy store or my friend Roger)
• Most Cordapp developers will represent their customers. When the number of customers
goes up, the total cost of spinning up a node for every customer becomes costly.
Introducing Corda Accounts
So that:
• A Corda node can host multiple “individuals/small companies” who wants to play a role in a
larger blockchain system. [Increase scalability]
• Consortium can “represent their customers” via accounts, while only spinning up minimal
numbers of nodes depends on the use-case. [Reduce operation cost]
An accounts library allows a Corda node operator to split the
vault into multiple "logical" sub-vaults.
High Level Pictorial Explanation…
NODE A VAULT
ACCOUNT ONE ACCOUNT TWO
KEY MANAGEMENT SERVICE
Stores key pairs
KEY HASH1 : ACCOUNT ONE, NODE A
KEY HASH2 : ACCOUNT ONE, NODE A
KEY HASH3 : ACCOUTN TWO, NODE A
KEY HASH4 : ACCOUNT X, NODE B
IDENTITY SERVICE
NO ACCOUNT
Maps key pairs to node identities and account ids
Level 1
Level 2Level 3
Points to note…
• Accounts are not Corda Identities – they are a different representation of a collection of states
and public keys.
• Account creation, discovery will be implemented on the Cordapp level. (Not from the
network level)
• Vault isolation is not supported – all accounts share the same node service and keys are all
stored in the same key management service.
• Node operator will know it all.
• Standalone HSM private/public key management for accounts is not supported.
Pictorial Representation Of Accounts
Use-Cases…
• Host multiple customers per node
• Custody-like accounts, brokerage accounts, bank accounts, etc.
• Internal separation between departments of large companies
• Isolate sensitive information from non-involving departments.
• Massive adoption of 2C application
• private record per consumer.
Under the hood of accounts…
• AccountInfo & AccountService
• Life cycle of an Account
• Account APIs
AccountInfo & AccountService
AccountInfo & AccountService
Link: <Path of Account Repository>/workflows/services/AccountService.kt
Life Cycle of an Account (Part I)
Account creation & sharing with counterparties:
1. Create Account
2. Share AccountInfo with counter parties
In the flow:
1. Retrieve the account and request a new set of Public/Private key pair for the transaction
2. Request the signing keys from counterparty’s account.
3. Share the transaction’s output state with the counterparties if we expect the state will be used as an input
for any further transactions. [Optional]
4. Record the transaction to corresponded accounts in responder flow
Life Cycle of an Account (Part II)
Querying the Vault:
1. Create a new query criteria
2. Perform query to return all desired states for account with specified accountId
DOORMAN
NODE
Node / Party /
First Class Identity
Certificate generated and signed by
node and then signed by Doorman.
Used by node operators. Node
operators might be companies that
also participate in states on the
ledger. However, the state which
they participate in would only be
through accounts.
Account
A Party and label pair. Where Party
represents a host node and label
represents some Party/application
scoped identifier. There is also a
UUID which should be unique at the
network level. Labels are only
guaranteed to be unique at the node
/ Party level. However, when they
are coupled with a Party, they are
guaranteed to be unique.
ACCOUNT
NODE NODE
PUBLIC
KEY
ACCOUNT
IDENTITY
AccountInfo
Name: String
Host: Party
ID: UniqueIdentifier
PublicKeyToExternalID
When new PublicKeys are created
on the host node, they will be
allocated to the UUID for a particular
Account. As such, Accounts will be
associated to multiple PublicKeys.
This is how the node keeps track of
which states should be allocated to
which Account.
ACCOUNT
Services / CorDapps
When new PublicKeys are created
on the host node, they will be
allocated to the UUID for a particular
Identifiable. As such, Identifiables will
be associated to multiple PublicKeys.
This is how the node keeps track of
which states should be allocated to
which Identifiable.
ACCOUNT
ACCOUNT
ACCOUNT ACCOUNT
IDENTITYIDENTITY
Identity
Represents the identity of a “user”.
Identifiables do not have a Doorman
provisioned identity. Instead, they
only have an identity in the context of
a Party node (that does have a
Doorman provisioned identity).
These identities are, in effect, self
signed. Noes/parties can attest to the
claims made in the Identifiable state.
AccountInfos are ledger states so that they can be easily shared with other nodes.
Holistic view
Code Example
Let’s go to IntelliJ …
Try it Yourself
Java version: https://github.com/corda/samples-java/tree/master/Accounts
Kotlin version: https://github.com/corda/samples-kotlin/tree/master/Accounts
Supply Chain:
This CorDapp mimics a supply chain transaction, where the deal is incorporated among
different teams in the companies on both side of the trade.
Tic Tac Thor:
This CorDapp recreates the game of Tic Tac Toe via Corda. It primarilly demonstrates
how you can have linear state transactions between cross-node accounts.
Worldcup Ticket Booking:
This CorDapp demonstrates an ticket booking system with a collaboration of Corda
Account Libray and TokenSDK.

Mais conteúdo relacionado

Mais procurados

Mais procurados (17)

DevDay: A Tale of Corda Slack Adventures, R3
DevDay: A Tale of Corda Slack Adventures, R3DevDay: A Tale of Corda Slack Adventures, R3
DevDay: A Tale of Corda Slack Adventures, R3
 
Building Blockchain Application with Corda
Building Blockchain Application with CordaBuilding Blockchain Application with Corda
Building Blockchain Application with Corda
 
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, INGDevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
DevDay: Have Your Cake and Eat it Too, Privacy and Security with ZKP, ING
 
Roles and skills of a corda architect a deep dive
Roles and skills of a corda architect  a deep diveRoles and skills of a corda architect  a deep dive
Roles and skills of a corda architect a deep dive
 
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
DevDay: Writing a Secure CorDapp, (almost) Everything You Didn't Know You Nee...
 
BSOS x R3 Corda Meetup: Leading the way to blockchain-based banking
BSOS x R3 Corda Meetup: Leading the way to blockchain-based bankingBSOS x R3 Corda Meetup: Leading the way to blockchain-based banking
BSOS x R3 Corda Meetup: Leading the way to blockchain-based banking
 
DevDay: Cerberus A Corda DLT Monitorin and Alerting System, CryptoBLK
DevDay: Cerberus A Corda DLT Monitorin and Alerting System, CryptoBLKDevDay: Cerberus A Corda DLT Monitorin and Alerting System, CryptoBLK
DevDay: Cerberus A Corda DLT Monitorin and Alerting System, CryptoBLK
 
DevDay: Managing a Distributed Network on a Common Infra, SIA
DevDay: Managing a Distributed Network on a Common Infra, SIADevDay: Managing a Distributed Network on a Common Infra, SIA
DevDay: Managing a Distributed Network on a Common Infra, SIA
 
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
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Christmas update 2016
Christmas update 2016Christmas update 2016
Christmas update 2016
 
Why Blockchain is seen as the new Internet and what SAP is doing
Why Blockchain is seen as the new Internet and what SAP is doingWhy Blockchain is seen as the new Internet and what SAP is doing
Why Blockchain is seen as the new Internet and what SAP is doing
 
Hyperledger Fabric Hands-On
Hyperledger Fabric Hands-OnHyperledger Fabric Hands-On
Hyperledger Fabric Hands-On
 
Code for America 2018 - Using Hyperledger Technologies to Deliver Government ...
Code for America 2018 - Using Hyperledger Technologies to Deliver Government ...Code for America 2018 - Using Hyperledger Technologies to Deliver Government ...
Code for America 2018 - Using Hyperledger Technologies to Deliver Government ...
 
blockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technicalblockchain workshop - hyperledger and oabcs - technical
blockchain workshop - hyperledger and oabcs - technical
 
Blockchain explored
Blockchain explored Blockchain explored
Blockchain explored
 
DevDay: Managing a Distributed Network on a Common Infra, NTT Data
DevDay: Managing a Distributed Network on a Common Infra, NTT DataDevDay: Managing a Distributed Network on a Common Infra, NTT Data
DevDay: Managing a Distributed Network on a Common Infra, NTT Data
 

Semelhante a Corda Developer Bootcamp: Accounts

Semelhante a Corda Developer Bootcamp: Accounts (20)

SRSTemplate (1).docx thi si for the studenst appearing for software engineering
SRSTemplate (1).docx thi si for the studenst appearing for software engineeringSRSTemplate (1).docx thi si for the studenst appearing for software engineering
SRSTemplate (1).docx thi si for the studenst appearing for software engineering
 
Payment Gateways in Kuwait - 2014 Update
Payment Gateways in Kuwait - 2014 UpdatePayment Gateways in Kuwait - 2014 Update
Payment Gateways in Kuwait - 2014 Update
 
Payment Services in Kuwait
Payment Services in KuwaitPayment Services in Kuwait
Payment Services in Kuwait
 
eris:db -- Typical Account Types
eris:db -- Typical Account Typeseris:db -- Typical Account Types
eris:db -- Typical Account Types
 
Understanding blockchain
Understanding blockchainUnderstanding blockchain
Understanding blockchain
 
Tally.ERPp Features.
Tally.ERPp Features.Tally.ERPp Features.
Tally.ERPp Features.
 
DIWD Concordia
DIWD ConcordiaDIWD Concordia
DIWD Concordia
 
Open Payments Cloud at Findevr London 2017
Open Payments Cloud at Findevr London 2017Open Payments Cloud at Findevr London 2017
Open Payments Cloud at Findevr London 2017
 
Iata blockchain presentation icaew suisse branch
Iata blockchain presentation   icaew suisse branchIata blockchain presentation   icaew suisse branch
Iata blockchain presentation icaew suisse branch
 
INFRA v2
INFRA v2INFRA v2
INFRA v2
 
Public ripple (payment protocol) for blockchain - Anil Nayak
Public ripple (payment protocol) for blockchain - Anil NayakPublic ripple (payment protocol) for blockchain - Anil Nayak
Public ripple (payment protocol) for blockchain - Anil Nayak
 
Fico notes
Fico notesFico notes
Fico notes
 
Banking Process in Oracle Fusion Bank ac
Banking Process in Oracle Fusion Bank acBanking Process in Oracle Fusion Bank ac
Banking Process in Oracle Fusion Bank ac
 
Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum) Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum)
 
Accounts receivable in sap
Accounts receivable in sapAccounts receivable in sap
Accounts receivable in sap
 
20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework
 
Features of Best Demat Account with Lowest Brokerage Charges.pdf
Features of Best Demat Account with Lowest Brokerage Charges.pdfFeatures of Best Demat Account with Lowest Brokerage Charges.pdf
Features of Best Demat Account with Lowest Brokerage Charges.pdf
 
Aria Training - QA 1
Aria Training - QA 1Aria Training - QA 1
Aria Training - QA 1
 
Implementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteImplementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking Site
 
SAP FICO Interview questions
SAP FICO Interview questionsSAP FICO Interview questions
SAP FICO Interview questions
 

Mais de R3

Mais de R3 (20)

Corda Developer Bootcamp: Tokens
Corda Developer Bootcamp:  TokensCorda Developer Bootcamp:  Tokens
Corda Developer Bootcamp: Tokens
 
Insurance Round Table
Insurance Round TableInsurance Round Table
Insurance Round Table
 
BizDay: David E. Rutter Welcome Address
BizDay: David E. Rutter Welcome AddressBizDay: David E. Rutter Welcome Address
BizDay: David E. Rutter Welcome Address
 
BizDay: Usage Based Insurance and Fleet Management, Infosys
BizDay: Usage Based Insurance and Fleet Management, InfosysBizDay: Usage Based Insurance and Fleet Management, Infosys
BizDay: Usage Based Insurance and Fleet Management, Infosys
 
BizDay: Improving Remittances in the World's 2nd Largest Corridor, Digiledge
BizDay: Improving Remittances in the World's 2nd Largest Corridor, DigiledgeBizDay: Improving Remittances in the World's 2nd Largest Corridor, Digiledge
BizDay: Improving Remittances in the World's 2nd Largest Corridor, Digiledge
 
BizDay: Designing the Future of Payments, Mastercard
BizDay: Designing the Future of Payments, MastercardBizDay: Designing the Future of Payments, Mastercard
BizDay: Designing the Future of Payments, Mastercard
 
DevDay: Developer Updates: Visual Studio Code, Java 11 and OpenAPI (oh my), L...
DevDay: Developer Updates: Visual Studio Code, Java 11 and OpenAPI (oh my), L...DevDay: Developer Updates: Visual Studio Code, Java 11 and OpenAPI (oh my), L...
DevDay: Developer Updates: Visual Studio Code, Java 11 and OpenAPI (oh my), L...
 
BizDay: Transition to DLT in RTGS payments, Accenture, SAP
BizDay: Transition to DLT in RTGS payments, Accenture, SAPBizDay: Transition to DLT in RTGS payments, Accenture, SAP
BizDay: Transition to DLT in RTGS payments, Accenture, SAP
 
BizDay: Connecting Construction & Insurance Ecosystem, Tinubu Square
BizDay: Connecting Construction & Insurance Ecosystem, Tinubu SquareBizDay: Connecting Construction & Insurance Ecosystem, Tinubu Square
BizDay: Connecting Construction & Insurance Ecosystem, Tinubu Square
 
BizDay: The Wholesale Food Supply Chain is Ripe for Transformation, ripe.io
BizDay: The Wholesale Food Supply Chain is Ripe for Transformation, ripe.ioBizDay: The Wholesale Food Supply Chain is Ripe for Transformation, ripe.io
BizDay: The Wholesale Food Supply Chain is Ripe for Transformation, ripe.io
 
BizDay: Fully Managed Corda Enterprise with Azure Blockchain Service, Microsoft
BizDay: Fully Managed Corda Enterprise with Azure Blockchain Service, MicrosoftBizDay: Fully Managed Corda Enterprise with Azure Blockchain Service, Microsoft
BizDay: Fully Managed Corda Enterprise with Azure Blockchain Service, Microsoft
 
BizDay: Truck Wallet, Daimler, KI Decentralized
BizDay: Truck Wallet, Daimler, KI DecentralizedBizDay: Truck Wallet, Daimler, KI Decentralized
BizDay: Truck Wallet, Daimler, KI Decentralized
 
BizDay: A View From Behind the Curtain, SIX Exchange
BizDay: A View From Behind the Curtain, SIX ExchangeBizDay: A View From Behind the Curtain, SIX Exchange
BizDay: A View From Behind the Curtain, SIX Exchange
 
BizDay: Finteum Presentation
BizDay: Finteum PresentationBizDay: Finteum Presentation
BizDay: Finteum Presentation
 
BizDay: Using Tokens for Payment and Instant Settlement, R3
BizDay: Using Tokens for Payment and Instant Settlement, R3BizDay: Using Tokens for Payment and Instant Settlement, R3
BizDay: Using Tokens for Payment and Instant Settlement, R3
 
BizDay: Digital Micro-Lending and Debt Crowd Funding Platform, JVentures
BizDay: Digital Micro-Lending and Debt Crowd Funding Platform, JVenturesBizDay: Digital Micro-Lending and Debt Crowd Funding Platform, JVentures
BizDay: Digital Micro-Lending and Debt Crowd Funding Platform, JVentures
 
BizDay: Trusted Data Exchange for Corp and Supplier Onboarding, Capgemini
BizDay: Trusted Data Exchange for Corp and Supplier Onboarding, CapgeminiBizDay: Trusted Data Exchange for Corp and Supplier Onboarding, Capgemini
BizDay: Trusted Data Exchange for Corp and Supplier Onboarding, Capgemini
 
BizDay: The Path to The Risk Singularity, RiskStream
BizDay: The Path to The Risk Singularity, RiskStreamBizDay: The Path to The Risk Singularity, RiskStream
BizDay: The Path to The Risk Singularity, RiskStream
 
BizDay: Insurtech Challenge, Nationwide
BizDay: Insurtech Challenge, NationwideBizDay: Insurtech Challenge, Nationwide
BizDay: Insurtech Challenge, Nationwide
 
BizDay: How Corda is Enabling Low Income Families to be Protected, Blocksure
BizDay: How Corda is Enabling Low Income Families to be Protected, BlocksureBizDay: How Corda is Enabling Low Income Families to be Protected, Blocksure
BizDay: How Corda is Enabling Low Income Families to be Protected, Blocksure
 

Último

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Último (20)

Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 

Corda Developer Bootcamp: Accounts

  • 2. Questions we want to answered [Not shown] • Where is Account stored? • Who is really signing the transaction when I am an account? • Am I visible to the participants on the network? • Does the other participants required to have account, if one of the participants want to use account. • How is Account mapped/linked with the state? • What are the problems accounts is trying to solve? • Can I easily migrate from node based model to account based model and again migrate from an account based model to a node based model? • Typical life cycle of an account? • How can offchain identity be mapped to onchain accounts identity? • What are the typical use cases when we would want to use accounts? • Roadmap of accounts • Can tokens and accounts be integrated
  • 3. The Problem We Had… • Corda was not designed to deploy and operate by individuals and small businesses. (such as, a local corner candy store or my friend Roger) • Most Cordapp developers will represent their customers. When the number of customers goes up, the total cost of spinning up a node for every customer becomes costly.
  • 4. Introducing Corda Accounts So that: • A Corda node can host multiple “individuals/small companies” who wants to play a role in a larger blockchain system. [Increase scalability] • Consortium can “represent their customers” via accounts, while only spinning up minimal numbers of nodes depends on the use-case. [Reduce operation cost] An accounts library allows a Corda node operator to split the vault into multiple "logical" sub-vaults.
  • 5. High Level Pictorial Explanation… NODE A VAULT ACCOUNT ONE ACCOUNT TWO KEY MANAGEMENT SERVICE Stores key pairs KEY HASH1 : ACCOUNT ONE, NODE A KEY HASH2 : ACCOUNT ONE, NODE A KEY HASH3 : ACCOUTN TWO, NODE A KEY HASH4 : ACCOUNT X, NODE B IDENTITY SERVICE NO ACCOUNT Maps key pairs to node identities and account ids Level 1 Level 2Level 3
  • 6. Points to note… • Accounts are not Corda Identities – they are a different representation of a collection of states and public keys. • Account creation, discovery will be implemented on the Cordapp level. (Not from the network level) • Vault isolation is not supported – all accounts share the same node service and keys are all stored in the same key management service. • Node operator will know it all. • Standalone HSM private/public key management for accounts is not supported.
  • 8. Use-Cases… • Host multiple customers per node • Custody-like accounts, brokerage accounts, bank accounts, etc. • Internal separation between departments of large companies • Isolate sensitive information from non-involving departments. • Massive adoption of 2C application • private record per consumer.
  • 9. Under the hood of accounts… • AccountInfo & AccountService • Life cycle of an Account • Account APIs
  • 11. AccountInfo & AccountService Link: <Path of Account Repository>/workflows/services/AccountService.kt
  • 12. Life Cycle of an Account (Part I) Account creation & sharing with counterparties: 1. Create Account 2. Share AccountInfo with counter parties In the flow: 1. Retrieve the account and request a new set of Public/Private key pair for the transaction 2. Request the signing keys from counterparty’s account. 3. Share the transaction’s output state with the counterparties if we expect the state will be used as an input for any further transactions. [Optional] 4. Record the transaction to corresponded accounts in responder flow
  • 13. Life Cycle of an Account (Part II) Querying the Vault: 1. Create a new query criteria 2. Perform query to return all desired states for account with specified accountId
  • 14. DOORMAN NODE Node / Party / First Class Identity Certificate generated and signed by node and then signed by Doorman. Used by node operators. Node operators might be companies that also participate in states on the ledger. However, the state which they participate in would only be through accounts. Account A Party and label pair. Where Party represents a host node and label represents some Party/application scoped identifier. There is also a UUID which should be unique at the network level. Labels are only guaranteed to be unique at the node / Party level. However, when they are coupled with a Party, they are guaranteed to be unique. ACCOUNT NODE NODE PUBLIC KEY ACCOUNT IDENTITY AccountInfo Name: String Host: Party ID: UniqueIdentifier PublicKeyToExternalID When new PublicKeys are created on the host node, they will be allocated to the UUID for a particular Account. As such, Accounts will be associated to multiple PublicKeys. This is how the node keeps track of which states should be allocated to which Account. ACCOUNT Services / CorDapps When new PublicKeys are created on the host node, they will be allocated to the UUID for a particular Identifiable. As such, Identifiables will be associated to multiple PublicKeys. This is how the node keeps track of which states should be allocated to which Identifiable. ACCOUNT ACCOUNT ACCOUNT ACCOUNT IDENTITYIDENTITY Identity Represents the identity of a “user”. Identifiables do not have a Doorman provisioned identity. Instead, they only have an identity in the context of a Party node (that does have a Doorman provisioned identity). These identities are, in effect, self signed. Noes/parties can attest to the claims made in the Identifiable state. AccountInfos are ledger states so that they can be easily shared with other nodes. Holistic view
  • 15. Code Example Let’s go to IntelliJ …
  • 16. Try it Yourself Java version: https://github.com/corda/samples-java/tree/master/Accounts Kotlin version: https://github.com/corda/samples-kotlin/tree/master/Accounts Supply Chain: This CorDapp mimics a supply chain transaction, where the deal is incorporated among different teams in the companies on both side of the trade. Tic Tac Thor: This CorDapp recreates the game of Tic Tac Toe via Corda. It primarilly demonstrates how you can have linear state transactions between cross-node accounts. Worldcup Ticket Booking: This CorDapp demonstrates an ticket booking system with a collaboration of Corda Account Libray and TokenSDK.

Notas do Editor

  1. Some Introdcution
  2. What are the problems accounts is trying to solve?
  3. Does the other participants required to have account, if one of the participants want to use account. What are the typical use cases when we would want to use accounts?
  4. Where is Account stored? Am I visible to the participants on the network?
  5. Who is really signing the transaction when I am an account?
  6. How is Account mapped/linked with the state?
  7. Typical life cycle of an account? How is Account mapped/linked with the state? Can I easily migrate from node based model to account based model and again migrate from an account based model to a node based model?
  8. How can offchain identity be mapped to onchain accounts identity? Roadmap of accounts
  9. Can tokens and accounts be integrated
  10. Can tokens and accounts be integrated