feat: validate indexer claim/cache delegation - #188
Draft
alanshaw wants to merge 1 commit into
Draft
Conversation
frrist
reviewed
Aug 12, 2025
| }, nil | ||
| } | ||
|
|
||
| func validateClaimCacheDelegation(ctx context.Context, id ucan.Signer, serviceID ucan.Principal, proofs []delegation.Proof, options ...principalresolver.Option) error { |
Member
There was a problem hiding this comment.
What is the difference between a principal.Signer and ucan.Signer? It looks like principal.Signer is a ucan.Signer, plus some other methods? Would it be possible to align on just a single interface here and everywhere else?
Member
Author
There was a problem hiding this comment.
We only need something that can sign a message here, we don't need the other methods that signers that are principals also have (like accessing the DID or encoding the key to bytes etc.).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a validation method for the configured delegation that enables piri nodes to cache claims with the indexer.
The delegation is validated at server startup to prevent failures from occurring after data is stored on the node.
The delegation is validated by calling the ucanto validator
Accessmethod with a dummy invocation.