EN | δΈζ
- Before Getting Started
- Install the Phala Scripts
- How to Use the Script
Check at IntelΒ© Ark that your processor is IntelΒ© SGX compatible.
Have Ubuntu 18.04, Ubuntu 20.04 or Ubuntu 21.04 installed. Compatible kernel versions may vary.
-
- Disable Secure Boot
- Boot Mode must be UEFI
- IntelΒ© SGX Settings must be Enabled or Software Controlled
π More details about the hardware requirements:
- Download the Script
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt install wget unzip
cd ~
wget https://github.com/Phala-Network/solo-mining-scripts/archive/refs/heads/main.zip
unzip main.zip
rm -r main.zip #cleaning up the installation
- Run the egx_enable if your SGX setting in BIOS is Software Controlled
cd solo-mining-scripts-main/tools/ #note this depends on your current directory
sudo chmod +x sgx_enable
sudo ./sgx_enable
It is now recommended to reboot you machine.
sudo reboot
Go to the Phala folder
cd solo-mining-scripts-main/ #note this depends on your current directory
sudo ./phala.sh install
-
- Use the
sudo phala install
command to install all dependencies without their configuration
sudo phala sgx-test
- Use the
-
- You can choose to install "Full" mode or "Prune" mode based on the size of your hard disk.
- In βPruneβ mode, after the configuration for the first time.
sudo phala update headers sudo phala update snapshot
sudo phala logs node
sudo phala logs pruntime
sudo phala logs pherry
sudo phala config show
sudo phala update script
sudo phala install init
Enter your information as prompted.
sudo phala config set
sudo phala start
sudo phala stop
sudo phala status
Head back to top βοΈ to navigate to other sections.
sudo phala start node
sudo phala start pruntime
sudo phala start pherry
sudo phala stop node
sudo phala stop pruntime
sudo phala stop pherry
sudo phala update
sudo phala update clean
The community is here to help! Check for existing posts on our forum if you are stuck. In rare circumstances, your issue may be new; feel free to post it then so that we can help. For us to be able to help you, please read the investigating the issue first, so you know how and where to get your logs from prior to posting.
Most symptoms are solved by restarting your node. If you experience issues running your node, try stopping the node by:
sudo phala stop
And attempt a restart with
sudo phala start
If you still have issues attempt to update the script.
Head back to top βοΈ to navigate to other sections.
Get an overview of your miner's status first.
sudo phala status
In case your node is stuck, a typical scenario would look like the following:
(image showing stuck node on the miner)With the symptom in the scenario above, the right method to solve the issue would be restarting the node
container only, with the commands mentioned here, and restarting the containers.
Now check the status of the node again.
If the local node block height is empty first, check if all required containers are running.
sudo docker ps
You should have three containers running as shown in this example:
(image showing the miner node's running docker containers)
To get the most recent logs of each container, you may execute:
docker logs <container_ID/container_name> -n 100 -f
Note that <container_ID/container_name>
must be replaced with the container you wish the receive the logs from. In the example above the container_ID
is 8dc34f63861e
and container_name
would be phala-pherry
.
If you attempt to post on the phala forum and do not know where the issue lies, please post the logs of all three docker containers. Copy-paste the container logs from the terminal into the forum post.
If a container is missing, you may attempt to restart it separately with the respective commands below. Use the applicable command for your missing container:
sudo phala start node
sudo phala start pruntime
sudo phala start pherry
Some users running nodes may find their nodes are struggling to connect to peers, which causes nodes to be dropped from the network. You can check your node connections through executing:
sudo docker logs -f phala-node
For an optimal setup, you should have between 40 and 50 peers.
If you have insufficient peers do the following:
- Check your firewall settings
- Ensure there are no NAT or Policy-based filters
Feel free to read NAT for more information if you are curious about the root causes. Also, do not hesitate to look for existing Phala forum posts before posing your issue if you are stuck.
βΉοΈ The most common issue is that your mainboard may not support a DCAP driver. In this case, the script cannot automatically install the isgx
driver and results in the following error message.
(image of the terminal showing the DCAP driver error message)
In this case, prior to running sudo phala start
, you need to manually install the isgx
driver:
sudo phala install isgx
If the Khala Chain stops synching and is stuck at a specific block and does not continue to sync, we advise you first to restart your node. Prior to restarting your miner confirm that your node is stuck, through execututing:
docker logs phala-node -n 100 -f
Within the logs if there is an issue in synchronizing a block, it will typically look as follows:
If the synchronization still fails, you may try to delete the khala chain database on your miner's node.
It is located in /var/khala-dev-node/chains/khala
.
(image showing the khala blockchain files of the miner node)
It is located in /var/khala-dev-node/chains/khala
.
First, stop your node with:
sudo phala stop
To delete the khala blockchain database on your node, execute the following commands:
rm -rf /var/khala-dev-node/chains/khala
To delete the Kusama blockchain , run:
rm -rf /var/khala-dev-node/chains/polkadot
Now restart your node.