How transactions are manually endorsed in Hyperledger composer?
How transactions are manually endorsed in Hyperledger composer?
The scenario I am considering is where peers in both Org1 and Org2 need to endorse transactions for these to be committed in blockchain. This should be taking place in following steps:
I am trying to understand how exactly step 3 works? The way events are created in SDKs and composer, I guess there is no way for an application, that is listening events, to send back an approval. I read here that manual approval is implemented by creating another transaction:
How does Hyperledger composer handle endorsements
How exactly this works (particularly when endorsement policy is 'AND' for the chaincode)? Can you suggest any piece of code implementing this?
1 Answer
1
When you start a business network with the composer network start
command you can specify the endorsement policy you want enforced, and Composer 'client' will work with Fabric to create valid transactions.
composer network start
If you want an additional manual approval process, then you probably want to write a Transaction that changes the value of a property in an Asset. This approval Transaction will then itself be subject to the endorsement policy!
The code to achieve the change in value of a property is not complex and there are examples in the Composer Tutorials and Sample Networks.
You might also want to consider ACLs so that you limit the Write access to your Assets.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.