Contestants can now use their own computer hardware to mine on the TEA network. This will require running an installation script to setup your mining machine.
You'll need the following to start mining:
- A defrosted CML seed to plant into the mining machine.
- An amount of TEA to fund the creation of your initial CML investment tokens.
- A mining machine to host the CML.
A Camellia seed (CML) is an NFT that gives mining rights when planted into a machine. The lifespan of a Camellia seed varies from a few weeks during testnet to approximately 2 years after mainnet launches. Camellia seeds can be purchased through the Seed Auction TApp in the TApp Store wallet.
When a CML is chosen by an enduser to host a TApp, the CML owner will earn the gas fee that the enduser pays. The actual amount earned goes to the bonding curve of the CML's investment token.
When an enduser pays a gas fee to use the services of a CML miner to host a TApp, the gas fee gets distributed as follows:
- Theta % (chosen by the miner when they setup their CML) goes directly to the miner's wallet.
- The rest goes to the bonding curve of the miner's CML token. This is like a dividend that's distributed according to how many tokens any user holds of that particular CML.
A CML miner will also earn public service rewards (like remote attestation) as a result of helping the ecosystem run smoothly.
The mining machine installation scripts were designed to be run on Ubuntu. The script has been tested successfully on Ubuntu versions 18.04, 20.04, and 22.04 and may run on other Ubuntu versions as well.
- CML mining machines must have a publicly-reachable IP address. You can use your home computer (provided you have shell access to run docker and have a way to get an IP address that is reachable from the outside world). For most people it will be easiest to use a cloud virtual server provider.
- Minimum ram requirement for mining machine = 1gb.
Create your droplet
Select Ubuntu for the distribution
Choose the droplet plan
We'll choose a 2GB droplet with shared CPU for our mining machine:
Choose a datacenter
Choose how you'll authenticate with your droplet
Using ssh key authentication is more secure method of authentication. The following screenshot shows selecting password authentication:
After creating your droplet, copy its IP address:
You can now login to your remote droplet using the terminal application on your home computer:
ipaddressis the IP address you've just copied to your clipboard from the Digitalocean dashboard. It will prompt you to enter your password if you're using password authentication.
Your first login will also ask
Are you sure you want to continue connecting (yes/no/[fingerprint])?to which you can answer
Turn on swap memory of the Digital ocean droplet
By default, digital ocean set the memory swap to off in order to save the life of their SSD drive. We recommend turning it on. It will potentially prevent the OOM (out of memory) errors which could cause your server to crash. Please use the following instructions to enable swap memory: Digital ocean instruction
Plant your Your CML seed
Click the copy script button to copy it to your clipboard
Run this command in the terminal of your mining machine. The output the script will give you includes the machine id as well as the Polkadot wallet address which you can copy down:
After you are done running the initial script on your mining machine, click the Next step button in the browser wallet.
Fill in the required mining machine information
You'll need to fill in the machine id, Polkadot wallet address (SSS8), and the mining machine's IP in this screen:
Copy the install scripts to your clipboard
There are two install scripts that you must run one after the other:
Use your terminal application to ssh into your droplet and run the installation scripts
Paste the 1st script and press
return. The script will download and install various packages and should complete within a minute.
Wait for the first install script to finish and then go back and run the second installation script.
After the installation has finished, click "Verify my miner" in the TEA browser wallet
Click the resulting success link
The success link is confirmation that your miner was installed correctly. Click the link to continue:
Click the "Activate miner" button
Your new miner should be visible in your TEA browser wallet main page
Please read carefully before hosting any applications. Failure to do so could result in penalties.
After you activate your newly planted CML, you still need to wait for your new node to sync up with the blockchain's latest block. Depending on your network speed, this sync-up may take up to a few minutes to several hours. Your node cannot provide any hosting services while negotiating the sync even though the status shows "active". If you host any application and your node hasn't yet synced, your node may be marked as "offline" which will result in a penalty.
You will need to login (ssh) to your node and type in the following command:
sudo docker logs -f -n 10 delegate-layer1
If you can see the output like the following screenshot (note the "Imported" lines in the log):
then your machine has completed syncing and is ready to host applications.
But if you see log messages as in the following screenshot (note the "Syncing .... target:.....best:... finalized #..." line):
then your machine is still syncing up to the latest block. Do NOT host any applications just yet. Check again after a few minutes or hours.
You can manage your active CML mining machine by clicking on its ID in your wallet:
These are the options you have available:
- Migrate miner - Use this button to migrate your CML to a new machine (e.g. your old machine provider has unreliable uptime). The machine will have to be shut down first before this button becomes active. Note that if you sell your CML, the new miner has to run this command to migrate the CML to their own machine.
- Start miner - Start up a previously stopped miner.
- Shut down miner - Shut down an active miner.
- Resume miner - If your miner was detected to be offline, you can slick resume to continue your miner once you're sure that your node is back online.
In your delegator-resources directory, there's a script named
tools.sh. You can use this script file to perform administrative tasks on your mining machine using the following arguments:
tools.sh logs: Show the current running docker-compose logs
tools.sh stop: Stop docker-compose
tools.sh clean: Clean out legacy data
tools.sh health: Check if current running docker-compose is healthy or not
tools.sh restart: Restart current running docker-compose file. Replaces having to do
docker-compose down& then
docker-compose up -d.
For example, to clean out the current program files (e.g. a new epoch is starting), you can execute the following commands:
If you've already run the installation script but need to start over from scratch, follow the direction below to delete the current installation.
- Stop the docker container:
- Remove all the files in the delegator-resources/ directory:
rm -rf *
rm -rf .*