Skip to content

Commit 51af952

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 4687000 commit 51af952

File tree

71 files changed

+700
-5976
lines changed

Some content is hidden

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

71 files changed

+700
-5976
lines changed

.github/workflows/ci.yaml

+7-34
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ jobs:
134134
uses: actions/[email protected]
135135
with:
136136
script: |
137-
const failMsg = "yarn codegen script produced version control " +
138-
"side-effects: source files have been changed by it that are " +
139-
"otherwise are under version control. " +
140-
"This means (99% of the time) that you need to run the " +
141-
"yarn codegen script locally and then include the changes it " +
137+
const failMsg = "yarn codegen script produced version control " +
138+
"side-effects: source files have been changed by it that are " +
139+
"otherwise are under version control. " +
140+
"This means (99% of the time) that you need to run the " +
141+
"yarn codegen script locally and then include the changes it " +
142142
"makes in your own commit when submitting your pull request.";
143143
core.setFailed(failMsg)
144144
@@ -1214,33 +1214,6 @@ jobs:
12141214
- run: npm run configure
12151215
- 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
12161216

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

16151588
- name: Run solidity tests
16161589
run: cd packages/cactus-plugin-htlc-eth-besu && forge test -vvvvv
1617-
1590+
16181591
cactus-test-plugin-htlc-eth-besu-erc20:
16191592
continue-on-error: false
16201593
env:

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

+8-8
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-socketio
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
```
@@ -229,7 +224,7 @@ For development purposes, it might be useful to run the sample application outsi
229224
**After sending the requests**
230225

231226
- The transactions are executed by order.
232-
- When the following log appears on the BLP console, the transactions are completed.
227+
- When the following log appears on the BLP console, the transactions are completed (you may need to scroll a bit to find it).
233228

234229
```
235230
[INFO] BusinessLogicAssetTrade - ##INFO: completed asset-trade, businessLogicID: guks32pf, tradeID: *******-001
@@ -295,3 +290,8 @@ For development purposes, it might be useful to run the sample application outsi
295290
./script-cleanup.sh
296291
popd
297292
```
293+
294+
#### Possible improvements
295+
- Ethereum events are duplicated, causing trade to proceed even if previous step was not successfull.
296+
- Handle this case properly - ignore duplciated events, move forward only if current step was completed.
297+
- Investigate and fix duplicated events in Verifier / Ethereum connector (or use openapi ethereum connector).

0 commit comments

Comments
 (0)