Skip to content

feat(synapse-core): support paginated client dataset reads from FWSS#698

Merged
hugomrdias merged 4 commits into
FilOzone:masterfrom
Chaitu-Tatipamula:paginated-fwss-reads
Apr 2, 2026
Merged

feat(synapse-core): support paginated client dataset reads from FWSS#698
hugomrdias merged 4 commits into
FilOzone:masterfrom
Chaitu-Tatipamula:paginated-fwss-reads

Conversation

@Chaitu-Tatipamula
Copy link
Copy Markdown
Contributor

@Chaitu-Tatipamula Chaitu-Tatipamula commented Mar 26, 2026

Summary

Adds synapse-core actions for the paginated client dataset query overloads introduced in filecoin-services#444, addressing filecoin-pin#362. This is in support of #691

New actions

getClientDataSetsLength - returns total count of datasets for a client (getClientDataSetsLength(address))
getClientDataSetsIds - returns paginated dataset IDs (clientDataSets(address, offset, limit))

Updated actions

getClientDataSets - added optional offset/limit params. defaults to unpaginated.

Other changes

  • ABI regenerated with updated GIT_REF
  • Mock handler and presets updated for getClientDataSetsLength
  • Tests added for all new/updated actions (call + mocked RPC)

all new pagination params default to 0n (fetch all), so no breaking changes are introduced.

synapse-sdk changes will follow in a separate PR. but will just have exposing these actions in WarmStorageService but as per comment there should not be any new methods so i'll just add an updated call at getClientDataSetsWithDetails() to use paginated version of clientDataSets

@BigLep
Copy link
Copy Markdown
Contributor

BigLep commented Mar 27, 2026

We can ignore the "add issues and PRs" CI check. That will get fixed in #700

@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Mar 27, 2026
@rjan90 rjan90 added this to the M4.2: mainnet GA milestone Mar 30, 2026
@BigLep BigLep requested a review from Copilot March 31, 2026 21:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds synapse-core support for FWSS’s new paginated client dataset read APIs by introducing new warm-storage actions (IDs + length) and extending the existing getClientDataSets action to optionally use the paginated overload, along with ABI/mocks/test updates.

Changes:

  • Extend getClientDataSets to accept optional offset/limit and select the correct contract overload.
  • Add new actions getClientDataSetsLength and getClientDataSetsIds for count + paginated ID enumeration.
  • Regenerate ABI and update JSON-RPC mocks/presets and tests to cover the new actions.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/synapse-core/wagmi.config.ts Bumps FWSS ABI source ref to pick up the new contract overloads/helpers.
packages/synapse-core/test/get-client-data-sets.test.ts Adds call-shape tests for the new paginated args selection.
packages/synapse-core/test/get-client-data-sets-length.test.ts New tests for the dataset-count action (call + mocked RPC).
packages/synapse-core/test/get-client-data-sets-ids.test.ts New tests for the paginated dataset-IDs action (call + mocked RPC).
packages/synapse-core/src/warm-storage/index.ts Exports the new warm-storage actions.
packages/synapse-core/src/warm-storage/get-client-data-sets.ts Adds optional offset/limit and overload selection logic for getClientDataSets.
packages/synapse-core/src/warm-storage/get-client-data-sets-length.ts Introduces getClientDataSetsLength action and call builder.
packages/synapse-core/src/warm-storage/get-client-data-sets-ids.ts Introduces getClientDataSetsIds action and call builder for clientDataSets.
packages/synapse-core/src/mocks/jsonrpc/warm-storage.ts Adds mock handler support for getClientDataSetsLength.
packages/synapse-core/src/mocks/jsonrpc/index.ts Extends mock presets with getClientDataSetsLength return value.
packages/synapse-core/src/abis/generated.ts Regenerates ABI including new overloads/helpers needed by the actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/synapse-core/src/warm-storage/get-client-data-sets.ts Outdated
Comment thread packages/synapse-core/src/warm-storage/get-client-data-sets.ts Outdated
Comment thread packages/synapse-core/test/get-client-data-sets.test.ts
Comment thread packages/synapse-core/wagmi.config.ts Outdated
Comment thread packages/synapse-core/src/warm-storage/get-client-data-sets.ts Outdated
Comment thread packages/synapse-core/src/warm-storage/get-client-data-sets.ts Outdated
Comment thread packages/synapse-core/wagmi.config.ts Outdated
* console.log(ids)
* ```
*/
export async function getClientDataSetsIds(
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.

@Chaitu-Tatipamula can we s/getClientDataSetsIds/getClientDataSetIds/ in here please to get rid of the double plural? (sets ids)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure!

Copy link
Copy Markdown
Collaborator

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

preemptively giving a 👍 but it's conditional on getClientDataSetsIds becoming getClientDataSetIds; this otherwise seems fine to me and it'll be good to get the sdk part done

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Apr 2, 2026
@hugomrdias hugomrdias merged commit 6435cc2 into FilOzone:master Apr 2, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Apr 2, 2026
@hugomrdias
Copy link
Copy Markdown
Member

@Chaitu-Tatipamula great work, thank you

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.

6 participants