Thursday, December 20, 2018

#QuarkChain Announces Official Launch of Testnet 2.0 Mining!

About QuarkChain Testnet 2.0

QuarkChain Testnet 1.0 was built based on standardized blockchain system requirements, which included network, wallet, browser, and virtual machine functionalities. Other than the fact that the token was a test currency, the environment was completely compatible with the main network. By enhancing the communication efficiency and security of the network, Testnet 2.0 further improves the openness of the network. In addition, Testnet 2.0 will allow community members (other than citizens or residents of the United States) to contribute directly to the network, i.e. running a full node and mining, and receive testnet tokens as rewards.

QuarkChain Testnet 2.0 will support multiple mining algorithms, including two typical algorithms: Ethash and Double SHA256, as well as QuarkChain’s unique algorithm called Qkchash — a customized ASIC-resistant, CPU mining algorithm, exclusively developed by QuarkChain. Mining is available both on the root chain and on shards due to QuarkChain’s two-layered blockchain structure. Miners can flexibly choose to mine on the root chain with higher computing power requirements or on shards based on their own computing power levels.

1. Our Goal

By allowing community members to participate in mining on Testnet 2.0, our goal is to enhance QuarkChain’s community consensus, encourage community members to participate in testing and building the QuarkChain network, and gain first-hand experience of QuarkChain’s high flexibility and usability. During this time, we hope that the community can develop a better understanding about our mining algorithms, sharding technologies, and governance structures, etc. Furthermore, this will be a more thorough challenge to QuarkChain’s design before the launch of mainnet! Thus, we sincerely invite you to join the Testnet 2.0 mining event and build QuarkChain’s infrastructure together!

Today, we’re pleased to announce that we are officially providing the CPU mining demo to the public (other than citizens and residents of the United States)! Everyone can participate in our mining event, and earn tQKC, which can be exchanged to real rewards by non-U.S. persons after the launch of our mainnet. Also, we expect to upgrade our testnet over time, and expect to allow GPU mining for Ethash, and ASIC mining for Double SHA256 in the future. In addition, in the near future, a mining pool that is compatible with all mining algorithms of QuarkChain is also expected to be supported.

We hope all the community members can join in with us, and work together to complete this milestone!

2. Introduction to Mining Algorithms

2.1 What is mining?

Mining is the process of generating the new blocks, in which the records of current transactions are added to the record of past transactions. Miners use software that contribute their mining power to participate in the maintenance of a blockchain. In return, they obtain a certain amount of QKC per block, which is called coinbase reward. Like many other blockchain technologies, QuarkChain adopts the most widely used Proof of Work (PoW) consensus algorithm to secure the network.

A cryptographically-secure PoW is a costly and time-consuming process which is difficult to solve due to computation-intensity or memory intensity but easy for others to verify. For a block to be valid it must satisfy certain requirements and hash to a value less than the current target threshold. Reverting a block requires recreating all successor blocks and redoing the work they contain, which is costly.

By running a cluster, everyone can become a miner and participate in the mining process. The mining rewards are proportional to the number of blocks mined by each individual.

2.2 Introduction to QuarkChain Algorithms and Mining setup

According to QuarkChain’s two-layered blockchain structure and Boson consensus, different shards can apply different consensus and mining algorithms. As part of the Boson consensus, each shard can adjust the difficulty dynamically to increase or decrease the hash power of each shard chain.

In order to fully test QuarkChain testnet 2.0, we adopt three different types of mining algorithms” Ethash, Double SHA256, and Qkchash, which is ASIC resistant and exclusively developed by QuarkChain founder Qi Zhou. These first two hash algorithms correspond to the mining algorithms dominantly conducted on the graphics processing unit (GPU) and application-specific integrated circuits (ASIC), respectively.

I. Ethash

Ethash is the PoW mining algorithm for Ethereum. It is the latest version of earlier Dagger-Hashimoto. Ethash is memory intensive, which makes it require large amounts of memory space in the process of mining. The efficiency of mining is basically independent of the CPU, but directly related to memory size and bandwidth. Therefore, by design, building Ethash ASIC is relatively difficult. Currently, the Ethash mining is dominantly conducted on the GPU machines.

Read more about Ethash: https://github.com/ethereum/wiki/wiki/Ethash

II. Double SHA256

Double SHA256 is the PoW mining algorithms for Bitcoin. It is computational intensive hash algorithm, which uses two SHA256 iterations for the block header. If the hash result is less than the specific target, the mining is successful. ASIC machine has been developed by Bitmain to find more hashes with less electrical power usage.

Read more about Double SHA256: https://en.bitcoin.it/wiki/Block_hashing_algorithm

