IPFS: Filecoin and Proof of Replication

 This article mainly talks about the Proof of Replication in the Filecoin protocol. Since the protocol involves many concepts, it may seem a little dizzy. The editor tries to simplify the complex problems and strive to make it popular for everyone. IPFS knowledge

 

 

concept:

  • Challenge : The system asks the miner a question, which may be a question or a series of questions. If the miner answers correctly, the challenge is successful, otherwise it fails.

  • Prover : Miners provide valid proofs to the Filecoin system to complete the challenge

  • Verifier : The system challenges the miners on behalf of the user to detect whether the miners have completed the data storage task

  • Data (data) : The data submitted by the user to the miner that needs to be stored or the miner has stored

  • Proof : the answer when the miner completes the challenge

 

        Process: The system (verifier) ​​initiates a challenge to the miner (prover), the miner responds with a proof (proof), and the system checks the miner's reply to determine whether the miner has passed the challenge (challenge).

 

The proof concept involved in Filecoin:

  • Provable Data Possession (PDP): The user sends data to the miner for storage, the miner proves that the data has been stored by himself, and the user can repeatedly check whether the miner is still storing his own data

  • Proof-of- Retrievability (PoRet): Similar to the PDP process, it proves that the data stored by miners can be queried. 

  • Proof-of- Storage (PoS): Proof of using storage space. A type of proof of work, Filecoin’s previous paper used this name, and the new paper was upgraded to PoRep

  • Proof-of- Replication (PoRep): The new PoS (Proof-of-Storage), PoRep can ensure that the storage of each data is independent, which can prevent sybil attacks, external attacks and generation attacks

  • Proof-of-Work ( PoW ): The prover proves to the verifier that he has spent a certain amount of resources. PoW is used in cryptocurrencies, Byzantine consensus and various other blockchain systems. BTC uses this type of proof, relying on huge hash calculations and energy consumption to establish consensus and ensure the security of the btc network

  • Proof -of-Space (PoSpace): The concept proposed by Filecoin, the proof of storage capacity, PoSpace is a kind of PoW, the difference is the computing resources used by PoW, while PoSpace uses storage resources

  • Proof-of- Spacetime (PoSt): Proof of space and time, miners prove that they have spent spacetime resources, that is: the use of storage space within a certain period of time, PoSt is based on PoReps

  • Proof of Replication (PoRep): PoRep is an evolutionary version of PoS: used to prove that data (data) has been stored by miners

     

 

Why make it so complicated?

        Any delicate system in the blockchain needs to be carefully designed (such as BTC), so that the system can run all the time by itself. The purpose of making such complex is nothing more than the following two:

  • Ensure that miners can honestly help users store data

  • Fair distribution of tokens

 

Proof of Replication: Proofs-of-Replication

        PoRep必须能够防范以下三种常见的攻击方式:女巫攻击,外源攻击和生成攻击,他们的共同特点是攻击矿工实际存储的数据大小要比声称存储的数据小,这样攻击矿工就能获得本不该他获得的报酬。

 

  • 女巫攻击(Sybil Attack):利用n个身份,承诺存储n份数据D,而实际上存储小于n份(比如1份),但是却提供了n份存储证明,攻击成功。

  • 外部数据源攻击(Outsourcing Attack):当攻击者矿工收到检验者要求提供数据D的证明的时候,攻击者矿工从别的矿工那里生成证明,证明自己一直存储了数据D,而实际上没有存储,攻击成功

  • 生成攻击(Generation Attack):攻击者A可以使用某种方式生成数据D,当检验者验证的时候,攻击者A就可以重新生成数据D来完成存储证明,攻击成功

 

        防范生成攻击比较困难,所有的PoS协议都会遇到这样的问题,如何保证矿工真正的存储了这些数据,目前这还是个待解决的问题,PoRep需要解决这个问题,Filecoin协议采用一种叫做 RepGame 的游戏来一起解决这三种攻击方式,PoRes还在此基础上引入了时限性(Time Bounded),PoRes协议的实现可能有很多种方式,不管哪种实现方式都必须能够防止上面的三中攻击方式,并且要能够通过RepGame游戏的测试。

 

时空证明:Proofs-of-Spacetime

        时空证明提出了证明链(proof-chain)的数据结构,证明链把一些的提问(challenge)和证明(proof)链接起来形成。在证明链的基础上添加上时间段,这样就得到了一段时间内的矿工存储数据的证明,这就是时空证明(Proof of Spacetime,PoSt),PoSt可以证明在该段时间内矿工存储了特定的数据,并且利用时间戳锚定这些证明链,这样即使验证者(verifier)不在线,也能够在将来去验证矿工在该段时间内生成了证明链,PoSt会被提交到链上用来产生新的Block。

 

PS: time-bounded Proof-of-Replication 和 Proofs-of-Spacetime的可实现结构目前Filecoin团队还没有给出来具体的细节,期待Filecoin下一篇论文。

 

 

作者飞向未来,致力于IPFS/Filecoin在中国的技术推广,他的微信公众号和社群,目前是中国最活跃最顶级的IPFS社群。作者飞向未来是圆方圆区块链的特邀嘉宾,所有转载都已经得到飞向未来本人授权。

 

更多飞向未来导师的公众号,可以在IPFS指南公众号中找到。

 

圆方圆链圈

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325475324&siteId=291194637