This talk analyzes the core technology of a blockchain and recreates a simple POC in Python.
Starting from Bitcoin Blockchain, some books, and some open source cryptocurrency POC, the talk will consider three main aspects of the blockchain technology implementing them in Python:
- Structure: blockchain as a data structure (with demo)
- Logic: meaning and limitations of blockchain scripting and smart contract (with demo)
- Network: blockchain as a distributed system and C.A.P. theorem (with demo)
7. Studying blockchain as a technology
• To use blockchain as a technology we need to:
• extract it from the original (economic/financial) domain
• analyze its strengths and weaknesses
• adapt it to other compatible domains
• We need to fully understand blockchain as technology for making the most out of it in the
original domain
• Blockchain technology is the core of… every blockchain!We need to study it to be confident
with the use and the development of blockchain-related applications.
9. “
”
Blockchain is a data structure; it is basically a linked
list that uses hash pointers instead of normal
pointers. Hash pointers are used to point to the
previous block.
(Mastering Blockchain)
BLOCKCHAIN as DATA STRUCTURE
12. Structure - Questions
• How is a blockchain structured internally?
• What could we store inside a blockchain?
• What are blockchain’s strengths and weaknesses?
13. Structure - Demo
Blockchain as Data Structure – Analysis
Code @ https://github.com/NicolaCostantino/Blockchain-Internals
18. Database:
• “A large amount of information stored in
a computer system in such a way that it
can be easily looked at or changed”
Source (Cambridge Dictionary):
https://dictionary.cambridge.org/dictionary/english/database
Blockchain:
• it can NOT be easily looked at or
changed
19. Blockchain
as data structure is the representation of…
(lack of) TRUST!
Trust me.
I trust you because/if/when I can check at any time if I can trust you
21. Ricardian Contract
"A Ricardian contract can be defined as a single document that is
• a contract offered by an issuer to holders
• for a valuable right held by holders, and managed by the
issuer
• easily readable (like a contract on paper)
• readable by programs (parsable like a database)
• digitally signed
• carrying the keys and server information
• allied with a unique and secure identifier.“
SourceWikipedia: https://en.wikipedia.org/wiki/Ricardian_contract
24. It is impossible for a distributed data store
to simultaneously provide more than two
out of the following three guarantees:
• Consistency: Every read receives the most recent write or
an error
• Availability: Every request receives a (non-error) response –
without the guarantee that it contains the most recent write
• Partition tolerance: The system continues to operate
despite an arbitrary number of messages being dropped (or
delayed) by the network between nodes
C.A.P. (Brewer's) Theorem