-
Notifications
You must be signed in to change notification settings - Fork 285
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
feat(connector-iroha2): add more iroha v2 tests #2178
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add a new test image for Iroha V2 (iroha2-all-in-one). It start a test ledger in single container, and also contains a proxy script for running iroha_client_cli. - Add the new image to the CI. - Add a new class for starting and interacting with Iroha V2 test ledger from typescript test - Iroha2TestLedger. - Add test for test setup class to ensure basic functions are working correctly. Relates to hyperledger-cacti#2138 Signed-off-by: Michal Bajer <[email protected]>
- Add new Iroha V2 cactus connector. - Two OpenAPI endpoints are implemented: `transact` and `query`. Both endpoints support critical subset of instructions and queries supported by the upstream javascript iroha sdk. - One SocketIO endpoint can be used to monitor new blocks from the ledger. - New connector can be used through a verifier-client interface. - All added functions are tested in functional test suites and documented. - Added execution of Iroha2 tests to the CI. Additional notes: - Connector doesn't work well with cactus module system, the issue has been reported and described in README. PR is not merge-ready until this is fixed (the CI should fail now). - Iroha V2 javascript packages are not available on official npm yet, had to include `.npmrc` with private npm address. I'm not sure if there's ETA of delivering these through NPM, so it might be necessary to commit it after all. Closes hyperledger-cacti#2138 Depends on hyperledger-cacti#2140 Signed-off-by: Michal Bajer <[email protected]>
- Add new endpoint `generate-transaction`, to create unsigned transactions that can be signed on the client side. - Add a function to iroha2-connector package to help signing iroha transactions on the client (BLP) side. - Extend transact endpoint to accept signed transaction as an argument as well. - Add new test suite to check features implemented in this PR (i.e. signing on the client side). Relates to hyperledger-cacti#2077 Depends on hyperledger-cacti#2153 Signed-off-by: Michal Bajer <[email protected]>
- Add a new argument to transact endpoint to wait for transaction commit. When this flag is true, request will return with final transaction status (commit / reject). - Add new transaction hash to all the responses from the transact endpoint. - Alter tests to wait for status instead of waiting for X seconds to make them more reliable. - Add new tests to check this PR features. Relates to hyperledger-cacti#2077 Depends on hyperledger-cacti#2168 Signed-off-by: Michal Bajer <[email protected]>
- Add new helper method for signing query payload on the client side. - Change query and generateTransaction to support both query and transaction payload generation and sending. - Refactor `CactusIrohaV2QueryClient` to return query context instead of single request method. - Update tests to fit the new API. - Add tests for signing queries on the client side. Depends on hyperledger-cacti#2171 Signed-off-by: Michal Bajer <[email protected]>
- Add test for complex scenario that involves creating new account and asset, and then transfering assets between two accounts. - Add test for parsing retrieved block data to find specific transaction hashes. Depends on hyperledger-cacti#2172 Signed-off-by: Michal Bajer <[email protected]>
outSH
requested review from
petermetz,
takeutak,
izuru0,
jagpreetsinghsasan and
sandeepnRES
as code owners
October 21, 2022 15:18
This PR/issue depends on:
|
petermetz
requested changes
Nov 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@outSH Please resolve the merge conflicts! (also squash+rebase)
izuru0
approved these changes
Dec 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #2172
Signed-off-by: Michal Bajer [email protected]
Please review only the last commit.