Skip to content

feat/piece pull client#12

Merged
parkan merged 2 commits into
masterfrom
feat/piece-pull-client
Apr 29, 2026
Merged

feat/piece pull client#12
parkan merged 2 commits into
masterfrom
feat/piece-pull-client

Conversation

@parkan
Copy link
Copy Markdown
Collaborator

@parkan parkan commented Apr 29, 2026

adds support for pull piece transfers (needed by singularity refactoring and for feature completeness with synapse-sdk)

parkan added 2 commits April 29, 2026 13:25
Curio's POST /pdp/piece/pull is the FWSS-mediated SP-submits flow: client
posts EIP-712-signed extraData and HTTPS source URLs, Curio fetches the
pieces, validates extraData via eth_call against PDPVerifier.addPieces(),
and submits the on-chain tx. Idempotent on (service, sha256(extraData),
dataSetId, recordKeeper). Used by singularity to push pieces to SPs
without holding the SP's wallet key.

Adds:
- Server.PullPieces and Server.WaitForPullPieces in pdp/server.go
- PullStatus, PullPieceInput, PullPieceStatus, PullPiecesRequest,
  PullPiecesResponse, PullPiecesOptions in pdp/types.go
- EncodeCreateDataSetAndAddPiecesExtraData in pdp/abi.go for the
  abi.encode(bytes,bytes) wrapper used when DataSetID is 0 (atomic
  create-and-add path)
abi.go and server.go had pre-existing whitespace drift (extra blank
lines between top-level decls, misaligned var-block alignment). CI's
golangci-lint v2 default doesn't run gofmt so master accumulated the
drift, but cleaning it up keeps editors+pre-commit hooks happy.
@parkan parkan merged commit d256e0e into master Apr 29, 2026
6 checks passed
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.

1 participant