SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Block-chain basics
Key points
You can use any programming environment for both custom blockchain or BTC-transactions.
 E.g. NBitcoin can be used with FSharp or Microsoft .NET CSharp
 Code examples: http://fssnip.net/7RT and http://fssnip.net/7RY
Blockchain is an immutable insert-only database (no deletes, no updates)
 Functional programming is a good fit!
Blockchain “trust” = external computing power required.
 To benefit block-chain you need untrusted 3rd parties.
Normal table with a hash-code
Id Column1 Column2 Hashcode
1 “Pekka” 23 9a3ffc
• This ensures that table data modifications could be detected
• Column1 and Column2 here is just some normal data…
Chain: Table with parent hash-code
Id Column1 Column2 Parent-Hashcode Hashcode
1 “Pekka” 23 9a3ffc
2 “Seppo” 12 9a3ffc a11c52
• Now we can ensure that the rows are in correct order
• And without extra rows or rows missing.
Accept only hash-codes start with zeros
Id Column1 Column2 Parent-Hashcode Seed Hashcode
1 “Pekka” 23 11212 00cff4
2 “Seppo” 12 00cff4 7223 009a56
3 “Raimo” 42 009a56 8932 0028a4
4 “asdf” 123 0028a4 6932 00fcc3
5 “Jukka” 53 00fcc3 1234 007b2f
• Add a seed and run a loop from 1 to … to find a seed where hash-code that starts with two zeros.
• Ensures creating a valid transaction chain will need computing power.
• As real hash-codes are length of 32, the leading zeros can be e.g. 8, not two.
Scalability: A “block” –chain
Id Parent-Hashcode Seed Hashcode
a1a35 11212 00cff4
2bcf4 00cff4 7223 009a56
3c9ff 009a56 8932 0028a4
• Not all the data need to increase the size of the block-chain.
• A block can contain multiple data rows. The merging (/attaching to chain) is the only operation that
needs the verification: can we trust the client that sent a chunk of data to us?
• Can be thought as normal relational database, a block is one to many relation
• To ensure data is not modified after attached to chain, corresponding Column1 and Column2 data is
still included to hashcode
BlockId Column1 Column2
2bcf4 “Pekka” 23
2bcf4 “Seppo” 12
3c9ff “Raimo” 42
3c9ff “asdf” 123
3c9ff “Jukka” 53
Immutable data tables
 Data is action-log / event-loop / audit-trail style
 Never delete, never update, only insert
 Note: The business-logic data action sequence validation is not built-in to block-chain itself.
 Did Raimo had 42 to sell?
BlockId Action Column1 Column2
2bcf4 Generated “Pekka” 23
2bcf4 Buy “Seppo” 12
3c9ff Sell “Raimo” 42
3c9ff Buy “asdf” 123
3c9ff Sell “Jukka” 53
Conclusions
 The real verification, and also cost, is the calculation power and time.
 There is no point in block-chain inside one company. You just waste your computing power.
 The only benefit is in a large distributed database.
 We could code this by hand, but why bother?
 Existing block-chain technologies can be used as is
 E.g. the Bitcoin block-chain. For Microsoft.NET, NBitcoin: https://github.com/MetacoSA/NBitcoin
 Existing trackers/wallets have also features to enable easily custom validations (e.g. data action
sequence)
 Creating new private keys uses advanced elliptic cryptography math which is painful to do manually
Code example: http://www.fssnip.net/7RY

Weitere ähnliche Inhalte

Ähnlich wie Blockchain (using NBitcoin and FSharp)

J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6Jesse Burke
 
Blockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBlockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBruno Gonçalves
 
BlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopBlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopPad Kankipati
 
Blockchain Demystified
Blockchain DemystifiedBlockchain Demystified
Blockchain DemystifiedMahesh M Reddy
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxWijdenBenothmen1
 
Managing Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDBManaging Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDBJason Terpko
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionTanel Poder
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Embarcados
 
Hitcon badge 2018
Hitcon badge 2018 Hitcon badge 2018
Hitcon badge 2018 Alan Lee
 
BSides DFW2016-Hack Mode Enabled
BSides DFW2016-Hack Mode EnabledBSides DFW2016-Hack Mode Enabled
BSides DFW2016-Hack Mode Enabledpricemcdonald
 
Базы данных. HBase
Базы данных. HBaseБазы данных. HBase
Базы данных. HBaseVadim Tsesko
 
Managing data and operation distribution in MongoDB
Managing data and operation distribution in MongoDBManaging data and operation distribution in MongoDB
Managing data and operation distribution in MongoDBAntonios Giannopoulos
 
MaxScale for Effective MySQL Meetup NYC - 14.01.21
MaxScale for Effective MySQL Meetup NYC - 14.01.21MaxScale for Effective MySQL Meetup NYC - 14.01.21
MaxScale for Effective MySQL Meetup NYC - 14.01.21Ivan Zoratti
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computingYongraeJo
 
140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetup140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetupdsdata systems
 
Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018
Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018
Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018Codemotion
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0DataStax
 
Webtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalabilityWebtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalabilityLuca Bonmassar
 

Ähnlich wie Blockchain (using NBitcoin and FSharp) (20)

J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6
 
Blockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBlockchain Technologies for Data Science
Blockchain Technologies for Data Science
 
BlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopBlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshop
 
Blockchain Demystified
Blockchain DemystifiedBlockchain Demystified
Blockchain Demystified
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptx
 
Managing Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDBManaging Data and Operation Distribution In MongoDB
Managing Data and Operation Distribution In MongoDB
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
 
Hitcon badge 2018
Hitcon badge 2018 Hitcon badge 2018
Hitcon badge 2018
 
BSides DFW2016-Hack Mode Enabled
BSides DFW2016-Hack Mode EnabledBSides DFW2016-Hack Mode Enabled
BSides DFW2016-Hack Mode Enabled
 
Базы данных. HBase
Базы данных. HBaseБазы данных. HBase
Базы данных. HBase
 
Managing data and operation distribution in MongoDB
Managing data and operation distribution in MongoDBManaging data and operation distribution in MongoDB
Managing data and operation distribution in MongoDB
 
MaxScale for Effective MySQL Meetup NYC - 14.01.21
MaxScale for Effective MySQL Meetup NYC - 14.01.21MaxScale for Effective MySQL Meetup NYC - 14.01.21
MaxScale for Effective MySQL Meetup NYC - 14.01.21
 
blockchain-and-trusted-computing
blockchain-and-trusted-computingblockchain-and-trusted-computing
blockchain-and-trusted-computing
 
140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetup140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetup
 
Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018
Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018
Managing your Black Friday Logs - Antonio Bonuccelli - Codemotion Rome 2018
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0
 
Webtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalabilityWebtech Conference: NoSQL and Web scalability
Webtech Conference: NoSQL and Web scalability
 

Mehr von Tuomas Hietanen

Possible FSharp Refactorings could be...
Possible FSharp Refactorings could be...Possible FSharp Refactorings could be...
Possible FSharp Refactorings could be...Tuomas Hietanen
 
Message passing & NoSQL (in English)
Message passing & NoSQL (in English)Message passing & NoSQL (in English)
Message passing & NoSQL (in English)Tuomas Hietanen
 
F# references (and some misc slides)
F# references (and some misc slides)F# references (and some misc slides)
F# references (and some misc slides)Tuomas Hietanen
 
Using f# project from c#
Using f# project from c#Using f# project from c#
Using f# project from c#Tuomas Hietanen
 
Pari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-ReferenssejäPari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-ReferenssejäTuomas Hietanen
 
Coding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesCoding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesTuomas Hietanen
 

Mehr von Tuomas Hietanen (13)

Possible FSharp Refactorings could be...
Possible FSharp Refactorings could be...Possible FSharp Refactorings could be...
Possible FSharp Refactorings could be...
 
Message passing & NoSQL (in English)
Message passing & NoSQL (in English)Message passing & NoSQL (in English)
Message passing & NoSQL (in English)
 
Function therory
Function theroryFunction therory
Function therory
 
The Pain Points of C#
The Pain Points of C#The Pain Points of C#
The Pain Points of C#
 
F# references (and some misc slides)
F# references (and some misc slides)F# references (and some misc slides)
F# references (and some misc slides)
 
Linq in practice
Linq in practiceLinq in practice
Linq in practice
 
Using f# project from c#
Using f# project from c#Using f# project from c#
Using f# project from c#
 
Funktioteoriaa
FunktioteoriaaFunktioteoriaa
Funktioteoriaa
 
Pari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-ReferenssejäPari sekalaista diaa ja F#-Referenssejä
Pari sekalaista diaa ja F#-Referenssejä
 
F# ja C# yhteiskäyttö
F# ja C# yhteiskäyttöF# ja C# yhteiskäyttö
F# ja C# yhteiskäyttö
 
C# nykyiset kipupisteet
C# nykyiset kipupisteetC# nykyiset kipupisteet
C# nykyiset kipupisteet
 
LINQ käytännössä
LINQ käytännössäLINQ käytännössä
LINQ käytännössä
 
Coding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesCoding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & Practices
 

Kürzlich hochgeladen

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
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
 
+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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
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
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
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
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 

Kürzlich hochgeladen (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
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
 
+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...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.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
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
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
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.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
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 

Blockchain (using NBitcoin and FSharp)

  • 2. Key points You can use any programming environment for both custom blockchain or BTC-transactions.  E.g. NBitcoin can be used with FSharp or Microsoft .NET CSharp  Code examples: http://fssnip.net/7RT and http://fssnip.net/7RY Blockchain is an immutable insert-only database (no deletes, no updates)  Functional programming is a good fit! Blockchain “trust” = external computing power required.  To benefit block-chain you need untrusted 3rd parties.
  • 3. Normal table with a hash-code Id Column1 Column2 Hashcode 1 “Pekka” 23 9a3ffc • This ensures that table data modifications could be detected • Column1 and Column2 here is just some normal data…
  • 4. Chain: Table with parent hash-code Id Column1 Column2 Parent-Hashcode Hashcode 1 “Pekka” 23 9a3ffc 2 “Seppo” 12 9a3ffc a11c52 • Now we can ensure that the rows are in correct order • And without extra rows or rows missing.
  • 5. Accept only hash-codes start with zeros Id Column1 Column2 Parent-Hashcode Seed Hashcode 1 “Pekka” 23 11212 00cff4 2 “Seppo” 12 00cff4 7223 009a56 3 “Raimo” 42 009a56 8932 0028a4 4 “asdf” 123 0028a4 6932 00fcc3 5 “Jukka” 53 00fcc3 1234 007b2f • Add a seed and run a loop from 1 to … to find a seed where hash-code that starts with two zeros. • Ensures creating a valid transaction chain will need computing power. • As real hash-codes are length of 32, the leading zeros can be e.g. 8, not two.
  • 6. Scalability: A “block” –chain Id Parent-Hashcode Seed Hashcode a1a35 11212 00cff4 2bcf4 00cff4 7223 009a56 3c9ff 009a56 8932 0028a4 • Not all the data need to increase the size of the block-chain. • A block can contain multiple data rows. The merging (/attaching to chain) is the only operation that needs the verification: can we trust the client that sent a chunk of data to us? • Can be thought as normal relational database, a block is one to many relation • To ensure data is not modified after attached to chain, corresponding Column1 and Column2 data is still included to hashcode BlockId Column1 Column2 2bcf4 “Pekka” 23 2bcf4 “Seppo” 12 3c9ff “Raimo” 42 3c9ff “asdf” 123 3c9ff “Jukka” 53
  • 7. Immutable data tables  Data is action-log / event-loop / audit-trail style  Never delete, never update, only insert  Note: The business-logic data action sequence validation is not built-in to block-chain itself.  Did Raimo had 42 to sell? BlockId Action Column1 Column2 2bcf4 Generated “Pekka” 23 2bcf4 Buy “Seppo” 12 3c9ff Sell “Raimo” 42 3c9ff Buy “asdf” 123 3c9ff Sell “Jukka” 53
  • 8. Conclusions  The real verification, and also cost, is the calculation power and time.  There is no point in block-chain inside one company. You just waste your computing power.  The only benefit is in a large distributed database.  We could code this by hand, but why bother?  Existing block-chain technologies can be used as is  E.g. the Bitcoin block-chain. For Microsoft.NET, NBitcoin: https://github.com/MetacoSA/NBitcoin  Existing trackers/wallets have also features to enable easily custom validations (e.g. data action sequence)  Creating new private keys uses advanced elliptic cryptography math which is painful to do manually Code example: http://www.fssnip.net/7RY