Peer cli assist for client request/response processing #492
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.
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 ofintegration/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 inecc/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?: