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_enableIt is now recommended to reboot you machine.
sudo rebootGo to the Phala folder
cd solo-mining-scripts-main/ #note this depends on your current directory
sudo ./phala.sh install-
- Use the
sudo phala installcommand 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 pherrysudo phala config showsudo phala update scriptsudo phala install initEnter your information as prompted.
sudo phala config setsudo phala startsudo phala stopsudo phala statusHead back to top βοΈ to navigate to other sections.
sudo phala start node
sudo phala start pruntime
sudo phala start pherrysudo phala stop node
sudo phala stop pruntime
sudo phala stop pherrysudo phala updatesudo phala update cleanThe 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 stopAnd attempt a restart with
sudo phala startIf 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 statusIn 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 psYou 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 -fNote 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 nodesudo phala start pruntimesudo phala start pherrySome 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-nodeFor 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 isgxIf 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 -fWithin 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 stopTo delete the khala blockchain database on your node, execute the following commands:
rm -rf /var/khala-dev-node/chains/khalaTo delete the Kusama blockchain , run:
rm -rf /var/khala-dev-node/chains/polkadotNow restart your node.
