aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

♻️ Presentation-exchange webhooks duplicate data under `by_format` and `presentation`

Open ff137 opened this issue 5 months ago • 0 comments

The same credential values are emitted twice in every presentation_exchange webhook: once in by_format.pres / by_format.pres_request, and again under presentation / presentation_request.

This duplication doubles the payload size for no benefit. It seems to be a leftover from adding multi-format support ... not sure - just seems presentation / presentation_request is the old way and by_format the new.


Changing schemas is of course a breaking change, but those are needed to move forward. So, wondering if this is something that can be followed up on and optimized. Larger payload slow de/serialization (and there's a lot of that in the codebase), and it also doubles storage costs when events are persisted.

It's mostly pertinent when issuers want to include potentially very large payloads, such as base64 encoded images, within credentials / presentations - and that's how we noticed these events are much bigger than they need to be.

Here's a sample presentation_exchange webhook event to illustrate large payload gets doubled:

Image

ff137 avatar Jun 30 '25 18:06 ff137