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

Legacy chaincode support with invoke #591

Open
paquitojc opened this issue Feb 12, 2022 · 1 comment
Open

Legacy chaincode support with invoke #591

paquitojc opened this issue Feb 12, 2022 · 1 comment
Assignees

Comments

@paquitojc
Copy link

I have a Legacy chaincode where I need to pass Arguments to Init function, To support legacy chaincodes there is
peer chaincode invoke cli command with --isInit parameter, see it here - https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerchaincode.html?highlight=invoke#peer-chaincode-invoke.

@mbwhite
Copy link
Collaborator

mbwhite commented Feb 14, 2022

I've reviewed the details and there is a reason why the invokes were not added. This is because it would break the idea that the Ansible Modules should be idempotent; there's no way to know if a transaction has been submitted already. other modules can be safely run repeatedly without issue - not the same with an invoke.

Having said that, this init-required is a special case, so I'll look at if it can be added to the committed_chaincode task - so that when the chaincode is committed, the init transaction is sent at the same time.

The restriction would be that if the init transaction fails and it needed resubmitting then that would need to be done by other means.

Here's the candidate PR:

#592

@mbwhite mbwhite self-assigned this Feb 14, 2022
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