Sia Cloud Storage - A Decentralized Blockchain Application

admin 70 0

“Major companies have shut down their own network disks” has been a big news for domestic Internet companies in the past two months. This incident has a greater impact on network disk users. On the one hand, a large amount of data stored by users needs to be migrated to other places. , On the other hand, we will have sequelae when choosing network disk products, because there is great uncertainty about the future collapse of the remaining companies.

Before this, we had a love-hate relationship with Netdisk products. We like it because the use cases for this app are everywhere. It is an extension of the electronic device space. You can transfer the photos you usually take to the network disk. , if your mobile phone has enough capacity, this method can help you back up, but assuming you only have 16GB, it can also help you free up excess space; it is also a bridge between company computers and home computers. With data synchronization, you can seamlessly switch between environments...

When talking about hate, privacy issues inevitably come up. This concern comes from two aspects. First, the network disk company may be hacked, causing its own data to be leaked; second, the company begins to abuse user data to obtain more profits. Privacy - such as analyzing data to create user profiles, etc. Coupled with the high possibility of being shut down, it seems that we can no longer happily use the network disk.

The world will definitely get better. The potential harm caused by monopoly and vicious competition to users will eventually be resolved in the Internet world. The outbreak of blockchain technology is an obvious trend, which allows the trust transfer between two users to be guaranteed by a third party without the need for a third party, making it closer to the real world. Sia is a network disk product in blockchain applications. The Sia network is a decentralized p2p network. Files you upload to Sia will be encrypted. , thereby ensuring the privacy of data, and the smart contract implemented by Sia through the blockchain ensures that the files you upload have 99.99% availability, so that you no longer have to worry about it "collapse" and expose you to the risk of data loss. .

I was extremely excited when I saw the Sia project, not only because it was a "wonderful world" but it also brought back so many memories for me. I have worked at Xunlei for 5 years. If I were to evaluate this company, it must be a very creative company. The first project I worked on at Xunlei was actually "Sia". We call it DCDN (CDN), which means that before 2009, before the birth of Bitcoin, Xunlei had such a "grand" idea: we hope to use all the free disks in the world for everyone to use. You can understand this. Today, when the sharing economy is in full swing, we started making shared disks 10 years ago.

I started this project twice and both times it failed. At the same time, this is also a shadow in my heart. So when I started it for the third time, I was already far away from it, afraid to touch it for fear of being hit again. . Humans have a strong ability to easily forget past pain. That’s why we often say “scars are healed and pain is forgotten.” So recently when I looked back on my ten years of working life, I asked myself if I had encountered any insurmountable difficulties. I would answer "no" without hesitation, because from the bottom of my heart, I believe that the so-called technical problem is actually just a problem. piece of paper. You don't know because you haven't pierced it yet. . But after discovering Sia, I realized I was wrong. I shouldn’t let go of past failures. If I don't face it, I won't be able to grow from it and realize Sia's true value.

Through my understanding of Sia, I concluded that there are two main reasons why previous projects failed:

There is a lack of "smart contracts" between users. At that time, users had not yet formed the habit of paying.

Smart contracts are the core of blockchain applications.In Sia, the contract mainly includes

When a space contributor downloads a file, a contract is formed: if you save the file within a specified time, you can get certain rewards. The contributor is required to submit a certain deposit: if he does not complete the contract, not only does he not get paid, but he also loses the deposit. Contributors who commit fraud or falsify data will be subject to hefty fines. If the online rate is lower than 95%, contributors will be punished and users need to pay a certain monthly space fee to pay space contributors.

Blockchain technology ensures the correct execution of contracts, allowing space contributors to "operate" according to regulations, and users can safely store private files on the network. The biggest challenge of a p2p file system is how to ensure file availability, because you cannot predict how long the storage node will be online. If a node goes offline, it means that the data stored on that node will not be available at that time. To increase availability, redundant backups are necessary. Unlike centralized storage systems, redundant backups generally take a long time, so p2p file systems must be redundant in advance or have more redundancy.

But if the online rate is high, the entire result will be different. Smart contracts guarantee this, so Sia claims 99.99% availability. If you know a little bit about technology, you might think they are bragging because reaching 99.99% is not easy in a centralized system. How can decentralization be achieved? To prove this, I actually did the math yesterday. The result is that, from a probabilistic perspective, such high availability is indeed possible. The following is the derivation process. If you feel bored, you can jump directly to the table below to see the conclusion.

By default, Sia will divide a file into 10 small chunks and copy each chunk 2 times. In other words, a file will have 30 small blocks in the Sia network. It uses encryption technology. The peculiarity of this encryption technology is that you can choose any one of them. The entire file can be recovered in 10 blocks. In other words, as long as 10 of the 30 nodes are online, the file can be downloaded. At this point, the file availability problem becomes a probability problem. To obtain this probability, we must first classify it, and then calculate its probability step by step for each category.

Classification means, "at least 10 are online", which means we need to find the probability that 10, 11, 12,..., 30 nodes are online at the same time, and then sum up; step-by-step means, When finding each probability, the following steps should be used, taking 10 nodes as an example

Select 10 nodes among 30 nodes and find the probability that 10 nodes are online at the same time. Find the probability that the other 20 nodes are offline at the same time.

In this step, we can list the formula of this probability based on the principles of classification summation and stepwise product (assuming here that the smart contract can make the online rate reach 90%):

Since I don't know how to simply calculate this formula, I finally used (users can understand it as excel) to calculate it, and the results are as follows:

The above is my understanding of Sia. I think it has long-term holding value. Let me tell you secretly that this product has grown more than 100 times since its release last year. If you agree, you can buy some as an investment (remember, the final decision is yours), but don't blame me for not telling you.

Finally, welcome to communicate.

标签: #sia #blockchain #decentralization #availability

  • 评论列表

留言评论