swanchain / go-computing-provider

A golang implementation of computing provider
MIT License
21 stars 22 forks source link

ubi task: Failed send a request #92

Closed ThomasBlock closed 3 months ago

ThomasBlock commented 3 months ago

I think i managed to get v 0.5 running. but ubi task has a network problem, how could i fix that?

it tires to conenct to the external multiaddress ip, not the internal ip. so it cannot appear onchain.

time="2024-06-14 09:23:27.840" level=info msg="ubi task received: id: 521842, type: 1, zk_type: fil-c2-512M, input_param: https://286cb2c989.acl.swanipfs.com/ipfs/Qmb1WzuvjaH6MMkgHGvt9jxFuTLkGEsdWepzre5Mk1G3ni, signature: 0x012de65d0b9ce1891491c73c6f74bfb78c9a621f783b6d9a3090f6cefe2270cf39cd1212abf48a5632a25fc3e992f3777c5d8acc57f44333d389ba90b73c1b5001, contract: 0x188776A3Fe39e76430AdD728085BD93DDB0C0c41" func=DoUbiTaskForDocker file="ubi.go:444"

docker ps -a
CONTAINER ID   IMAGE                             COMMAND                  CREATED         STATUS                     PORTS                                         NAMES
ec69f4cfaf7c   filswan/ubi-worker-gpu-amd:v2.0   "ubi-bench c2"           7 minutes ago   Exited (0) 7 minutes ago                                                 fil-c2-512m-5218421zokl
docker logs ec69f4cfaf7c
2024-06-14T07:23:28.218Z    INFO    ubi-bench   ubi-bench/main.go:96    Starting ubi-bench
2024-06-14T07:23:28.218Z    INFO    ubi-bench   ubi-bench/main.go:556   get param from mcs url: https://286cb2c989.acl.swanipfs.com/ipfs/Qmb1WzuvjaH6MMkgHGvt9jxFuTLkGEsdWepzre5Mk1G3ni
...
2024-06-14T07:23:55.839 INFO filecoin_proofs::api::seal > verify_seal:start: SectorId(0)
2024-06-14T07:23:55.839 INFO filecoin_proofs::caches > trying parameters memory cache for: STACKED[536870912]-verifying-key
2024-06-14T07:23:55.839 INFO filecoin_proofs::caches > found params in memory cache for STACKED[536870912]-verifying-key
2024-06-14T07:23:55.840 INFO filecoin_proofs::api::seal > verify_seal:finish: SectorId(0)
2024-06-14T07:23:55.840 INFO filecoin_proofs::api::seal > seal_commit_phase2:finish: SectorId(0)
time="2024-06-14 07:24:15.847" level=error msg="Failed send a request, error: Post \"http://45.153.35.148:40037/api/v1/computing/cp/docker/receive/ubi\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" func=func4 file="main.go:644"
2024-06-14T07:24:15.848Z    WARN    ubi-bench   ubi-bench/main.go:113   Post "http://45.153.35.148:40037/api/v1/computing/cp/docker/receive/ubi": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

image

sonic-chain commented 3 months ago

Fix the bug that is not working on this branch:https://github.com/swanchain/go-computing-provider/tree/fix-doc. Use this branch to compile the binary to replace the old binary. @ThomasBlock

ThomasBlock commented 3 months ago

thank you! now we are in a great workflow.

2024-06-14T09:58:49.695 INFO filecoin_proofs::api::seal > seal_commit_phase2:finish: SectorId(0)
seal: commit phase 2 finished, total time: 6.024157, sector_id: 0 
user@swanZK:~/go-computing-provider$ 
time="2024-06-14 11:58:49.696" level=info msg="task_id: 522050, c2 proof out received: {TaskId:522050 TaskType: Proof:hdRsud7nldlWxCantlU+rYVPz2xJ/nOUUPpXUMWhcDHh1ZJlY2TtanqAn1R3nQydgYXNsIuqAP8sHHshCFx6pVz5XbnmYWAu3S2KNitWwTz5XCuZ1YRvVt5TNqHKrkL6GCsxJ2BILApAtDEitx1/17tZBsrscisOcrcQwjW5VzboeAx/8chU6q8Af8XRLyQAhbQLUlC2rnWz5WxdWopjkMhgzyfSviEbEe9gp1HZ7n9a25nEj4NNA+PUWyQMw4CX ZkType: NameSpace:}" func=ReceiveUbiProofForDocker file="ubi.go:733"
time="2024-06-14 11:58:53.483" level=info msg="taskId: 522050, submitUBIProofTx: 0xf2d38c44b6b31cb680859549b35dcef103995d15f8e4a54bb69a4ba7bf6e9289" func=submitUBIProof file="ubi.go:873"

image