Skip to content

Commit 12ffc67

Browse files
committed
Merge branch 'main' into fix-228
2 parents 4ac26cf + 0b52f4a commit 12ffc67

File tree

60 files changed

+2450
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2450
-623
lines changed

.github/workflows/publish-docker-on-main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@ jobs:
3131
yamllint -v
3232
npm install
3333
./fablo-build.sh --push
34+
35+
- name: Build and push node chaincode
36+
run: |
37+
FABLO_VERSION=$(cat package.json | jq -r '.version')
38+
docker buildx build \
39+
--platform linux/amd64,linux/arm64 \
40+
--tag "ghcr.io/fablo-io/fablo-kv-node-chaincode-sample:$FABLO_VERSION" \
41+
--push \
42+
samples/chaincodes/chaincode-kv-node

.github/workflows/release-on-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release on tag
33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- '*.*.*'
77

88
jobs:
99
release:
@@ -53,7 +53,7 @@ jobs:
5353
5454
- name: Create next development version PR
5555
run: |
56-
./bump_version.sh unstable
56+
sh ./bump_version.sh unstable
5757
NEW_VERSION=$(jq -r '.version' <"$GITHUB_WORKSPACE/package.json")
5858
BRANCH_NAME="bump-version-to-$NEW_VERSION"
5959
git checkout -b $BRANCH_NAME

.github/workflows/test-on-push.yml

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121
./fablo-build.sh
2222
2323
- name: Test simple network
24-
run: e2e-network/docker/test-01-simple.sh
24+
run: e2e-network/docker/test-01-v2-simple.sh
2525

2626
- uses: actions/upload-artifact@v4
2727
if: always()
2828
with:
2929
name: test-main
3030
path: |
31-
e2e-network/docker/test-01-simple.sh.logs/*
32-
e2e-network/docker/test-01-simple.sh.tmpdir/fablo-target/**/*
31+
e2e-network/docker/test-01-v2-simple.sh.logs/*
32+
e2e-network/docker/test-01-v2-simple.sh.tmpdir/fablo-target/**/*
3333
3434
- name: Test generators
3535
run: |
@@ -110,15 +110,15 @@ jobs:
110110
./fablo-build.sh
111111
112112
- name: Test RAFT network
113-
run: e2e-network/docker/test-02-raft-2orgs.sh
113+
run: e2e-network/docker/test-02-v2-raft-2orgs.sh
114114

115115
- uses: actions/upload-artifact@v4
116116
if: always()
117117
with:
118118
name: test-02-raft
119119
path: |
120-
e2e-network/docker/test-02-raft.sh.logs/*
121-
e2e-network/docker/test-02-raft.sh.tmpdir/fablo-target/**/*
120+
e2e-network/docker/test-02-v2-raft-2orgs.sh.logs/*
121+
e2e-network/docker/test-02-v2-raft-2orgs.sh.tmpdir/fablo-target/**/*
122122
123123
test-03-private-data:
124124
needs: test-main
@@ -135,15 +135,15 @@ jobs:
135135
./fablo-build.sh
136136
137137
- name: Test private data
138-
run: e2e-network/docker/test-03-private-data.sh
138+
run: e2e-network/docker/test-03-v2-private-data.sh
139139

140140
- uses: actions/upload-artifact@v4
141141
if: always()
142142
with:
143143
name: test-03-private-data
144144
path: |
145-
e2e-network/docker/test-03-private-data.sh.logs/*
146-
e2e-network/docker/test-03-private-data.sh.tmpdir/fablo-target/**/*
145+
e2e-network/docker/test-03-v2-private-data.sh.logs/*
146+
e2e-network/docker/test-03-v2-private-data.sh.tmpdir/fablo-target/**/*
147147
148148
test-04-snapshot:
149149
needs: test-main
@@ -160,64 +160,86 @@ jobs:
160160
./fablo-build.sh
161161
162162
- name: Test snapshots
163-
run: e2e-network/docker/test-04-snapshot.sh
163+
run: e2e-network/docker/test-04-v2-snapshot.sh
164164

