Skip to content

Validate presentations against definition optimizations #153

@hazandrii

Description

@hazandrii

During presentation exchange I noticed that the same validations or decoding of jwt token in underlying methods happens multiple times.

Problem in PresentationExchange.validatePresentationsAgainstDefinition(). Here you have filterOutCorrectPresentation() method that invoke pex.evaluatePresentation() and do filtering to get only correct presentation definitions. After that in validatePresentationsAgainstDefinition() you have the same pex.evaluatePresentation() to do validation. But actually you made this validation previously, so no point to do this one more time. And at the end of method you have PresentationExchange.validatePresentationAgainstDefinition() where you one more time create PEX and call evaluatePresentation() for validation.

So maybe you can revise this method and optimize it so that you don't do the same checks multiple times. Because it slows down the presentation exchange process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions