hyperledger-archives / aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
https://wiki.hyperledger.org/display/ARIES/aries-framework-go
Apache License 2.0
240 stars 161 forks source link

feat: embed claim format designations #3533

Closed skynet2 closed 1 year ago

skynet2 commented 1 year ago

Signed-off-by: Stas D stanislav.dmytryshyn@securekey.com

During stress testing for vcs, we realized some slowness inside CreateVP method. After some research, we find out that the performance issue is related to gojsonschema as it will request https://identity.foundation/claim-format-registry/schemas/presentation-definition-claim-format-designations.json every time https://github.com/xeipuuv/gojsonschema/blob/b076d39a02e5015af0a2a96636e4cc479ecd9f45/jsonLoader.go#L188

gojsonschema, by default, has a possibility to cache some records, https://github.com/xeipuuv/gojsonschema/blob/b076d39a02e5015af0a2a96636e4cc479ecd9f45/draft.go but there is no possibility to add additional records to the cache.

also with the current approach we have one additional failure point (if identity.foundation fails - our code will also fail), so embedding content inside will also remove that failure point