165165
- uses: actions/upload-artifact@v4
166166
if: always()
167167
with:
168168
name: test-04-snapshot
169169
path: |
170-
e2e-network/docker/test-04-snapshot.sh.logs/*
171-
e2e-network/docker/test-04-snapshot.sh.tmpdir/fablo-target/**/*
172-
170+
e2e-network/docker/test-04-v2-snapshot.sh.logs/*
171+
e2e-network/docker/test-04-v2-snapshot.sh.tmpdir/fablo-target/**/*
172+
173173
test-05-v3:
174174
needs: test-main
175-
runs-on: ubuntu-latest
175+
runs-on: macos-13
176176
steps:
177177
- name: Check out repository code
178178
uses: actions/checkout@v2
179-
179+
180+
- name: Fix Python conflicts between macOS runner and Homebrew
181+
run: |
182+
# see https://github.com/actions/setup-python/issues/577
183+
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
184+
185+
- name: Install homebrew dependencies
186+
run: |
187+
set -x
188+
sudo chmod ugo+w /usr/local/bin
189+
brew install docker docker-compose lima qemu
190+
191+
- name: Install and start Colima
192+
run: |
193+
brew install colima
194+
colima version
195+
colima start --cpu 3 --memory 6 --disk 100 --vm-type=qemu --mount-type=sshfs --dns=1.1.1.1
196+
colima restart
197+
198+
- name: Install dependencies
199+
run: |
200+
brew install shellcheck yamllint
201+
npm install -g npm@latest
202+
npm install
203+
180204
- name: Build Fablo
181205
run: |
182206
shellcheck --version && \
183207
yamllint -v && \
184208
npm install && \
185209
./fablo-build.sh
186-
210+
187211
- name: Test version 3
188-
run: e2e-network/docker/test-05-version3.sh
189-
212+
run: e2e-network/docker/test-05-v3.sh
213+
190214
- uses: actions/upload-artifact@v4
191215
if: always()
192216
with:
193217
name: test-05-version3
194218
path: |
195-
e2e-network/docker/test-05-version3-snapshot.sh.logs/*
196-
e2e-network/docker/test-05-version3-snapshot.sh.tmpdir/fablo-target/**/*
219+
e2e-network/docker/test-05-v3.sh.logs/*
220+
e2e-network/docker/test-05-v3.sh.tmpdir/fablo-target/**/*
197221
198222
test-05-v3-BFT:
199223
needs: test-main
200224
runs-on: ubuntu-latest
201225
steps:
202226
- name: Check out repository code
203227
uses: actions/checkout@v2
204-
228+
205229
- name: Build Fablo
206230
run: |
207231
shellcheck --version && \
208232
yamllint -v && \
209233
npm install && \
210234
./fablo-build.sh
211-
235+
212236
- name: Test version 3 with BFT
213-
run: e2e-network/docker/test-05-version3-BFT.sh
214-
237+
run: e2e-network/docker/test-06-v3-bft.sh
238+
215239
- uses: actions/upload-artifact@v4
216240
if: always()
217241
with:
218242
name: test-05-version3-BFT-snapshot
219243
path: |
220-
e2e-network/docker/test-05-version3-BFT-snapshot.sh.logs/*
221-
e2e-network/docker/test-05-version3-BFT-snapshot.sh.tmpdir/fablo-target/**/*
222-
223-
244+
e2e-network/docker/test-06-v3-bft.sh.logs/*
245+
e2e-network/docker/test-06-v3-bft.sh.tmpdir/fablo-target/**/*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ node_modules
77
.idea
88
.vscode
99
samples/invalid-fablo-config.json
10+
.DS_Store

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 2.3.0
2+
3+
### Features
4+
* Hardcode fablo config inside init generator
5+
[#554](https://github.com/hyperledger-labs/fablo/pull/554)
6+
* Publish sample chaincode Docker image
7+
[#555](https://github.com/hyperledger-labs/fablo/pull/555)
8+
* Include and test Sample Go chaincode in samples/chaincodes/chaincode-kv-go
9+
[#569](https://github.com/hyperledger-labs/fablo/pull/569)
10+
* Export network topology with Mermaid
11+
[#565](https://github.com/hyperledger-labs/fablo/pull/565)
12+
13+
114
## 2.2.0
215

316
### Features

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ See `git help commit`:
3939
- **Ent-to-End network tests**: Execute relevant shell scripts from `e2e-network` directory with E2E network tests.
4040
3. **Update snapshots**: If you've made changes that affect snapshots (esp. any template changes), update them using `npm run test:e2e-update`.
4141

42-
## ## Running Fablo locally
42+
## Running Fablo locally
4343

4444
You may want to verify some changes by running Fablo locally. To do so:
4545
1. Execute `./fablo-build.sh` script to create a Fablo Docker image locally.

COVERAGE_TRACKER.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Supported features
2+
3+
This document provides an overview of Fablo features. The table below tracks feature compatibility across different Fabric versions, testing status, documentation coverage, and links to relevant issues for ongoing development work.
4+
5+
---
6+
7+
| Feature | Fabric v2 | Fabric v3 | Documented | CI tests | Relevant issues |
8+
|----------------------------------------|-----------|-----------|------------|----------|-----------------|
9+
| <br>**NETWORK CONFIGURATION** | | | | | |
10+
| RAFT Consensus |||| | |
11+
| BFT Consensus | - ||| [05_v3](/e2e-network/docker/test-06-v3-bft.sh) | [#559](https://github.com/hyperledger-labs/fablo/issues/559) |
12+
| TLS |||| | |
13+
| Orderer Groups |||| | [#560](https://github.com/hyperledger-labs/fablo/issues/560) |
14+
| Peer DB - LevelDB |||| | |
15+
| Peer DB - CouchDB |||| | |
16+
| CA DB - SQLite |||| | |
17+
| CA DB - Postgres |||| | |
18+
| CA DB - MySQL |||| | [#561](https://github.com/hyperledger-labs/fablo/issues/561) |
19+
| <br>**CHANNELS** | | | | | |
20+
| Channel query scripts ||| | | |
21+
| <br>**CHAINCODES** | | | | | |
22+
| Node ||| | | |
23+
| Go ||| | | |
24+
| Java ||| | | |
25+
| Chaincode-as-a-Service (CCaaS) ||| | | |
26+
| Endorsement Policies ||| | | |
27+
| Multi-org Endorsements ||| | | |
28+
| Private Data Collections ||| | | |
29+
| Chaincode scripts (list/query/invoke) ||| | | |
30+
| Commands: install / upgrade ||| | | |
31+
| <br>**TOOLS** | | | | | |
32+
| Fablo REST ||| | | |
33+
| Explorer ||| | | |
34+
| <br>**FABLO COMMANDS** | | | | | |
35+
| `generate` |||| | |
36+
| `up` |||| | |
37+
| `start`, `stop`, `restart` |||| | |
38+
| `down`, `reset` |||| | |
39+
| `prune`, `recreate` |||| | |
40+
| `validate`, `extend-config` |||| | |
41+
| `version` |||| | |
42+
| `init` (node, rest, dev) |||| | |
43+
| `export-network-topology` to Mermaid |||| | |
44+
| Other `init` options | | | | | [#444](https://github.com/hyperledger-labs/fablo/issues/444) |
45+
| <br>**SNAPSHOT** | | | | | |
46+
| Create snapshot |||| | |
47+
| Restore snapshot |||| | |
48+
| Post-start hook | | | | | [#111](https://github.com/hyperledger-labs/fablo/issues/111) |
49+
| <br>**OTHER FEATURES** | | | | | |
50+
| Peer dev mode |||| | [#472](https://github.com/hyperledger-labs/fablo/issues/472) |
51+
| Connection profiles |||| | |
52+
| Gateway client | | | | | [#544](https://github.com/hyperledger-labs/fablo/pull/544) |
53+
| Hooks: post-generate |||| | |
54+
| JSON/YAML support |||| | |
55+
56+
---
57+
58+
**Supported Fabric versions:**
59+
60+
Fabric v2 = 2.5.12<br>
61+
Fabric v3 = 3.0.0
62+
63+
**Legend:**
64+
65+
✓ = supported<br>
66+
✕ = not supported<br>
67+
<span>-</span> = not applicable

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ COPY package.json /fablo/package.json
99
COPY package-lock.json /fablo/package-lock.json
1010

1111
# copy files for init network
12-
COPY samples/fablo-config-hlf2-1org-1chaincode.json /fablo/generators/init/templates/fablo-config.json
1312
COPY samples/chaincodes/chaincode-kv-node /fablo/generators/init/templates/chaincodes/chaincode-kv-node
13+
COPY samples/gateway/node /fablo/generators/init/templates/gateway/node
1414

1515
WORKDIR /fablo
1616
RUN npm install --silent --only=prod

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ In this case, however, you should use generated `fablo-docker.sh` instead of `fa
7272
### init
7373

7474
```bash
75-
fablo init [node] [rest] [dev]
75+
fablo init [node] [rest] [dev] [gateway]
7676
```
7777

7878
Creates simple network config file in current dir.
@@ -82,6 +82,7 @@ Fablo `init` command takes three parameters (the order does not matter):
8282
* Option `node` makes Fablo to generate a sample Node.js chaincode as well.
8383
* Option `rest` enables simple REST API with [Fablo REST](https://github.com/fablo-io/fablo-rest) as standalone Docker container.
8484
* Option `dev` enables running peers in dev mode (so the hot reload for chaincode is possible).
85+
* Option `gateway` makes Fablo generate a sample Node.js server that connects to the gateway.
8586

8687
Sample command:
8788

@@ -151,6 +152,30 @@ fablo validate [/path/to/fablo-config.json|yaml]
151152
Validates network config. This command will validate your network config try to suggest necessary changes or additional tweaks.
152153
Please note that this step is also executed automatically before each `generate` to ensure that at least critical errors where fixed.
153154
155+
### export-network-topology
156+
157+
```bash
158+
fablo export-network-topology [/path/to/fablo-config.json] [outputFile.mmd]
159+
160+
```
161+
- `outputFile.mmd`: (optional) Path to the output Mermaid file. Defaults to `network-topology.mmd`.
162+
163+
#### Example
164+
165+
```bash
166+
fablo export-network-topology fablo-config.json network-topology.mmd
167+
```
168+
169+
You can visualize the output using any Mermaid-compatible tool or online editor.
170+
171+
### extend-config
172+
173+
```bash
174+
fablo extend-config [/path/to/fablo-config.json|yaml]
175+
```
176+
177+
Generates an extended version of the Fablo config by filling in default and computed values based on the provided configuration file and making some config parts more verbos.
178+
154179
### snapshot and restore
155180
156181
Fablo supports saving state snapshot (backup) of the network and restoring it.

e2e-network/TEST_CASES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Test cases
22

3-
| Test case | 01-simple | 02-raft | 03-private | 04-snapshot | test-05-version3 | test-05-version3-BFT |
3+
| Test case | 01-v2-simple | 02-v2-raft-2orgs | 03-v2-private-data | 04-v2-snapshot | test-05-v3 | test-06-v3-bft |
44
| ------------------------- |:---------------:|:-----------:|:----------:|:------------------------:|:------------------:|:---------------------:|
5-
| Fabric versions | 2.4.7 | 2.3.2 | 2.4.7 | 2.3.3/2.4.2 | 3.0.0-beta | 3.0.0-beta |
5+
| Fabric versions | 2.5.12 | 2.4.3 | 2.5.12 | 2.5.12 | 3.0.0 | 3.0.0 |
66
| TLS | no | yes | no | yes | yes | yes |
77
| Channel capabilities | v2 | v2 | v2_5 | v2 | v3_0 | v3_0 |
88
| Consensus | solo | RAFT | solo | RAFT | RAFT | BFT |
@@ -17,6 +17,6 @@
1717
| Node chaincode endorsement| OR | OR | OR, AND | default | OR | OR |
1818
| Private data | no | no | yes | yes | no | no |
1919
| Java chaincode | no | yes | no | no | no | no |
20-
| Go chaincode | no | no | no | no | no | no |
20+
| Go chaincode | no | no | yes | no | no | no |
2121
| Tools | channel scripts | Fablo REST | - | Fablo REST, Explorer | - | - |
2222
| Other Fablo commands | init, reset | stop, start | - | snapshot, prune, restore | - | - |

0 commit comments

Comments
 (0)