introduction to bigchaindb
TRANSCRIPT
![Page 1: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/1.jpg)
Introduction to BigchainDB
![Page 2: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/2.jpg)
2
![Page 3: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/3.jpg)
DCS triangle
![Page 4: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/4.jpg)
DCS triangle
4
![Page 5: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/5.jpg)
5
![Page 6: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/6.jpg)
6
![Page 7: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/7.jpg)
DCS triangle
7
![Page 8: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/8.jpg)
8
![Page 9: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/9.jpg)
9
![Page 10: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/10.jpg)
10
![Page 11: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/11.jpg)
BigchainDB
![Page 12: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/12.jpg)
Property
12
![Page 13: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/13.jpg)
Architecture
13
![Page 14: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/14.jpg)
14
![Page 15: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/15.jpg)
Behaviour
15
![Page 16: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/16.jpg)
Life of a transaction
16
![Page 17: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/17.jpg)
Estimation of latency
17
![Page 18: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/18.jpg)
Transaction model{ "id": "<hash of transaction , excluding signatures>", "version": "<version number of the transaction model>", "transaction": { "fulfillments": ["<list of fulfillments>"], "conditions": ["<list of conditions>"], "operation": "<string>", "timestamp": "<timestamp from client>", "data": { "hash": "<hash of payload>", "payload": "<any JSON document>" } } }
18
![Page 19: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/19.jpg)
Block model{ "id": "<hash of block>", "block": { "timestamp": "<block - creation timestamp>", "transactions": ["<list of transactions>"], "node_pubkey": "<public key of the node \ creating the block>", "voters": ["<list of federation nodes public keys>"] }, "signature": "<signature of block>", "votes": ["<list of votes>"] }
19
![Page 20: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/20.jpg)
Vote model{ "node_pubkey": "<the public key of the voting node>", "vote": { "voting_for_block": "<id of the block \ the node is voting for>", "previous_block": "<id of the block \ previous to this one>", "is_block_valid": "<true|false>", "invalid_reason": "<None| DOUBLE_SPEND \ | TRANSACTIONS_HASH_MISMATCH \ | NODES_PUBKEYS_MISMATCH>", "timestamp": "<timestamp of the voting action>" }, "signature": "<signature of vote>" }
20
![Page 21: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/21.jpg)
Consensus algorithmBlock construction order
After �nalizing the creation of a block, thatblock must not allow any more transactions tobe added to it. For easier detection of double-spending.
Hashing votes
No need to include votes for computing blockhash. Because votes are digitally signed bysigning nodes, and therefore not malleable.
21
![Page 22: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/22.jpg)
Consensus algorithmDropping transactions
Add a way to re-assign transactions if theprevious node assignment got stale.
Denial of service
Not an issue any more than with a traditionalweb service.
22
![Page 23: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/23.jpg)
Consensus algorithmClient transaction order
Must ensure that transactions sent from thesame client in a particular order are processedin that order, or at least with a bias to thatorder.
Database built-in communication vulnerability
Use big data DB’s own built-in consensusalgorithm like Paxos to tolerate benign failures.Many nodes would have to be affected for it tohave any major consequences.
23
![Page 24: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/24.jpg)
Consensus algorithmDouble spends
All past transactions are checked to make surethat input was not already spent. This can befast for BigchainDB because it can use anoptimized query of the underlying DB.
Malicious behaviour
Because of the federation model, bad behaviorcan be detected when a node’s vote on a block isdifferent than the majority.
24
![Page 25: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/25.jpg)
Consensus algorithmAdmin becoming god
If admin can be god, that constitute a singlepoint of failure. To prevent it, all writetransactions ( including updating software )need to be voted on by the federation.
Of�ine nodes
One or a few of�ine nodes is �ne, as a quorum isstill online. Otherwise, wait until enough nodescome back online to vote.
25
![Page 26: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/26.jpg)
Consensus algorithmChaining blocks rather than transactions
It is easier to write 1000 blocks (eachcontaining up to 1000 transactions) per secondthan to write 1 million transactions per second.
Each voting node only has to append a vote toeach block, rather than to each transaction.
Constructing a vote needs to compute acryptographic signature. Save time by doingthat only once per block.
26
![Page 27: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/27.jpg)
Possible use casesTracking intellectual property assets
Receipts, and certi�cation
Legally-binding contracts
Creation and real-time movement of high-volume�nancial assets
Tracking high-volume physical assets
Smart contracts
Data science
27
![Page 28: Introduction to BigchainDB](https://reader030.vdocuments.us/reader030/viewer/2022020410/58e531ff1a28abac7e8b5b0f/html5/thumbnails/28.jpg)
ReferencesBigchainDB
BigchainDB Whitepaper
BigchainDB Documentation
The DCS triangle
BigchainDB: how we built a blockchain databaseon top of RethinkDB
28