Recently, the Swarm (BZZ) market, which is backed by the Ether Foundation, is in full swing, and the atmosphere is no less than Chia’s. On February 14, 2021, Swarm officially released the test network “million airdrop” plan to attract active participation of community users, and so far the test network nodes have exceeded 240,000. On June 4, Swarm Foundation tweeted that the main Bee network will be soft-launched on June 13, followed by a public offering of 5173934 project tokens, BZZ, on CoinList at 1:00 a.m. BST on June 15. The market is filled with various voices about the hot out of the loop Swarm, Pomegranate Mining Pool Li Bai will share the technical evolution of the file transfer protocol from FTP to Swarm based on the technical evolution, so that you can better understand how and why Swarm is designed from the technical level, and also hope that you can hear the truest and purest voice about Swarm (BZZ), hoping that the opening of the book will be beneficial!
Swarm’s official website: https://swarm.ethereum.org/
Official Twitter address: https://twitter.com/ethswarm
Official blog address: https://medium.com/ethereum-swarm
The Internet was born to solve the problem of data sharing and transmission. The openness and freedom of the Internet also ushered us into the era of information explosion. However, as time progressed, the Internet gradually went towards blocking information, hence the creation of a series of technologies such as Swarm and IPFS at the present time.
Swarm is a decentralized data storage and distributed technology with a vision: CensorshipResistant. in one sentence: Swarm = BitTorrent + Tor + Layer 2, which will be shared below.
Split files into small chunks
Parallel transfer by chunk
After the transfer is complete, the chunk is verified (hashed) ->
Recover the file according to the chunk
Solved: the problem of large file transfer in unstable network environment. Not solved: the bandwidth of the server can’t handle a large number of users downloading at the same time.
Use the hash value of chunk as the unique address
Solved: The problem of insufficient bandwidth when a large number of users download at the same time is solved by transferring data between users to each other. Not solved: the centralization problem of Tracker.
Every node is a tracker
Too much chunk, too big hash table
Difficult to notify all nodes of kv changes
Distributed Hash Table (DHT)
Each node stores a part of kv, so when searching, first find the node and then connect to get kv
A group of kv is stored in multiple nodes at the same time to prevent single point of failure
Randomly select the same address as chunk address
Define distance: XOR
Each node stores a chunk close to its own address
node 0110: chunk 0111: 18.104.22.168, 22.214.171.124, 40.40.40
node 0010: chunk 0011: 126.96.36.199
node 1110:chunk 1111: 188.8.131.52, 184.108.40.206, 50.50.50
How to find the IP list of a chunk in a KAD network.
In addition to the hash table, the node will store a list of all the nodes it can connect to (address and IP)
Connect the node and get its node list
Try to connect to the nodes in the list in turn
Find the chunk
Find the nearest node from the node list
Get its hash table after connection, if the target chunk exists, return it
Otherwise, get the node list and find the node that is closer
Download chunk: directly connect to the node
KAD network is used by eDonkey, IPFS and BT after upgrade. By blocking the ip of the node where the chunk is located, the propagation of the chunk is stopped. kad network.
Solved: the centralization problem of tracker
Not solved: firewall problem
The core technology of Tor (The Onion Router), “The Onion Router”, was developed in the mid-1990s by employees of the US Naval Research Laboratory to protect US intelligence communications. By means of relay it is possible to.
Swarm’s first innovation.
Communication by way of relay
node’s hash table, the value is no longer the IP of the node with the chunk, but the chunk itself
Files are pushed into the network
Greater upload and download bandwidth
Nearby nodes will sync chunk
chunk is stored in multiple nodes
Resolved: firewall issues
Not solved: node benefits
BT is voluntarily seeded, and Tor is voluntarily a node. And in Swarm networks, incentives must be given to those who provide services (bandwidth, storage) to keep the network running in the long run.
Swarm is attached to the Ethernet network, which can be understood as Layer2 of the Ethernet network.
Swarm network needs to provide bandwidth and storage resources in order to become a node. First of all, let’s share how to distribute rewards by traffic.
(1) Pay off-chain, settle on-chain
How to create a node.
owner pledges bzz to create chequebook
owner A sends cheque to B
owner B initiates settlement request to chequebook A
chequebook A settles bzz to chequebook B
A and B clients synchronize chequebook latest status
(2) Off-chain consensus
Blacklist if no cheque is given over the threshold
Uploader presses money into the contract
Storer provides proof of storage to get money from contract
Status: The function is not yet mature
Uploaders can store even if they only pay for traffic, but the data is easily cleaned
(1) Clear objectives, technological innovation
Hot data, censorship resistant, potential for phenomenal products
BitTorrent + Tor + Layer 2
(2) The economic model is not mature
Uploading and downloading costs money, registering nodes also costs money, ETH and BZZ
No empty mining mechanism, difficult to motivate nodes online
(3) The function is not fully tested, so we are in a hurry to go online
Can first public offering on CoinList, then research chain
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/a-quick-overview-of-the-decentralized-storage-project-swarm-bzz-technical-principles/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.