10000 fix: infinite recursion with unknown attestation by volmedo · Pull Request #36 · storacha/go-ucanto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: infinite recursion with unknown attestation #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

volmedo
Copy link
Member
@volmedo volmedo commented Feb 17, 2025

Part of #35

This PR ports the changes added to the JS ucanto library here: storacha/ucanto#368

@volmedo volmedo self-assigned this Feb 17, 2025
Copy link
codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
validator/lib.go 87.81% <100.00%> (+0.10%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Member Author

Choose a reason for hiding this comment

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

in all honesty, I don't think I fully understand how all of this works so I adapted the test from the ucanto PR. It is passing, but I may be messing something up, please review carefully.

Copy link
Member

Choose a reason for hiding this comment

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

The test is checking that validation fails due to the attestation being issued by a different service (othersvc) - we don't trust attestations issued by other services. It's not invalid, just irrelevant. We're not able to resolve did:mailto:web.mail:alice because there's no attestation we can use that makes it valid.

If you don't take the delegation that's being verified out of the list and it happens to need an attestation that doesn't exist then it'll just keep recursing - trying to find an attestation for the same delegation over and over.

@volmedo volmedo merged commit fcfe756 into main Feb 25, 2025
2 checks passed
@volmedo volmedo deleted the vic/fix/infinite-recursion branch February 25, 2025 10:25
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.

2 participants
0