III. Qkchash

Originally, Bitcoin mining was conducted on the CPU of individual computers, with more cores and greater speed resulting in more profitability. After that, the mining process became dominated by GPU machines, then field-programmable gate arrays (FPGA) and finally ASIC, in a race to achieve more hash rates with less electrical power usage. Due to this arms race, it has become increasingly harder for prospective new miners to join. This raises centralization concerns because the manufacturers of the high-performance ASIC are concentrated in a small few.

To solve this, after extensive research and development, QuarkChain founder Dr. Qi Zhou has developed mining algorithm — Qkchash, that is expected to be ASIC-resistant. The idea is motivated by the famous date structure orders-statistic tree. Based on this data structure, Qkchash requires to perform multiple search, insert, and delete operations in the tree, which tries to break the ASIC pipeline and makes the code execution path to be data-dependent and unpredictable besides random memory-access patterns. Thus, the mining efficiency is closely related to the CPU, which ensures the security of Boston consensus and encourges the mining decentralization.

Please refer to Dr. Qi’s paper for more details: https://medium.com/quarkchain-official/order-statistics-based-hash-algorithm-e40f108563c4

2.3 Testnet 2.0 Mining Configuration

Numbers of Shards: 8

Cluster: According to the real-time online mining node

The corresponding mining algorithm is given as follows:

https://i.redd.it/5x5udifsyf521.png

We will provide cluster software and the demo implementation of CPU mining to the public. Miners are able to arbitrarily select one shard or multiple shards to mine according to the mining difficulty and rewards of different shards. GPU / ASIC mining is allowed if the public manages to get it working with the current testnet. With the upgrade of our testnet, we will further provide the corresponding GPU / ASIC software.

QuarkChain’s two-layered blockchain structure, new P2P mode, and Boson consensus algorithm are expected tobe fully tested and verified in the QuarkChain testnet 2.0.

3. Mining Guidance

In order to encourage all community members to participate in QuarkChain Testnet 2.0 mining event, we have prepared three mining guidances for community members of different backgrounds.

Today we are releasing the Docker Mining Tutorial first. This tutorial provides a command line configuration guide for developers and a docker image for multiple platforms, including a concise introduction of nodes and mining settings. Follow the instructions here: https://github.com/QuarkChain/pyquarkchain/wiki/Run-a-Private-Cluster-on-the-QuarkChain-Testnet-2.0#quick-start-use-docker-image-to-start-a-cluster-and-mining

Next we will continue to release:

  1. A tutorial for community members who don’t have a programming background. In this tutorial, we will teach how to create private QuarkChain nodes using AWS, and how to mine QKC step by step. This tutorial is expected to be released in the next few days.
  2. Programs and APIs integrated with GPU / ASIC mining. This is expected to allow existing miners to switch to QKC mining more seamlessly.

Frequently Asked Questions:

  1. Can I use my laptop or personal computer to mine?

Yes, we will provide cluster software and the demo implementation of CPU mining to the public. Miners will be able to arbitrarily select one shard or multiple shards to mine according to the work difficulty and rewards of different shards.

  1. What is the minimum requirements for my laptop or personal computer to mine?

Please prepare a Linux or MacOs machine with public IP address or port forwarding set up.

  1. Can I mine with my GPU or an ASIC machine?

For now, we will only be providing the demo implementation of CPU mining as our first step. Interested miners/developers can rewrite the corresponding GPU / ASIC mining program, according to the JSON RPC API we provided. With the upgrade of our testnet, we expect to provide the corresponding GPU / ASIC interface at a later date.

  1. What is the difference among the different mining algorithms? Which one should I choose?

Double SHA256 is a computational intensive algorithm, but Ethash and Qkchash are memory intensive algorithms, which have certain requirements on the computer’s memory. Since currently we only support CPU mining, the mining efficiency entirely depends on the cores and speed of CPU.

  1. For testnet mining, what else should I know?

First, the mining process will occupy a computer’s memory. Thus, it is recommended to use an idle computer for mining. In Testnet 2.0 settings, the target block time of root chain is 60 seconds, and the target block time of shard chain is 10 seconds. The mining is a completely random process, which will take some time and consume a certain amount of electricity.

  1. What are the risks of testnet mining?

Currently our testnet is still under the development stage and may not be 100% stable. Thus, there would be some risks for QuarkChain main chain forks in testnet, software upgrades and system reboots. These may cause your tQKC or block record to be lost despite our best efforts to ensure the stability and security of the testnet.

For more technical questions, welcome to join our developer community on Discard: http://discord.me/quarkchain.


No comments:

Post a Comment