filecoin-project / motion

:motorcycle: Accelerating Data onto FileCoin
Other
25 stars 5 forks source link

Singularity needs on-chain address: provide better error message & document #203

Closed rvagg closed 11 months ago

rvagg commented 1 year ago

Singularity will choke if it's provided a wallet that's not been touched on-chain because it uses short IDs for deal-making. Since we have the Lotus API in Motion, we could do a quick ping of the API to check the wallet address before loading Singularity and having a strange error emerge from below.

Alternatively, just make Singularity's error a bit more helpful:

2023-11-02T02:56:47.459Z       ERROR   singularity/handler/wallet      wallet/import.go:66     failed to lookup state for wallet address       {"addr": "f1ctnp53osruklvuiqtdf27meicerv5utfiq7jvia", "err": "3: actor not found"}
rvagg commented 1 year ago

Actually, given https://github.com/filecoin-project/motion/pull/200, we probably can't do this locally, so we should:

  1. Improve the error message and make sure it propagates to the user
  2. Document this requirement - it must be an actor on chain, even if it's funded with 0 FIL (apparently you can send 0 FIL to an address)
xinaxu commented 1 year ago

This may be a code bug that forgets to check IsSuccess() of below response https://github.com/filecoin-project/motion/blob/0ef904de503b8e50d607815e3c3cd77f28ace9fb/integration/singularity/store.go#L147C13-L147C13