Ich sehe mehrere Münzen, die für 1 Tag PoW werben. Ein Beispiel ist diese Münze. https://github.com/concealcoin/concealcoin
Ich habe den Code studiert, muss aber einen kritischen Teil vermissen, da keine der Mathematik zu 1 Tag beiträgt.
Kann jemand Licht ins Dunkel bringen? Welcher Teil des Codes fehlt mir?
Main.cpp
CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // "standard" scrypt target limit for proof of work, results with 0,000244140625 proof-of-work difficulty
CBigNum bnProofOfStakeLimit(~uint256(0) >> 20);
CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16);
unsigned int nTargetSpacing = 1 * 30; // 30 seconds
unsigned int nStakeMinAge = 24 * 60 * 60; // 24 hours
unsigned int nStakeMaxAge = 30 * 24 * 60 * 60; // 30 days
unsigned int nModifierInterval = 10 * 60; // time to elapse before new modifier is computed
int nCoinbaseMaturity = 80;
CBlockIndex* pindexGenesisBlock = NULL;
int nBestHeight = -1;
and the rewards from main.cpp
// miner's coin base reward
int64_t GetProofOfWorkReward(int64_t nFees)
{
int64_t nSubsidy = 3500 * COIN;
if (fDebug && GetBoolArg("-printcreation"))
printf("GetProofOfWorkReward() : create=%s nSubsidy=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nSubsidy);
return nSubsidy + nFees;
}
Main.h
static const int LAST_POW_BLOCK = 2880;
static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const unsigned int MAX_INV_SZ = 50000;
static const int64_t MIN_TX_FEE = 1000;
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
static const int64_t MAX_MONEY = 17000000 * COIN;
static const int64_t COIN_YEAR_REWARD = 3 * CENT; // 3% per year
static const int64_t MAX_MINT_PROOF_OF_STAKE = 0.03 * COIN; // 3% annual interest
static const int MODIFIER_INTERVAL_SWITCH = 2000;
Es hat keine 24-Stunden-Blockzeit, es hat alle seine PoW-Coins in den ersten 24 Stunden seines Bestehens ausgegeben .
Die Mathematik, nach der Sie suchen, ist nTargetSpacing * LAST_POW_BLOCK
, die mit 86400 multipliziert wird, der Anzahl der Sekunden in 24 Stunden.
Wie Sie auf ihrer Homepage sehen können ( Screenshot ), hat das ungefähr so gut geklappt, wie Sie es erwarten würden.
Jo
Nick Odell
Jo
Zauberer von Ozzie
Jannes