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

feat(quorum): private transaction support #2293

Merged

Conversation

aldousalvarez
Copy link
Contributor

Fixes #951

Co-authored-by: Travis Payne travis.payne@accenture.com
Co-authored-by: johnhomantaring john.h.o.mantaring@accenture.com
Co-authored-by: jagpreetsinghsasan jagpreet.singh.sasan@accenture.com
Co-authored-by: aldousalvarez aldousss.alvarez@gmail.com

Copy link
Contributor

@jagpreetsinghsasan jagpreetsinghsasan left a comment

Choose a reason for hiding this comment

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

LGTM, just write a detailed commit message for this and create follow-up issues to address the issue of privateUrl being truely optional. Right now we are passing privateUrl in all the instances of QuorumConnector even though we don't need to do private transactions everywhere.
The follow up issue can also include 2 test cases, one showcasing private tx (the newly created file in this PR) and a seperate test file showing public tx (a similar file as packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-private.test.ts, but just doing the public tx). Also that issue can include renaming of this privateUrl to something more specific, maybe a rpcApiHttpHost and another field being privacyEnabled set as true/false.

@petermetz are the expectations from the follow-up issues fine? (Or anything more required, given this PR being the current state of enabling private tx)

@petermetz
Copy link
Contributor

@petermetz are the expectations from the follow-up issues fine? (Or anything more required, given this PR being the current state of enabling private tx)

@jagpreetsinghsasan Sorry for the slow response! We do need a good test case verifying that the private transactions that the connector can now allegedly run actually are private (otherwise the implementation in the connector is broken).
Please see my comment for details: https://github.com/hyperledger/cacti/pull/2293#discussion_r1150972067

@jagpreetsinghsasan
Copy link
Contributor

@aldousalvarez I see some commits being pushed into the PR after the last review comment, if you think its ready, please re-request review

@aldousalvarez
Copy link
Contributor Author

@jagpreetsinghsasan I tried to update my branch with the latest commit at that time. my apologies I am still working on it as of now. Thank you

-----------------------------------------
	- Added v2.3.0-deploy-contract-from-json-private.test.ts that would support private
	transaction test for Quorum.
	- Added a QuorumPrivateTransactionConfig on openapi.json
	- Added Web3JsQuorum on plugin-ledger-connector-quorum and added a transact private
	method to be able to proceed with the private transaction.
	- Currently the privateUrl in the test is being truely optional
	and we need to address this in the future.
	- We are just passing privateUrl in all the instances even though
	we don't need to do private transactions everywhere.

Fixes hyperledger-cacti#951

Co-authored-by: Travis Payne <travis.payne@accenture.com>
Co-authored-by: johnhomantaring <john.h.o.mantaring@accenture.com>
Co-authored-by: jagpreetsinghsasan <jagpreet.singh.sasan@accenture.com>
Co-authored-by: aldousalvarez aldousss.alvarez@gmail.com
Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@aldousalvarez @jagpreetsinghsasan I pushed some minor changes to greatly reduce the diff and also did a rebase onto upstream/main. LGTM as-is now. Thank you all!

Copy link
Contributor

@jagpreetsinghsasan jagpreetsinghsasan left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz merged commit 3c944d6 into hyperledger-cacti:main Jun 12, 2023
@petermetz petermetz deleted the quorum-private-transaction branch June 12, 2023 02:55
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.

feat(quorum): Add private transaction support
4 participants