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(fabric-socketio-connector): sending transactions signed on the client-side #2070

Closed
outSH opened this issue Jun 7, 2022 · 0 comments · Fixed by #2071
Closed

feat(fabric-socketio-connector): sending transactions signed on the client-side #2070

outSH opened this issue Jun 7, 2022 · 0 comments · Fixed by #2071
Labels
enhancement New feature or request

Comments

@outSH
Copy link
Contributor

outSH commented Jun 7, 2022

Izuru-san request:

  • Make generateUnsignedProposal function of fabric SDK callable via Validator-Verifier from BLP.
  • Modify ServerPlugin.sendSignedProposal function in ServerPlugin.ts in a way that
    • it will not require submitter's certificate and its private key in the parameter
    • it will not call channel.generateUnsignedProposal
    • it will not sign the proposal
  • Modify examples/cactus-example-discounted-asset-trade to match the modifications described in previous items

relevant modules:

  • packages/cactus-plugin-ledger-connector-fabric-socketio
  • examples/cactus-example-discounted-asset-trade

current status

The ServerPlugin.sendSignedProposal function in @hyperledger/cactus-plugin-ledger-connector-fabric-socketio package always calls
channel.generateUnsignedProposal fabric API via ServerPlugin.InvokeSendSignedProposal function. It also signs the proposal using a certificate and private key sent from BLP or read from connector's local filesystem. The function returns an error if certificate and private key are not found in the parameter and it failed to read them from local filesystem.

alternative

The ServerPlugin.sendSignedProposal function in the connector can be modified in a backward compatible way: skip
call to channel.generateUnsignedProposal and sign steps when parameter to ServerPlugin.sendSignedProposal includes a signed request and the parameter does not include certificate and private key and the function failed to read the pair from local filesystem.

This alternative is confusing to BLP developer and a developer can easily mix up two options: send both signed request and certificate-key pair.

Therefore I prefer deleting signing functionality from the connector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant