Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between distributed hashtable technology and the bitcoin blockchain?

Tags:

This question could go into a bitcoin forum but I am trying to understand from a programming point of view.

There are technologies used for distributed storage, like distributed hashtables (say kademlia or similar). How is the bitcoin blockchain different from distributed hashtables? Or is maybe distributed hashtable technology underpinning the bitcoin blockchain? Or why is the bitcoin blockchain hailed as such a breakthrough compared to DHT?

like image 577
transient_loop Avatar asked Oct 17 '14 00:10

transient_loop


People also ask

What are the differences between Bitcoin blockchain and distributed ledger?

Distributed ledger is a record of consensus with cryptographic audit trail maintained and validated by nodes. It can be decentralized or centralized. blockchain is a way to implement a distributed ledger, but not all distributed ledgers necessarily employ blockchains.

What is distributed hash table in blockchain?

A Distributed Hash Table is a decentralized data store that looks up data based on key-value pairs. Every node in a distributed hash table is responsible for a set of keys and their associated values. The key is a unique identifier for its associated data value, created by running the value through a hashing function.

What type of hashing algorithm does Bitcoin blockchain use?

Bitcoin uses the SHA-256 hash algorithm. This algorithm generates verifiably random numbers in a way that requires a predictable amount of computer processing power.

Is Bitcoin blockchain distributed?

Blockchain technology is a decentralized, distributed ledger that stores the record of ownership of digital assets. Any data stored on blockchain is unable to be modified, making the technology a legitimate disruptor for industries like payments, cybersecurity and healthcare.


1 Answers

Distributed Hash Table

A DHT is simply a key-value store distributed accross a number of nodes in a network. The keys are distributed among nodes with a deterministic algorithm. Each node is responsible for a portion of the hash table.

A routing algorithm allows to perform requests in the hash table without knowing every node of the network.

For exemple in the Chord DHT —which is relatively simple DHT implementation— each node is assigned an identifier and is responsible of keys which are closer to its identifier.

Imagine there is 4 nodes that have identifiers: 2a6c, 7811, a20f, e9c3 The data with the identifier 2c92 will be stored on the node 2a6c.

Imagine now that you only know the node 7811 and you are looking for the data with the identifier eabc.

You ask the node 7811 for the data eabc. 7811 doesn't have it so it ask the node e9c3 wich send it to node 7811 which send it back to you.

A clever algorithm allows to find data in O(log(N)) jumps. Without storing the entire routing table of the network (the addresses of each nodes). Basically you ask the closest node to the data identifier you know wich itself asks the closest node it knows and so on reducing the size of the jump at each step.

A DHT is very scalable because the data are uniformly distributed among nodes and lookup time generally grows in O(log(N)).

Blockchain

A blockchain is also a distributed data structure but its purpose is completely different.

Think of it as a history, or a ledger. The purpose is to store a continuously-growing list of record without the possibility of tampering and revision.

It is mainly used in the bitcoin currency system for keeping track of transactions. Its property of being tamper-proof let everybody know the exact balance of an account by knowing its history of transaction.

In a blockchain, each node of the network stores the full data. So it is absolutely not the same idea as the DHT in which data are divided among nodes. Every new entry in the blockchain must be validated by a process called mining whose details are out of the scope of this answer but this process insure consensus of the data.

The two structures are both distributed data structure but serve different purposes. DHT aims to provide an efficient (in term of lookup time and storage footprint) structure to divide data on a network and blockchain aims to provide a tamper-proof data structure.

like image 180
luxcem Avatar answered Sep 23 '22 22:09

luxcem