Phala Crust double mining tutorial released, get extra rewards quickly

This article is approximately 1448 words,and reading the entire article takes about 2 minutes
As Polkadot ecological projects, Phala Network and Crust Network both use TEE + blockchain technology, and both project economic models have mining models. Miners with Intel SGX equipment can mine Phala, Crust or other storage projects in parallel after

Phala  Crust double mining tutorial released, get extra rewards quickly

As Polkadot ecological projects, Phala Network and Crust Network both use TEE + blockchain technology, and both project economic models have mining models. The most important thing is that the two projects are very complementary: Phala Network is responsible for private computing of data, and Crust is responsible for data storage of these data materials.

Therefore, the two protocols are jointly creating an ecology of privacy technology mining. Miners with Intel SGX equipment can mine Phala, Crust or other storage projects in parallel after connecting the hard disk.

Crust uses TEE for MPoW (Meaningful Proof of Work) mining to solve the problems of supervision and quantification. In Crust, TEE acts like an honest watchdog. Periodically check whether the node is working normally, and whether there is any error or leakage of user data. Through the GPoS consensus, Crust realizes efficient node incentives.

Phalas TEE mining mechanism is similar to PoW. Phalas TEE mining mechanism is to stimulate computer computing power. If the online time is long and the calculation tasks are many, the rewards will be large, and it will not cause electricity and computing power like POW. waste of energy.

Crust Network opened the incentive test network of the test network Ark Project on November 26, and launched the first phase of the test network on November 30. In the first phase, rewards worth about 300,000 CRUs will be distributed, of which 50 % is CRU, 50% is CRU18 (locked CRU, which will be unlocked linearly within 18 months after the mainnet goes live). Every 5 days, Crust Network will count the points of the previous 5 days and issue rewards in proportion.

The Phala Network testnet Vedenttas 1605 competition has also started, and it is expected that 1 million PHA will be distributed as testnet rewards. At present, Vendetta has more than 730 privacy nodes (TEE work nodes), with a total computing power of 280,000 Score, and triggered the leaderboard liquidity airdrop Firedrop. This means that nearly 4,000 CPU cores are serving blockchain privacy tasks in real time, surpassing similar protocols such as Oasis Labs and Secret Network. Phala Network has become one of the largest decentralized privacy computing networks.

Below we will introduce to you how to double mine Crust and Phala:

Crust Node Setup Tutorial

It should be noted that since the Crust driver installation script will reset the driver, please be sure to install the Crust miner node first, and then install the Phala miner node. Here, we only list some of the key steps. For detailed mining tutorials, please refer to:https://mp.weixin.qq.com/s/cfwUlYrYE4e6EsQLmGDyTw

Phala Node Setup Tutorial

After the Crust node is set up, the Phala node can be set up.

1. Open phala.network to register 2 accounts

2. Follow this tutorial to create a Phala account

3. In order to easily identify the binding relationship, it is recommended to add a paired suffix such as account stash / account controller (you can also use any words you like to distinguish).

4. Obtain test coins

Method 1: Follow this tutorial to burn 0.1 PHA in exchange for 1000 test coins (need to ensure that you have both ETH and PHA in your wallet)

Method 2: Complete small tasks to get 888 test coins

5. Set the binding relationship between Stash and Controller

Developer (developer) → Extrinsics (transaction) → your stash account → phalaModule → SetStash(controller)

Phala  Crust double mining tutorial released, get extra rewards quickly

Click Submit Transaction, sign and wait for the broadcast.

6. Deploy local Phala full node, pruntime and phost

6.1 Deploy local full node

Deploying local full nodes helps avoid various problems at the network connection level. Deploying a full node requires about 50G of space reserved on the hard disk for storing block data.

mdnice editor

sudo docker pull phalanetwork/phala-poc3-node

Then enter the command below to create (and start) the container. This step will set your node name, please pay attention to replace the relevant characters.

sudo docker run -ti --rm --name phala-node -d -e NODE_ -p 9933:9933 -p 9944:9944 -p 30333:30333 -v $HOME/phala-node-data:/root/data phalanetwork/phala-poc3-node

After the command is executed, the container will start automatically. If you want to close it, you can use sudo docker kill phala-node.

In addition, please avoid operations that will cause the container to shut down unexpectedly (such as shutting down or restarting the machine or Docker service without closing the full-node container), which may damage the block database. At this time, all blockchain data can only be deleted and re-initialized. If you want to start multiple full-node containers on one computer (not necessary and not recommended), you need to set $HOME/phala-node-data to different paths to avoid conflicts.

mdnice editor

