Skip to content

Commit

Permalink
refactor(weaver): prefix cacti to all weaver packages, set publish ta…
Browse files Browse the repository at this point in the history
…rget to cacti

    - Update relay, drivers, iin-agent image registry to hyperledger/cacti
    - Update npm packages (protos-js and sdks) registry to cacti
    - Update maven packages registry to cacti
    - Rename sdks/besu/interoperation-node-sdk to sdks/besu/node
    - Rename modules with following convention `<module-type>-<dlt-platform>`:
        - For SDKs: `sdk.corda`, `sdk-fabric`, `sdk-besu`
        - For drivers: `driver-corda`, `driver-fabric`
        - For imodule: `imodule.corda`
    - Change all packages version to v2.0.0-alpha-prerelease

Signed-off-by: Sandeep Nishad <sandeep.nishad1@ibm.com>
  • Loading branch information
sandeepnRES committed May 2, 2023
1 parent b9066a9 commit f37495c
Show file tree
Hide file tree
Showing 270 changed files with 930 additions and 772 deletions.
2 changes: 1 addition & 1 deletion .dcilintignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ examples/cactus-example-carbon-accounting-backend/src/main/json/generated/build-
# Cannot be edited as its a name of a imported Corda library, and Corda syntax
weaver/core/drivers/corda-driver/src/main/kotlin/CustomSerializationWhitelist.kt
weaver/samples/corda/corda-simple-application/clients/src/main/kotlin/com/cordaSimpleApplication/client/CustomSerializationWhitelist.kt
weaver/core/network/corda-interop-app/interop-workflows/src/main/kotlin/org/hyperledger/cacti/weaver/corda/app/interop/flows/customSerializers/CustomSerializationWhitelist.kt
weaver/core/network/corda-interop-app/interop-workflows/src/main/kotlin/org/hyperledger/cacti/weaver/imodule/corda/flows/customSerializers/CustomSerializationWhitelist.kt

# Corda test network files that are generated and therefore cannot be altered to comply with DCI-Lint
weaver/tests/network-setups/corda/shared
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_weaver-asset-exchange-besu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
# BESU SDK
- name: Setup BESU SDK
run: make build-local
working-directory: weaver/sdks/besu/interoperation-node-sdk
working-directory: weaver/sdks/besu/node

# BESU NETWORK
- name: Start Besu Network
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test_weaver-data-sharing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -450,34 +450,34 @@ jobs:

- name: Start Relay for network1
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-relay-server#g" docker/testnet-envs/.env.n1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.n1
make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n1'
working-directory: weaver/core/relay

- name: Start Relay for network2
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-relay-server#g" docker/testnet-envs/.env.n2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.n2
make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.n2'
working-directory: weaver/core/relay

- name: Start Relay for Corda_Network
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-relay-server#g" docker/testnet-envs/.env.corda
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.corda
make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda'
working-directory: weaver/core/relay

- name: Start Relay for Corda_Network2
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-relay-server#g" docker/testnet-envs/.env.corda2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-relay-server#g" docker/testnet-envs/.env.corda2
make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda2'
working-directory: weaver/core/relay

# FABRIC DRIVER
- name: Setup Fabric Driver .env
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-fabric-driver#g" docker-testnet-envs/.env.n1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-fabric#g" docker-testnet-envs/.env.n1
sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-fabric-driver#g" docker-testnet-envs/.env.n2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-fabric#g" docker-testnet-envs/.env.n2
sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}/weaver#g" docker-testnet-envs/.env.n2
working-directory: weaver/core/drivers/fabric-driver

Expand All @@ -492,19 +492,19 @@ jobs:
# IIN AGENT
- name: Setup Fabric IIN Env
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-iin-agent#g" docker-testnet/envs/.env.n1.org1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n1.org1
sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org1
sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org1
sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-iin-agent#g" docker-testnet/envs/.env.n1.org2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n1.org2
sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n1.org2
sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n1.org2
sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n1.org2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-iin-agent#g" docker-testnet/envs/.env.n2.org1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n2.org1
sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org1
sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org1
sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org1
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-iin-agent#g" docker-testnet/envs/.env.n2.org2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-iin-agent#g" docker-testnet/envs/.env.n2.org2
sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}/weaver#g" docker-testnet/envs/.env.n2.org2
sed -i "s#^AUTO_SYNC=true#AUTO_SYNC=false#g" docker-testnet/envs/.env.n2.org2
sed -i "s#^DNS_CONFIG_PATH=.*#DNS_CONFIG_PATH=./docker-testnet/configs/dnsconfig-2-nodes.json#g" docker-testnet/envs/.env.n2.org2
Expand All @@ -525,13 +525,13 @@ jobs:
# CORDA DRIVER
- name: Start Corda Driver
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-corda-driver#g" docker-testnet-envs/.env.corda
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-corda#g" docker-testnet-envs/.env.corda
make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda'
working-directory: weaver/core/drivers/corda-driver

- name: Start Corda_Network2 Driver
run: |
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=weaver-corda-driver#g" docker-testnet-envs/.env.corda2
sed -i "s#^DOCKER_IMAGE_NAME=.*#DOCKER_IMAGE_NAME=cacti-weaver-driver-corda#g" docker-testnet-envs/.env.corda2
make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda2'
working-directory: weaver/core/drivers/corda-driver

Expand Down Expand Up @@ -899,11 +899,11 @@ jobs:

# CORDA DRIVER
- name: Start Corda_Network Driver
run: ./build/install/corda-driver/bin/corda-driver &> corda-driver.out &
run: ./build/install/driver-corda/bin/driver-corda &> corda-driver.out &
working-directory: weaver/core/drivers/corda-driver

- name: Start Corda_Network2 Driver
run: DRIVER_PORT=9098 ./build/install/corda-driver/bin/corda-driver &> corda2-driver.out &
run: DRIVER_PORT=9098 ./build/install/driver-corda/bin/driver-corda &> corda2-driver.out &
working-directory: weaver/core/drivers/corda-driver

# FABRIC CLI
Expand Down
10 changes: 5 additions & 5 deletions weaver/.github/workflows/deploy_node-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
paths:
- 'common/protos-js/package.json'
- 'sdks/fabric/interoperation-node-sdk/package.json'
- 'sdks/besu/interoperation-node-sdk/package.json'
- 'sdks/besu/node/package.json'
- 'core/drivers/fabric-driver/VERSION'
- 'core/identity-management/iin-agent/VERSION'

Expand Down Expand Up @@ -125,11 +125,11 @@ jobs:
cp .npmrc.template .npmrc
sed -i "s/<personal-access-token>/${{ secrets.GITHUB_TOKEN }}/g" .npmrc
cat .npmrc
working-directory: sdks/besu/interoperation-node-sdk
working-directory: weaver/sdks/besu/node

- name: Build
run: make build
working-directory: sdks/besu/interoperation-node-sdk
working-directory: weaver/sdks/besu/node

- name: Check if package already exists
run : |
Expand All @@ -141,12 +141,12 @@ jobs:
else
echo "WEAVER_BESU_SDK_PUBLISH=true" >> $GITHUB_ENV
fi
working-directory: sdks/besu/interoperation-node-sdk
working-directory: weaver/sdks/besu/node

- name: Publish
if: ${{ env.WEAVER_BESU_SDK_PUBLISH == 'true' }}
run: make publish
working-directory: sdks/besu/interoperation-node-sdk
working-directory: weaver/sdks/besu/node

publish-driver-image:
if: ${{ always() && github.repository_owner == 'hyperledger-labs' }}
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos-go/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.7
v2.0.0-alpha-prerelease
4 changes: 2 additions & 2 deletions weaver/common/protos-java-kt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ after PR approval, publish it to `hyperledger/cacti`.
To publish to your fork, replace `<your-git-name>` with your github username in `github.properties`:
```
...
url=https://maven.pkg.github.com/<your-git-name>/weaver-dlt-interoperability
url=https://maven.pkg.github.com/<your-git-name>/cacti
```
and then follow above 4 steps.

