Installation
The Node Framework is currently undergoing testing and will be released soon.
Starting a 2PM Node Using Docker Image We recommend deploying using the 2PM Node Docker image for optimal performance and ease.
Downloading the Image
Pull the latest release version of the image from Docker Hub:
Initializing Configuration
The 2PM-node node stores data including configuration files, saved user data, and system operation logs. Before launching the node service, it is necessary to initialize the configuration:
First, create a new directory named 2pm_node
which will serve as the root directory for the node launch:
Within the node root directory, enter the command:
After running the command, new directories such as config
, task
, and data
will be created within the root directory 2pm_node
. The config
folder stores the node's configuration files, the task
folder holds intermediate results of node tasks, and data
stores the data provided by the node.
Modifying Configuration Files
In the config
folder, there will be a pre-generated configuration file config.yaml
. Before the first launch, it is essential to modify certain entries. One of the necessary changes is the address of the Chain Connector, which should be updated to the IP address configured in the previous section. Another is the 2PM Node's own IP address, which is needed for identity registration on the blockchain, allowing other nodes to communicate with this node. Find the public IP address of this node and enter it into the configuration file:
After completing the configuration, you are now ready to launch the 2PM Node.
Launching the Node Service
Use the Docker command line to create and start the node container, binding the folder created in the previous step to the container's internal /app
folder. Additionally, the 2PM Node needs to expose port 6700 for external APIs and node-to-node communication:
To monitor the container's execution status and confirm that the node has started successfully, use Docker's logs
command:
The 2PM Node also outputs logs to the log
directory within the local data folder, where you can review the node's operational logs.
With the 2PM Node now up and running, before executing any 2PM computation tasks, ensure to place some required data within the data
folder of the 2PM Node, as this data will be needed for the computation tasks:
Alternatively, you can request data for FHE Machine Learning Tasks from 0G Storage Nodes Through Node Data Connector.
Last updated