Skip to content

Commit ca9068a

Browse files
authored
Merge branch 'main' into substrate-test-ledger-draft
2 parents 9eb3f4b + 9082bfa commit ca9068a

File tree

70 files changed

+840
-464
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

+840
-464
lines changed

.github/workflows/ci.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
experimental: [false]
2323

2424
steps:
25+
- name: Set Swap Space to 10GB
26+
uses: pierotofy/[email protected]
27+
with:
28+
swap-size-gb: 10
2529
- name: Use Node.js ${{ matrix.node-version }}
2630
uses: actions/[email protected]
2731
with:
@@ -30,3 +34,117 @@ jobs:
3034
- uses: actions/[email protected]
3135

3236
- run: ./tools/ci.sh
37+
38+
build-containers:
39+
runs-on: ubuntu-20.04
40+
continue-on-error: true
41+
42+
steps:
43+
44+
- uses: actions/[email protected]
45+
name: Check out code
46+
47+
- name: Print Disk Usage Reports
48+
run: df ; echo "" ; docker system df
49+
50+
- name: ghcr.io/hyperledger/cactus-dev-container-vscode
51+
run: DOCKER_BUILDKIT=1 docker build ./.devcontainer/ -f ./.devcontainer/Dockerfile
52+
53+
- name: Print Disk Usage Reports
54+
run: df ; echo "" ; docker system df
55+
56+
- name: ghcr.io/hyperledger/cactus-example-supply-chain-app
57+
run: DOCKER_BUILDKIT=1 docker build . -f ./examples/supply-chain-app/Dockerfile
58+
59+
- name: Print Disk Usage Reports
60+
run: df ; echo "" ; docker system df
61+
62+
- name: ghcr.io/hyperledger/cactus-example-carbon-accounting
63+
run: DOCKER_BUILDKIT=1 docker build . -f ./examples/carbon-accounting/Dockerfile
64+
65+
- name: Print Disk Usage Reports
66+
run: df ; echo "" ; docker system df
67+
68+
- name: ghcr.io/hyperledger/cactus-cmd-api-server
69+
run: DOCKER_BUILDKIT=1 docker build . -f ./packages/cactus-cmd-api-server/Dockerfile
70+
71+
- name: Print Disk Usage Reports
72+
run: df ; echo "" ; docker system df
73+
74+
- name: ghcr.io/hyperledger/cactus-keychain-vault-server
75+
run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/ -f ./packages/cactus-plugin-keychain-vault/src/cactus-keychain-vault-server/Dockerfile
76+
77+
- name: Print Disk Usage Reports
78+
run: df ; echo "" ; docker system df
79+
80+
- name: ghcr.io/hyperledger/cactus-connector-corda-server
81+
run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-corda/src/main-server/ -f ./packages/cactus-plugin-ledger-connector-corda/src/main-server/Dockerfile
82+
83+
- name: Print Disk Usage Reports
84+
run: df ; echo "" ; docker system df
85+
86+
- name: ghcr.io/hyperledger/cactus-connector-fabric
87+
run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-fabric/ -f ./packages/cactus-plugin-ledger-connector-fabric/Dockerfile
88+
89+
- name: Print Disk Usage Reports
90+
run: df ; echo "" ; docker system df
91+
92+
- name: ghcr.io/hyperledger/cactus-connector-besu
93+
run: DOCKER_BUILDKIT=1 docker build ./packages/cactus-plugin-ledger-connector-besu/ -f ./packages/cactus-plugin-ledger-connector-besu/Dockerfile
94+
95+
- name: Print Disk Usage Reports
96+
run: df ; echo "" ; docker system df
97+
98+
- name: ghcr.io/hyperledger/cactus-besu-all-in-one
99+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/besu-all-in-one/ -f ./tools/docker/besu-all-in-one/Dockerfile
100+
101+
- name: Print Disk Usage Reports
102+
run: df ; echo "" ; docker system df
103+
104+
- name: ghcr.io/hyperledger/cactus-corda-all-in-one
105+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/corda-all-in-one/ -f ./tools/docker/corda-all-in-one/Dockerfile
106+
107+
- name: Print Disk Usage Reports
108+
run: df ; echo "" ; docker system df
109+
110+
- name: ghcr.io/hyperledger/cactus-fabric2-all-in-one
111+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v2.x
112+
113+
- name: Print Disk Usage Reports
114+
run: df ; echo "" ; docker system df
115+
116+
- name: ghcr.io/hyperledger/cactus-fabric-all-in-one
117+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v1.4.x
118+
119+
- name: Print Disk Usage Reports
120+
run: df ; echo "" ; docker system df
121+
122+
- name: ghcr.io/hyperledger/cactus-iroha-all-in-one
123+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/iroha-all-in-one/ -f ./tools/docker/iroha-all-in-one/Dockerfile
124+
125+
- name: Print Disk Usage Reports
126+
run: df ; echo "" ; docker system df
127+
128+
- name: ghcr.io/hyperledger/cactus-quorum-all-in-one
129+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/quorum-all-in-one/ -f ./tools/docker/quorum-all-in-one/Dockerfile
130+
131+
- name: Print Disk Usage Reports
132+
run: df ; echo "" ; docker system df
133+
134+
- name: ghcr.io/hyperledger/cactus-rust-compiler
135+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/rust-compiler/ -f ./tools/docker/rust-compiler/Dockerfile
136+
137+
- name: Print Disk Usage Reports
138+
run: df ; echo "" ; docker system df
139+
140+
- name: ghcr.io/hyperledger/cactus-rust-compiler
141+
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/test-npm-registry/ -f ./tools/docker/test-npm-registry/Dockerfile
142+
143+
- name: Print Disk Usage Reports
144+
run: df ; echo "" ; docker system df
145+
146+
- name: ghcr.io/hyperledger/cactus-whitepaper
147+
run: DOCKER_BUILDKIT=1 docker build ./whitepaper/ -f ./whitepaper/Dockerfile
148+
149+
- name: Print Disk Usage Reports
150+
run: df ; echo "" ; docker system df

