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

feat: add ccapi to application samples #780

Merged

Conversation

osamamagdy
Copy link
Contributor

What this PR does / why we need it:
This PR is a continuation to #779 on how to integrate with the cc-tools project, especially using the cc-tools-demo project

Here, we add the CCAPI, which is an API server that uses REST APIs to communicate with peers and invoke operations.

Which issue(s) this PR fixes:

Fixes the LFX mentorship project Hyperledger Fabric CC-Tools Support for Fabric Private Chaincode

@osamamagdy osamamagdy requested a review from a team as a code owner October 22, 2024 21:21
@osamamagdy osamamagdy force-pushed the feature/add-ccapi-for-samples branch from 748ac3f to d4d237d Compare October 22, 2024 21:22
@osamamagdy osamamagdy force-pushed the feature/add-ccapi-for-samples branch from 8645511 to 41b2505 Compare January 17, 2025 12:26
@osamamagdy osamamagdy force-pushed the feature/add-ccapi-for-samples branch from 41b2505 to 266287c Compare January 17, 2025 12:33
@osamamagdy osamamagdy force-pushed the feature/add-ccapi-for-samples branch from 379f567 to d3dee26 Compare January 17, 2025 12:59
@munapower
Copy link
Contributor

munapower commented Jan 22, 2025

@osamamagdy checks are failing because you have to add core_peer_org_name to the test.sh script in the test-network directory around line 111
you also have to update the cc-tools-demo readme because it is missing the same definition that you did add to the test-network readme.
For some reason when I started the chaincode I got this error:

EGo (bundled) v1.5.3 (04243b39cc7bdc92732c2dacca8c509f8fb10550)
2025-01-22 20:32:09 panic: signal: illegal instruction
2025-01-22 20:32:09 
2025-01-22 20:32:09 goroutine 1 [running]:
2025-01-22 20:32:09 main.main()
2025-01-22 20:32:09     github.com/edgelesssys/ego/ego/cmd/bundle/main.go:58 +0x155
2025-01-22 20:32:05 [erthost] running in simulation mode
2025-01-22 20:32:05 [erthost] loading enclave ...

@mbrandenburger
Copy link
Contributor

@osamamagdy checks are failing because you have to add core_peer_org_name to the test.sh script in the test-network directory around line 111 you also have to update the cc-tools-demo readme because it is missing the same definition that you did add to the test-network readme. For some reason when I started the chaincode I got this error:

EGo (bundled) v1.5.3 (04243b39cc7bdc92732c2dacca8c509f8fb10550)
2025-01-22 20:32:09 panic: signal: illegal instruction
2025-01-22 20:32:09 
2025-01-22 20:32:09 goroutine 1 [running]:
2025-01-22 20:32:09 main.main()
2025-01-22 20:32:09     github.com/edgelesssys/ego/ego/cmd/bundle/main.go:58 +0x155
2025-01-22 20:32:05 [erthost] running in simulation mode
2025-01-22 20:32:05 [erthost] loading enclave ...

It seems that you run it with ego instead of pure go (for testing on M1).

@mbrandenburger
Copy link
Contributor

Looking at the Github actions ... it's still failing related to the missing CORE_PEER_ORG_NAME when running the simple-cli. See here https://github.com/hyperledger/fabric-private-chaincode/actions/runs/12829555830/job/35985706439?pr=780#step:7:10333

@munapower
Copy link
Contributor

@osamamagdy checks are failing because you have to add core_peer_org_name to the test.sh script in the test-network directory around line 111 you also have to update the cc-tools-demo readme because it is missing the same definition that you did add to the test-network readme. For some reason when I started the chaincode I got this error:

EGo (bundled) v1.5.3 (04243b39cc7bdc92732c2dacca8c509f8fb10550)
2025-01-22 20:32:09 panic: signal: illegal instruction
2025-01-22 20:32:09 
2025-01-22 20:32:09 goroutine 1 [running]:
2025-01-22 20:32:09 main.main()
2025-01-22 20:32:09     github.com/edgelesssys/ego/ego/cmd/bundle/main.go:58 +0x155
2025-01-22 20:32:05 [erthost] running in simulation mode
2025-01-22 20:32:05 [erthost] loading enclave ...

It seems that you run it with ego instead of pure go (for testing on M1).

yeah @mbrandenburger now that you mention it I remember!

@osamamagdy osamamagdy force-pushed the feature/add-ccapi-for-samples branch from 3dffe3a to 2efeb72 Compare January 24, 2025 11:56
Signed-off-by: osamamagdy <[email protected]>
Copy link
Contributor

@munapower munapower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to make it run ....

@osamamagdy osamamagdy requested a review from munapower January 28, 2025 00:13
Signed-off-by: Osama Magdy <[email protected]>
@osamamagdy osamamagdy requested a review from munapower January 31, 2025 11:37
Copy link
Contributor

@mbrandenburger mbrandenburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mbrandenburger mbrandenburger merged commit 805e428 into hyperledger:main Jan 31, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants