Skip to content

Commit b413ca5

Browse files
Update ecc_go todo list
Signed-off-by: Marcus Brandenburger <[email protected]>
1 parent b4139c1 commit b413ca5

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

ecc_go/README.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
Licensed under Creative Commons Attribution 4.0 International License
33
https://creativecommons.org/licenses/by/4.0/
44
--->
5+
56
# Go Chaincode Support for Fabric Private Chaincode
67

7-
*Note - Go Chaincode support is currently under development and should be considered experimental.*
8+
_Note - Go Chaincode support is currently under development and should be considered experimental._
89

910
## Overview
1011

1112
This directory contains the components to enable Go Chaincode support for Fabric Private Chaincode (FPC).
1213
This feature relies on the [Ego project](https://www.ego.dev/) to build and execute go application with Intel SGX.
1314

1415
In particular, it contains:
16+
1517
- FPC Go Library to be used with your Go Chaincode.
1618
- Building and packaging utilities
1719

@@ -23,6 +25,7 @@ We refer to [shim.go](chaincode/enclave_go/shim.go) for the full list of support
2325
Note that calling unsupported shim functions, currently results in a `panic`.
2426

2527
To use FPC, you simply need to wrap your chaincode with the FPC Go Library. Here an example:
28+
2629
```go
2730
package main
2831

@@ -34,8 +37,8 @@ import (
3437

3538
func main() {
3639

37-
...
38-
40+
...
41+
3942
// create private chaincode
4043
privateChaincode := fpc.NewPrivateChaincode(&chaincode.YourChaincode{})
4144

@@ -55,6 +58,7 @@ func main() {
5558
In contrast to traditional Fabric Go Chaincode, FPC uses the ego compiler to build the chaincode and then package it in a docker image.
5659
To simplify this process, we provide you a `Dockerfile` and a `build.mk` which you can use in your project.
5760
Here an example of a `Makefile`:
61+
5862
```Makefile
5963
include $(FPC_PATH)/ecc_go/build.mk
6064
CC_NAME ?= your-chaincode-name
@@ -72,12 +76,14 @@ You can find all setup information in the getting started section of our [README
7276

7377
If you are **not** using the FPC dev docker container, you need to install the ego compiler manually.
7478
Install ego by running the following:
79+
7580
```bash
7681
wget -qO- https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add
7782
add-apt-repository "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu `lsb_release -cs` main"
7883
wget https://github.com/edgelesssys/ego/releases/download/v1.0.0/ego_1.0.0_amd64.deb
7984
apt install ./ego_1.0.0_amd64.deb build-essential libssl-dev
8085
```
86+
8187
You can find more information about ego installation on the official [documentation](https://docs.edgeless.systems/ego/#/getting-started/install).
8288

8389
## Examples
@@ -93,6 +99,7 @@ You can find the tutorial in [samples/chaincode/simple-asset-go](../samples/chai
9399

94100
We provide a sample auction [samples/chaincode/auction-go](../samples/chaincode/auction-go).
95101
You can run it using the integration test suite as follows:
102+
96103
```bash
97104
cd $FPC_PATH/integration/go_chaincode/auction
98105
make
@@ -102,16 +109,18 @@ make
102109

103110
Another example is provided [samples/chaincode/kv-test-go](../samples/chaincode/kv-test-go).
104111
You can run it using the integration test suite as follows:
112+
105113
```bash
106114
cd $FPC_PATH/integration/go_chaincode/kv_test/
107115
make
108116
```
109117

110118
## Developer notes
111119

112-
Here provide a collection of useful developer notes which may help you while developing.
120+
Here provide a collection of useful developer notes which may help you while developing.
113121

114122
### Kill hanging containers
123+
115124
```bash
116125
docker kill $(docker ps -a -q --filter ancestor=fpc/ercc --filter ancestor=fpc/fpc-auction-go)
117126
docker rm $(docker ps -a -q --filter ancestor=fpc/ercc --filter ancestor=fpc/fpc-auction-go)
@@ -124,4 +133,3 @@ More to come ...
124133
The following components are not yet implemented.
125134

126135
- [ ] HW Attestation support
127-
- [ ] Fabric contract API

0 commit comments

Comments
 (0)