Phala  Crust double mining tutorial released, get extra rewards quickly
Phala  Crust double mining tutorial released, get extra rewards quickly
6.2 Deploy pRuntime

Attention everyone, here the full node must be synchronized before deploying phost, otherwise an error will occur

mdnice editor

sudo docker pull phalanetwork/phala-poc3-pruntime

mdnice editor

sudo docker run -d -ti --rm --name phala-pruntime -p 8000:8000 -v $HOME/phala-pruntime-data:/root/data --device /dev/isgx phalanetwork/phala-poc3-pruntime

mdnice editor

Phala  Crust double mining tutorial released, get extra rewards quickly
$HOME/phala-pruntime-data is the path to store PRuntime data. The default is the phala-pruntime-data directory under the current users home directory (if not, it will be created automatically). If necessary, you can specify other paths, and pay attention to the directory you specify , the current user must have read and write permissions. If you want to start multiple PRuntime containers on one computer (unnecessary and not recommended), you need to set different paths to avoid conflicts. If the data is deleted, you need to re-execute the process of registering the miner.

6.3 Deploy pHost

sudo docker pull phalanetwork/phala-poc3-phost

enter

sudo docker run -d -ti --rm --name phala-phost -e PRUNTIME_ -e PHALA_NODE_WS_ -e -e EXTRA_ phalanetwork/phala-poc3-phost

Note that if the mnemonic is entered incorrectly here, an error will be reported later.

After the command is executed, the container will automatically start. Please refer to the complete document for shutdown and startup (you need to start PHost after both the full node and PRuntime are started). If PRuntime restarts, PHost also needs to restart.

http://your IP address:8000 is the access address of PRuntime. ws://your IP address:9944 is the WebSocket address of the Phala full node. You can use the ip addr command to view your own ip address.

Query whether phost is running normally: docker logs phala-phost

Phala  Crust double mining tutorial released, get extra rewards quickly

7. Set commission and beneficiary

1) Enter Developer → Extrinsics (Developer - Transaction)

2) Select your Controller account in the first row

3) Select the phalaModule module in the second row, and then select setPayoutPrefs(payout_comission, payout_target)

mdnice editor

  • 4) The third row is your commission rate (Commission)
  • Note: The value of commission is a ratio. For example, writing 80 means that 80% of your income is reserved for yourself, and the remaining 20% ​​is distributed to your co-miners.
  • If there is no co-miner, no matter how much you write here, you will get 100%.
  • The lower you set the Commission, the lower your earnings, but at the same time the more people lend you money, the lower your startup costs.

5) In the fourth row, select a mining coin collection address. Multiple mining machines can choose the same coin receiving address.

Phala  Crust double mining tutorial released, get extra rewards quickly

8. Check the deployment of mining machines

1) Open Developer → Chain state in the upper right corner

mdnice editor

  • 2) Click on the phalaModule module, select workerState next to it, select your stash account at the bottom, click the plus sign next to it, and some information will appear below.
  • score.overallScore The total score of the mining machine
  • features The second row: your hardware rating (from low to high is 0-4)

3) Select the stashState module, select your stash account, click the plus sign next to it, and some information will appear below.

4) Select the phalaModule.stash(controller) module, select your controller account, and click the plus sign next to it to see your controller address.

5) After all modules are clicked, it should be as shown in the figure below:

Phala  Crust double mining tutorial released, get extra rewards quickly

Description of the status of several mining machines:

1)"Empty": null,generally should not be seen

2)"Free": null,The mining machine has been successfully registered and is in an idle state. You need to refer to the steps in Start Mining to start mining

3)"MiningPending": null,Operate the state displayed after starting mining, the mining machine has entered the ready to start state, and will start mining after the next round (one round every 600 blocks)

4)"Mining": "BlockNumber",The miner is mining, and the number behind is the block height at which you start mining

5)"MiningStopping": null, the status displayed after the operation stops mining, the mining machine has entered the ready to stop state, and will stop mining in the next round, and the state will return to free. If you log off before the status returns to free, you will be slashed.

6)"Gatekeeper": null,Your device has a GK identity and cannot run miners at the same time.

9. Start mining

1) Open Developr → Extrinsics in the upper right corner

2) Select your controller account, click the phalaModule module, click startMiningIntention(), then click Submit Transaction, sign and wait for the broadcast. After a green notification appears, it means mining has started.

Phala  Crust double mining tutorial released, get extra rewards quickly

Then you can check your mining status and wait for the fire to arrive

mdnice editor

Phala  Crust double mining tutorial released, get extra rewards quickly

Original article, author:Phala可信网络。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks