Skip to content

Commit 50f6ce5

Browse files
committed
feat(cactus-plugin-ledger-connector-fabric-socketio): remove fabric-socketio connector
- Remove cactus-plugin-ledger-connector-fabric-socketio connector. - Refactor discounted cartrade sample to use openapi fabric connector instead of fabric-socketio. Sample app will use delegated signing, similar to offline signing in old connector. - Remove dead code from cmd-socketio-server - Update fabric SDK to 2.X in all cacti projects, refactor code that use it where necessary. Only exception is fabric persistence plugin which uses fabric SDK as dev dependency (for tests). It can be updated in separate PR later on. Depends on: hyperledger-cacti#2644 Signed-off-by: Michal Bajer <[email protected]>
1 parent 392ca8d commit 50f6ce5

File tree

70 files changed

+672
-6000
lines changed

Some content is hidden

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

70 files changed

+672
-6000
lines changed

.github/workflows/ci.yaml

-27
Original file line numberDiff line numberDiff line change
@@ -1215,33 +1215,6 @@ jobs:
12151215
- run: npm run configure
12161216
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts
12171217

1218-
cactus-plugin-ledger-connector-fabric-socketio:
1219-
continue-on-error: false
1220-
env:
1221-
FULL_BUILD_DISABLED: true
1222-
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric-socketio/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
1223-
JEST_TEST_RUNNER_DISABLED: false
1224-
TAPE_TEST_RUNNER_DISABLED: true
1225-
needs: build-dev
1226-
runs-on: ubuntu-20.04
1227-
steps:
1228-
- name: Use Node.js v16.14.2
1229-
uses: actions/[email protected]
1230-
with:
1231-
node-version: v16.14.2
1232-
- uses: actions/[email protected]
1233-
1234-
- id: yarn-cache
1235-
name: Restore Yarn Cache
1236-
uses: actions/[email protected]
1237-
with:
1238-
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
1239-
path: ./.yarn/
1240-
restore-keys: |
1241-
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
1242-
- run: yarn --version
1243-
- run: yarn install
1244-
- run: ./tools/ci.sh
12451218
cactus-plugin-ledger-connector-go-ethereum-socketio:
12461219
continue-on-error: false
12471220
env:

examples/cactus-example-discounted-asset-trade/README.md

+8-17
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Alice will use credentials and other Indy formats such as schema and definition
2626

2727
## Setup Overview
2828

29-
### fabric-socketio-validator
29+
### fabric-connector
3030

3131
- Validator for fabric ledger.
32-
- Docker networks: `fabric-all-in-one_testnet-2x`, `cactus-example-discounted-asset-trade-net`
32+
- Started as part of discounted asset trade BLP.
3333

3434
### ethereum-validator
3535

@@ -114,8 +114,6 @@ Alice will use credentials and other Indy formats such as schema and definition
114114
```
115115
cactus-example-discounted-asset-trade-ethereum-validator | listening on *:5050
116116
...
117-
cactus-example-discounted-asset-trade-fabric-socketio-validator | listening on *:5040
118-
...
119117
cactus-example-discounted-asset-trade-indy-validator | 2022-01-31 16:00:49,552 INFO success: validator entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
120118
...
121119
cactus-example-discounted-asset-trade-indy-validator-nginx | 2022/01/31 16:00:49 [notice] 1#1: start worker process 35
@@ -154,9 +152,6 @@ For development purposes, it might be useful to run the sample application outsi
154152
1. Configure cactus and start the ledgers as described above.
155153
1. Run `./script-dockerless-config-patch.sh` from `cactus-example-discounted-asset-trade/` directory. This will patch the configs and copy it to global location.
156154
1. Start validators (each in separate cmd window).
157-
1. ```bash
158-
cd packages/cactus-plugin-ledger-connector-fabric-socketio/ && npm run start
159-
```
160155
1. ```bash
161156
cd packages/cactus-plugin-ledger-connector-go-ethereum-socketio/ && npm run start
162157
```
@@ -207,8 +202,6 @@ For development purposes, it might be useful to run the sample application outsi
207202
208203
1. Run the transaction execution:
209204
210-
**For docker-compose environment, run:**
211-
212205
```
213206
./script-post-trade-request.sh
214207
```
@@ -219,17 +212,10 @@ For development purposes, it might be useful to run the sample application outsi
219212
docker run --rm -ti -v "$(pwd)/etc/cactus/":"/etc/cactus/" --net="host" register-indy-data
220213
```
221214
222-
**For dockerless environment, run:**
223-
224-
```bash
225-
pushd ../register-indy-data && sh ./script-build-docker.sh && popd &&
226-
docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" register-indy-data --force
227-
```
228-
229215
**After sending the requests**
230216
231217
- The transactions are executed by order.
232-
- When the following log appears on the BLP console, the transactions are completed.
218+
- When the following log appears on the BLP console, the transactions are completed (you may need to scroll a bit to find it).
233219
234220
```
235221
[INFO] BusinessLogicAssetTrade - ##INFO: completed asset-trade, businessLogicID: guks32pf, tradeID: *******-001
@@ -295,3 +281,8 @@ For development purposes, it might be useful to run the sample application outsi
295281
./script-cleanup.sh
296282
popd
297283
```
284+
285+
#### Possible improvements
286+
- Ethereum events are duplicated, causing trade to proceed even if previous step was not successfull.
287+
- Handle this case properly - ignore duplciated events, move forward only if current step was completed.
288+
- Investigate and fix duplicated events in Verifier / Ethereum connector (or use openapi ethereum connector).

0 commit comments

Comments
 (0)