In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, I would like to share with you what are the relevant knowledge points about the EOS storage system of the blockchain, which are detailed in content and clear in logic. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
1. Huge amount of data
In a completely decentralized blockchain system, each node must download complete blockchain data if it wants to verify whether a transaction is correct. With the passage of time, the amount of blockchain data increases linearly. Take Bitcoin as an example, a block is generated every 10 minutes, the block size is 1MB, and the annual block growth rate is 24 * 60 / 10 * 365 = 51.3GB. After 10 years, about 5T of space is needed. EOS can theoretically reach millions of TPS. According to the calculation of 100byte transaction data, the volume of block data in a day is 1000000 * 10060 * 60 * 24 = 7.8TB, and the amount of block data in a year is 7.8365 = 2868TB. In addition, it also needs to include intelligent contract codes and pictures, videos uploaded by users, etc., so The average individual user cannot afford such a huge storage space.
How does EOS solve this problem? The producer node is responsible for saving the actual data of the file, while the client node only saves the address of the file locally, and all client nodes can access the file content remotely through the address. This can save a lot of storage overhead for the client node.
2. IPFS distributed file system
EOS uses the IPFS distributed file system as the underlying storage. IPFS is a distributed file system that is addressable, point-to-point, and transmitted over the http protocol. IPFS uses content-addressable addressing technology, that is, it is retrieved by the contents of the file rather than the network address of the file. To put it simply, the hash operation is performed on the contents of the file, and the hash value is saved in the local database as the file name, so as long as the file content remains the same, the file name remains the same.
The node running IPFS is both a client and a server. The client sends the file name to the server and requests to download the file. The server will look for the corresponding file in the database according to the file name, and then send the file to the client. When the file download is completed, the client will hash the file content and compare the hash value with the file name to determine the integrity of the file.
Because the file is saved on a remote node, IPFS itself cannot guarantee that the contents of the file are always accessible, for example, the file is deleted or the remote node denies access. Therefore, there needs to be a set of perfect incentive mechanism to encourage server nodes to provide stable and efficient storage services. For example, in the Filecoin system, users need to pay a fee to the server node for each upload and download of files. However, this payment model will cause the rejection of some users, after all, watching the money out of their pockets, and once users forget to renew, the file may be deleted.
3. EOS storage design model.
In order to gain access to IPFS storage space, users need to hold a certain number of EOS storage tokens (TOK). Each EOS client needs to define a local home directory to hold links to IPFS files. The link content mainly includes the local home directory path, file name (hash value of the file content), and file size.
The user packages the file link into transaction information, signs it and broadcasts it to the block producer, and then the user uploads the file to one of the block producers through the standardized REST application program interface defined by the EOS storage software. Next, the producer will verify that the file content hash value and file size are correct. Once the verification is successful, the producer will broadcast the transaction information to other producers and synchronize it to the TOK block chain, indicating that the file has been saved successfully. Other nodes save file information synchronously over the IPFS network. The process for users to upload files is as follows:
After the file is uploaded successfully, when the client needs to download the file, it only needs to send the file name to the producer server, and then the server can retrieve the corresponding file through IPFS and send it to the client. In general, files in the IPFS file system are read-only because minor changes to the contents of the file can cause client-side validation to fail.
At the core of EOS storage is IPFS, which provides a decentralized network where anyone can host files that can be accessed remotely by address. Block producers actually represent 21 super nodes. Each super node needs to have a data center that supports high throughput EOS transactions, can provide file hosting services worldwide, and users' files can be accessed as long as at least one super node is online.
4. EOS storage economics
1. How do block producers make a profit
IPFS itself does not guarantee that the contents of the file are always accessible, for example, the file is deleted or the remote node denies access. Therefore, it is necessary to have a perfect incentive mechanism to encourage block producers to provide stable and efficient storage services.
The business model of EOS storage is different from the pay-per-time model of general cloud storage providers, such as Amazon S3. Users who own TOK can use EOS storage service for free. When users upload files, the TOK they hold will be locked on the chunk chain through a smart contract. These TOK cannot be traded or are locked repeatedly. When the user deletes the file, the TOK is automatically released, and then the user can resell the TOK or lock it next time. If the price of TOK remains the same, the user is equivalent to using EOS storage service for free. In fact, TOK will issue an additional 5% every year to the block producer as a contribution reward, so the TOK held by the user will continue to depreciate (assuming the TOK price remains the same), which is equivalent to paying the user the interest generated by holding the TOK as the service fee to the block producer.
2. TOK storage quota
Block producers vote to produce the storage capacity they want to provide, and the median set of storage capacity is the expected capacity that all producers must provide. In order to win votes, producers will increase the storage capacity provided. The total amount of TOK per year is fixed, so if the storage capacity provided by the producer increases, then the storage capacity that can be used by holding a unit of TOK will increase accordingly. Otherwise, the storage capacity per unit of TOK will be reduced:
TOK storage quota = total storage / total TOK
3. TOK price
Like EOS token, the price of TOK is also affected by the supply and demand of the secondary market. If the demand for EOS storage increases, the number of locked TOK will increase accordingly, resulting in a decrease in the circulation of TOK in the market, resulting in an increase in the price of TOK. Users holding TOK can not only use storage services free of charge, but also resell profits in the secondary market. On the contrary, if the number of users using EOS storage decreases, the number of TOK flowing to the market increases, the price of TOK decreases, and holding TOK may bear some economic loss.
5. EOS bandwidth economics.
In EOS storage systems, only users who lock in TOK can upload and download files, while ordinary anonymous Internet users do not have the right to download files in IPFS. For example, we deployed a YouTube-like video sharing site in the EOS system, where a TOK user uploaded a movie and wanted all Internet users to watch the video.
However, video publishers do not want to pay TOK for these Internet users to watch videos, and this is also a huge expense. In this case, it would be perfect if each video viewer paid for his or her own bandwidth. However, this small high-frequency payment method will make users feel that they have to pay every time they watch the video, so it is not an ideal solution. A more reasonable solution is for all users to permanently lock down TOK that is sufficient to cover the bandwidth they need.
So who will pay for the bandwidth charges of these ordinary users? The answer is those DAPP developers who deploy their business on EOS systems. These developers buy an appropriate amount of TOK according to the scale of their business and provide users with free bandwidth services by locking in TOK. For users, in fact, they do not feel that the underlying technology of DAPP business is centralized or de-neutralized. As long as developers can provide high-quality services to users, they can make a profit by charging increased service fees. Moreover, the TOK purchased by enterprises is also equivalent to an investment, and it is possible to increase in value in the future.
These are all the contents of this article entitled "what are the knowledge points of the EOS storage system of the blockchain". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.