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

Feature/integrate with cc tools #779

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

osamamagdy
Copy link
Contributor

@osamamagdy osamamagdy commented Oct 11, 2024

What this PR does / why we need it:
This PR adds a tutorial on how to integrate with cc-tools project, specially using the cc-tools-demo project

Which issue(s) this PR fixes:

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

Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
@osamamagdy osamamagdy marked this pull request as ready for review October 11, 2024 11:21
@osamamagdy osamamagdy requested a review from a team as a code owner October 11, 2024 11:21
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
@osamamagdy osamamagdy force-pushed the feature/integrate-with-cc-tools branch from 39d2366 to a064eb0 Compare October 11, 2024 11:31
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
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 tried to follow but wasn't able to compile the changes for main.go

samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
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.

Thanks @osamamagdy this is pretty cool! Let's shape it a bit more!

go.mod Outdated Show resolved Hide resolved
commands.sh Outdated Show resolved Hide resolved
ecc_go/chaincode/enclave_go/shim.go Outdated Show resolved Hide resolved
ecc_go/chaincode/enclave_go/shim.go Outdated Show resolved Hide resolved
ecc_go/chaincode/enclave_go/shim.go Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Show resolved Hide resolved
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
@osamamagdy osamamagdy force-pushed the feature/integrate-with-cc-tools branch from 92e4665 to 1ec09a9 Compare October 15, 2024 23:08
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
@osamamagdy osamamagdy force-pushed the feature/integrate-with-cc-tools branch from 87db6e1 to ae668f1 Compare October 22, 2024 00:01
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
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 have not been able to complete the tutorial yet

samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
@mbrandenburger
Copy link
Contributor

@osamamagdy I think you can tell staticcheck to ignore the deprecated use issue and thus make CI passing.

You find the documentation here: https://staticcheck.dev/docs/configuration/#ignoring-problems

Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
osamamagdy and others added 3 commits November 6, 2024 03:55
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
samples/chaincode/cc-tools-demo/README.md Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Show resolved Hide resolved
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: Osama Magdy <59124937+osamamagdy@users.noreply.github.com>
@osamamagdy osamamagdy force-pushed the feature/integrate-with-cc-tools branch from 9eab2e5 to 9c485b8 Compare November 14, 2024 13:44
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
ecc_go/ccToolsDemoEnclave.json Outdated Show resolved Hide resolved
samples/chaincode/cc-tools-demo/README.md Outdated Show resolved Hide resolved
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
Signed-off-by: osamamagdy <osamamagdy174@gmail.com>
```

**Note:** If you're inside the dev environment, you don't need the `sudo` permissions and don't need to `chown` the directory.
The chaincode code structure is different than normal chaincode as it's using the cc-tools framework.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to add an enter here ... I don't think that last sentence is part of the note, correct?

In `$FPC_PATH/samples/chaincode/cc-tools-demo` directory, to build the chaincode and package it as docker image, execute:

```bash
make
Copy link
Contributor

Choose a reason for hiding this comment

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

So I would add a note here that for those that have arm-based computers they should use the method recommended in the main readme for building both the cc-tools-demo chaincode as well as ercc

Open a new terminal and connect to the `fpc-development-go-support` container by running

```bash
docker exec -it fpc-development-go-support /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure about the name of the environment? I had to change fpc-development-go-support to fpc-development-main .... I am guessing you are using a branch and maybe that is why the difference?

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