The TEA Project’s 3 Types of Mining CML

Tea Project Blog
5 min readJun 3, 2022

Those new to the TEA Project might wonder why we have three different types of CML. This three-tier division actually coincides with the various functions that TApps need to execute within the TEA ecosystem.

The TEA Project’s three types of mining nodes are as follows:

  • Global CML nodes (the state maintainers) provide the underlying infrastructure for the state machine and the database layer available to TApps.
  • Hosting CML nodes host individual TApps.
  • Private CML nodes can fetch TApps to a local environment to interact with the user’s private data.
From left to right: private CML, hosting CML, and global CML

TEA mining nodes can only be activated by planting a CML NFT into them, which functions as a mining license. Users interested in mining can buy new Camellia seeds through an open auction.

  • Each CML has a lifespan associated with it (approximately two years). Its lifespan and other attributes such as productivity have variations that are generated algorithmically.
  • Each mining machine’s characteristics (e.g., its RAM and whether it has a graphics card) will be recorded within the CML NFT.
  • The DAO regulates CML supply to ensure that there isn’t an oversupply in the market (too many miners and not enough TApps to host).

Global CML Nodes

The TEA Project is different from smart contract platforms that are limited to storing everything on their blockchains. In contrast, the TEA Project’s layer-1 blockchain doesn’t keep any app data there. The TEA Project’s state machine only stores the TApps’ transactions in memory.

  • Transactions are stored in the RAM of global CML mining nodes, which reside inside the global CML enclaves.
  • Every global CML node will have the same copy of the state in its memory.
  • Only global CML nodes are allowed to maintain the state machine based on Proof of Time.

All new transactions are already ordered through our use of GPS satellites (Proof of Time). We don’t run consensus for global CML, so there are no new blocks to wait for. Instead of blocks, we have a conveyor belt where new transactions land on, and eventually every node ends up with the same state.

The global CML can keep parallel states, with one of those states acting as a SQL database that TApps can use as a database layer.

Rewards: global CML nodes earn public service rewards for maintaining the state machine, and are paid directly by TApps for providing the NoSQL database layer. There’s also a global CML staking token that’s issued on a bonding curve which anyone can buy to earn a share of the global CML mining rewards. Since most global CML will be operated by the main team during the early phases of the project, staking is a way for users to earn a share of the global CML mining rewards.

Hosting CML

The hosting CML hosts developers’ code that’s been compiled to WASM and and uploaded (encrypted) to IPFS. When a hosting CML “hosts” this code and the data it acts upon, they’re then decrypted when it enters the node’s TPM-protected enclave.

The TEA Project doesn’t require miners to secure expensive server-class hardware in order to operate a node. TEA Project miners can deploy single-board computers with the only hardware prerequisites being a TPM security chip and a GPS module. A typical RPi mining machine with these embedded components suitable for mining on the TEA network can be set up for less than $100.

TEA Project mining is so accessible because TEA’s hosting CML doesn’t need to do any high-energy complex cryptographic computing as there’s no consensus algorithms to run on our layer2 compute layer. Making TEA Project mining affordable and accessible to the general public also helps improve decentralization, and we expect TEA mining (deploying a hosting CML) to be within reach for miners all over the world.

Hosting CML Handles Some Database Functions

Although we say that the global CML handle the database needs of TApps, there are certain situations where the hosting CML is involved with providing a database infrastructure to TApps.

  • The global CML nodes provide the infrastructure for the relational database data stored in GlueSQL format.
  • Hosting CML handles NoSQL database data which is sent to IPFS using OrbitDB. The OrbitDB database is optimized for IPFS storage as any entry can be retrieved once you have its content_id. But NoSQL databases are only functional for simple queries.

Rewards: hosting CML nodes earn public service rewards for performing remote attestation, and they earn TEA / TApp tokens for hosting the TApps running on the TEA platform. Each hosting CML also has a global CML staking token issued on a bonding curve that anyone can buy to earn a share of that particular hosting CML’s mining rewards.

Private CML Nodes

Private CML nodes are what users will plant into their private machines (e.g., a home router or home computer) to allow TApps to interact with their private data. You can imagine a scenario where users don’t want their data stored somewhere on centralized servers. The TEA Project’s “send the code to the data” paradigm allows for users to stay in control of their data which never leaves the house even when interacting with TApps.

Private CML is useful when calling a TApp to interact with private data in the home

An added benefit of running a private CML miner is that there’s no need for a public IP. A typical home computer with a residential internet connection is sufficient to operate a private CML.

Rewards: C CML can earn availability attestation rewards by verifying hosting CML machines’ availability.

If you’d like to learn about how to use CML to get started in the TEA Project’s ecosystem, drop by our Telegram and we’ll help you get started.

--

--