0

I am using WSL Ubuntu 20.04 on Windows 10. I installed lotus, ipfs-go, pow, and powd. I waited for the lotus daemon to finish syncing then I launched ipfs with ipfs daemon, then the pow daemon in a screen session with powd --lotustoken <mylotustokenhere>.

So the lotus daemon is synced and running, the ipfs daemon is running, and the powergate daemon is also running connected to the lotus daemon through the admin auth token. I already staged a directory and got a cid (through powergate) with the command pow data stage path/to/dir and got a 'bafy' starting IPFS hash. The directory is about 5GB in size. I created a random data bin file through a dd command. I chose to make it 5GB because I noticed that a lot of miners want you to make the job for more than 4GB. I ran the command pow config apply --watch <CID> -o -c custom-072321-config.json. This was my custom-072321-config.json file.

{
  "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
}

But the job failed... IDK why?

This was my error that I got:

                 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>:~$

So I removed all of the files from the IPFS daemon pinning system with ipfs pin ls --type recursive | cut -d' ' -f1 | xargs -n1 ipfs pin rm then ran ipfs repo gc to make sure that they were garbage collected. I ran ipfs add -r --pin=false path/to/dir and got a Q starting CID and ran the command pow config apply --watch <CID> -o -c custom-072321-config.json again with the new CID starting with a Q and I got the same error as above. So I figured that the original bafy starting CID and the Q starting CID were still describing the same directory. So I ran the original pow config apply --watch <CID> -o -c custom-072321-config.json command with the original bafy starting CID and after sticking on JOB_STATUS_EXECUTING for a long time, I got this error:

                 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                                                                                                        |       |       |    

What am I doing wrong? How do I store my file on Filecoin?

0

Personally, I was not able to correct this error without changing the install. What I ended up doing was re-installing powergate but this time doing it through docker instead of installing lotus, ipfs, and powergate separately and trying to link them all together.

Btw, I recommend doing screen -S newScreen and running the install commands in the screen shell. That way when you want to check logs through the below mentioned command docker logs mainnet_* you can do Ctrl+a, d to disconnect from the screen session and run the log checking command in a your original terminal environment. When it's time to go back to the installing commands shell just run screen -ls to find the session's name and then run screen -r <session name here>.

This was the way that I installed powergate that worked:

  1. git clone https://github.com/textileio/powergate.git
  2. cd powergate/docker/
  3. nano docker-compose.yaml
  4. between line 32 and 33, add command: ["lotus", "daemon", "--import-snapshot", "https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car"]
  5. make up
  6. Wait for the blockchain to finish downloading. Check progress with docker logs mainnet_lotus_1 look for 1.54 GiB / 35.65 GiB, 2.51 GiB / 35.65 GiB, 3.36 GiB / 35.65 GiB...
  7. When the blockchain is finished downloading kill the process with ^C and run make down
  8. nano docker-compose.yaml
  9. Delete the line that you added.
  10. make up
  11. Wait for the blockchain state syncing to finish. Check progress with docker logs mainnet_powergate_1 and look for
<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

When the syncing is complete you can successfully make Filecoin deals without the merkledag: not found error occcuring.

@jsign on Github stated that the error can be fixed without doing a docker re-install be simply referring to "https://docs.textile.io/powergate/faq/#i-see-a-log-error-computing-commp-failed-generating-commp-blockstore-block-not-found-what-does-this-mean." This is referenced here "https://github.com/textileio/powergate/issues/849."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.