The simplicity of the smart contract may not seem to be a big issue right now but its limitations may pose a threat to applications on the blockchain. Our TestNet is trying to make a step forward! Learn more about the latest Test Net from CortexLabs here 👉

CortexCortex
$0.10879
2.84%
medium.com4y ago
TestNet Release 1. Cerebro Block Explorer & Cortex Wallet

A block explorer is a browser for the blockchain, similar to how we have browsers like Google Chrome for internet web pages, which displays the contents of individual blocks and transactions, the transaction histories, and balances of addresses. With Cortex block explorer, namely “Cerebro”, users can enjoy features most explorers have with additional perks.

In the Cerebro browser, In addition to the usual address, transaction, block, and other search and query functions, the most important and revolutionary changes are the addition of AI models, data uploads, and AI inference. There are currently two AI models already stored on the chain, and an AI smart contract that invokes the models to infer data. Cortex wallet will need to be installed to interact with the Cerebro browser. Please stay tuned for concrete steps on how to use the wallet and the explorer.

Cerebro Block Explorer Link: https://cerebro.cortexlabs.ai/ Cortex Wallet Download Link: https://github.com/CortexFoundation/Cortex_Release/ 2. Cortex Full Node

We have deployed 10 full nodes distributing in 6 countries for our TestNet and the number of full nodes will increase in the upcoming months. For now, we have the full nodes distributed in the following places:

Beijing, China Shanghai, China Hong Kong, China Silicon Valley, USA Los Angelas, USA Frankfurt, Germany London, UK Tokyo, Japan Singapore, Sinapore

Full nodes on our TestNet generate logs that reveals the running procedure of the AI smart contract, the calling of AI model and data, and the inference results.

Users are welcome to host their own nodes. Click here for the binary code and instruction.

3. Consensus Mechanism

We are a strong believer in one-machine-one-vote to allow more people to participate equally in the blockchain consensus. Cuckoo Cycle algorithm is selected as the consensus mechanism to allow commodity hardware to mine. Cuckoo cycle is one of the most promising ASIC-resistant frameworks due to the memory-intensive algorithm, yet with instant verification. It generates random bipartite graphs from a provided message and tries to find whether a subgraph with required property exists or not.

The current block rate is 15 seconds per block and the reward is 9 CTXC per block. Considering the nature of the PoW mechanism and possible changes in the ASIC mining industry, the PoW algorithm may be replaced as appropriate before the main chain goes live.

4. Mining Pool & Mining Software

Miners can connect their mining machines to our mining pool and configure the parameters to enable mining on Cortex. Miners can check statuses such as the entire computing power, the mining difficulty, and block height on the dashboard. We have developed a mining software for deployment on the GPU, which can set the mining address, wallet address, and connect to the Cortex pool for test mining.

Mining Pool Link: https://pool.cortexlabs.ai/ Mining Pool Address: miner.cortexlabs.ai:8009/ Mining Software Download Link: https://github.com/CortexFoundation/Cortex_Release/ 5. AI Smart Contract

The writing of AI smart contract can be done with Solidity, the programming language used for Ethereum developers. Cortex’s CVM is backward-compatible with EVM but adds infer instructions. Developers can use Remix to write AI smart contract. We also allow users to upload their models. If you wish to upload your models, please contact us at [email protected] The reason is that we need to retrain the models into quantized models before uploading.

Remix Editor Link: https://cerebro.cortexlabs.ai/remix/ 6. Deterministic AI Inference: Synapse

Cortex provides “Synapse”, an integer inference engine to do deterministic AI inference. Cortex’s Synapse Technology is a deterministic inference engine that guarantees exactly the same result of an AI model in heterogenetic computing environments. determinacy is crucial in the blockchain, as consensus has to be formed upon smart contract outputs. It is non-trivial for widely-used AI inference engines (TVM, NNVM, etc.) to guarantee the determinacy because modern GPU introduces parallelism into the execution flow. Synapse utilizes both quantizations of AI models and deterministic GPU acceleration to make AI DApps available.

7. Quantization and Compression

Quantization in deep learning combines high performance with lightweight inference which reduces the computation and memory costs. Quantization allows models to be executed on the blockchain with relatively low cost but also provides consistent inferred results.

To further reduce the size of the models, model compression is essential for the efficient deployment of neural network models. Under the new set of limitation, precision could downgrade for most models. Currently, fine-tuning is needed to train the new integer models to reduce precision loss. With 8-bit integer models, we can achieve a compression rate of 25% (75% size reduction).

Our model, Cat/Dog classifier AI model, has achieved a promising result with quantization and compression. The size of the original VGG16 model is 528MB. We performed transfer learning to the original model and generated an integer model of 129MB. Finally, we further optimized and compressed the model with its size as small as 14.7MB.

8. Storage Layer

We use a customized P2P network for storing AI model and data storage based on Libtorrent to achieve more AI model and data storage. This design combines the P2P storage network with the blockchain, providing a high-availability decentralized storage to Cortex, while the storage API is compatible with more systems to enhance the system’s performance.

How to report issues and bugs?

Please direct your technical questions to [email protected] and our technical team will assist you on the matters.