@filoz/repair-cli 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +3 -2
- package/dist/src/cli.js +2 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/datasets.d.ts +16 -1
- package/dist/src/commands/datasets.d.ts.map +1 -1
- package/dist/src/commands/datasets.js +107 -3
- package/dist/src/commands/datasets.js.map +1 -1
- package/dist/src/commands/providers.d.ts +16 -1
- package/dist/src/commands/providers.d.ts.map +1 -1
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/repair.d.ts +16 -1
- package/dist/src/commands/repair.d.ts.map +1 -1
- package/dist/src/commands/repair.js +7 -8
- package/dist/src/commands/repair.js.map +1 -1
- package/dist/src/commands/replicate.d.ts +24 -0
- package/dist/src/commands/replicate.d.ts.map +1 -0
- package/dist/src/commands/replicate.js +171 -0
- package/dist/src/commands/replicate.js.map +1 -0
- package/dist/src/commands/setup.d.ts.map +1 -1
- package/dist/src/commands/setup.js +15 -0
- package/dist/src/commands/setup.js.map +1 -1
- package/dist/src/commands/wallet.d.ts +16 -1
- package/dist/src/commands/wallet.d.ts.map +1 -1
- package/dist/src/db/dedupe-cids.d.ts +22 -0
- package/dist/src/db/dedupe-cids.d.ts.map +1 -0
- package/dist/src/db/dedupe-cids.js +28 -0
- package/dist/src/db/dedupe-cids.js.map +1 -0
- package/dist/src/db/find-providers-by-cid.d.ts +9 -0
- package/dist/src/db/find-providers-by-cid.d.ts.map +1 -0
- package/dist/src/db/{get-providers-by-cid.js → find-providers-by-cid.js} +4 -6
- package/dist/src/db/find-providers-by-cid.js.map +1 -0
- package/dist/src/db/find-repair-dataset.d.ts +10 -0
- package/dist/src/db/find-repair-dataset.d.ts.map +1 -0
- package/dist/src/db/{get-repair-dataset.js → find-repair-dataset.js} +8 -6
- package/dist/src/db/find-repair-dataset.js.map +1 -0
- package/dist/src/db/get-pieces.d.ts +16 -0
- package/dist/src/db/get-pieces.d.ts.map +1 -1
- package/dist/src/db/get-pieces.js +44 -3
- package/dist/src/db/get-pieces.js.map +1 -1
- package/dist/src/db/repair-create.d.ts.map +1 -1
- package/dist/src/db/repair-create.js +1 -0
- package/dist/src/db/repair-create.js.map +1 -1
- package/dist/src/db/repair-delete.d.ts.map +1 -1
- package/dist/src/db/repair-delete.js +0 -5
- package/dist/src/db/repair-delete.js.map +1 -1
- package/dist/src/db/replicate-create.d.ts +7 -0
- package/dist/src/db/replicate-create.d.ts.map +1 -0
- package/dist/src/db/replicate-create.js +78 -0
- package/dist/src/db/replicate-create.js.map +1 -0
- package/dist/src/db/upsert-operations.js +1 -1
- package/dist/src/db/upsert-operations.js.map +1 -1
- package/dist/src/local-schema.d.ts +19 -0
- package/dist/src/local-schema.d.ts.map +1 -1
- package/dist/src/local-schema.js +1 -0
- package/dist/src/local-schema.js.map +1 -1
- package/dist/src/middleware.d.ts +32 -2
- package/dist/src/middleware.d.ts.map +1 -1
- package/dist/src/middleware.js +10 -1
- package/dist/src/middleware.js.map +1 -1
- package/dist/src/pipeline/add-pieces.d.ts +12 -0
- package/dist/src/pipeline/add-pieces.d.ts.map +1 -0
- package/dist/src/pipeline/add-pieces.js +142 -0
- package/dist/src/pipeline/add-pieces.js.map +1 -0
- package/dist/src/pipeline/create-datasets.d.ts +3 -1
- package/dist/src/pipeline/create-datasets.d.ts.map +1 -1
- package/dist/src/pipeline/create-datasets.js +57 -5
- package/dist/src/pipeline/create-datasets.js.map +1 -1
- package/dist/src/utils.d.ts +166 -120
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +50 -25
- package/dist/src/utils.js.map +1 -1
- package/package.json +3 -2
- package/readme.md +110 -7
- package/src/cli.ts +2 -0
- package/src/commands/datasets.ts +109 -3
- package/src/commands/providers.ts +0 -1
- package/src/commands/repair.ts +12 -8
- package/src/commands/replicate.ts +183 -0
- package/src/commands/setup.ts +16 -0
- package/src/db/dedupe-cids.ts +49 -0
- package/src/db/{get-providers-by-cid.ts → find-providers-by-cid.ts} +5 -10
- package/src/db/{get-repair-dataset.ts → find-repair-dataset.ts} +12 -7
- package/src/db/get-pieces.ts +105 -3
- package/src/db/get-target-dataset.ts +1 -1
- package/src/db/repair-create.ts +1 -0
- package/src/db/repair-delete.ts +0 -5
- package/src/db/replicate-create.ts +106 -0
- package/src/db/upsert-operations.ts +1 -1
- package/src/local-schema.ts +1 -0
- package/src/middleware.ts +12 -1
- package/src/pipeline/add-pieces.ts +214 -0
- package/src/pipeline/create-datasets.ts +71 -11
- package/src/utils.ts +64 -32
- package/dist/src/db/get-providers-by-cid.d.ts +0 -10
- package/dist/src/db/get-providers-by-cid.d.ts.map +0 -1
- package/dist/src/db/get-providers-by-cid.js.map +0 -1
- package/dist/src/db/get-repair-dataset.d.ts +0 -9
- package/dist/src/db/get-repair-dataset.d.ts.map +0 -1
- package/dist/src/db/get-repair-dataset.js.map +0 -1
- package/dist/src/db/sync-pieces-onchain.d.ts +0 -10
- package/dist/src/db/sync-pieces-onchain.d.ts.map +0 -1
- package/dist/src/db/sync-pieces-onchain.js +0 -35
- package/dist/src/db/sync-pieces-onchain.js.map +0 -1
- package/dist/src/pipeline/pull.d.ts +0 -30
- package/dist/src/pipeline/pull.d.ts.map +0 -1
- package/dist/src/pipeline/pull.js +0 -169
- package/dist/src/pipeline/pull.js.map +0 -1
- package/src/db/sync-pieces-onchain.ts +0 -53
- package/src/pipeline/pull.ts +0 -255
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,KAAK,KAAK,EAAY,MAAM,4BAA4B,CAAA;AACjE,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAmB,KAAK,GAAG,EAAO,MAAM,aAAa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M,aAAa;;iBAExB,CAAA;AAEF,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAQhF;AAED,wBAAsB,oBAAoB,CAAC,EAAE,EAAE,aAAa,iBAwC3D;AASD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,UAGlD;AAKD,wBAAsB,QAAQ,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,mBAehG;AASD,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,+BAe/E;AAED,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,OAAO,GAAG,WAAW,EAAE,CAAC,SAAS,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,EAC3G,OAAO,CAAC,EACR,UAAU,CAAC,EAAE,4BAed,CAAA;AAKD,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,eAAe,EAAE,EAAE,GAAG,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhF;AAKD,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,eAAe,EAAE,uBAiBnE"}
|
package/dist/src/utils.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getChain } from '@filoz/synapse-core/chains';
|
|
2
|
-
import
|
|
2
|
+
import * as Piece from '@filoz/synapse-core/piece';
|
|
3
3
|
import { getTableColumns, sql } from 'drizzle-orm';
|
|
4
4
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
5
5
|
import { z } from 'incur';
|
|
6
|
+
import { Conf } from 'iso-conf';
|
|
6
7
|
import { request } from 'iso-web/http';
|
|
7
8
|
import pLocate from 'p-locate';
|
|
8
9
|
import terminalLink from 'terminal-link';
|
|
@@ -10,27 +11,18 @@ import { createWalletClient, http } from 'viem';
|
|
|
10
11
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
11
12
|
import packageJson from '../package.json' with { type: 'json' };
|
|
12
13
|
import * as schema from "./local-schema.js";
|
|
13
|
-
export const
|
|
14
|
+
export const configSchema = z.object({
|
|
15
|
+
privateKey: z.string().optional(),
|
|
16
|
+
indexerMainnetUrl: z.url().optional(),
|
|
17
|
+
indexerCalibrationUrl: z.url().optional(),
|
|
18
|
+
chainId: z.number().optional(),
|
|
19
|
+
dbPath: z.string().optional(),
|
|
20
|
+
source: z.string().optional(),
|
|
21
|
+
});
|
|
14
22
|
export const config = new Conf({
|
|
15
23
|
projectName: packageJson.name,
|
|
16
24
|
projectSuffix: '',
|
|
17
|
-
schema:
|
|
18
|
-
privateKey: {
|
|
19
|
-
type: 'string',
|
|
20
|
-
},
|
|
21
|
-
dbPath: {
|
|
22
|
-
type: 'string',
|
|
23
|
-
},
|
|
24
|
-
indexerMainnetUrl: {
|
|
25
|
-
type: 'string',
|
|
26
|
-
},
|
|
27
|
-
indexerCalibrationUrl: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
},
|
|
30
|
-
chainId: {
|
|
31
|
-
type: 'number',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
25
|
+
schema: configSchema,
|
|
34
26
|
});
|
|
35
27
|
export const name = packageJson.name;
|
|
36
28
|
export const version = packageJson.version;
|
|
@@ -74,11 +66,19 @@ export async function migrateLocalDatabase(db) {
|
|
|
74
66
|
target_provider_id text NOT NULL,
|
|
75
67
|
target_provider_url text NOT NULL,
|
|
76
68
|
target_data_set_id text,
|
|
69
|
+
repair_data_set_id text,
|
|
77
70
|
block_number text NOT NULL,
|
|
78
71
|
created_at integer NOT NULL,
|
|
79
72
|
updated_at integer NOT NULL
|
|
80
73
|
)
|
|
81
74
|
`);
|
|
75
|
+
try {
|
|
76
|
+
await db.$client.execute(`
|
|
77
|
+
ALTER TABLE repairs ADD COLUMN repair_data_set_id text
|
|
78
|
+
`);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
}
|
|
82
82
|
await db.$client.execute(`
|
|
83
83
|
CREATE TABLE IF NOT EXISTS operations (
|
|
84
84
|
id integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
@@ -100,12 +100,6 @@ export function hashLink(hash, chain) {
|
|
|
100
100
|
const link = terminalLink(hash, `${chain.blockExplorers?.default?.url}/tx/${hash}`);
|
|
101
101
|
return link;
|
|
102
102
|
}
|
|
103
|
-
export function getRepairDatasetMetadata() {
|
|
104
|
-
return {
|
|
105
|
-
source: EARLY_REPAIR_SOURCE,
|
|
106
|
-
withIPFSIndexing: '',
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
103
|
export async function getPiece({ pieceCid, serviceUrl }) {
|
|
110
104
|
const url = new URL(`/piece/${pieceCid}`, serviceUrl);
|
|
111
105
|
const response = await request.head(url, {
|
|
@@ -137,4 +131,35 @@ export const buildConflictUpdateColumns = (table, columns) => {
|
|
|
137
131
|
}, {});
|
|
138
132
|
return r;
|
|
139
133
|
};
|
|
134
|
+
export function excludeOperationsByCid(operations, cid) {
|
|
135
|
+
const operationToCommit = [];
|
|
136
|
+
const operationToFailed = [];
|
|
137
|
+
for (const operation of operations) {
|
|
138
|
+
if (operation.cid === cid) {
|
|
139
|
+
operationToFailed.push(operation);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
operationToCommit.push(operation);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return { operationToCommit, operationToFailed };
|
|
146
|
+
}
|
|
147
|
+
export function operationsToPullPieces(operations) {
|
|
148
|
+
const cids = new Set();
|
|
149
|
+
const pieces = [];
|
|
150
|
+
for (const operation of operations) {
|
|
151
|
+
if (cids.has(operation.cid)) {
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
pieces.push({
|
|
155
|
+
sourceUrl: Piece.createPieceUrlPDP({
|
|
156
|
+
cid: operation.cid,
|
|
157
|
+
serviceURL: operation.alternateProvider,
|
|
158
|
+
}),
|
|
159
|
+
pieceCid: Piece.from(operation.cid),
|
|
160
|
+
});
|
|
161
|
+
cids.add(operation.cid);
|
|
162
|
+
}
|
|
163
|
+
return pieces;
|
|
164
|
+
}
|
|
140
165
|
//# sourceMappingURL=utils.js.map
|
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,eAAe,EAAY,GAAG,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,OAAO,EAAE,CAAC,EAAE,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,OAAO,MAAM,UAAU,CAAA;AAC9B,OAAO,YAAY,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAY,IAAI,EAAE,MAAM,MAAM,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAE/D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAG3C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,iBAAiB,EAAE,CAAC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M,iBAAiB,GAAsB,EAAE,CAAA;IAC/C,MAAM,iBAAiB,GAAsB,EAAE,CAAA;IAC/C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YAC1B,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACnC,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACnC,CAAC;IACH,CAAC;IACD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAA;AACjD,CAAC;AAKD,MAAM,UAAU,sBAAsB,CAAC,UAA6B;IAClE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,MAAM,MAAM,GAAwB,EAAE,CAAA;IACtC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,SAAQ;QACV,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC;gBACjC,GAAG,EAAE,SAAS,CAAC,GAAG;gBAClB,UAAU,EAAE,SAAS,CAAC,iBAAiB;aACxC,CAAC;YACF,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;SACpC,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@filoz/repair-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Early repair for faulty service providers and datasets",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -96,12 +96,13 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@clack/prompts": "^1.5.1",
|
|
99
|
-
"@filoz/synapse-core": "^0.
|
|
99
|
+
"@filoz/synapse-core": "^0.7.0",
|
|
100
100
|
"@libsql/client": "^0.17.3",
|
|
101
101
|
"conf": "^15.1.0",
|
|
102
102
|
"drizzle-orm": "^0.45.2",
|
|
103
103
|
"incur": "^0.4.6",
|
|
104
104
|
"iso-base": "^4.4.0",
|
|
105
|
+
"iso-conf": "^0.4.0",
|
|
105
106
|
"iso-web": "^3.1.2",
|
|
106
107
|
"p-all": "^5.0.1",
|
|
107
108
|
"p-locate": "^7.0.0",
|
package/readme.md
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
> Early repair for faulty service providers and datasets
|
|
6
6
|
|
|
7
|
-
The `repair` CLI helps prepare and run repair
|
|
7
|
+
The `repair` CLI helps prepare and run repair and replication jobs on Filecoin PDP datasets. It uses:
|
|
8
8
|
|
|
9
9
|
- an indexer Postgres database as the read-only source of providers, datasets, and pieces
|
|
10
|
-
- a local SQLite database to track repair jobs and per-piece operations
|
|
10
|
+
- a local SQLite database to track repair and replication jobs and per-piece operations
|
|
11
11
|
- a configured Filecoin wallet to create datasets and submit on-chain add-piece transactions
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
@@ -37,6 +37,7 @@ Setup prompts for:
|
|
|
37
37
|
- calibration indexer Postgres URL
|
|
38
38
|
- chain, either Filecoin Mainnet `314` or Filecoin Calibration `314159`
|
|
39
39
|
- local SQLite database path
|
|
40
|
+
- dataset source label, used when creating repair target datasets (defaults to `early-repair`)
|
|
40
41
|
|
|
41
42
|
The command stores these values in the CLI config and runs the local SQLite schema migration. It returns the configured wallet address.
|
|
42
43
|
|
|
@@ -58,7 +59,7 @@ Interactive configuration and local database setup.
|
|
|
58
59
|
repair setup
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
Use this whenever you need to initialize the CLI, change the active chain, update indexer URLs, or move the local SQLite database.
|
|
62
|
+
Use this whenever you need to initialize the CLI, change the active chain, update indexer URLs, change the dataset source label, or move the local SQLite database.
|
|
62
63
|
|
|
63
64
|
### `repair wallet fund`
|
|
64
65
|
|
|
@@ -140,6 +141,26 @@ Filter by provider ID:
|
|
|
140
141
|
repair datasets list --provider-id 123
|
|
141
142
|
```
|
|
142
143
|
|
|
144
|
+
### `repair datasets show <id>`
|
|
145
|
+
|
|
146
|
+
Shows a dataset from the configured indexer.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
repair datasets show 42
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
The output includes the dataset record, its provider, and active pieces.
|
|
153
|
+
|
|
154
|
+
### `repair datasets terminate <id>`
|
|
155
|
+
|
|
156
|
+
Terminates a dataset owned by the configured wallet.
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
repair datasets terminate 42
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The command submits the on-chain terminate transaction, waits for it to be mined, and returns the result.
|
|
163
|
+
|
|
143
164
|
### `repair repair create`
|
|
144
165
|
|
|
145
166
|
Creates a local repair plan for a source provider and a target provider.
|
|
@@ -165,12 +186,14 @@ repair repair list
|
|
|
165
186
|
Each repair includes:
|
|
166
187
|
|
|
167
188
|
- repair ID and status
|
|
168
|
-
-
|
|
189
|
+
- repair provider ID
|
|
169
190
|
- target provider ID and target provider URL
|
|
170
191
|
- target dataset ID, when one has been created or found
|
|
171
192
|
- block number used when the repair was created
|
|
172
193
|
- total operations and counts by `pending`, `failed`, `completed`, and `skipped`
|
|
173
194
|
|
|
195
|
+
This command lists provider-level repairs only. Dataset replications are listed with `repair replicate list`.
|
|
196
|
+
|
|
174
197
|
### `repair repair run <repairId>`
|
|
175
198
|
|
|
176
199
|
Runs a pending repair.
|
|
@@ -179,18 +202,17 @@ Runs a pending repair.
|
|
|
179
202
|
repair repair run 1
|
|
180
203
|
```
|
|
181
204
|
|
|
182
|
-
The command first ensures the target repair dataset exists for the configured wallet and target provider. If no matching dataset exists, it creates one with IPFS indexing enabled and CDN disabled. Then it processes pending `add_piece` operations by pulling pieces from alternate providers into the target provider and committing them on-chain.
|
|
205
|
+
The command first ensures the target repair dataset exists for the configured wallet and target provider. If no matching dataset exists, it creates one with IPFS indexing enabled and CDN disabled, using the configured source label. Then it processes pending `add_piece` operations by pulling pieces from alternate providers into the target provider and committing them on-chain.
|
|
183
206
|
|
|
184
207
|
Options:
|
|
185
208
|
|
|
186
209
|
- `--concurrency <number>` controls how many pull batches run at once. Defaults to `4`.
|
|
187
210
|
- `--batch-size <number>` controls the maximum number of `add_piece` operations per batch. Defaults to `40`.
|
|
188
|
-
- `--reset` retries failed `add_piece` operations as well as pending operations.
|
|
189
211
|
|
|
190
212
|
Example:
|
|
191
213
|
|
|
192
214
|
```bash
|
|
193
|
-
repair repair run 1 --concurrency 8 --batch-size 40
|
|
215
|
+
repair repair run 1 --concurrency 8 --batch-size 40
|
|
194
216
|
```
|
|
195
217
|
|
|
196
218
|
### `repair repair delete <repairId>`
|
|
@@ -203,6 +225,68 @@ repair repair delete 1
|
|
|
203
225
|
|
|
204
226
|
This only deletes local SQLite state. It does not delete on-chain datasets or remove pieces from a provider.
|
|
205
227
|
|
|
228
|
+
### `repair replicate create`
|
|
229
|
+
|
|
230
|
+
Creates a local replication plan for a source dataset and a target provider.
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
repair replicate create --data-set-id 42 --target-provider-id 202
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
`--data-set-id` is the source dataset whose pieces should be replicated.
|
|
237
|
+
|
|
238
|
+
`--target-provider-id` is the provider that should receive the replicated pieces. It must be different from the source dataset's provider.
|
|
239
|
+
|
|
240
|
+
The command snapshots the current chain block number, creates a local replication row, and creates local `add_piece` operations for every active piece in the source dataset. Pieces are pulled from the source dataset's provider, not from alternate providers. The command returns a `replicateId`.
|
|
241
|
+
|
|
242
|
+
### `repair replicate list`
|
|
243
|
+
|
|
244
|
+
Lists local dataset replications.
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
repair replicate list
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Each replication includes:
|
|
251
|
+
|
|
252
|
+
- replication ID and status
|
|
253
|
+
- source provider ID and source dataset ID
|
|
254
|
+
- target provider ID and target provider URL
|
|
255
|
+
- target dataset ID, when one has been created
|
|
256
|
+
- block number used when the replication was created
|
|
257
|
+
- total operations and counts by `pending`, `failed`, `completed`, and `skipped`
|
|
258
|
+
|
|
259
|
+
### `repair replicate run <replicateId>`
|
|
260
|
+
|
|
261
|
+
Runs a pending replication.
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
repair replicate run 1
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
The command creates a new target dataset on the target provider, copying CDN and metadata settings from the source dataset. Then it processes pending `add_piece` operations by pulling pieces from the source provider into the target provider and committing them on-chain.
|
|
268
|
+
|
|
269
|
+
Options:
|
|
270
|
+
|
|
271
|
+
- `--concurrency <number>` controls how many pull batches run at once. Defaults to `4`.
|
|
272
|
+
- `--batch-size <number>` controls the maximum number of `add_piece` operations per batch. Defaults to `40`.
|
|
273
|
+
|
|
274
|
+
Example:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
repair replicate run 1 --concurrency 8 --batch-size 40
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### `repair replicate delete <replicateId>`
|
|
281
|
+
|
|
282
|
+
Deletes a local replication and its operations.
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
repair replicate delete 1
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
This only deletes local SQLite state. It does not delete on-chain datasets or remove pieces from a provider.
|
|
289
|
+
|
|
206
290
|
## Typical Workflow
|
|
207
291
|
|
|
208
292
|
1. Configure the CLI.
|
|
@@ -238,6 +322,25 @@ repair repair list
|
|
|
238
322
|
repair repair run 1
|
|
239
323
|
```
|
|
240
324
|
|
|
325
|
+
### Replicating a dataset
|
|
326
|
+
|
|
327
|
+
Use replication when you want to copy an entire dataset to another provider, rather than repairing all pieces on a faulty provider.
|
|
328
|
+
|
|
329
|
+
1. Find the source dataset.
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
repair datasets list
|
|
333
|
+
repair datasets show 42
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
1. Create, inspect, and run the replication.
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
repair replicate create --data-set-id 42 --target-provider-id 202
|
|
340
|
+
repair replicate list
|
|
341
|
+
repair replicate run 1
|
|
342
|
+
```
|
|
343
|
+
|
|
241
344
|
## Contributing
|
|
242
345
|
|
|
243
346
|
Read contributing [guidelines](../../.github/CONTRIBUTING.md).
|
package/src/cli.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Cli } from 'incur'
|
|
|
3
3
|
import { datasets } from './commands/datasets.ts'
|
|
4
4
|
import { providers } from './commands/providers.ts'
|
|
5
5
|
import { repair } from './commands/repair.ts'
|
|
6
|
+
import { replicate } from './commands/replicate.ts'
|
|
6
7
|
import { setup } from './commands/setup.ts'
|
|
7
8
|
import { wallet } from './commands/wallet.ts'
|
|
8
9
|
import { version } from './utils.ts'
|
|
@@ -15,6 +16,7 @@ const cli = Cli.create('repair', {
|
|
|
15
16
|
cli.command(setup)
|
|
16
17
|
cli.command(wallet)
|
|
17
18
|
cli.command(repair)
|
|
19
|
+
cli.command(replicate)
|
|
18
20
|
cli.command(datasets)
|
|
19
21
|
cli.command(providers)
|
|
20
22
|
cli.serve()
|
package/src/commands/datasets.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as p from '@clack/prompts'
|
|
2
|
+
import * as SP from '@filoz/synapse-core/sp'
|
|
3
|
+
import { getPdpDataSet } from '@filoz/synapse-core/warm-storage'
|
|
4
|
+
import { and, asc, eq } from 'drizzle-orm'
|
|
2
5
|
import { Cli, z } from 'incur'
|
|
3
6
|
import { contextMiddleware, contextSchema } from '../middleware.ts'
|
|
4
|
-
import { globalOptions } from '../utils.ts'
|
|
7
|
+
import { globalOptions, hashLink } from '../utils.ts'
|
|
5
8
|
export const datasets = Cli.create('datasets', {
|
|
6
9
|
description: 'Dataset commands',
|
|
7
10
|
options: globalOptions,
|
|
@@ -29,8 +32,11 @@ datasets.command('list', {
|
|
|
29
32
|
where: and(...conditions),
|
|
30
33
|
with: {
|
|
31
34
|
provider: true,
|
|
32
|
-
pieces:
|
|
35
|
+
pieces: {
|
|
36
|
+
where: eq(c.var.indexerDb._.fullSchema.pieces.removed, false),
|
|
37
|
+
},
|
|
33
38
|
},
|
|
39
|
+
orderBy: [asc(schema.dataSets.dataSetId)],
|
|
34
40
|
})
|
|
35
41
|
|
|
36
42
|
const datasetsFlattened = datasets.map((dataset) => {
|
|
@@ -60,3 +66,103 @@ datasets.command('list', {
|
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
})
|
|
69
|
+
|
|
70
|
+
datasets.command('terminate', {
|
|
71
|
+
description: 'Terminate a dataset',
|
|
72
|
+
args: z.object({
|
|
73
|
+
id: z.coerce.bigint().describe('Dataset ID to terminate'),
|
|
74
|
+
}),
|
|
75
|
+
options: globalOptions,
|
|
76
|
+
middleware: [contextMiddleware],
|
|
77
|
+
outputPolicy: 'agent-only',
|
|
78
|
+
run: async (c) => {
|
|
79
|
+
const isInteractive = !c.agent && !c.formatExplicit
|
|
80
|
+
const spinner = p.spinner()
|
|
81
|
+
try {
|
|
82
|
+
if (isInteractive) {
|
|
83
|
+
spinner.start('Getting dataset...')
|
|
84
|
+
}
|
|
85
|
+
const dataset = await getPdpDataSet(c.var.client, { dataSetId: c.args.id })
|
|
86
|
+
if (!dataset) {
|
|
87
|
+
return c.error({
|
|
88
|
+
code: 'DATASET_NOT_FOUND',
|
|
89
|
+
message: 'Dataset not found',
|
|
90
|
+
retryable: false,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
if (isInteractive) {
|
|
94
|
+
spinner.message(`Terminating dataset ${dataset?.dataSetId} at ${dataset?.provider.pdp.serviceURL}...`)
|
|
95
|
+
}
|
|
96
|
+
const result = await SP.terminateService(c.var.client, {
|
|
97
|
+
dataSetId: c.args.id,
|
|
98
|
+
serviceURL: dataset?.provider.pdp.serviceURL,
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const waitForResult = await SP.waitForTerminateService({
|
|
102
|
+
statusUrl: result.statusUrl,
|
|
103
|
+
onHash: (hash) => {
|
|
104
|
+
if (isInteractive) {
|
|
105
|
+
spinner.message(`Waiting for tx ${hashLink(hash, c.var.chain)} to be mined...`)
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
})
|
|
109
|
+
if (isInteractive) {
|
|
110
|
+
spinner.stop(`Dataset ${dataset?.dataSetId} terminated successfully.`)
|
|
111
|
+
}
|
|
112
|
+
return c.ok(waitForResult)
|
|
113
|
+
} catch (error) {
|
|
114
|
+
const msg = error instanceof Error ? error.message : 'Failed to terminate the dataset'
|
|
115
|
+
if (isInteractive) {
|
|
116
|
+
spinner.error(msg)
|
|
117
|
+
}
|
|
118
|
+
if (c.options.debug) {
|
|
119
|
+
console.error(error)
|
|
120
|
+
}
|
|
121
|
+
return c.error({
|
|
122
|
+
code: 'DATASETS_FAILED',
|
|
123
|
+
message: msg,
|
|
124
|
+
retryable: true,
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
datasets.command('show', {
|
|
131
|
+
description: 'Show a dataset',
|
|
132
|
+
args: z.object({
|
|
133
|
+
id: z.coerce.bigint().describe('Dataset ID to show'),
|
|
134
|
+
}),
|
|
135
|
+
options: globalOptions,
|
|
136
|
+
middleware: [contextMiddleware],
|
|
137
|
+
run: async (c) => {
|
|
138
|
+
try {
|
|
139
|
+
const dataset = await c.var.indexerDb.query.dataSets.findFirst({
|
|
140
|
+
where: eq(c.var.indexerDb._.fullSchema.dataSets.dataSetId, c.args.id),
|
|
141
|
+
with: {
|
|
142
|
+
provider: true,
|
|
143
|
+
pieces: {
|
|
144
|
+
where: eq(c.var.indexerDb._.fullSchema.pieces.removed, false),
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
if (!dataset) {
|
|
150
|
+
return c.error({
|
|
151
|
+
code: 'DATASET_NOT_FOUND',
|
|
152
|
+
message: 'Dataset not found',
|
|
153
|
+
retryable: false,
|
|
154
|
+
})
|
|
155
|
+
}
|
|
156
|
+
return c.ok(dataset)
|
|
157
|
+
} catch (error) {
|
|
158
|
+
if (c.options.debug) {
|
|
159
|
+
console.error(error)
|
|
160
|
+
}
|
|
161
|
+
return c.error({
|
|
162
|
+
code: 'DATASETS_FAILED',
|
|
163
|
+
message: error instanceof Error ? error.message : 'Failed to terminate the dataset',
|
|
164
|
+
retryable: true,
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
})
|
|
@@ -30,7 +30,6 @@ providers.command('list', {
|
|
|
30
30
|
const filters: (SQLWrapper | undefined)[] = [
|
|
31
31
|
eq(schema.providers.providerActive, true),
|
|
32
32
|
eq(schema.providers.pdpProductActive, true),
|
|
33
|
-
// or(eq(schema.providers.approved, true), eq(schema.providers.endorsed, true)),
|
|
34
33
|
]
|
|
35
34
|
if (!c.options.all) {
|
|
36
35
|
filters.push(or(eq(schema.providers.approved, true), eq(schema.providers.endorsed, true)))
|
package/src/commands/repair.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { and, desc, eq, inArray } from 'drizzle-orm'
|
|
1
|
+
import { and, desc, eq, inArray, isNull } from 'drizzle-orm'
|
|
2
2
|
import { Cli, z } from 'incur'
|
|
3
3
|
import { repairCreate } from '../db/repair-create.ts'
|
|
4
4
|
import { repairDelete } from '../db/repair-delete.ts'
|
|
5
5
|
import { contextMiddleware, contextSchema } from '../middleware.ts'
|
|
6
|
+
import { runAddPieces } from '../pipeline/add-pieces.ts'
|
|
6
7
|
import { ensureRepairDataset } from '../pipeline/create-datasets.ts'
|
|
7
|
-
import { runPullPiecesPhase } from '../pipeline/pull.ts'
|
|
8
8
|
import { globalOptions } from '../utils.ts'
|
|
9
|
+
|
|
9
10
|
export const repair = Cli.create('repair', {
|
|
10
11
|
description: 'Repair commands',
|
|
11
12
|
vars: contextSchema,
|
|
@@ -50,6 +51,7 @@ repair.command('list', {
|
|
|
50
51
|
try {
|
|
51
52
|
const localSchema = c.var.localDb._.fullSchema
|
|
52
53
|
const repairs = await c.var.localDb.query.repairs.findMany({
|
|
54
|
+
where: isNull(localSchema.repairs.repairDataSetId),
|
|
53
55
|
orderBy: [desc(localSchema.repairs.createdAt)],
|
|
54
56
|
with: {
|
|
55
57
|
operations: true,
|
|
@@ -131,16 +133,19 @@ repair.command('run', {
|
|
|
131
133
|
repairId: z.coerce.number().describe('Repair ID to run'),
|
|
132
134
|
}),
|
|
133
135
|
options: globalOptions.extend({
|
|
134
|
-
concurrency: z.coerce.number().default(4).describe('Concurrency level'),
|
|
135
|
-
batchSize: z.coerce.number().default(40).describe('Max
|
|
136
|
-
reset: z.boolean().default(false).describe('Reset the repair'),
|
|
136
|
+
concurrency: z.coerce.number().min(1).max(10).default(4).describe('Concurrency level'),
|
|
137
|
+
batchSize: z.coerce.number().min(1).max(40).default(40).describe('Max pieces per batch'),
|
|
137
138
|
}),
|
|
138
139
|
middleware: [contextMiddleware],
|
|
139
140
|
run: async (c) => {
|
|
140
141
|
try {
|
|
141
142
|
const schema = c.var.localDb._.fullSchema
|
|
142
143
|
const repair = await c.var.localDb.query.repairs.findFirst({
|
|
143
|
-
where: and(
|
|
144
|
+
where: and(
|
|
145
|
+
eq(schema.repairs.id, c.args.repairId),
|
|
146
|
+
inArray(schema.repairs.status, ['pending', 'failed']),
|
|
147
|
+
isNull(schema.repairs.repairDataSetId)
|
|
148
|
+
),
|
|
144
149
|
})
|
|
145
150
|
if (!repair) {
|
|
146
151
|
return c.error({
|
|
@@ -155,12 +160,11 @@ repair.command('run', {
|
|
|
155
160
|
repair,
|
|
156
161
|
})
|
|
157
162
|
|
|
158
|
-
await
|
|
163
|
+
await runAddPieces({
|
|
159
164
|
...c.var,
|
|
160
165
|
repair,
|
|
161
166
|
concurrency: c.options.concurrency,
|
|
162
167
|
batchSize: c.options.batchSize,
|
|
163
|
-
reset: c.options.reset,
|
|
164
168
|
})
|
|
165
169
|
return c.ok({
|
|
166
170
|
repairId: repair.id,
|