一个内容可寻址、对等的超媒体分发协议。 IPFS网络中的节点造成分布式文件系统。vim
为何要用IPFS?api
“IPFS and the Blockchain are a perfect match! You can address large amounts of data with IPFS, and place the immutable, permanent IPFS links into a blockchain transaction. This timestamps and secures your content, without having to put the data on the chain itself.” — ipfs.io安全
我认为主要是把一些交易相关的附件存放在IPFS文件系统,只把附件的IPFS links(cryptographic hash)存放在区块链中,能够节省大量的区块链网络带宽。关于文件的安全性,一方面咱们能够加密后存入IPFS,另外一方面IPFS也能够实现文件分布式共享。网络
咱们搭建IPFS节点时,会自动链接预设的远程节点,即数据内容默认是公开的。咱们在进行企业级开发中,天然很是关注数据的保密性,控制访问权限。接下来,介绍如何搭建私有文件系统。编辑器
export EDITOR=vim
ipfs config edit
ipfs swarm filters add /ip4/192.168.0.0/ipcidr/16