Skip to content

Commit

Permalink
Merge pull request #185 from sanvenDev/main
Browse files Browse the repository at this point in the history
Corda Testnet: Added Corda_Network2
  • Loading branch information
sandeepnRES authored Nov 17, 2021
2 parents 3fe57b3 + c4d08e9 commit d4cef34
Show file tree
Hide file tree
Showing 213 changed files with 9,522 additions and 8,372 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/asset-exchange-corda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ jobs:
# CORDA NETWORK
- name: Start Corda Network
run: |
make start
make start-network1 PROFILE=3-nodes
sleep 100
docker logs corda_partya_1
docker logs corda_partyb_1
working-directory: tests/network-setups/corda

# FABRIC CLI
- name: Setup Corda CLI init
run: ./scripts/initAsset.sh
run: ./scripts/initAsset.sh 1
working-directory: samples/corda/corda-simple-application

- name: Asset Exchange Corda CLI Tests
Expand Down Expand Up @@ -164,15 +164,15 @@ jobs:
# CORDA NETWORK
- name: Start Corda Network
run: |
make start-local
make start-network1-local PROFILE=3-nodes
sleep 100
docker logs corda_partya_1
docker logs corda_partyb_1
working-directory: tests/network-setups/corda

# FABRIC CLI
- name: Setup Corda CLI init
run: ./scripts/initAsset.sh
run: ./scripts/initAsset.sh 1
working-directory: samples/corda/corda-simple-application

- name: Asset Exchange Corda CLI Tests
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
# CORDA NETWORK
- name: Start Corda Network
run: |
make start-house
make start-network1 APP_NAME=house PROFILE=3-nodes
sleep 100
docker logs corda_partya_1
docker logs corda_partyb_1
Expand All @@ -279,7 +279,7 @@ jobs:

# FABRIC CLI
- name: Setup Corda CLI init
run: ./scripts/initHouseToken.sh
run: ./scripts/initHouseToken.sh 1
working-directory: samples/corda/corda-simple-application

- name: House Token Exchange Corda CLI Tests
Expand All @@ -305,9 +305,9 @@ jobs:
cat tmp.out
# Timeout
CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token lock -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 5 -r "O=PartyB,L=London,C=GB" -p house:20 1> tmp.out
CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token lock -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 10 -r "O=PartyB,L=London,C=GB" -p house:20 1> tmp.out
CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/')
sleep 5
sleep 10
cat tmp.out
## Is asset lock false
Expand Down
62 changes: 58 additions & 4 deletions .github/workflows/data-transfer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
- name: Start Relay for Corda_Network
run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda'
working-directory: core/relay

- name: Start Relay for Corda_Network2
run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda2'
working-directory: core/relay

# FABRIC DRIVER
- name: Setup Fabric Driver .env
Expand All @@ -122,6 +126,10 @@ jobs:
run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda'
working-directory: core/drivers/corda-driver

- name: Start Corda_Network2 Driver
run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda2'
working-directory: core/drivers/corda-driver

# FABRIC CLI
- name: Setup Fabric CLI .npmrc
run: |
Expand Down Expand Up @@ -162,7 +170,26 @@ jobs:
- name: Data Transfer Corda Client Tests
run: |
COUNT=0
TOTAL=4
TOTAL=8
# CORDA-CORDA2
./clients/build/install/clients/bin/clients request-state localhost:9081 relay-corda2:9082/Corda_Network2/corda_network2_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:H 1> tmp.out
cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
./clients/build/install/clients/bin/clients get-state H 1> tmp.out
cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
# CORDA2-CORDA
NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients request-state localhost:9082 relay-corda:9081/Corda_Network/corda_partya_1:10003#com.cordaSimpleApplication.flow.GetStateByKey:C 1> tmp.out
cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-state C 1> tmp.out
cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
# CORDA - FABRIC1
./clients/build/install/clients/bin/clients request-state localhost:9081 relay-network1:9080/network1/mychannel:simplestate:Read:a 1> tmp.out
Expand Down Expand Up @@ -377,6 +404,10 @@ jobs:
- name: Start Relay for Corda_Network
run: RELAY_CONFIG=config/Corda_Relay.toml cargo run --bin server &> relay-corda.out &
working-directory: core/relay

- name: Start Relay for Corda_Network2
run: RELAY_CONFIG=config/Corda_Relay2.toml cargo run --bin server &> relay-corda2.out &
working-directory: core/relay

