Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

777 introduce dynamic circuit inputs parsing for current e2e use case #800

Conversation

ognjenkurtic
Copy link
Collaborator

Description

Transaction agent executeTransaction method is refactored to translate transaction payload to circuit inputs using the schema previously associated with the workstep. It utilizes the circuitInputParser service for that.

Transaction agent executeTransaction method is also refactored for better readability.

CircuitInputParser service and schema is extended to support mapping inputs from arrays of objects from the tx payload .

E2E test is extended to verify the flow works.

Related Issue

#777

Motivation and Context

SRI needs to be able to support generic use-cases when it comes to circuits and this implementation allows for that.

How Has This Been Tested

Extended unit tests
Extended e2e test

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 change)
  • Request to be added as a Code Owner/Maintainer

Checklist

  • My code follows the code style of this project.
  • 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.
  • I commit to abide by the Responsibilities of Code Owners/Maintainers.

}
// TODO: Example input preparation for other workstep circuits from the example use-case, to be used
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ognjenkurtic is that gonna be an issue you create?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -18,17 +18,12 @@ import {
} from '../../../../identity/bpiSubjects/models/publicKey';

jest.setTimeout(20000);
//NOTE: Skiping out the workstep1 as it requires compiled artifacts to run.
Copy link
Collaborator

@Therecanbeonlyone1969 Therecanbeonlyone1969 Jul 2, 2024

Choose a reason for hiding this comment

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

@ognjenkurtic will that be another issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was done by @biscuitdey . I believe these test are not needed as we can't expect the unit test suite to compile cirucits. Is it ok to remove these tests ? @biscuitdey

Copy link
Collaborator

@Therecanbeonlyone1969 Therecanbeonlyone1969 left a comment

Choose a reason for hiding this comment

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

LGTM @ognjenkurtic ... check my comments

@ognjenkurtic ognjenkurtic merged commit f64347d into develop Jul 3, 2024
2 checks passed
@ognjenkurtic ognjenkurtic deleted the 777-introduce-dynamic-circuit-inputs-parsing-for-current-e2e-use-case branch July 3, 2024 20:45
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.

2 participants