Commit 71f157d
fix: IPNI validation confirms provider in indexer response (#231)
* fix: validateIpniAdvertisement checks provider
previously, validateIpniAdvertisement did not validate that the ipni advertisement existed for
the given provider. Now, we validate that the response includes the expected provider,
and allow consumers to pass extra providers (to support future multiple provider uploads)
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* fix: fine-tune logic, remove dead branches
* fix: allow ipniIndexer override, default to filecoinpin.contact
* fix: use only current provider serviceURL
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* chore: more logic cleanup
* fix: display received + expected multiaddrs
* refactor: inline simple maps and filters
* chore: more code cleanup
* fix: PDP definition
* chore: cleanup validateIpni options set in executeUpload
* fix: last error message
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/test/unit/validate-ipni-advertisement.test.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/test/unit/validate-ipni-advertisement.test.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/test/unit/validate-ipni-advertisement.test.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/test/unit/validate-ipni-advertisement.test.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* fix: remove expectedProviderMultiaddrs
* refactor: validateIPNIadvertisement -> waitForIpniProviderResults
* fix: use set operations, finish move to waitForIpniProviderResults
* fix: update terminology, ipniAdvertisement -> ipni provider results
* fix: include Set operations in typescript
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* Update src/core/utils/validate-ipni-advertisement.ts
Co-authored-by: Steve Loeppky <[email protected]>
* chore: lint fix
* test: fix tests after error msg change
---------
Co-authored-by: Steve Loeppky <[email protected]>1 parent 70e780f commit 71f157d
File tree
7 files changed
+593
-89
lines changed- src
- common
- core
- upload
- utils
- test/unit
- upload-action/src
7 files changed
+593
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
| 344 | + | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
236 | 238 | | |
237 | | - | |
238 | | - | |
239 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
240 | 258 | | |
241 | 259 | | |
242 | 260 | | |
| |||
270 | 288 | | |
271 | 289 | | |
272 | 290 | | |
273 | | - | |
| 291 | + | |
274 | 292 | | |
275 | 293 | | |
276 | 294 | | |
| |||
0 commit comments