Daily Test Network Update #3:
Leading up to our June 28th Test Network release, we will be providing daily updates that explain the work that goes on behind the scenes. Yesterday we went over the 5 more points, and today we focus a lot on the Proof-of-Stake portion of the Test Network.11, Change all output strings Bitcoin -> Qtum, BTC -> QTUMReplace all instances of bitcoin and BTC with qtum and QTUM (Just the output strings, not the actual class/variable names and not the code comments)
12, Increase Script limits to suitable valuesThere are a number of limits in vanilla Bitcoin that restrict our usage of smart contracts. These limits should be relaxed:
maximum data push size: 1Mb
maximum stack size: 1Mb
Test for other limits that we run into with large scripts caused by contracts.13, Consensus/Chain parameters for PoSConsensus/chain parameters for PoS
The consensus provide parameters that will affect the creation of new blocks in the network.
The PoS limit need to be added in order to determine the initial difficulty for PoS.
The halving interval is 4 years (target) and there will be 7 halving intervals.
Block target is set to 128 seconds.
4 tokens per Block (Approximately 1% inflation per year for 4 years)
2 tokens (Slightly more than .5% inflation per year for 4 years based on 100 million original tokens .5% of 104~ million after 4 years)
1 token
.5 tokens
.25 tokens
.125 tokens
.0625 tokens
The last PoW block need to be defined and set to 5000 for the main net. The reward for PoW block is 20000 coins, the reward for PoS block is 4 coins. The Proof-of-Work blocks will be mined by the Qtum development team.
14 , Update of block/block-header parameters for PoSThe general rule for the header is to keep it as small as possible.
Four parameters are needed for PoS in order to work:
1) Block signature, that is the signature of the whole block, signed by the block creator
2) Block type (Proof Of Work or Proof Of Stake)
3) Previous stake location, need in order to confirm the block validity, mandatory for PoS
4) Staking time, the time when the staking transaction was created, mandatory for PoS
Block signature must be a parameter. The parameter need to be in the header due to the segregated witness which split the block delivery into header and transactions that can be required from any user.
The other parameters can be extracted from the PoS transaction. Whether or not to include those 3 parameters in the header too can be discussed. The block header is downloaded before the whole block, not including those parameters in the header will prevent doing PoS checks to the header before downloading the whole block. Blackcoin download the whole block before the checks and put those parameters into the Block.
15 ,Proof of Work/Stake Kernel UpdateThe source code for PoW and PoS kernel is kept into the files:
pos.h
pos.cpp
pow.h
pow.cpp
The location of the files is according to master-pos, in Blackcoin the location is kernel.h and kernel.cpp.
We need to decide if we will keep it or use different structure for organization of the code for PoW and PoS kernel.
The version of the stake modifier that will be used is the second version.
Block difficulty, masks, modifiers, time-stamps are all used here, so this is important parts for PoS.
Please see the Roadmap below for more information:
Please remember that we have an event in Shanghai on the 28th so please RSVP if you plan on attending:
Qtum will also be sponsoring a Hackathon in Russia, with 8500 QTUM tokens. For more information, please see:
Qtum is hiring! If you have experience in Blockchain technology, and can handle working in a changing industry, get in touch with us.