Altcoin-Development

1 天 PoW 是什麼意思?

  • March 24, 2015

我看到幾個代幣在宣傳 1 天的 PoW。這枚硬幣就是一個例子。<https://github.com/concealcoin/concealcoin>

我一直在研究程式碼,但必須缺少一個關鍵部分,因為沒有任何數學會增加 1 天。

任何人都可以闡明這一點嗎?我缺少程式碼的哪一部分?

主文件

CBigNum bnProofOfWorkLimit(~uint256(0) &gt;&gt; 20); // "standard" scrypt target limit for proof of work, results with 0,000244140625 proof-of-work difficulty
CBigNum bnProofOfStakeLimit(~uint256(0) &gt;&gt; 20);
CBigNum bnProofOfWorkLimitTestNet(~uint256(0) &gt;&gt; 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;
}

主文件

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;

它沒有 24 小時的出塊時間,它在存在的前 24 小時內發行了所有的 PoW 代幣

您正在尋找的數學是nTargetSpacing * LAST_POW_BLOCK,它乘以 86400,即 24 小時內的秒數。

正如您從他們的首頁螢幕截圖)中看到的那樣,結果與您預期的一樣好。

引用自:https://bitcoin.stackexchange.com/questions/36577