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

Add support for custom validation and endorsement plugins. #192

Open
Nova38 opened this issue Oct 4, 2023 · 1 comment
Open

Add support for custom validation and endorsement plugins. #192

Nova38 opened this issue Oct 4, 2023 · 1 comment

Comments

@Nova38
Copy link

Nova38 commented Oct 4, 2023

What would you like to be added?

Places in code where fix is needed:

In the bellow section to support custom validation and endorsement plugins we just need to be able to specify name of the plugins where in the existing code it is just the const string 'vscc' and 'escc'. It would probably be best if the those are the default values.

chaincode, err := resClient.LifecycleCheckCCCommitReadiness(
c.channelName,
resmgmt.LifecycleCheckCCCommitReadinessRequest{
Name: c.chaincodeName,
Version: c.version,
Sequence: c.sequence,
EndorsementPlugin: "escc",
ValidationPlugin: "vscc",
SignaturePolicy: sp,
CollectionConfig: collectionConfigs,
InitRequired: c.initRequired,
},
resmgmt.WithTargetEndpoints(peerName),
)

txID, err := resClient.LifecycleApproveCC(
c.channelName,
resmgmt.LifecycleApproveCCRequest{
Name: c.name,
Version: c.version,
PackageID: c.packageID,
Sequence: c.sequence,
EndorsementPlugin: "escc",
ValidationPlugin: "vscc",
SignaturePolicy: sp,
CollectionConfig: collectionConfigs,
InitRequired: c.initRequired,
},
resmgmt.WithTargetEndpoints(peerName),
resmgmt.WithTimeout(fab.ResMgmt, 20*time.Minute),
resmgmt.WithTimeout(fab.PeerResponse, 20*time.Minute),

https://github.com/hyperledger/bevel-operator-fabric/blob/a4028e5d787a1c988d9cfd5075a5fae7498b3a96/kubectl-hlf/cmd/chaincode/checkcommitreadiness.go#L83C4-L96

Docs

Here is the doc description of this:
https://hyperledger-fabric.readthedocs.io/en/release-2.5/pluggable_endorsement_and_validation.html

Why is this needed?

In order to be able to experiment with the impact of different ways of implementing endorsement.

@adityajoshi12
Copy link
Contributor

@Nova38 this looks interesting, since you have identified the changes, would be great if you can raise a PR against it.

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

No branches or pull requests

2 participants