Browse Source

New features in testing

New komodod -ac parameters for assetchains. If -ac_reward=<satoshis> is
non-zero, the chain will mine normally and start with -ac_reward for
the block reward.

if -ac_end=<endheight> is set, then -ac_reward will be 0 after
endheight is reached

if -ac_halving=<halvingperiod> is set, then every <halvingperiod>
blocks the block reward is reduced according to one of three methods.
1440 (approx a day) is the most frequent halving period

if -ac_decay is not set, then the normal bitcoin halving is done.

if -ac_decay=<numerator> is set to be exactly 100000000, then the
-ac_reward is scaled linearly toward 0, with 0 at endheight.

for all other values of numerator (less than 100000000) the reward is
iteratively reduced by the number of "halving" periods, ie.
	numhalvings = (height / -ac_halving);
	for (i=0; i<numhalvings; i++)
		reward = (reward * -ac_decay) / 100000000;

if -ac_perc=<satoshis> is nonzero and less than equal 100000000 and
-ac_pubkey=<secp_pubkey33> is set to a 33byte hexstr (len 66 starting
with 02 or 03) then there will be a second vout in the coinbase
transaction that is exactly the commission rate indicated by -ac_perc,
with 100000000 being the max of 100%. wallets will need to be
customized to make sure to pay the -ac_perc of transaction size as
txfee. chains with a percentage override can only be mined by the
-ac_pubkey address

bitcoin behavior would be -ac_reward=5000000000 -ac_halving=210000

KMD behavior would be -ac_reward = 300000000 -ac_end=7777777

a more smoothly reducing reward that halves every 210000 blocks would
be:

 -ac_reward=5000000000 -ac_halving=10000 -ac_decay=96777000

This release also supports a second slate of hardcoded notaries
metaverse
jl777 6 years ago
parent
commit
e169b65ff0
  1. 2
      src/komodo_bitcoind.h

2
src/komodo_bitcoind.h

@ -662,7 +662,7 @@ uint32_t komodo_chainactive_timestamp()
{
if ( chainActive.Tip() != 0 )
return((uint32_t)chainActive.Tip()->GetBlockTime());
else return(0);
else return(0);
}
CBlockIndex *komodo_chainactive(int32_t height)

Loading…
Cancel
Save