Filecoin安装教程

  • 如果安装时候出现任何问题,请大家添加文章末尾微信交流

    Filecoin的实现,将世界上未使用的存储变成了一个算法市场。

    什么是filecoin?

    Filecoin是一个分散存储网络,它将世界上未使用的存储变成一个算法市场,为网络创造一个永久的、分散的未来。矿工通过提供数据存储或检索来获取本机协议代币(也称为“filecoin”)。客户向矿工支付存储或分发数据并检索数据的费用。

    系统要求

    Filecoin可以在大多数Linux和MacOS系统上构建和运行。还不支持Windows。

    代码库链接:

    mkdir -p ${GOPATH}/src/github.com/filecoin-project

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

    现在安装下面列出的工具和必选项。如果你有什么问题,见疑难解答与常见问题。

    安装Go和Rust

    Go-filecoin的构建过程需要:

    Go语言版本不低于v1.11.2。

    如果你是第一次安装Go语言,我们建议观看本教程,其中包括环境设置。

    RUST语言版本不低于v1.31.0和cargo工具

    pkg-config用于go-filecoin处理生成链接器标志。

    苹果系统可以通过brew来安装pkg-config

    由于我们使用的是cgo语言,无论您是使用预先构建的libfilecoin_ips(我们的cgo兼容的Rust-proof库)还是自己从源代码构建它,都需要一个C编译器来构建go-filecoin。如果你想用gcc(如:export CC=gcc),在构建go-filecoin时,需要使用V7.4.0或更高版本。

    您必须有libclang在您的链接搜索路径,以建立Rust-proof的来源。在大多数环境中,您可以通过使用您最喜欢的包管理器安装Clang来满足这一要求。

    安装必选项

    go-filecoin依赖于用Rust编写的一些示例代码,这些代码包含在Rus-proof作为子模块使用。你需要提前安装Rust和cargo。

    go-filecoin的运行还需要gx。若要安装gx、gmetalinter以及其他构建和测试必选项,请运行:

    cd ${GOPATH}/src/github.com/filecoin-project/go-filecoin

    go run ./build/*.go deps

    生成、运行测试和安装

    First, build the binary...

    go run ./build/*.go build

    Install go-filecoin to ${GOPATH}/bin (necessary for tests)

    go run ./build/*.go install

    Then, run the tests.

    go run ./build/*.go test

    Build and test can be combined!

    go run ./build/*.go best

    其他方便的构建命令包括:

    Check the code for style and correctness issues

    go run ./build/*.go lint

    Test with a coverage report

    go run ./build/*.go test -cover

    Test with Go's race-condition instrumentation and warnings (see https://blog.golang.org/race-detector)

    go run ./build/*.go test -race

    Deps, Lint, Build, Test (any args will be passed to test)

    go run ./build/*.go all

    注意:任何传递给go run ./build/*.go test(如:-cover)都将传递给go test.

    如果你有其他问题,请看疑难解答与常见问题。

    手动管理子模块(可选)

    如果你在编辑Rust-proof,您需要手动管理子模块。如果你不编辑Rust-proof你可以忽略这个,deps将自动为你完成。如果子模块是由其他人更新的(它将出现在git status)你需要再跑一遍deps.

    若要初始化子模块,请执行以下操作:

    cd ${GOPATH}/src/github.com/filecoin-project/go-filecoin

    git submodule update --init

    当头部的Rust-proof master分支更改,您可能要更新go-filecoin,请执行以下操作:

    git submodule update --remote

    注意,更新Rust-proof这样的子模块将需要提交到go-filecoin(更改子模块哈希)。

    使用

    那个开始Wiki页面包含一个简单的序列,可以让您的Filecoin节点启动并运行,并连接到一个devnet。

    那个命令页面包含有关特定命令和环境变量的更多详细信息,以及设置矿工和进行交易的脚本。

    若要查看命令的完整列表,请运行go-filecoin --help.

    高级选项

    使用IPTB运行多个节点

    那个localfilecoinIPTB插件提供一个自动化层,使运行多个文件中节点变得容易。例如,它使您能够轻松地在计算机上本地启动10个挖掘节点。

    贡献者

    感谢支持我们项目的贡献者,没有你们就没有这个项目。

    社区

    以下是获得帮助并与Filecoin社区的几个地方:

    文件Wiki-关于教程、故障排除和常见问题

    #fil-dev onFilecoin项目板现场帮助和一些开发讨论

    Filecoin社区论坛-用于讨论设计决策、用例、实现建议和更长时间的对话。

    GitHub问题-目前,只用于报告bug,查看或促进正在进行的开发。欢迎!请看我们的贡献指南.

    开发人员网络

    目前有3个开发人员网络(又名开发网)可用于开发和测试。这些都是受频繁停机和中断更改。在wiki中描述这些开发人员网络,并说明如何将您的节点连接到它们。

    (识别二维码进入Filecoin社群)

    原文地址:https://github.com/filecoin-project/go-filecoin#install-from-source

Log in to reply
 

Email:filapp@protonmail.com

Twitter:

https://twitter.com/RalapXStartUp

Telegram:

https://t.me/bigdog403

全球Filecoin中文爱好者网站

  • X

    It has come to my attention that storage clients wish to obtain the CommD and CommR associated with the sector into which the piece referenced in their storage deal has been sealed. The client can already use the query-deal command to obtain the CID of the commitSector message corresponding to that sector - but message wait doesn't show individual commitSector arguments - it just shows some string encoding of the concatenated arguments' bytes.
    I propose to augment the ProofInfo struct with CommR and CommD such that the storage client can query for their deal and, when available, see the replica and data commitments in the query-storage-deal command. Alternatively, the query-storage-deal code could get deal state from the miner and use the CommitmentMessage CID to look up CommR and CommD (on chain) - but this seems like more work than is really necessary.

    阅读更多
  • X

    Hmmmm. These are just my thoughts off the cuff:

    For straight-ahead performance that's not specifically concerned with the issue of loading the data (from wherever), then work on smaller (1GiB) sectors is okay. When considering optimization for space so that large sectors can be replicated, 128GB for >1GiB sectors is obviously problematic from a normal replication perspective. However, if we consider the attacker who wants to replicate fast at any cost, then maybe it's okay.
    Based on this, we could probably focus on smaller sectors as a reasonable representation of the problem. This has the unfortunate consequence that the work is less applicable to the related problem of speeding replication even when memory must be conserved to some extent.
    I guess as a single datum to help calibrate our understanding of how R2 scales, it would be worth knowing exactly how much RAM is required for both 1GiB and (I guess) 2GiB. If the latter really fails with 128GB RAM, how much does it require not to? If the work you're already doing makes it easy to get this information, it might help us reason through this. I don't think you should spend much time or go out of your way to perform this investigation though, otherwise.
    Others may feel differently about any of this.

    阅读更多
  • X

    @xiedapao
    If there does exist such a thing, I cannot find it.

    zenground0 [7 hours ago]
    I don't believe there is

    zenground0 [7 hours ago]
    tho maybe phritz has some "refactor the vm" issues that are relevant

    laser [7 hours ago]
    I assert to you that we must create an InitActor in order for CreateStorageMiner conform to the specification.

    Why [7 hours ago]
    I’ll take things I don’t disagree with for $400 Alex

    zenground0 [7 hours ago]
    Agreement all around. However this is one of those changes that is pretty orthogonal to getting the storage protocol to work and something we can already do. We need to track it but I see it as a secondary priority to (for example) getting faults or arbitrating deals working.

    anorth [3 hours ago]
    Thanks @zenground0, I concur. Init actor is in our high-level backlog, but I'm not surprised there's no issue yet. Is it reasonable to draw our boundary there for now?

    阅读更多
  • X

    Does there already exist a story which addresses the need to create an InitActor?

    阅读更多

Looks like your connection to Filecoin.cn中国爱好者社区 was lost, please wait while we try to reconnect.