Qubic mining, consensus and computors

Written by

Qsilver

Jan 13, 2024

Qubic mining seems to be misunderstood by a lot of people, understandably so as it actually is not mining in the traditional crypto sense. Mining is typically used by blockchains to secure the network and are needed to find each new block. Each new block creates a range of possible next blocks and by varying a nonce field random hashes are generated. Since a good hashing function returns a dramatically different value even with very small changes in input, just by calculating a hash for almost the same values in a buffer (maybe just one number is incrementing), you get a stream of random looking high entropy hash values.

Half the hashes will have the last bit being 0, and the other half being 1. half of those with 0 have another 0, so 25% will end with 00. With current hashrates, this is extended to absurd levels with quite a large number of 0 bits all in a row. If you find a nonce value that generates a hash value with enough 0 bits in a row, you win that block. You broadcast it, other nodes accept it and it becomes the new tip of the blockchain.

Then there is the next block that is mined off of the tip, but maybe some miner finds two blocks starting from the previous tip. If they do before a new block is found off of the new tip, then it replaces the old new tip and it is as if the old new tip never existed! Blockchain reorganization and orphans. Very complicated and if you do not fully understand it do not worry, very few people actually understand how all this works and it is actually probabilistic about whether a block will remain valid along with all its transactions. It is also the reason why 51% attacks are possible, which leads to double spending.

However Qubic does not need to deal with any of this as it is not a typical blockchain and miners are not mining zillions of hashes searching for a bunch of 0 bits. yes, if you feel that hashing over and over basically the same data to find the one with the most 0 bits is pretty much useless, you are right. It is only useful in the context of making a new block and getting the block reward coins. Even proof of stake blockchains use an analogue of this mining method, just where stake is used to adjust the number of 0 bits that are needed. Of course in proof of stake there is no actual mining so some other method is needed to generate a variety of hash values, usually public keys, but the details do not matter. The same set of reorg concerns affect proof of stake, actually more as proof of stake can end up in a state where a single staker gets all blocks.

Anyway, to understand Qubic mining, forget all the above complexities. In Qubic mining is not needed for a new tick. In fact, all mining could stop and the ticks will keep on ticking. Without mining there would be no way to know who the best performing computors were though, so it would cause issues in the next epoch. To create the next tick, there is a tick leader that broadcasts a proposed new tick. The 676 computors send cryptographically signed votes that include hashes of all the internal state of the qubic network. Two thirds needs to vote with a majority of the quorum in agreement for the tick to be accepted. If the tick leader does not publish a proposed new tick, then we would get an empty tick. In this case the tick data is all zeroes and the hash also all zeroes. There still needs to be a quorum vote about the empty tick.

If there is no quorum, qubic stops ticking. As long as qubic is ticking we know that a majority of the quorum vote of computors are in total sync, down to every last bit of the state of the qubic network. The computors however need mining in order to keep their computor spots. So qubic mining is not about generating the next block, but rather to help their computor keep (win) one of the coveted computor spots. Only the 676 computors get any rewards. Every epoch there is a maximum of 1 trillion QU sent out to the 676 computors, with a discount based on their performance. Recently all the computers are performing very well, so about 99% of the 1 trillion are sent to the computors. The balance goes to the Arbitrator, who acts to make sure the computors are behaving properly.

While the Arbitrator publishes the list of computors for the new epoch, all the computors already have this information in the system file. The arbitrator published list is only for those who are not running full nodes. In reality the arbitrator powers are quite limited and is so far from the consensus, it does not affect the tick by tick operation of Qubic.

Recently Qubic has been one of the most profitable crypto to mine with around $3 million USD worth being mined every week, even though the mining is not needed for new blocks. The mining turns out to actually be training for the AI, and in its current state, research into the best ways to train the AI. It is vitally important for all the computors to have enough mining power to retain their precious spots, so in a unique way, Qubic is setup to have incentivized training for AI and has that as part of securing the network indirectly. The highest performance computors have a lot invested in Qubic and are most incentivized to keep Qubic running smoothly. Odds are some of the top richlist holders are the top computors, but that is just my speculation.

Is Qubic a CPU coin or a GPU coin? Yes. Currently with the recent advent of a public GPU mining pool, we have seen a lot of new miners join the ranks. The AI training is expected to be optimized purely for the AI training. If it turns out that GPU can handle it, then there will be GPU mining. Currently we are on the eve of a few algo changes that are expected to impact GPU more than CPU. The other week there was a change that appeared to affect the performance of most CPU and GPU about equally, roughly 50%. If everyone is getting 50% less results, then there is no relative change. Some GPU did get hit by more than 50% probably due to limited RAM as the recent change doubled the amount of RAM needed.

It has been announced that RAM requirements will double and then double again (and again?) and that could make more and more GPU less competitive. However with GPU profitability so high now, even if it is reduced somewhat it could still be that Qubic is one of the best to GPU mine. Only time will tell if the GPU miner devs can keep the efficieny level comparable to CPU with the upcoming changes.

There are still only a very few mining pools, though nothing stops more from being formed. Things are still very early with the Qubic ecosystem and we can look forward to there being competition across all the usual areas as more and more industry players recognize Qubic is here to stay. The high levels of profits available make it quite interesting for the early adopters and now we should be getting the fast followers.

© 2024 Qubic. All Rights Reserved.

© 2024 Qubic. All Rights Reserved.

© 2024 Qubic. All Rights Reserved.