Closed arpentnoir closed 3 years ago
You are using oa v3 ?
We could but I don't know how often the file changes, so it could have an impact :thinking:
You are using oa v3 ?
not yet, the error stems from this import statement
const { verificationBuilder, isValid, openAttestationVerifiers } = require('@govtechsg/oa-verify');
try to upgrade, I fixed this issue some times ago:
- I added a small cache to pre-load some contexts because it's slow
- later I realised that when you used v2 only it was downloading those files
- now download happens only at first v3 verification
@Nebulis what do you think about optionally providing alternative location for those schemas provided via environment variable? then an async process decoupled from the validator itself could keep the schemas up to date and we can know at any time that our local cache won't fail. In our case, where we have a verifier api running on lambda, in memory caching doesn't work for long.
happy to raise PR if you're ok with the approach in principle.
You upgraded and it didn't help ?
I prefer a proxy-based solution. or inversion of control (i.e. you inject your own fetch)
we did upgrade, and looks ok for now - but by the time we upgraded w3 had fixed their cert. we're about to start looking at v3 though so thinking more about preventing future issues
Ok sure, I will close this issue then. If you want to raise a PR to address what we discussed above feel free.
You can open a github discussion if you want more support on the matter
our verifier is throwing this error looks like w3.org ssl certificate has expired, so the fetch to preload contexts fails (and is not handled).
is it possible to pull these dependencies back to build time? - so that runtime does not depend on those resources