ChainSafe/forest-iac

Support range queries when fetching snapshots

Closed this issue · 0 comments

lemmih commented

Issue summary

We currently ignore range queries when downloading snapshots from CloudFlare. Without range queries, we cannot resume downloads.

Tasks:

This is the R2.get method that needs range options:

const object = await env.FOREST_ARCHIVE.get(latest.key);

Other information and links

R2 worker API: https://developers.cloudflare.com/r2/api/workers/workers-api-reference/

Logging headers to console: https://developers.cloudflare.com/workers/examples/logging-headers/

JavaScript library for parsing range headers: https://www.npmjs.com/package/range-parser