Skip to main content

Attestor Node Guide

This guide explains how to deploy the Primus Network Attestor Node using TEE (provided by Phala) in production environments.

1. Supported Chains

ChainChainIdTask Contract AddressSupport
base-mainnet84530x151cb5eD5D10A42B607bB172B27BDF6F884b9707
base-sepolia845320xC02234058caEaA9416506eABf6Ef3122fCA939E8
hashkey-chain-testnet1330x6588a24D34C881cF10c8DA77e282f6E1fBc262C7
hashkey-chain-mainnet1770x1c5D0d5e0a3e0a5c9B0cDcF5C25A892281e4cd04
ink-mainnet570730xCE7cefB3B5A7eB44B59F60327A53c9Ce53B0afdE

2. Deploy the Node using TEE

2.1 Register a Phala Account

  1. If you don't have a Phala account, you can register one here.

2.2 Deploy the Node

1. Visit the deployment template and click

Deploy button.

2. Please fill in the required fields:
  • Name: This node's name.

  • docker-compose.yml: Please don't change it

  • KMS Provider: Only supports Base

  • Node: prod9

  • Instance Type: Use Large TDX Instance(4 vCPU, 8 GB)

  • Storage: Larger than 20 GB

  • Operating System: dstack-0.5.4.1

  • Encrypted Secrets: Please set:

    • PRIVATE_KEY. PRIVATE_KEY should start with 0x. PRIVATE_KEY acts as the owner of the node, used to report results, and will also be used to register the node.

    • NETWORK_CHAINS: A compressed single-line JSON string (no line breaks). Each element has rpcUrl, taskContractAddress, and chainId — see Supported Chains.

      Example value to paste:

      Here is an example for base mainnet

      [{"rpcUrl":"https://mainnet.base.org","taskContractAddress":"0x151cb5eD5D10A42B607bB172B27BDF6F884b9707","chainId":8453}]

      If you edit in expanded form, use this tool to minify before pasting.

    • IMAGE_TAG: Please use the tag: 0.1.1-alpha.5.

3. Click Deploy to start the deployment process.
4. If everything is successful, you will see the following services:

5. Click the attestor-node service to view the node's log. You will find the attestor's address in the log.

Please save this address as you will need it when registering the node.

6. Click the Network tab to check your Network Information.

Please save this endpoint for registering the node.

7. Copy the endpoint from step 7 to your browser and you will see the following information:

If you see Hi, PRIMUS NETWORK!, it means you have successfully deployed the node.

3. Register the Node

NOTE: Before managing a node, you must first contact the primuslabs team to have the attestor added to the whitelist.

3.1 Prerequisites

Make sure Docker is installed on your system.

3.2 Clone and Prepare

git clone https://github.com/primus-labs/primus-network-startup.git
cd primus-network-startup
chmod +x ./run.sh

3.3 Set Environment Variables

Based on the chain where your node is located, run the following command:

cp env_files/.env.base-mainnet .env

Then set your private key, RPC URL, and other parameters:

Here is an example for base mainnet

PRIVATE_KEY=0x
# Rpc for base chain testnet
RPC=
NODE_CONTRACT_ADDRESS=0x9C1bb8197720d08dA6B9dab5704a406a24C97642
ATTESTOR_ADDRESS=
RECIPIENT_ADDRESS=
ATTESTOR_URLS=
NODE_META_URL=
  1. PRIVATE_KEY: This private key owns the node and is the same as the above while deploying the node. We recommend depositing 0.01 ETH(for base chain) to this address. If you set it as the RECIPIENT_ADDRESS below, it will automatically receive task fees. This ensures sufficient balance for reporting results. Otherwise, you must manually monitor and maintain the balance.
  2. RPC: rpc for the chain.
  3. NODE_CONTRACT_ADDRESS: This is the address of the node contract. You can use the default value from env_files/.env.base-mainnet.
  4. ATTESTOR_ADDRESS: Attestor's address to sign attestations, this address is from above attestor-node.
  5. RECIPIENT_ADDRESS:Address to receive task fees. This address can be set to the node owner address corresponding to the PRIVATE_KEY above, or to any other address.
  6. ATTESTOR_URLS: Attestor node domain names. This domain is from endpoint above, and remove https://, just the domain name like: dd26063786a0fccd8e4cc499374b4515d4df1e87-18080.dstack-base-prod9.phala.network.If you have multiple URLs, separate them with commas.
  7. NODE_META_URL: Attestor node metadata url. The metadata should be a JSON document containing the following fields:
{
"name": "Your node name",
"description": "Introduce your node",
"website": "Your website URL",
"x": "https://x.com/<your_x_username>",
"logo": ""
}

MAKE SURE NODE_META_URL IS PUBLICLY ACCESSIBLE ON THE INTERNET.

3.4 Register the Node

One chain per run: Registration applies to one chain only (the chain determined by your current .env from step 3.3). If you need to register the node on multiple chains, repeat 3.3 (set environment variables for the next chain, e.g. cp env_files/.env.<other-chain> .env and fill in the values) and 3.4 (run register) for each chain.

sudo ./run.sh register

If you want to unregister from the Primus network, run the following command:

sudo ./run.sh unregister

Please note: Unregistering from the network means you will no longer receive any tasks and will not earn any income.