Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export default class Spark {
statusCode: null
}
const searchParams = new URLSearchParams({
// See https://github.com/filecoin-project/lassie/blob/main/docs/HTTP_SPEC.md#dag-scope-request-query-parameter
// Only the root block at the end of the path is returned after blocks required to verify the specified path segments.
'dag-scope': 'block',
protocols: retrieval.protocol,
providers: retrieval.providerAddress
})
Expand Down
4 changes: 3 additions & 1 deletion test/spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Spark from '../lib/spark.js'
import { test } from 'zinnia:test'
import { assertInstanceOf, assertEquals, assertArrayIncludes } from 'zinnia:assert'
import { SPARK_VERSION, MAX_CAR_SIZE } from '../lib/constants.js'
import { SPARK_VERSION } from '../lib/constants.js'

test('getRetrieval', async () => {
const round = {
Expand Down Expand Up @@ -82,6 +82,7 @@ test('fetchCAR', async () => {
assertEquals(requests, [{ url: URL }])
})

/* Disabled as long as we are fetching the top-level block only
test('fetchCAR exceeding MAX_CAR_SIZE', async () => {
const URL = 'url'
const fetch = async url => {
Expand Down Expand Up @@ -110,6 +111,7 @@ test('fetchCAR exceeding MAX_CAR_SIZE', async () => {
assertEquals(stats.carChecksum, null)
assertEquals(stats.statusCode, 200)
})
*/

test('submitRetrieval', async () => {
const requests = []
Expand Down