Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Namespaces | Functions
aserti32d.h File Reference
#include <cstdint>
Include dependency graph for aserti32d.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Consensus
 

Functions

arith_uint256 CalculateASERT (const arith_uint256 &refTarget, const int64_t nPowTargetSpacing, const int64_t nTimeDiff, const int64_t nHeightDiff, const arith_uint256 &powLimit, const int64_t nHalfLife) noexcept
 
uint32_t GetNextASERTWorkRequired (const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params &params) noexcept
 
uint32_t GetNextASERTWorkRequired (const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const Consensus::Params &params, const CBlockIndex *pindexAnchorBlock) noexcept
 Compute the next required proof of work using an absolutely scheduled exponentially weighted target (ASERT).
 

Function Documentation

◆ CalculateASERT()

arith_uint256 CalculateASERT ( const arith_uint256 refTarget,
const int64_t  nPowTargetSpacing,
const int64_t  nTimeDiff,
const int64_t  nHeightDiff,
const arith_uint256 powLimit,
const int64_t  nHalfLife 
)
noexcept

Definition at line 84 of file aserti32d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextASERTWorkRequired() [1/2]

uint32_t GetNextASERTWorkRequired ( const CBlockIndex pindexPrev,
const CBlockHeader pblock,
const Consensus::Params params 
)
noexcept

Definition at line 9 of file aserti32d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextASERTWorkRequired() [2/2]

uint32_t GetNextASERTWorkRequired ( const CBlockIndex pindexPrev,
const CBlockHeader pblock,
const Consensus::Params params,
const CBlockIndex pindexAnchorBlock 
)
noexcept

Compute the next required proof of work using an absolutely scheduled exponentially weighted target (ASERT).

With ASERT, we define an ideal schedule for block issuance (e.g. 1 block every 600 seconds), and we calculate the difficulty based on how far the most recent block's timestamp is ahead of or behind that schedule. We set our targets (difficulty) exponentially. For every [nHalfLife] seconds ahead of or behind schedule we get, we double or halve the difficulty.

Definition at line 28 of file aserti32d.cpp.

Here is the call graph for this function: