Skip to content

Fix endorsed & approved provider ID fetching discrepancies - #712

Merged
hugomrdias merged 6 commits into
masterfrom
hugomrdias/644
Apr 2, 2026
Merged

Fix endorsed & approved provider ID fetching discrepancies#712
hugomrdias merged 6 commits into
masterfrom
hugomrdias/644

Conversation

@hugomrdias

Copy link
Copy Markdown
Member
  • Renames getProviderIds to getEndorsedProviderIds
  • Renames getApprovedProviders to getApprovedProviderIds
  • Changes getEndorsedProviderIds return type to bigint[]

closes #644

@hugomrdias
hugomrdias requested a review from rvagg as a code owner April 1, 2026 11:44
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Apr 1, 2026
@hugomrdias
hugomrdias requested a review from juliangruber April 1, 2026 11:44
@hugomrdias hugomrdias self-assigned this Apr 1, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 1, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
synapse-dev a94b19c Commit Preview URL

Branch Preview URL
Apr 02 2026, 03:40 PM

@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Apr 1, 2026
@rjan90 rjan90 added this to the M4.2: mainnet GA milestone Apr 1, 2026
Comment thread packages/synapse-sdk/src/storage/context.ts Outdated
Comment thread packages/synapse-core/src/warm-storage/location-types.ts Outdated
Comment thread packages/synapse-core/test/get-provider-ids.test.ts Outdated
Comment thread packages/synapse-core/src/endorsements/get-endorsed-provider-ids.ts Outdated

@rvagg rvagg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor suggestions inline, the mutation one being the biggest but also the doc discrepancies

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Apr 2, 2026

@juliangruber juliangruber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 and +1 to all of Rod's suggestions

@hugomrdias
hugomrdias force-pushed the hugomrdias/644 branch 2 times, most recently from 0055c41 to ca49b1b Compare April 2, 2026 14:00
hugomrdias and others added 4 commits April 2, 2026 15:01
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Rod Vagg <rod@vagg.org>

Update packages/synapse-core/test/get-provider-ids.test.ts

Co-authored-by: Rod Vagg <rod@vagg.org>

Update
packages/synapse-core/src/endorsements/get-endorsed-provider-ids.ts

Co-authored-by: Rod Vagg <rod@vagg.org>
@juliangruber juliangruber changed the title Issue #644 Fix endorsed & approved provider ID fetching discrepancies Apr 2, 2026
@hugomrdias
hugomrdias merged commit 80799c0 into master Apr 2, 2026
10 checks passed
@hugomrdias
hugomrdias deleted the hugomrdias/644 branch April 2, 2026 14:12
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Apr 2, 2026
anjor added a commit to anjor/pynapse that referenced this pull request Apr 18, 2026
…vider_ids, add get_endorsed_provider_ids

Mirrors FilOzone/synapse-sdk#712.

- Renames the approved-providers accessor to get_approved_provider_ids
  (the previous name was misleading — it returns IDs, not full provider
  records). The method still takes the same offset/limit pagination
  args. The redundant no-arg wrapper is removed.
- Adds get_endorsed_provider_ids(), which reads the ProviderIdSet
  contract (chain.contracts.provider_id_set) and deduplicates results
  while preserving insertion order.
- Threads a new provider_id_set address through ChainContracts for both
  mainnet and calibration (already present in ADDRESSES).

Breaking: callers of get_approved_providers() must switch to
get_approved_provider_ids().
anjor added a commit to anjor/pynapse that referenced this pull request Apr 18, 2026
…vider_ids, add get_endorsed_provider_ids (#25)

Mirrors FilOzone/synapse-sdk#712.

- Renames the approved-providers accessor to get_approved_provider_ids
  (the previous name was misleading — it returns IDs, not full provider
  records). The method still takes the same offset/limit pagination
  args. The redundant no-arg wrapper is removed.
- Adds get_endorsed_provider_ids(), which reads the ProviderIdSet
  contract (chain.contracts.provider_id_set) and deduplicates results
  while preserving insertion order.
- Threads a new provider_id_set address through ChainContracts for both
  mainnet and calibration (already present in ADDRESSES).

Breaking: callers of get_approved_providers() must switch to
get_approved_provider_ids().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Endorsed & approved provider ID fetching discrepancies

5 participants