首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Powergate和IPFS一直未能达成存储协议

Powergate和IPFS一直未能达成存储协议
EN

Ethereum用户
提问于 2021-07-24 10:59:55
回答 1查看 55关注 0票数 0

我在Windows 10上使用WSL Ubuntu 20.04,我安装了lotus、ipfs、pow和powd。我等待莲花守护进程完成同步,然后用ipfs daemon启动ipfs,然后在与powd --lotustoken <mylotustokenhere>的屏幕会话中启动pow守护进程。

因此,莲花守护进程是同步并运行的,ipfs守护进程正在运行,powergate守护进程也通过管理令牌连接到莲花守护进程。我已经安排了一个目录,并使用命令pow data stage path/to/dir (通过powergate)获得了一个cid,并得到了一个启动IPFS的“bafy”散列。该目录的大小约为5GB。我通过dd命令创建了一个随机数据桶文件。我之所以选择了5GB,是因为我注意到很多矿工想让你把这份工作做得超过4GB。我运行了命令pow config apply --watch <CID> -o -c custom-072321-config.json。这是我的自定义-072321-config.json文件。

代码语言:javascript
复制
{
  "hot":  {
    "enabled":  false,
    "allowUnfreeze":  false,
    "unfreezeMaxPrice":  "0",
    "ipfs":  {
      "addTimeout":  "900"
    }
  },
  "cold":  {
    "enabled":  true,
    "filecoin":  {
      "replicationFactor":  "1",
      "dealMinDuration":  "518400",
      "excludedMiners":  [],
      "trustedMiners":  [],
      "countryCodes":  [],
      "renew":  {
        "enabled":  false,
        "threshold":  "0"
      },
      "address":  "<my filecoin address with 400000000 attoFIL>",
      "maxPrice":  "100000000000",
      "fastRetrieval":  true,
      "dealStartOffset":  "8640",
      "verifiedDeal":  false
    }
  },
  "repairable":  false
}

但工作失败了..。懒散为什么?

这是我所犯的错误:

代码语言:javascript
复制
                 JOB ID                |             STATUS             | MINER | PRICE | DEAL STATUS
---------------------------------------+--------------------------------+-------+-------+--------------
            <my job id here>           | JOB_STATUS_FAILED executing    |       |       |
                                       | cold-storage config: getting   |       |       |
                                       | cid cummulative size:          |       |       |
                                       | getting cid cummulative        |       |       |
                                       | size: calculating data size:   |       |       |
                                       | merkledag: not found           |       |       |
<myusername>@<mycompname>:~$

因此,我用ipfs pin ls --type recursive | cut -d' ' -f1 | xargs -n1 ipfs pin rm从IPFS守护进程固定系统中删除了所有文件,然后运行ipfs repo gc以确保它们被垃圾收集。我运行了ipfs add -r --pin=false path/to/dir,得到了一个Q启动CID,并再次运行了命令pow config apply --watch <CID> -o -c custom-072321-config.json,新的CID以Q开头,我得到了与上面相同的错误。因此,我认为最初的bafy启动CID和Q启动CID仍然描述相同的目录。因此,我使用启动CID的原始pow config apply --watch <CID> -o -c custom-072321-config.json命令运行原始bafy,在坚持JOB_STATUS_EXECUTING很长一段时间之后,我得到了以下错误:

代码语言:javascript
复制
                 JOB ID                |                                                              STATUS                                                              | MINER | PRICE | DEAL STATUS
---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+-------+-------+--------------
            <my job id here>           | JOB_STATUS_FAILED automatically staging cid: adding data to ipfs: Post                                                           |       |       |    
                                       | "http://127.0.0.1:5001/api/v0/pin/add?arg=%2Fipfs%2F<bafystaringCID>&recursive=true":                                            |       |       |    
                                       | context deadline exceeded                                                                                                        |       |       |    

我做错了什么?如何将文件存储在Filecoin上?

EN

回答 1

Ethereum用户

回答已采纳

发布于 2021-07-30 02:19:39

就我个人而言,我无法在不更改安装的情况下更正此错误。我最后所做的是重新安装powergate,但这一次是通过docker完成的,而不是分别安装lotus、ipfs和powergate,并试图将它们连接在一起。

顺便说一句,我建议执行screen -S newScreen并在屏幕外壳中运行安装命令。这样,当您想通过下面提到的命令docker logs mainnet_*检查日志时,可以执行Ctrl+a, d从屏幕会话断开连接,并在原始终端环境中运行日志检查命令。当回到安装命令shell时,只需运行screen -ls来查找会话的名称,然后运行screen -r <session name here>

这就是我安装powergate的方式:

  1. git clone https://github.com/textileio/powergate.git
  2. cd powergate/docker/
  3. nano docker-compose.yaml
  4. 在第32行和第33行之间添加command: ["lotus", "daemon", "--import-snapshot", "https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car"]
  5. make up
  6. 等待区块链完成下载。检查docker logs mainnet_lotus_1的进展情况,查找1.54 GiB / 35.65 GiB,2.51 GiB / 35.65 GiB,3.36 GiB / 35.65 GiB.
  7. 完成块链下载后,用^C终止进程并运行make down
  8. nano docker-compose.yaml
  9. 删除您添加的行。
  10. make up
  11. 等待区块链状态同步完成。使用docker logs mainnet_powergate_1检查进度并查找
代码语言:javascript
复制
<Time And Date>        WARN    lotus-client    lotus/metrics.go:90     Louts behind in syncing with height diff 370, todo: 191
<Time And Date>        WARN    lotus-client    lotus/metrics.go:90     Louts behind in syncing with height diff 370, todo: 142
<Time And Date>        WARN    lotus-client    lotus/metrics.go:90     Louts behind in syncing with height diff 370, todo: 103
<Time And Date>        WARN    lotus-client    lotus/metrics.go:90     Louts behind in syncing with height diff 370, todo: 54
<Time And Date>        WARN    lotus-client    lotus/metrics.go:90     Louts behind in syncing with height diff 370, todo: 8
<Time And Date>        WARN    lotus-client    lotus/metrics.go:90     Louts behind in syncing with height diff 39, todo: 7
<Time And Date>        INFO    ffs-scheduler   scheduler/scheduler.go:<Number>      running scheduler gc...
<Time And Date>        INFO    ffs-scheduler   scheduler/scheduler.go:<Number>      scheduler gc ran with 0 excluded cids, unpinning 0 staged cids

当同步完成后,您可以成功地完成Filecoin处理,而不会出现merkledag: not found错误。

@j符号on Github指出,不需要重新安装就可以修复错误,只需引用"https://docs.textile.io/powergate/faq/#i-see-a-log-error-computing-commp-failed-generating-commp-blockstore-block-not-found-what-does-this-mean.“这里引用的是"https://github.com/textileio/powergate/issues/849.”。

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/104010

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档