Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[https://slate.host] Repairing deals that are on miners that no longer exist. #389

Open
jimmylee opened this issue Oct 27, 2020 · 1 comment

Comments

@jimmylee
Copy link

In Slate we have a bunch of deals listed here: https://slate.host/api/v1/deals

All of the deal data comes from Powergate through this call:

const listStorageResult = await power.listStorageDealRecords({
  ascending: false,
  includePending: false,
  includeFinal: true,
});

Here is an example of our database entry we produce

{
  "id": "d6f555e8-6d7f-4657-98ee-ff0f79a138dc",
  "owner_user_id": "1195e8bb-3f94-4b47-9deb-b30d6a6f82c4",
  "data": {
    "addr": "t3whc2f2m3oyc6ooq2efo756bgipyx3g4jsaoa5pjsmug5tnrtbunq7n6vfzrcn624p73q5iuo6qzqy7qtjolq",
    "size": 32512,
    "time": 1602264766,
    "user": {
      "id": "1195e8bb-3f94-4b47-9deb-b30d6a6f82c4",
      "name": "Jimmy Lee",
      "photo": "https://bafkreieyix5bxsdyvig3w3uvmb4rbcqhtqimukfo5mvnsqzeij7k34fbfy.ipfs.slate.textile.io",
      "username": "jim"
    },
    "miner": {
      "id": "f02401",
      "miner": "f02401",
      "expiry": 229207,
      "priceFIL": "0.000000002 FIL",
      "timestamp": 142807,
      "priceAttoFIL": 2000000000,
      "minDealDuration": "79.59 days",
      "minPieceSizeBytes": 256,
      "minPieceSizeFormatted": "256.00 Bytes"
    },
    "dealId": 510801,
    "minerId": "f02401",
    "pending": false,
    "rootCid": "bafybeierwxqlawluj3aoizloe5oi3dn3dgxxvhoxsglfpojvbvwb6sevg4",
    "duration": 521130,
    "pieceCid": "baga6ea4seaqpmotb24kfiiagwu3dnxur5uezienxa7gztvdadtmwqc7zc3t24mi",
    "createdAt": "9-30-2020",
    "startEpoch": 137788,
    "proposalCid": "bafyreihixvrtkx3docimzunttdorqumbd2lrpb4q2voyvaccpq262fp2ty",
    "totalCostFIL": "0.0000000000156339 FIL",
    "formattedSize": "31.75 KB",
    "pricePerEpoch": 30,
    "activationEpoch": 131852,
    "totalCostAttoFIL": 15633900,
    "formattedDuration": "180.95 days",
    "userEncryptsDeals": true
  },
  "created_at": "2020-10-19T03:39:08.643Z",
  "updated_at": "2020-10-19T03:39:08.643Z"
},       

However, we now know that these miners don't exist:

t016303
t016304
t016305
t016306
t016309

And that may be the case other miners as well, I'd love to run a repair method on deals that are no longer retrievable? Also happy to think of other solutions here too.

@asutula
Copy link
Member

asutula commented Nov 9, 2020

Powergate does include some repair functionality, so we should see what the status of that feature is and how it relates to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants