Skip to content

feat: resolve storage-provider auth via registry current worker - #318

Merged
Kubuxu merged 5 commits into
FilOzone:mainfrom
curiostorage:feat/worker-registry-auth
Nov 25, 2026
Merged

Kubuxu merged 5 commits into
FilOzone:mainfrom
curiostorage:feat/worker-registry-auth

Conversation

@snadrus

@snadrus snadrus commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Wire an optional ServiceProviderRegistry into PDPVerifier so proving and mutations follow the live worker after payee-driven rotation, instead of only the snapshotted create-time address.

Wire an optional ServiceProviderRegistry into PDPVerifier so proving and
mutations follow the live worker after payee-driven rotation, instead of
only the snapshotted create-time address.

Co-authored-by: Cursor <cursoragent@cursor.com>
@snadrus
snadrus marked this pull request as draft November 24, 2026 04:15
Comment thread src/PDPVerifier.sol Outdated

/// @notice Optional registry used to resolve the current worker from a former worker address.
/// @dev When unset, authorization remains `msg.sender == storageProvider[setId]`.
address public serviceProviderRegistry;

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.

let's make this immutable constructor param rather than requiring it set by owner

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.

that adds a lot of changes (all the constructor calls). Is this done right?

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.

Yes. There will be more changes downstream.

It's worth it to reduce storage accesses, which are the second-most expensive kind of operation.

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.

We'll also benefit during deployment from the owner not having to set it.

@snadrus
snadrus marked this pull request as ready for review November 24, 2026 18:14
@wjmelements

Copy link
Copy Markdown
Contributor

Fix the lint and we can merge

note[screaming-snake-case-immutable]: immutables should use SCREAMING_SNAKE_CASE
    ╭▸ src/PDPVerifier.sol:145:30
    │
145 │     address public immutable serviceProviderRegistry;
    │                              ━━━━━━━━━━━━━━━━━━━━━━━ help: consider using: `SERVICE_PROVIDER_REGISTRY`
    │
    ╰ help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-immutable

Comment thread src/PDPVerifier.sol Resolved
Comment thread src/PDPVerifier.sol Resolved
@Kubuxu
Kubuxu merged commit 04be8f5 into FilOzone:main Nov 25, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this to 🎉 Done in PDP 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