How to use miner monitor tool

Current tool locations (may change):
https://phala-miner-monitor2.100k.dev/

Verify tool state

Monitor collects data about all miners by fetching public blockchain data.
So miners state will be always a little delayed. You can check tool status on top of app.
image
Crawler sync describes how many blocks are waiting for processing in tool.
Some less important informations about accounts are updated in 12h intervals.

How to add miners

  • Manually add each miner

    On Miners panel click “Add miner” and put your controller account address. Optionally specify name (if you want to distinct many miners)
  • Find miners via common payout target

    If you have multiple controller accounts which has the same payout target (common technique) you can add payout target account and next use “Find miners” option

Some tool details

Payout target view

Miners target view

Columns

  • Name, Address
    self explanatory

  • Score
    miner score - also available via chain state request phalaModule::workerState

  • State
    first tag is miner state (Empty / MiningPending / Mining etc.) accessible via phalaModule::workerState.
    Second line tags are set by miner performance.

    • Online / Offline - miner is online if submit transaction (extrinsic) in last 4h
    • Rewarding / Not rewarding - miner is rewarding if got reward in last 4h

    Third line describes device stats - details in device stats section.

  • Commission
    If you don’t stake full amount by yourself you probably want to tempt others to stake on your device. This is reward commission also available via phalaModule::stashState

  • Stake
    Miner stake - check miningStaking::stakeReceived

  • Balance
    Miner PHA balance

  • Fire mined
    Total fire mined via each miner phalaModule::fireX

  • Last extrinsics
    Last extrinsics executed via miner. If not executed successfully it will be marked red.

  • Last rewards
    Last rewards received by miner with information of type “Online” / “Compute” reward

Device state monitoring

Besides public data monitoring you can also monitor device state like:
CPU temp, Stack status (node / pruntime / phost containers)

However this had to be somehow secured. Otherwise anyone could submit updates of any device state.
For that reason I added verifying of payout target ownership.
You need to sign message - it is costless, simple and secure (as long as you know what doing), common action.

You need polkadot.js extension with payout target account managed by it.

After connecting with extension you will be able to select payout target account and specify password (secret key) for it.
image
Provided password will be stored (in hashed form) in crawlers database.

When you want to update device state you need to provide that password.

Here is device stats collector script
https://github.com/l00k/phala-miner-monitor-ui/blob/master/device-state-updater.php
In top lines you need to specify 2 things: controller address and password given previously.

Add running of this script (PHP required) to CRON and it will submit CPU and docker containers state to monitor tool.
You will be able to monitor it like below:
image

Note: device state will be publicly visible to anyone who enter your public address. But those informations are not confidential (at least not confidential a lot).
Still I suggest to do that only to people who know what they are doing ;)

Visual stats

As you may notice tools also provides some basic stats visualized with graphs

image

image

Other features

If you have any suggestions what should be nice to include in this tool - feel free to comment below. Any useful features will be implemented depending on the possibilities.

4 Likes

Mybro could you share me your back-end code that the yourgit just a UI,iwanna get whole.
my email [email protected]

That may lead to security voulnerability. Sorry but no

My main that i just use to myself ,i am lazy to write again,or maybe i can buy it for 300pha.
we are friends,I have to say that your code is nice and grace. Actually we can talk about detial in email.We are all phala of believers :smiling_face_with_three_hearts:

Hmm but why you need to run it by your own? It is publically accessible to all. I don’t see any reason to run it locally.

It is not for sale.

If you are missing any feature - suggest maybe I will implement it.

Cause Network latency is lower that i could konw my woker status more faster and i want to learn your code

Dear,when i touch the monitor your devices button,this system ask me connect my extension,i have install tht polkadot to my chrome,but when i press the connect button,an error “connected to polkadot extension,no account found”,pls help me ,thank you

I understand. But I will not share it.

First add your payout target account. It is account which you specified when executing setPayoutPrefs
Also note monitor tool may have 1h delay as it need to process all blockchain state changes.

thank you very much!i have fixed it by use your method!
New question,i have add 3 payout Targets,now ,i touch the monitor your devices button,pop a window to select the target,there is only one target for me to choose,why?

As site is already offline and I will probably not maintain it anymore. You can get it now