Guide for Privanetix Node

The guide for Privanetix Node provides a step-by-step overview of managing a Privanetix Node in the Privasea AI Network Testnet.

Remark: Ensure you have completed the prerequisites outlined here.

Minimum System Requirements

  • OS: Debian/Ubuntu (Recommended)
  • Storage: 100GB available storage
  • Memory: 8GB RAM
  • Processor: A processor with 6 cores, x86 architecture.
  • Network: A public static IP address
  • Port: Exposed TCP port 8181, make sure it's not occupied

Step 1: Pull Docker Image

First pull the docker image using the following command:

$ docker pull privasea/node-calc:v0.0.1

Step 2:Start the Privanetix Node

Start to running the node using the following command.

$ docker run -d -p 8181:8181 -e HOST=  -e KEYSTORE=UTC--2023-12-27T11-43-17.586161000Z--e674b632a9780110af23e4906779105998198479 -e KEYSTORE_PASSWORD=123456  -v /home/jason/node/cal-config:/app/config privasea/node-calc:v0.0.1

The user needs to customize the specified section in the above command:

  • HOST= Replace this part with the public IP address of the Privanetix node.
  • KEYSTORE=UTC--2023-12-27T11-43-17.586161000Z--e674b632a9780110af23e4906779105998198479: Replace this part with the file name of the keystore file (not the full path).
  • KEYSTORE_PASSWORD=123456: Replace with the password of the keystore file
  • /home/jason/node/cal-config: Replace this part with the path to store the keystore file on the host machine.
  • /app/config: This is the mapping directory in the container, do not change this.

The result of executing the command above is the Docker container ID, which appears as follows:


Step 3:Check Privanetix Node Running Status

Check the node running status from the log using the following command:

$  docker logs -f cf2b5dfabcaee87e4a5320d6e38453e0fe0da24825475facb3b0cf0906ca2dd5

When the message "node register success" appears, it indicates that the computing node has been successfully started.

t=2024-01-02T14:59:40+0100 lvl=info msg="this node is staked, dont need stake again"
t=2024-01-02T14:59:40+0100 lvl=info msg="node register success" nodeId=0xe674b632a9780110af23e4906779105998198479
[GIN] 2024/01/02 - 14:59:55 | 200 |      78.671µs | | GET      "/health"
[GIN] 2024/01/02 - 15:00:15 | 200 |      57.733µs | | GET      "/health"
[GIN] 2024/01/02 - 15:00:35 | 200 |      40.704µs | | GET      "/health"

If the node fails to start, please check the following:

  • Whether the keystore information is correct, including passwords and file storage paths
  • Whether the public IP address of the machine is correct
  • Whether there is a balance in tBNB
  • Whether TT has balance

Step 4: View Task Execution Status

When a task is assigned to the current computing node, you can view the task execution status using the following command:

$ docker logs -f cf2b5dfabcaee87e4a5320d6e38453e0fe0da24825475facb3b0cf0906ca2dd5

The information below indicates the details of the task execution status:

t=2024-01-02T15:15:49+0100 lvl=info msg="get a new task" id=38 taskId=d8ed8a12656c6ada5943dbf69e62457991c6d84b1e4e389bf81fdfd14db34c98 ipfsHashStr=client_pkg_20240102150539071484.tar.gz userId=0x3657eA851e06C61a58a14ccEd55b93F1F7eebdE5 userPk=04d220bd3f9ea34c06551e23dbf551d4c7939489858f3a570ef14315886d08d8028288dd65924c0a059d6251143187d58d080dd629e8160331322da31a8f734e2d
t=2024-01-02T15:15:49+0100 lvl=info msg="begin to download" filename=client_pkg_20240102150539071484.tar.gz
[GIN] 2024/01/02 - 15:15:56 | 200 | 226.915µs | | GET "/health"
[GIN] 2024/01/02 - 15:16:16 | 200 | 29.485µs | | GET "/health"
Downloaded file, 160489904 bytes
t=2024-01-02T15:16:32+0100 lvl=info msg="download client pkg in local success" hash=client_pkg_20240102150539071484.tar.gz
t=2024-01-02T15:16:32+0100 lvl=info msg="decry success, will write to file" fileName=./client_pkg_20240102151632342791.tar.gz input=160,489,904
fheServerWorkDir: ./fhe_server
fileName: client_pkg_20240102151632342791.tar.gz
taskId: 20240102151632342791
exec ./fhe_server/go_itf/ ./fhe_server ./client_pkg_20240102151632342791.tar.gz 20240102151632342791
[GIN] 2024/01/02 - 15:16:36 | 200 | 31.496µs | | GET "/health"
exec script finished!
t=2024-01-02T15:16:40+0100 lvl=info msg="processEncryptInputWithoutId success" serverFile=./fhe_server/client_pkg/client_pkg_20240102151632342791/fhe_result_20240102151632342791.tar.gz
file uploaded to
t=2024-01-02T15:16:41+0100 lvl=info msg="upload result to ipfs success" serverHash=
t=2024-01-02T15:16:41+0100 lvl=info msg="core workflow success" id=38 hash=fhe_result_20240102151632342791.tar.gz
t=2024-01-02T15:16:41+0100 lvl=info msg="core workflow update success" id=38
[GIN] 2024/01/02 - 15:16:56 | 200 | 29.391µs | | GET "/health"
[GIN] 2024/01/02 - 15:17:16 | 200 | 25.573µs | | GET "/health"

Step 5: Reward Distribution and Balance Check

Rewards will be directly distributed to the node's account. Follow these steps to check the balance using a wallet like Metamask:

  1. Import Keystore File: Import the node account's keystore file into the Metamask wallet.

  2. Access Metamask: Open Metamask and connect to the BNB Smart Chain testnet.

  3. Check Balance: Navigate to the "Assets" or "Tokens" section in Metamask to view your test token balance. If it's your first time, you might need to import the test token. Here is the contract address of the test token:[0xe83796b91a4c821E8E0a661c09C86A4e17fCE357].

Step 6: Stop the Node

If you want to stop running the node, simply using the following command:

$ docker stop <container id>

results matching ""

    No results matching ""