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

Peer cli assist for client request/response processing #492

Merged

Conversation

g2flyer
Copy link
Contributor

@g2flyer g2flyer commented Dec 9, 2020

What this PR does / why we need it:

Extension of peer cli assist to handle client request/response processing (e.g., encryption/decryption and related protobuf and base64 encoding/decoding). Modified peer cli wrapper which takes this cli and implemnts the new invoke flows. Additionally some encoding fixes and modified integration tests to work with new responses.

BTW: we currently somewhat superfluously base64 encode the result in ecc_enclave/enclave/enclave.cpp:238 before putting it in the protobuf. But seems easiest to drop that when we add support for fabric response object ...

Which issue(s) this PR fixes:

This should close #288 and address the peer cli side of #486

Special notes for your reviewer:

Note integration test will fail due to missing signature in endorsement. However, if you comment out the endorsement response test on line 671 in fabric/bin/peer.sh, tests which do not rely on state-update will succeed, e.g., all of integration/echo_test.sh should succeed. Note given that we do not have any proper read-write setup, even successful transactions (e.g., by commenting out lines 195-197 in ecc/chaincode/ecc.go) will not make the tests succeed (but will allow you to test that the endorsement-verification-response-validation logic in peer.sh is correct ..)

Does this PR introduce a user-facing changes and/or breaks backward compatability?:

@g2flyer g2flyer requested a review from a team December 9, 2020 03:29
@g2flyer g2flyer marked this pull request as draft December 9, 2020 03:30
@g2flyer g2flyer force-pushed the msteiner.peer-assit-client-request-response branch 7 times, most recently from af6a72c to 41b6fb9 Compare December 15, 2020 17:59
@g2flyer g2flyer force-pushed the msteiner.peer-assit-client-request-response branch 2 times, most recently from 07bd7d8 to 6176cd5 Compare December 16, 2020 19:10
@g2flyer g2flyer force-pushed the msteiner.peer-assit-client-request-response branch from 6176cd5 to bab8419 Compare December 17, 2020 03:17
* somewhat more consistenly put debugish info to stderr so
  we can better script other scripts
* fixed test-verification against new output format

Signed-off-by: michael steiner <[email protected]>
@g2flyer g2flyer force-pushed the msteiner.peer-assit-client-request-response branch from 7e05364 to 832e5a7 Compare December 17, 2020 04:35
@g2flyer g2flyer marked this pull request as ready for review December 17, 2020 04:39
@g2flyer g2flyer changed the title Peer cli assist for client request/response processing (WIP) Peer cli assist for client request/response processing Dec 17, 2020
@g2flyer g2flyer mentioned this pull request Dec 17, 2020
18 tasks
Signed-off-by: michael steiner <[email protected]>
Copy link
Contributor

@bvavala bvavala left a comment

Choose a reason for hiding this comment

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

lg, builds/works as expected

@bvavala bvavala merged commit e736015 into hyperledger:master Dec 18, 2020
@g2flyer g2flyer deleted the msteiner.peer-assit-client-request-response branch December 18, 2020 16: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.

Client side support: peer cli
2 participants