TEA Project Monthly Report — March 3, 2023

Tea Project Blog
3 min readMar 3, 2023

--

TEA Backend Improvements Continue

This February has been a month of both ending the old and preparing for the new as the TEA Project continues infrastructure updates and inches closer to mainnet launch.

  • Epoch 12 is still ongoing but will be winding down soon as we prepare the launch of Epoch 13. End-users will not notice any differences in the front-end interface but many changes have been made in the back-end.
  • The back-end changes continue to be the primary focus of the TEA development team with the transition to the Wasmer WebAssembly runtime taking up the most development time.

The rest of this monthly report will discuss some of the recent development updates and what they mean for the TEA Project going forward.

Wasmer: Updating the Wasm Runtime

The TEA Project development team recently realized that the Wasm runtime they were using hadn’t been updated in years. Bug fixes are essential to maintaining a secure codebase, and the dev team was getting worried that they were building on a runtime that would only get less secure over the years.

Not wanting to build on an abandoned project, the TEA dev team decided to move the WebAssembly runtime over to Wasmer. This move to the new Wasmer runtime has also unlocked some very useful features for the TEA Project:

  • Hot upgrades: we no longer have to shut down our layer-2 in order to do upgrades. Shutting everything down resets the entire layer-2 state machine which is a drastic measure we want to avoid.
  • Precise billing: Before Wasmer, we had to charge a static price for all computing tasks. The upgrade to Wasmer allows us to charge the actual gas fee according to the compute resources used. For example, we can now see how many CPU cycles are used as opposed to estimating resource usage based on time.

AWS Nitro: Solidifying the Preliminary Node Network

The TEA Project will be launching with AWS Nitro as the compute instances for both our CML hosting nodes and the state maintainer nodes. AWS Nitro is an ideal platform for our nodes as the entire compute instance is protected within a secure enclave.

Moving the business logic of our platform from layer-1 to layer-2 has always been a priority and gives us portability to run on top of any layer-1 blockchain. One of the biggest changes has been moving the remote attestation process to our layer-2. This is how the remote attestation process works with AWS Nitro comprising the nodes of our compute layer:

  1. Remote attestation will begin with an attestor asking the remote candidate to generate its own attestation document with its declared hardware fingerprints.
  2. This document is compared to the attestation document generated by the KMS of the Nitro instance that the CML node is running on.
  3. If there’s a discrepancy with the two attestation documents then attestation is marked as failed for this node.
  4. TEA’s compute layer uses a Raft consensus protocol where a leader node randomly selects other nodes to challenge the randomly selected node being tested for remote attestation. If a two-thirds (2/3) majority of attestor nodes (including the leader) receives a positive result from verifying the target node’s requested attestation material, the tested node will have passed the consensus verification and be marked as trustable to use.
  5. The pass / fail status of the node is replicated to layer-1 (Ethereum) in the metadata of the CML NFT (ERC-721). Any failed nodes will have their bonding curve tokens slashed and be banned from running a node on the network.

End-users will be able to experience the fruits of these technical updates in Epochs 13 & 14 which are right around the corner.

--

--