docs/source/regulatory-and-industry-initiatives-reading-list.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ https://readiness.digitalizetrade.org/
2626

2727
https://iccwbo.org/media-wall/news-speeches/digital-trade-standards-initiative-launches-under-the-umbrella-of-icc/
2828

29-
### BAFT Digital Payment ledger Commitment (Private sector - Banking Industry)
29+
### BAFT Digital Ledger Payment Commitment - Technical and Business Best Practices (Private sector - Banking Industry)
3030

31-
https://www.baft.org/about-baft/news-and-press-releases/2019/04/23/baft-releases-best-practices-for-digital-ledger-payment-commitments
31+
https://www.baft.org/wp-content/uploads/2021/03/baft-dlpc-technical-bps-v1-1.pdf
3232

33+
https://www.baft.org/wp-content/uploads/2021/03/baft-dlpc-business-bps-v1-1.pdf
3334
### DCSA Digital Container Shipping Association (Private sector - shipping industry)
3435

3536
https://dcsa.org/dcsa-publishes-standards-for-the-bill-of-lading/

docs/source/support.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This section contains the ledger supported versions for connectors in Hyperledge
99
Besu <support/besu.md>
1010
Corda <support/corda.md>
1111
Fabric <support/fabric.md>
12+
Iroha <support/iroha.md>
1213
Quorum <support/quorum.md>
1314
xDai <support/xdai.md>
1415

examples/cactus-example-carbon-accounting-backend/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"extensions": "sol"
3232
}
3333
},
34+
"publishConfig": {
35+
"access": "public"
36+
},
3437
"engines": {
3538
"node": ">=10",
3639
"npm": ">=6"

examples/cactus-example-carbon-accounting-business-logic-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@hyperledger/cactus-plugin-ledger-connector-fabric": "0.9.0",
8282
"@hyperledger/cactus-plugin-ledger-connector-xdai": "0.9.0",
8383
"async-exit-hook": "2.0.1",
84-
"axios": "0.21.1",
84+
"axios": "0.21.4",
8585
"express": "4.17.1",
8686
"openapi-types": "9.1.0",
8787
"typescript-optional": "2.0.1",

examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/carbon-accounting-plugin.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import { Server } from "http";
2-
import { Server as SecureServer } from "https";
3-
4-
import { Optional } from "typescript-optional";
51
import { Express } from "express";
62
import { v4 as uuidv4 } from "uuid";
73

@@ -132,10 +128,6 @@ export class CarbonAccountingPlugin
132128
return theEndpoints;
133129
}
134130

