Skip to content

feat: SP payee and worker rotation - #674

Merged
wjmelements merged 8 commits into
FilOzone:mainfrom
curiostorage:feat/sp-payee-worker-rotation
Nov 25, 2026
Merged

wjmelements merged 8 commits into
FilOzone:mainfrom
curiostorage:feat/sp-payee-worker-rotation

Conversation

@snadrus

@snadrus snadrus commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

snadrus and others added 2 commits November 23, 2026 20:53
Allow the payee to rotate payee and worker via direct calls, keep previous
workers resolvable for PDP auth, and add worker-callable data-set rail
retarget so future income follows the registry payee.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@FilOzzy FilOzzy added this to FOC Nov 24, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Nov 24, 2026
Keep former workers in addressToProviderId so currentWorker still
resolves from snapshotted data-set addresses without a second mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wjmelements

Copy link
Copy Markdown
Contributor

So is the payee the true owner or is it the serviceProvider? Seems to be a mix of both.

The hot key should be the worker that can add pieces etc, while the cold one can cycle it without having to uproot all of the rails. So I think the payee should be the real owner while the serviceProvider is the worker. I think you've done that in some places but I think there is some inconsistency about the roles.

snadrus and others added 2 commits November 23, 2026 22:30
Require ServiceProviderRegistry owner (central vetting) for changePayee
and changeServiceProvider so compromised SP wallets cannot rotate roles.

Co-authored-by: Cursor <cursoragent@cursor.com>
changePayee stays owner-only for vetted recovery. changeServiceProvider
is again a common payee (or owner) operation so wallet rotation is routine.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FilOzzy FilOzzy moved this from 📌 Triage to 🔎 Awaiting review in FOC Nov 24, 2026
@wjmelements

Copy link
Copy Markdown
Contributor
FAILED  2 findings
  - 0x8408502033C418E1bbC97cE9ac48E5528F371A9f selector 0x05f892ec serviceProviderRegistry() is exported by both src/modules/FWSSAuthorizationModule.sol:FWSSAuthorizationModule and src/modules/FWSSDataSetModule.sol:FWSSDataSetModule
  - 0x02925630df557F957f70E112bA06e50965417CA0 selector 0x05f892ec serviceProviderRegistry() is exported by both src/modules/FWSSAuthorizationModule.sol:FWSSAuthorizationModule and src/modules/FWSSDataSetModule.sol:FWSSDataSetModule

@wjmelements

Copy link
Copy Markdown
Contributor

@snadrus also run forge fmt to fix the lint

@snadrus
snadrus requested a review from wjmelements November 24, 2026 19:50
@wjmelements

Copy link
Copy Markdown
Contributor

need to run make update-abi. also test is failing.

Pull the pdp dependency after merging FilOzone/pdp#318

Comment thread service_contracts/src/lib/LibRails.sol Resolved
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Nov 25, 2026
Comment thread service_contracts/src/lib/LibRails.sol Resolved
@Kubuxu

Kubuxu commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

dataSetCreated only checks that the caller maps to a provider ID, not that it’s the current worker. Rotation alone therefore doesn’t revoke the old worker’s ability to submit a valid create authorisation, including in a combined create-and-add.

@Kubuxu Kubuxu left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we get better PR title/description so the squash commit is accurate, ideally describing the flows/usage

@wjmelements wjmelements changed the title Feat/sp payee worker rotation feat: SP payee and worker rotation Nov 25, 2026
@wjmelements
wjmelements merged commit fb66862 into FilOzone:main Nov 25, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Nov 25, 2026
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.

3 participants