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

Persistence of proposal, transaction and commit objects #394

Closed
bestbeforetoday opened this issue Feb 17, 2022 · 1 comment
Closed

Persistence of proposal, transaction and commit objects #394

bestbeforetoday opened this issue Feb 17, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bestbeforetoday
Copy link
Member

bestbeforetoday commented Feb 17, 2022

As an application developer
I want to persist proposal, transaction and commit objects
So that I can resume a submit flow following an application restart

This is already possible using the off-line signing flow but the methods for re-creating these objects from serialized bytes do not make it obvious that this is the case, either through their naming or the presence of a signature parameter, which must be left empty for the persistence flow without off-line signing.

Suggest simply adding methods such as newUnsignedProposal(bytes) to Gateway to support this flow. The implementation would be largely common with the newSignedProposal(bytes, signature) methods.

@bestbeforetoday bestbeforetoday added the enhancement New feature or request label Feb 17, 2022
@bestbeforetoday bestbeforetoday added this to the v1.1 milestone Feb 17, 2022
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 24, 2022
Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Resolves hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Resolves hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Resolves hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
@bestbeforetoday
Copy link
Member Author

As we start working on this it's becoming obvious that, if the request being serialised (proposal, transaction, commit, block / chaincode events request) has already been signed using the off-line signing flow, the serialised form should include that signature and it should be preserved when deserialised. It would be unhelpful to require client applications to separately store the off-line signature or to repeat off-line signing if they choose to persist a proposal. This makes the newUnsignedProposal() naming a bit misleading. Typically it may be unsigned but there are cases where it may already be signed and we want to retain that signature.

To fit with the existing Gateway.newSignedProposal(bytes) naming, we could call the method used to deserialise a proposal from its bytes simply Gateway.newProposal(bytes). Or it could have a more descriptive name, something like Gateway.proposalFromBytes() or Gateway.deserializeProposal(). Anyone got any strong preferences?

sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 25, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 27, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 27, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 27, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 27, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
sapthasurendran added a commit to sapthasurendran/fabric-gateway that referenced this issue May 27, 2022
Contributes to  hyperledger#394

Signed-off-by: sapthasurendran <[email protected]>
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

No branches or pull requests

2 participants