Manage blockchain consensus and validation as a Gatekeeper on Phala Network.
NODE_ROLE=MINER
). Then two sets of the ports are exported, including the p2p ports (30333, 30334), Prometheus metrics (9615, 9616), ws rpc (9944, 9945), and http rpc ports (9933, 9944). For each pair of the ports, the former one is Khala’s and the later one is Kusama’s. The data directory /root/data
is mapped to the disk. Feel free to change it to somewhere better.
The node may take a few days to be fully synced. Recovering from a backup can greatly reduce the time to sync, if you have one.
Second, run pRuntime:
/etc/isgx
. Note that pruntime will store its credentials under /root/data
, which is mapped to the locla disk. The credentials are encrypted with the CPU keys. It’s important to backup the key in order to keep the identity of the worker (pRuntime instance). However, it’s impossible to recover the credentials in another CPU (vCPU).
In the above command line we assumed you are running with the kernel SGX driver. If you have to run with the manually installed driver on an older kernel, you may consider to switch to differnt device arguments:
--device /dev/sgx/enclave
--device /dev/sgx/provision
--device /dev/isgx
khala-node
and phala-pruntime
containers. It reads the blockchain from khala-node:9944
and sync the data to phala-pruntime:8000
. If you run the full node remotely, just change the host name khala-node
to the node rpc endpoint. The mnenomic is specified by the environment variable.
pherry usually takes 1-2 days to sync the blockchain history. However, since pRuntime doesn’t persist the state, if it exits, you will need to sync from scratch in the next time.
The account you specified will be used to send transactions on behalf of the Gatekeeper. Once it’s fully synced, it will initiate a PhalaRegistry.registerWorker()
extrinsic to the blockchain. A Gatekeeper is identified by its worker public key (worker pubkey). You can find it from http://phala-pruntime:8000/get_info
RPC, and check the registration status from the blockchain at PhalaRegistry.workers()
.
Summary:
Collator | collator | ||
Gatekeeper | gatekeeper |