feat(synapse-core): support paginated client dataset reads from FWSS#698
Conversation
|
We can ignore the "add issues and PRs" CI check. That will get fixed in #700 |
2f5b70a to
956e6da
Compare
956e6da to
d14c1a1
Compare
There was a problem hiding this comment.
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
getClientDataSetsto accept optionaloffset/limitand select the correct contract overload. - Add new actions
getClientDataSetsLengthandgetClientDataSetsIdsfor 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.
…s, update GIT_REF, add paginated RPC test
d112a7e to
ed66393
Compare
| * console.log(ids) | ||
| * ``` | ||
| */ | ||
| export async function getClientDataSetsIds( |
There was a problem hiding this comment.
@Chaitu-Tatipamula can we s/getClientDataSetsIds/getClientDataSetIds/ in here please to get rid of the double plural? (sets ids)
rvagg
left a comment
There was a problem hiding this comment.
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
|
@Chaitu-Tatipamula great work, thank you |
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 optionaloffset/limitparams. defaults to unpaginated.Other changes
getClientDataSetsLengthall new pagination params default to 0n (fetch all), so no breaking changes are introduced.