Solo Worker Deployment
Currently, there is no one-click deployment script for workers on Phala Network. Computation providers need to run docker compose manually for solo worker deployment.
Basic Requirements
SGX Function
Running Phala worker requires SGX-capable CPU. Please choose a device that supports SGX and enable SGX in the BIOS. For more information, please check: choose your CPU
Device Configuration
Solo workers on Phala need to run 3 components: Node, pherry, and pRuntime. The requirements for each component are as follows:
Node
4GB+
900GB+ NVME
harddisk requirement increasing, 2t will be best
pherry
2GB
0
-
pRuntime
2GB
500MB
increase slowly
Totally
8GB+
2TB
-
The number of cores of the worker needs to be 4 or more, the stronger the CPU computing power of the worker, the better the rewards in reward calculation. For details, please refer to: Gemini Tokenomics
OS Requirements
We strongly recommend that you use Ubuntu 22.04.2 LTS, download link: https://ubuntu.com/download/server
The desktop version of the OS is less stable than Server version, so we strongly recommend using the server version.
And please make sure that the kernel version is linux-image-5.15.0-82-generic or above, the intel-microcode should be 20230808 or above.
If you do not want to update the current Ubuntu system version, please be sure to check the kernel version. Because pRuntime will use the SGX driver built into the kernel.
After the OS is installed, we strongly recommend that you remotely connect and deploy the worker through SSH or other methods. This will help you with document input and maintenance.
Deployment of Components
Preparations
After installing the OS above, first install the necessary Docker program.
Then create a folder locally, and create a docker-compose document within it.
Document Editing
Edit the docker-compose document using the following commands:
After entering, you will access the document.
At this point, enter a
and you will start editing the document. Paste the following content into the document. (Please note that the file content remains consistent and the indentation alignment of each line is consistent with this document)
Some parameters need to be customized by yourself, including:
In phala-pherry, replace {gas fee memory seed} in “–mnemonic={gas fee memory seed}” with the mnemonic seed of the gas fee account. For example:
“–mnemonic=a b c d e … h”
In phala-pherry, replace the {node ip} with your own node’s IP in both “–substrate-ws-endpoint=ws://{node ip}:9945” and “–collator-ws-endpoint=ws://{node ip}:9944”; Replace {pruntime ip} in “–pruntime-endpoint=http://{pruntime ip}:8000” with the IP of your own pruntime worker; If you are running these components on the same device, the easiest way is to replace them all with 127.0.0.1. For example:
“–substrate-ws-endpoint=ws://127.0.0.1:9945”
“–collator-ws-endpoint=ws://127.0.0.1:9944”
“–pruntime-endpoint=http://127.0.0.1:8000”
In phala-pherry, replace {owner address} in “–operator={owner address}” with the Phala network address of the mining pool’s main account. For example:
“-operator=446u…WewDEZyv”
In phala-pruntime, change –cores={core_num} to the number of cores of your machine, such as –cores=4.
After entering, complete the following steps to finish the text editing and save successfully.
Program Execution
Inside the newly created folder, run docker-compose, and the essential components for Solo worker will run successfully.
Status Check
Node Check
Enter the following command to get the last 100 lines of node log information
If you have changed the component name through customizing docker-compose.yml, please replace “node” to your customized name in the command.
A typical node log in sync will look like this:
Determine whether the parachain and relaychain are synchronizing normally by judging the height of the “target”, “best”, and “finalized”.
Polkadot chain (relaychain) produces a block every 6 seconds.
Phala chain (parachain) produces a block every 12 seconds.
Pherry Check
Enter the following command to get the most recent 100 lines of Pherry log information:
If you have changed the component name through customizing docker-compose.yml, please replace “phala-pherry” to your customized name in the command.
A typical pherry log will look like this:
You can search for issues in these logs and confirm whether the synchronization is going normally. Also, you can obtain the worker’s public key and the real-time calculated P-value (score) from them.
pRuntime Check
Enter the following command to get the most recent 100 lines of pRuntime log information:
If you have changed the component name through customizing docker-compose.yml, please replace “phala-pruntime” to your customized name in the command.
A typical pRuntime log in sync will look like this:
You can determine whether the synchronization is proceeding normally by checking the synchronized height and progress.\
Last updated