Skip to content

Conversation

@SgtPooki
Copy link
Collaborator

@SgtPooki SgtPooki commented Oct 13, 2025

Summary

Update filecoin-pin to use the new withIpni provider filtering option from synapse-sdk. Here's what was changed:

Files Modified:

  1. src/core/synapse/index.ts (2 changes):

    • Updated DEFAULT_STORAGE_CONTEXT_CONFIG to include withIpni: true on line 32
    • Updated initializeSynapse function to pass withIpni: true in SynapseOptions on line 227
  2. src/payments/interactive.ts (1 change):

    • Updated Synapse.create() call to include withIpni: true on line 95

Key Points:

All Synapse instances now pass withIpni: true to ensure only IPNI-enabled providers are selected
All storage contexts created through our wrapper functions will automatically have withIpni: true in their default configuration
Upload-action doesn't need changes since it uses our createStorageContext and initializeSynapse functions which now have the defaults set

Consistency with SDK Updates:

The changes align with the synapse-sdk PR #309 which:

  • Added withIpni filtering to provider selection
  • Forces provider random selection when forceCreateDataSet is true
  • Filters out providers where provider?.products.PDP?.data.ipniIpfs === false

Fixes #104

@SgtPooki SgtPooki requested a review from rvagg October 13, 2025 20:17
@SgtPooki SgtPooki merged commit f642d6e into master Oct 13, 2025
12 checks passed
@SgtPooki SgtPooki deleted the fix/filter-ipni-providers branch October 13, 2025 20:21
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

Successfully merging this pull request may close these issues.

feat: support ipni filter createStorageContext options

2 participants