Commit 51765439 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent 57d837b9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -38,11 +38,8 @@ COPY src/dlt/gateway/dltApp/src/ ./src
# Install dependencies
RUN npm install



# Expose the port that the gRPC service runs on
EXPOSE 50051

# Command to run the service
CMD ["node", "src/dltGateway.js"]
#CMD ["sh", "-c", "sleep 3600"]  # Keep the container running for testing
+23 −15
Original line number Diff line number Diff line
@@ -2,9 +2,15 @@

## Description

The DLT Gateway consists of a **fabricConnect.ts** TypeScript file, which contains the logic for identification management (certificates required for the MSP), connection management to the blockchain, and finally, it exposes a contract object with all the required information for interacting with the chaincode. The **fabricConnect.ts** is coded following the Fabric Gateway API recommendations from Hyperledger Fabric 2.4+. The compiled **fabricConnect.ts** logic is imported into a **dltGateway.js** file, which contains the gRPC logic for interaction with the TFS controller. Testing code for various performance tests is included inside the [/tests](./tests/) folder.
The DLT Gateway consists of a **fabricConnect.ts** TypeScript file, which contains the logic for identification
management (certificates required for the MSP), connection management to the blockchain, and finally, it exposes a
contract object with all the required information for interacting with the chaincode. The **fabricConnect.ts** is
coded following the Fabric Gateway API recommendations from Hyperledger Fabric 2.4+. The compiled **fabricConnect.ts**
logic is imported into a **dltGateway.js** file, which contains the gRPC logic for interaction with the TFS controller.
Testing code for various performance tests is included inside the [/tests](./tests/) folder.

The chaincode is written in Go, providing a reference for the operations that are recorded in the blockchain. This chaincode must already be deployed in a working Hyperledger Fabric blockchain.
The chaincode is written in Go, providing a reference for the operations that are recorded in the blockchain. This
chaincode must already be deployed in a working Hyperledger Fabric blockchain.

## Requisites

@@ -12,7 +18,8 @@ The chaincode is written in Go, providing a reference for the operations that ar
* Docker
* Kubernetes (K8s)
 
Sign and TLS certificates, and private key of the MSP user from the Hyperledger Fabric deployment must be copied to the [/keys](./keys/) directory inside this repository.
Sign and TLS certificates, and private key of the MSP user from the Hyperledger Fabric deployment must be copied to the
[/keys](./keys/) directory inside this repository.

Example:

@@ -24,4 +31,5 @@ Sign and TLS certificates, and private key of the MSP user from the Hyperledger
cp ~/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/priv_sk src/dlt/gateway/keys/
```

These files are essential for establishing the identity and secure connection to the blockchain. Make sure you replace the paths with your actual file locations from your Hyperledger Fabric deployment.
These files are essential for establishing the identity and secure connection to the blockchain. Make sure you replace
the paths with your actual file locations from your Hyperledger Fabric deployment.
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
        "start": "node dist/dlt_gateway.js"
    },
    "engineStrict": true,
    "author": "CTTC-Javier",
    "author": "Javier Jose Diaz (CTTC)",
    "license": "Apache-2.0",
    "dependencies": {
        "@grpc/grpc-js": "^1.10.8",
−285 KiB
Loading image diff...
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ const packageDefinition = protoLoader.loadSync(PROTO_PATH, {
const dltProto = grpc.loadPackageDefinition(packageDefinition).dlt;

const client = new dltProto.DltGatewayService(
  '10.1.1.96:32001', //Replace with TFS server IP_ADDRESS
  '127.0.0.1:32001', // Replace with TFS server IP_ADDRESS
  grpc.credentials.createInsecure()
);

Loading