# FABRIC DRIVER
- name: Setup Fabric Driver .env
Expand All @@ -395,9 +426,13 @@ jobs:
working-directory: core/drivers/fabric-driver

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

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

# FABRIC CLI
- name: Setup Fabric CLI Config
Expand Down Expand Up @@ -429,8 +464,27 @@ jobs:
- name: Data Transfer Corda Client Tests
run: |
COUNT=0
TOTAL=4
TOTAL=8
# CORDA-CORDA2
./clients/build/install/clients/bin/clients request-state localhost:9081 localhost:9082/Corda_Network2/localhost:30006#com.cordaSimpleApplication.flow.GetStateByKey:H 1> tmp.out
cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
./clients/build/install/clients/bin/clients get-state H 1> tmp.out
cat tmp.out | grep "SimpleState(key=H, value=\[SimpleState(key=H, value=1" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
# CORDA2-CORDA
NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients request-state localhost:9082 localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:C 1> tmp.out
cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
NETWORK_NAME=Corda_Network2 CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-state C 1> tmp.out
cat tmp.out | grep "SimpleState(key=C, value=\[SimpleState(key=C, value=20" && COUNT=$(( COUNT + 1 )) && echo "PASS"
cat tmp.out
# CORDA - FABRIC1
./clients/build/install/clients/bin/clients request-state localhost:9081 localhost:9080/network1/mychannel:simplestate:Read:a 1> tmp.out
cat tmp.out | grep "SimpleState(key=a, value=Arcturus" && COUNT=$(( COUNT + 1 )) && echo "PASS"
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,23 @@ jobs:
run: go test -v ./...
working-directory: samples/fabric/simpleassetandinterop

#test_simpleassettransfer_github:
#runs-on: ubuntu-latest
#steps:
#- uses: actions/checkout@v2

#- name: Set up Go
#uses: actions/setup-go@v2
#with:
#go-version: 1.16

#- name: Build
#run: go build -v ./...
#working-directory: samples/fabric/simpleassettransfer

#- name: Test
#run: go test -v ./...
#working-directory: samples/fabric/simpleassettransfer
test_simpleassettransfer_github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Build
run: go build -v ./...
working-directory: samples/fabric/simpleassettransfer

- name: Test
run: go test -v ./...
working-directory: samples/fabric/simpleassettransfer

test_simpleassettransfer_local:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion common/protos-go/build-protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BUILDDIR=./
PROTOSDIR=../protos
FABRIC_PROTOSDIR=../fabric-protos

protoc --proto_path=$PROTOSDIR --proto_path=$FABRIC_PROTOSDIR --go_out=$BUILDDIR --go_opt=paths=source_relative $PROTOSDIR/common/query.proto $PROTOSDIR/common/ack.proto $PROTOSDIR/common/proofs.proto $PROTOSDIR/common/state.proto $PROTOSDIR/common/access_control.proto $PROTOSDIR/common/membership.proto $PROTOSDIR/common/verification_policy.proto $PROTOSDIR/common/interop_payload.proto $PROTOSDIR/common/asset_locks.proto
protoc --proto_path=$PROTOSDIR --proto_path=$FABRIC_PROTOSDIR --go_out=$BUILDDIR --go_opt=paths=source_relative $PROTOSDIR/common/query.proto $PROTOSDIR/common/ack.proto $PROTOSDIR/common/proofs.proto $PROTOSDIR/common/state.proto $PROTOSDIR/common/access_control.proto $PROTOSDIR/common/membership.proto $PROTOSDIR/common/verification_policy.proto $PROTOSDIR/common/interop_payload.proto $PROTOSDIR/common/asset_locks.proto $PROTOSDIR/common/asset_transfer.proto
protoc --proto_path=$PROTOSDIR --proto_path=$FABRIC_PROTOSDIR --go_out=$BUILDDIR --go_opt=paths=source_relative $PROTOSDIR/fabric/view_data.proto
protoc --proto_path=$PROTOSDIR --proto_path=$FABRIC_PROTOSDIR --go_out=$BUILDDIR --go_opt=paths=source_relative $PROTOSDIR/corda/view_data.proto
protoc --proto_path=$PROTOSDIR --proto_path=$FABRIC_PROTOSDIR --go-grpc_out=paths=source_relative:$BUILDDIR --go_out=paths=source_relative:$BUILDDIR $PROTOSDIR/networks/networks.proto
Expand Down
17 changes: 10 additions & 7 deletions common/protos-go/common/access_control.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions common/protos-go/common/ack.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions common/protos-go/common/asset_locks.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4cef34

Please sign in to comment.