Expand All @@ -38,6 +38,6 @@ and then follow above 4 steps.
5) Add this to your build.gradle (change the version accordingly):
```
dependencies {
compile(group: 'com.weaver', name: 'protos-java-kt', version: "1.2.1")
compile(group: 'org.hyperledger.cacti.weaver', name: 'protos-java-kt', version: "1.2.1")
}
```
2 changes: 1 addition & 1 deletion weaver/common/protos-java-kt/github.properties.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
username=<GITHUB email>
password=<GITHUB Personal Access Token>
url=https://maven.pkg.github.com/hyperledger-labs/weaver-dlt-interoperability
url=https://maven.pkg.github.com/hyperledger/cacti
4 changes: 2 additions & 2 deletions weaver/common/protos-java-kt/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Interop Protos
group=com.weaver
version=1.5.7
group=org.hyperledger.cacti.weaver.protos
version=2.0.0-alpha-prerelease
kotlin.incremental=false
2 changes: 1 addition & 1 deletion weaver/common/protos-js/.npmrc.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@hyperledger-labs:registry=https://npm.pkg.github.com/hyperledger-labs
@hyperledger:registry=https://npm.pkg.github.com/hyperledger
//npm.pkg.github.com/:_authToken=<personal-access-token>
2 changes: 1 addition & 1 deletion weaver/common/protos-js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
npm run build

.PHONY: publish
publish:
publish: build
npm publish

.PHONY: clean-build
Expand Down
2 changes: 1 addition & 1 deletion weaver/common/protos-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ and then follow above 4 steps.
2) Create a copy of `.npmrc.template` as `.npmrc`.
3) Replace <personal-access-token> in copied `.npmrc` file with your personal access token.
4) Now put this `.npmrc` file in your application in same level as package.json.
5) Now you can run `npm install @hyperledger-labs/weaver-protos-js` in your application directory to install the latest version.
5) Now you can run `npm install @hyperledger/cacti-weaver-protos-js` in your application directory to install the latest version.
6 changes: 3 additions & 3 deletions weaver/common/protos-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger-labs/weaver-protos-js",
"version": "1.5.7",
"name": "@hyperledger/cacti-weaver-protos-js",
"version": "2.0.0-alpha-prerelease",
"description": "Interop protos for Node JS (Weaver)",
"main": "index.js",
"exports": {
Expand Down Expand Up @@ -54,6 +54,6 @@
},
"homepage": "https://github.com/hyperledger/cacti/weaver#readme",
"publishConfig": {
"registry": "https://npm.pkg.github.com/hyperledger-labs"
"registry": "https://npm.pkg.github.com/hyperledger"
}
}
6 changes: 3 additions & 3 deletions weaver/common/protos-rs/pkg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "weaver_protos_rs"
version = "1.5.4"
name = "cacti_weaver_protos_rs"
version = "2.0.0-alpha-prerelease"
authors = ["Peter Somogyvari <peter.somogyvari@accenture.com>", "Sandeep Nishad <sandeep.nishad1@ibm.com"]
edition = "2018"
license = "Apache-2.0"
description = "Rust compiled Weaver protobuf package"
documentation = "https://github.com/hyperledger/cacti/tree/main/weaver/rfcs/formats"
repository = "https://github.com/hyperledger/cacti/"
readme = "README.md"
keywords = ["weaver", "interoperability", "protobuf", "protos"]
keywords = ["cacti", "weaver", "interoperability", "protobuf", "protos"]

[lib]
name = "weaverpb"
Expand Down
4 changes: 2 additions & 2 deletions weaver/core/drivers/corda-driver/.env.docker.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ DRIVER_PORT=<driver-server-port>
DRIVER_RPC_USERNAME=driverUser1
DRIVER_RPC_PASSWORD=test
EXTERNAL_NETWORK=<docker-bridge-network>
DOCKER_IMAGE_NAME=ghcr.io/hyperledger-labs/weaver-corda-driver
DOCKER_TAG=1.2.9
DOCKER_IMAGE_NAME=ghcr.io/hyperledger/cacti-weaver-driver-corda
DOCKER_TAG=2.0.0-alpha-prerelease
COMPOSE_PROJECT_NAME=<docker-compose-project-name>
COMPOSE_PROJECT_NETWORK=<docker-compose-project-network>
RELAY_TLS=<true|false>
Expand Down
8 changes: 4 additions & 4 deletions weaver/core/drivers/corda-driver/Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Local build
FROM gradle:4.10.3-jdk8 AS builder-local

