Skip to content

make commitment request optional#163

Merged
himanshuchawla009 merged 23 commits intoalphafrom
feat/remove-commitments
Oct 4, 2024
Merged

make commitment request optional#163
himanshuchawla009 merged 23 commits intoalphafrom
feat/remove-commitments

Conversation

@himanshuchawla009
Copy link
Copy Markdown
Contributor

@himanshuchawla009 himanshuchawla009 commented Aug 26, 2024

Support added to make commitment request optional

Motivation and Context

This PR add supports to make commitment request optional. It does that by passing temp session keys and verifier to retrieve shares and import shares request.
Ideally this flow should be recommended only for mpc and multi factor setups. It should not be used in SFA flow.
This is done to improve login speed in cases where commitment request can be skipped.

Jira Link:
https://toruslabs.atlassian.net/browse/IRT-1536

Description

A new param named "checkCommitment" is added to retrieveShares and importShares function. By default its set to true to keep the change fully backward compatible.

Apps can now set this flag to false if they want to skip commitment req.

Previously session keys and verifier name was getting derived from node sigs in backend, this PR explicitly sends those fields in request if checkCommitment is set to false.

How has this been tested?

A new test case is added to run the flow without commitments.

Also i have tested the network calls manually to see if its actually skipping the commitment rpc calls.

Similar testing has been done on backend.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@himanshuchawla009 himanshuchawla009 marked this pull request as ready for review September 25, 2024 07:03
@himanshuchawla009 himanshuchawla009 changed the title Feat remove commitments request make commitment request optional Sep 25, 2024
Copy link
Copy Markdown
Contributor

@arch1995 arch1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@himanshuchawla009 himanshuchawla009 changed the base branch from master to alpha October 4, 2024 04:03
@himanshuchawla009 himanshuchawla009 merged commit 5881a07 into alpha Oct 4, 2024
@himanshuchawla009 himanshuchawla009 deleted the feat/remove-commitments branch October 4, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants