Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fabric-connector): contract deployment endpoint hyperledger-cact…
…i#616 Primary change ============= Finally adds real support for chain code deployment with custom made contracts not just the ones that the fabric samples container comes pre-built with. Additional notes, changes ======================== 1. Makes assumptions about the ledger being containerized the same way the fabric-samples repo does it, e.g. there must be a container called "cli" which is set up to execute the peer binary and to be able to perform go builds with a version of go that has go modules support (1.11+ IIRC) 2. Does not yet support Fabric 2.x (at least it was not tested) 3. Magic strings in the connector that still need to be eliminted. 4. Go mod file upload is not supported, for now one must use the pinned dependencies array to lock dependencies to specific versions. 5. The deployment endpoint supports deploying to multiple orgs with a single request but this only makes sense for example code since in a production environment it is not expected that different organizations will share the same server/container to run their infrastructure. 6. Output structure is not yet finalized. Priority was for now to at least allow failure detection. Diagnostics is a bit harder to achieve but should come in a follow-up improvement nevertheless. 7. Forced to use ugly timeout to make sure test is passing. 8. Pending refactor of the chaincode compiler which will no longer build on the file-system locally (after the refactor is done). For now the test is being skipped. End to end test demonstrating how it all works can be seen at: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/deploy-contract-go-bin-endpoint-v1/deploy-contract/deploy-cc-from-golang-source.test.ts Fixes hyperledger-cacti#616 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information