The Technical Background of Filecoin
(2022年09月13日)Filecoin's vision is to provide data storage and retrieval services across the network through a blockchain with incentives to reduce the cost of data storage and usage. Since it is a blockchain, it also needs a consensus mechanism, that is, it needs to answer "how are the blocks of the Filecoin blockchain generated".
The well-known proof-of-work (POW) consensus mechanism requires miners to rely on the computing power of machines to continuously perform hash calculations. Miners who can solve the problem within a short period of time are eligible to generate the next block. That is, the probability of a miner producing a block is theoretically proportional to the computing power of the machine, thus giving birth to professional miners. However, the only role of this hash calculation is to provide network security without generating any other contributions, which is why POW has been criticized as consuming resources.
The "computing power" in Filecoin not only protects network security, but also provides functional guarantees for the system. The "computing power" in Filecoin is called storage computing power. Simply put, miners who store more data for the network have more storage computing power. This is advantageous in the next round of competition for storage rights. Miners with large computing power can not only protect system stability at a security level, but also store data and provide data integrity for users.
Ⅰ. The mechanism of Filecoin
For POW that continuously calculates the hash, it takes a long time. Once the calculation is successful, the calculation result can be quickly verified by other miners. But Filecoin's storage computing power is different. Storage computing power refers to how much data miners store on their local disks. This is something that other miners cannot directly verify, so Filecoin's consensus mechanism must confirm at least two things:
1. Whether the miner claims to store data on its disk;
2. Does the miner claim that the stored data has been stored on its disk before it expires.
To confirm these two points, Filecoin proposes two mechanisms: Proof of Replication (PoRep) and Proof of Space-Time (PoSt).
The core idea of proof-of-replication is that miner "A" can submit a PoRep certificate to the entire network to confirm that there is a backup of some data on its storage device, which other miners can quickly verify. However, miners may launch malicious attacks. For example, a malicious miner claims to the whole network that he has saved n copies of data, but the miner creates multiple nodes or shares data through multiple miners. Only one backup of this data is saved. Want to learn more about Filecoin and get Filecoin news? FILMINER could help you with it!
Ⅱ. PoRep consensus algorithm
Backups are used to complete all checks when certificates are issued to the entire network. In this way, users who spend money on redundant backups lack data security, and malicious miners use n storage spaces to earn n shares. The key lies in the design of the PoRep consensus algorithm.
After research, the PoRep consensus algorithm needs to meet the following requirements:
1. Miners need to perform encryption operations when storing data. This operation should be non-parallel and take a long time;
2. When extracting data, decrypt the data. The operation should take a short time;
3. The process of generating PoRep certificates from encrypted data should be fast;
4. The verification process of PoRep certificates should be fast.
For requirement one, it is the time cost of increasing miners to store data. Subsequent operations such as proof of generation are based on encrypted data, which makes it impossible for malicious miners to temporarily generate encrypted data to generate within the valid time. The second requirement is that when files need to be extracted, there is no need for a large computational resource overhead, otherwise the cost of the Filecoin system will be very high. For requirements three and four, this is because miners need to generate PoRep certificates within the stipulated time. If miners encrypt and store the stored data as required for a long time, the time to generate the certificate should be very short. This ensures that miners can prove their storage within a specified time, as verified by other miners.
Proof-of-replication PoRep ensures that miners are indeed storing specific data at a specific time. However, there is no guarantee that miners will store data over time based on user requirements, such as discarding data after PoRep certificates are generated. This is the problem that Proof of Spacetime PoSt solves. In simple terms, PoSt requires storage miners to generate proofs at regular intervals, which requires miners to generate a series of PoRep certificates at certain intervals.
In summary, PoRep is a snapshot of time when miners store files as requested, and PoSt is proof that miners stored files for a certain period of time.
FIL MINER provides decentralized filing, fil crypto and etc. If you want to know more about decentralized file storage or buy filecoin, contact us.
If you want to know filecoin coin price or the details of sdr blockchain, please visit our website.
- このできごとのURL:
コメント