135-
public getHttpServer(): Optional<Server | SecureServer> {
136-
return Optional.empty();
137-
}
138-
139131
public async shutdown(): Promise<void> {
140132
this.log.info(`Shutting down ${this.className}...`);
141133
}

examples/cactus-example-supply-chain-backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"@hyperledger/cactus-plugin-ledger-connector-quorum": "0.9.0",
7878
"@hyperledger/cactus-test-tooling": "0.9.0",
7979
"async-exit-hook": "2.0.1",
80-
"axios": "0.21.1",
80+
"axios": "0.21.4",
8181
"express": "4.17.1",
8282
"fabric-network": "2.2.8",
8383
"jose": "1.28.1",

examples/cactus-example-supply-chain-business-logic-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"@hyperledger/cactus-plugin-ledger-connector-fabric": "0.9.0",
8383
"@hyperledger/cactus-plugin-ledger-connector-quorum": "0.9.0",
8484
"async-exit-hook": "2.0.1",
85-
"axios": "0.21.1",
85+
"axios": "0.21.4",
8686
"express": "4.17.1",
8787
"openapi-types": "9.1.0",
8888
"typescript-optional": "2.0.1",

examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/supply-chain-cactus-plugin.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import type { Server } from "http";
2-
import type { Server as SecureServer } from "https";
3-
import { Optional } from "typescript-optional";
41
import { Express } from "express";
52
import OAS from "../../json/openapi.json";
63
import {
@@ -152,10 +149,6 @@ export class SupplyChainCactusPlugin
152149
return this.endpoints;
153150
}
154151

155-
public getHttpServer(): Optional<Server | SecureServer> {
156-
return Optional.empty();
157-
}
158-
159152
public async shutdown(): Promise<void> {
160153
this.log.info(`Shutting down ${this.className}...`);
161154
}

examples/carbon-accounting/Dockerfile

Lines changed: 9 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,3 @@
1-
FROM node:16.3.0-buster-slim as builder
2-
3-
RUN apt-get update
4-
RUN apt-get -y upgrade
5-
6-
# Generic dependencies that are usually needed by other software
7-
RUN apt-get install -y build-essential libssl-dev libffi-dev python3-dev
8-
9-
# Need git because some of our npm depedencies might be coming
10-
# straight from github instead of being an npm package on npmjs.com.
11-
RUN apt-get install -y git
12-
13-
# Need OpenJDK for the OpenAPI generator tool
14-
ENV DEBIAN_FRONTEND=noninteractive
15-
16-
WORKDIR /opt
17-
RUN apt-get update \
18-
&& apt-get install -y --no-install-recommends \
19-
ca-certificates \
20-
curl \
21-
&& curl \
22-
-L \
23-
-o openjdk.tar.gz \
24-
https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz \
25-
&& mkdir jdk \
26-
&& tar zxf openjdk.tar.gz -C jdk --strip-components=1 \
27-
&& rm -rf openjdk.tar.gz \
28-
&& ln -sf /opt/jdk/bin/* /usr/local/bin/ \
29-
&& java --version \
30-
&& javac --version \
31-
&& jlink --version
32-
33-
# Some install scripts of the npm package fabric-network need python/pip
34-
RUN apt-get install -y python3-pip
35-
36-
WORKDIR /
37-
RUN mkdir /app/
38-
WORKDIR /app/
39-
COPY ./ ./
40-
RUN npm ci
41-
RUN ./node_modules/.bin/lerna clean --yes
42-
RUN ./node_modules/.bin/lerna bootstrap
43-
RUN npm rebuild
44-
RUN npm run build:dev:backend
45-
RUN npm run webpack:dev:web
46-
RUN npm run build:dev:frontend -- --scope='@hyperledger/cactus-example-carbon-accounting-frontend'
47-
48-
RUN rm -rf ./packages/cactus-test-plugin*
49-
RUN rm -rf ./packages/cactus-test-cmd*
50-
RUN rm -rf ./packages/cactus-test-api*
51-
RUN rm -rf ./node_modules/
52-
531
FROM cruizba/ubuntu-dind:19.03.11 as runner
542

553
USER root
@@ -76,22 +24,23 @@ RUN useradd -m ${APP_USER}
7624
RUN usermod -a -G ${APP_USER} ${APP_USER}
7725
RUN mkdir -p ${APP}
7826

79-
COPY --chown=$APP_USER:$APP_USER --from=builder /app/ ${APP}
80-
8127
RUN mkdir -p "${APP}/log/"
82-
RUN chown -R $APP_USER:$APP_USER "${APP}/log/"
28+
RUN chown -R $APP_USER:$APP_USER "${APP}/"
8329

8430
# TODO: Can we hack it together so that the whole thing works rootless?
8531
USER ${APP_USER}
32+
WORKDIR ${APP}
8633

8734
SHELL ["/bin/bash", "--login", "-i", "-c"]
88-
8935
# Installing Node Version Manager (nvm)
9036
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
91-
RUN source ~/.bashrc && nvm install 16.3.0
37+
RUN source ~/.bashrc && \
38+
nvm install 16.8.0 && \
39+
npm install -g yarn && \
40+
yarn add @hyperledger/cactus-example-carbon-accounting-backend@0.9.1-ci-942.cbb849c6.35 --ignore-engines --production
41+
9242
SHELL ["/bin/bash", "--login", "-c"]
9343

94-
WORKDIR ${APP}
9544

9645
COPY --chown=${APP_USER}:${APP_USER} ./examples/carbon-accounting/healthcheck.sh /
9746

@@ -100,7 +49,7 @@ ENV AUTHORIZATION_PROTOCOL=NONE
10049
ENV CACTUS_NODE_ID=-
10150
ENV CONSORTIUM_ID=-
10251
ENV KEY_PAIR_PEM=-
103-
ENV COCKPIT_WWW_ROOT=examples/cactus-example-carbon-accounting-frontend/www/
52+
ENV COCKPIT_WWW_ROOT=/usr/src/app/node_modules/@hyperledger/cactus-example-carbon-accounting-frontend/www/
10453
ENV COCKPIT_TLS_ENABLED=false
10554
ENV COCKPIT_CORS_DOMAIN_CSV=\*
10655
ENV COCKPIT_MTLS_ENABLED=false
@@ -117,6 +66,7 @@ ENV API_TLS_CLIENT_CA_PEM=-
11766
ENV API_TLS_KEY_PEM=-
11867
ENV API_HOST=0.0.0.0
11968
ENV API_PORT=4000
69+
ENV GRPC_TLS_ENABLED=false
12070
ENV LOG_LEVEL=TRACE
12171

12272
COPY examples/carbon-accounting/supervisord.conf /etc/supervisord.conf

extensions/cactus-plugin-object-store-ipfs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@hyperledger/cactus-common": "0.9.0",
7676
"@hyperledger/cactus-core": "0.9.0",
7777
"@hyperledger/cactus-core-api": "0.9.0",
78-
"axios": "0.21.1",
78+
"axios": "0.21.4",
7979
"ipfs-http-client": "51.0.1",
8080
"run-time-error": "1.4.0",
8181
"typescript-optional": "2.0.1",

extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import path from "path";
2-
import type { Server } from "http";
3-
import type { Server as SecureServer } from "https";
42
import type { Express } from "express";
53
import { create } from "ipfs-http-client";
64
import type { Options } from "ipfs-http-client";
7-
import { Optional } from "typescript-optional";
85
import { RuntimeError } from "run-time-error";
96
import { Logger, Checks, LoggerProvider } from "@hyperledger/cactus-common";
107
import type { LogLevelDesc } from "@hyperledger/cactus-common";
@@ -186,10 +183,6 @@ export class PluginObjectStoreIpfs implements IPluginObjectStore {
186183
};
187184
}
188185

189-
public getHttpServer(): Optional<Server | SecureServer> {
190-
return Optional.empty();
191-
}
192-
193186
public async shutdown(): Promise<void> {
194187
this.log.info(`Shutting down ${this.className}...`);
195188
}

0 commit comments

Comments
 (0)