WORKDIR /corda-driver
ADD build /corda-driver/build
WORKDIR /driver/corda
ADD build /driver/corda/build

FROM builder-local as builder

# Deployment Image
FROM openjdk:8-jre

COPY --from=builder /corda-driver/build/install/corda-driver /corda-driver/
COPY --from=builder /driver/corda/build/install/driver-corda /driver/corda/

WORKDIR /corda-driver
WORKDIR /driver/corda

ARG GIT_URL
LABEL org.opencontainers.image.source ${GIT_URL}
6 changes: 3 additions & 3 deletions weaver/core/drivers/corda-driver/Dockerfile.remote
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM gradle:4.10.3-jdk8 AS builder-remote
USER root
RUN apt-get update && apt-get install -y maven

WORKDIR /corda-driver
WORKDIR /driver/corda
ADD . .
RUN ./gradlew clean installDist

Expand All @@ -13,9 +13,9 @@ FROM builder-remote as builder
# Deployment Image
FROM openjdk:8-jre

COPY --from=builder /corda-driver/build/install/corda-driver /corda-driver/
COPY --from=builder /driver/corda/build/install/driver-corda /driver/corda/

WORKDIR /corda-driver
WORKDIR /driver/corda

ARG GIT_URL
LABEL org.opencontainers.image.source ${GIT_URL}
47 changes: 10 additions & 37 deletions weaver/core/drivers/corda-driver/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--
driver-corda<!--
Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: CC-BY-4.0
-->
# corda-driver
# Corda Driver

The Corda driver is used by the relays to interface with the Corda nodes. It
triggers flows from the interoperation CorDapp to retrieve state given the query
Expand Down Expand Up @@ -52,32 +52,32 @@ make build-refresh-dependencies[-local]
To run the driver, use the following:

```
./build/install/corda-driver/bin/corda-driver
./build/install/driver-corda/bin/driver-corda
```

The driver gRPC server will be listening on port `9099`.

### With TLS

If the relay expects a TLS connection over gRPC, you need to specify the following environment variables in the `corda-driver` command:
If the relay expects a TLS connection over gRPC, you need to specify the following environment variables in the `driver-corda` command:
- `RELAY_TLS`: should be set to `true`
- One of the following:
* If the relay server TLS CA certificates are in a password-protected Java Key Store (JKS file):
- `RELAY_TLSCA_TRUST_STORE`: JKS file path
- `RELAY_TLSCA_TRUST_STORE_PASSWORD`: password used to create the JKS file
* If the relay server TLS CA certificates are in separate PEM files in the filesystem:
- `RELAY_TLSCA_CERT_PATHS`: colon-separated list of CA certificate file paths
If you wish to run the driver service with TLS enabled, you need to specify the following environment variables in the `corda-driver` command:
If you wish to run the driver service with TLS enabled, you need to specify the following environment variables in the `driver-corda` command:
- `DRIVER_TLS`: should be set to `true`
- `DRIVER_TLS_CERT_PATH`: driver's TLS certificate file path
- `DRIVER_TLS_KEY_PATH`: driver's TLS private key file path
- Example: both relay and driver are TLS-enabled, and a trust store is used as a certificate repository:
```bash
RELAY_TLS=true RELAY_TLSCA_TRUST_STORE_PASSWORD=password RELAY_TLSCA_TRUST_STORE=trust_store.jks DRIVER_TLS=true DRIVER_TLS_CERT_PATH=cert.pem DRIVER_TLS_KEY_PATH=key.pem ./build/install/corda-driver/bin/corda-driver
RELAY_TLS=true RELAY_TLSCA_TRUST_STORE_PASSWORD=password RELAY_TLSCA_TRUST_STORE=trust_store.jks DRIVER_TLS=true DRIVER_TLS_CERT_PATH=cert.pem DRIVER_TLS_KEY_PATH=key.pem ./build/install/driver-corda/bin/driver-corda
```
- Example: only relay is TLS-enabled, and the driver's trusted certificates are in separate files in the filesystem:
```bash
RELAY_TLS=true RELAY_TLSCA_CERT_PATHS=ca_cert1.pem:ca_cert2.pem ./build/install/corda-driver/bin/corda-driver
RELAY_TLS=true RELAY_TLSCA_CERT_PATHS=ca_cert1.pem:ca_cert2.pem ./build/install/driver-corda/bin/driver-corda
```
If the driver is deployed within a Docker container, set the same variables as above in the appropriate `.env` file. The following sample files in [./docker-testnet-envs/](./docker-testnet-envs) can be used and tweaked for Fabric drivers associated with particular testnets:
Expand Down Expand Up @@ -114,13 +114,13 @@ To push image to github container registry:
### Docker-Compose Deployment
* Copy `.env.docker.template` to `.env`
- `NETWORK_NAME`: Used as suffix to corda-driver container name, i.e. `corda-driver-<network-name>` will be the name of the container.
- `NETWORK_NAME`: Used as suffix to driver-corda container name, i.e. `driver-corda-<network-name>` will be the name of the container.
- `DRIVER_PORT`: Driver server port.
- `DRIVER_RPC_USERNAME`: RPC user registered for Driver.
- `DRIVER_RPC_PASSWORD`: Password for the above RPC user.
- `EXTERNAL_NETWORK`: Name of the docker network in which the Corda containers are deployed.
- `DOCKER_IMAGE_NAME`: _Keep this unchanged_.
- `DOCKER_TAG`: Refer here for the image tags available: [weaver-corda-driver](https://github.com/hyperledger-labs/weaver-dlt-interoperability/pkgs/container/weaver-corda-driver)
- `DOCKER_TAG`: Refer here for the image tags available: [cacti-weaver-driver-corda](https://github.com/hyperledger/cacti/pkgs/container/cacti-weaver-driver-corda)
- `COMPOSE_PROJECT_NAME`: Docker project name for the Corda network to which this driver is supposed to attach. By default, the folder name of the Corda network's `docker-compose.yml`, is the project name.
- `COMPOSE_PROJECT_NETWORK`: Docker project network name for the Corda network to which this driver is supposed to attach. By default, `default` is the project network name.
- `RELAY_TLS`: Boolean flag indicating whether or not the local relay requires TLS connections
Expand All @@ -144,37 +144,10 @@ generate the code docs, run the following:
./gradlew dokka
```
The docs are then located in `build/dokka/corda-driver`. Opening
The docs are then located in `build/dokka/driver-corda`. Opening
`index.html` in your browser will allow you to navigate through the project
structure.
## Notes on the proto dependencies
This repo relies on data structures defined in
[protos](../../../common/protos). It
also has a dependency on the [interop
CorDapp](../../../core/network/corda-interop-app), which
itself has a dependency on the same proto files. Generating the java and Kotlin
files from the proto files locally in this repository therefore creates some
problems. Firstly, because the generated java and kotlin files are created under
the namespace provided in the proto files (e.g. `common.state`), this creates
two sets of the same source files in the classpath under the same namespace.
Compiling the project then fails with conflicting dependencies. The other
problem is that if the proto files do change, they need to be updated in two
separate repositories.
A workaround (or arguably, a cleaner solution) is for the corda-testnet project
to use the generated java and kotlin source files that comes from the interop
CorDapp. This means that there is guaranteed to be one consistent version of the
files and we don't need to worry about conflicting dependencies. When the proto
files are updated, they need to be updated in a single repo, instead of across
multiple.
To update the version number of the interop CorDapps that should be pulled from
Github Maven Repository, change the version number of the `interop_cordapps_version` at the
top of the `build.gradle` file.
## TODO
1. Create an Error class
2. Make a script for pulling the latest interop cordapp (add to make)
Loading

0 comments on commit f37495c

Please sign in to comment.