28
Introduction to BigchainDB

Introduction to BigchainDB

Embed Size (px)

Citation preview

Page 1: Introduction to BigchainDB

Introduction to BigchainDB

Page 2: Introduction to BigchainDB

2

Page 3: Introduction to BigchainDB

DCS triangle

Page 4: Introduction to BigchainDB

DCS triangle

4

Page 5: Introduction to BigchainDB

5

Page 6: Introduction to BigchainDB

6

Page 7: Introduction to BigchainDB

DCS triangle

7

Page 8: Introduction to BigchainDB

8

Page 9: Introduction to BigchainDB

9

Page 10: Introduction to BigchainDB

10

Page 11: Introduction to BigchainDB

BigchainDB

Page 12: Introduction to BigchainDB

Property

12

Page 13: Introduction to BigchainDB

Architecture

13

Page 14: Introduction to BigchainDB

14

Page 15: Introduction to BigchainDB

Behaviour

15

Page 16: Introduction to BigchainDB

Life of a transaction

16

Page 17: Introduction to BigchainDB

Estimation of latency

17

Page 18: Introduction to BigchainDB

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

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

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

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

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

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

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

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

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

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