-
Notifications
You must be signed in to change notification settings - Fork 197
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
Shared cache fails on when using different contexts sequentially #502
Comments
Update: I guess the issue is very closely related to the old one #500 Array like context with child and parent: {
"@context": [
// parent context
"https://example.com/parentconetext",
// child context
{
"@import": "https://example.com/examplecontext",
"example": "https://example.com",
}
]
} |
Test credentials for reproducing the issue: The credentials can be downloaded in json format on under the provided links with the JSON button under the credential. If you wonder why both credentials get verified when clicking the link: i have disabled the shared cache manually. |
I forked a temporary workaround to make it work with inline contexts, but i hope that someone with a deeper understanding of the library will clear the root cause eventually. |
More specific issue #537 |
Problem
While verifying credentials i observed a strange behavior: At first it all works well and i could verify on credential after another, but as soon as i tried to verify a credential of another type, i.e. with another context, the verification failed with an ambiguous
VerificationError
. The error persists, no matter which context is used first. As soon as the context is switched, the verification fails.Tracking down the error
After some hours of digging into the digitalbazaar libraries it turned out that the error is actually a JSON-LD safemode validation error where one key word could not get expanded into an IRI. More digging revealed that this has to do with the ContextResolver.js which is used when processing the context in context.js line 87. When looking into the processed context it turned out that always the first key word was missing in the context mappings, causing dropped property. This must happen in the cache, because investigating the process method in context.js line 113 showed, that the particular key word was never return in on the the cached contexts. Further investigation is on course.
Fixes
ContextResolver.js line 76
Used packages:
"@digitalbazaar/ed25519-signature-2020": "^5.0.0",
"@digitalbazaar/vc": "^5.0.0",
The text was updated successfully, but these errors were encountered: