Filecoin

Filecoin是一个分散的存储网络,将世界上未使用的存储转变为算法市场,为网络创造一个永久的,分散的未来。矿工通过提供数据存储和/或检索来获得本机协议令牌(也称为“filecoin”)。客户支付矿工存储或分发数据并检索数据。(基于ipfs协议)
https://github.com/filecoin-project/go-filecoin
1.安装go-filecoin
给在之前安装好的go工作环境下创建filecoin-project

appledeMac-mini:~ root# mkdir -p ${GOPATH} /src/github.com/filecoin-project

克隆git存储库:

git clone https://github.com/filecoin-project/go-filecoin.git $ {GOPATH} /src/github.com/filecoin-project/go-filecoin

安装下面列的工具
Filecoin_第1张图片
2.安装依赖项:
Filecoin_第2张图片

appledeMac-mini:go-filecoin apple$ go run ./build deps
pkg-config --version
0.29.2
Installing dependencies...
go mod download
go: finding github.com/libp2p/go-libp2p-circuit v0.1.0
go: finding github.com/libp2p/go-libp2p-routing v0.1.0
go: finding github.com/ipfs/go-car v0.0.1
go: finding github.com/ipfs/go-ds-leveldb v0.0.2
go: finding github.com/hashicorp/go-multierror v1.0.0
go: finding github.com/kisielk/errcheck v1.2.0

第一次运行deps可能会很慢,因为~1.6GB参数文件是在本地下载或生成的/tmp/filecoin-proof-parameters。

出现的问题:

go: golang.org/x/[email protected]: unrecognized import path “golang.org/x/exp” (https fetch: Get https://golang.org/x/exp?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)

解决1:https://shockerli.net/post/go-get-golang-org-x-solution/
解决2:/Users/apple/code/go/src/golang.org/x
在你的GO工作环境下:

cd  $ {GOPATH} /src/  mkdir golang.org/x
appledeMac-mini:x apple$ pwd
/Users/apple/code/go/src/golang.org/x

把每个依赖包都git下来:

appledeMac-mini:x apple$ git clone https://github.com/golang/tour.git
Cloning into 'tour'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 2243 (delta 0), reused 1 (delta 0), pack-reused 2239
Receiving objects: 100% (2243/2243), 936.51 KiB | 33.00 KiB/s, done.
Resolving deltas: 100% (1431/1431), done.

每个依赖包如下:

benchmarks — benchmarks to measure Go as it is developed.
blog — blog.golang.org's implementation.
build — build.golang.org's implementation.
crypto — additional cryptography packages.
debug — an experimental debugger for Go.
image — additional imaging packages.
mobile — experimental support for Go on mobile platforms.
net — additional networking packages.
perf — packages and tools for performance measurement, storage, and analysis.
review — a tool for working with Gerrit code reviews.
sync — additional concurrency primitives.
sys — packages for making system calls.
text — packages for working with text.
time — additional time packages.
tools — godoc, goimports, gorename, and other tools.
tour — tour.golang.org's implementation.
exp — experimental and deprecated packages (may change without warning).

然后重新安装依赖项:

appledeMac-mini:go-filecoin apple$ go run ./build deps

你可能感兴趣的:(IPFS,macOS)