veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::VbkChainParams Struct Referenceabstract

VeriBlock chain parameters. More...

Detailed Description

Definition at line 19 of file vbk_chain_params.hpp.

#include <vbk_chain_params.hpp>

+ Inheritance diagram for altintegration::VbkChainParams:
+ Collaboration diagram for altintegration::VbkChainParams:

Public Member Functions

virtual int getProgPowForkHeight () const =0
 
virtual uint32_t getProgPowStartTimeEpoch () const noexcept=0
 
virtual bool isProgPowStartTimeEpochEnabled () const noexcept
 
virtual const char * networkName () const =0
 
virtual uint256 getMinimumDifficulty () const =0
 
virtual VbkNetworkType getTransactionMagicByte () const noexcept=0
 
virtual bool getPowNoRetargeting () const noexcept=0
 
virtual uint32_t getRetargetPeriod () const noexcept=0
 
virtual uint32_t getTargetBlockTime () const noexcept=0
 
virtual uint32_t numBlocksForBootstrap () const noexcept=0
 
virtual uint32_t maxFutureBlockTime () const noexcept
 
virtual bool EnableTimeAdjustment () const noexcept=0
 In miner it is hard to simulate correct timestamps, so this flag disables Time Adjustment Algorithm in POP Fork Resolution. More...
 
virtual int32_t getMaxReorgBlocks () const noexcept
 
virtual uint32_t getKeystoneInterval () const noexcept
 
virtual uint32_t getFinalityDelay () const noexcept
 
virtual int32_t getOldBlocksWindow () const noexcept
 all blocks further than this number of blocks are considered "old" More...
 
virtual const std::vector< uint32_t > & getForkResolutionLookUpTable () const noexcept
 
virtual int32_t getEndorsementSettlementInterval () const noexcept
 
uint32_t preserveBlocksBehindFinal () const noexcept
 when finalizeBlockImpl is called, this many blocks behind final block will be preserved in RAM. More...
 

Public Attributes

uint32_t mOldBlocksWindow = 12000
 
uint32_t mEndorsementSettlementInterval = 400
 
uint32_t mPreserveBlocksBehindFinal = mEndorsementSettlementInterval
 
int32_t mMaxReorgBlocks = VBK_MAX_REORG_BLOCKS_MIN_VALUE
 

Protected Attributes

uint32_t mMaxFutureBlockTime = 5 * 60
 
std::vector< uint32_t > forkResolutionLookUpTable_
 

Member Function Documentation

◆ EnableTimeAdjustment()

virtual bool altintegration::VbkChainParams::EnableTimeAdjustment ( ) const
pure virtualnoexcept

Set it to TRUE in production, and to FALSE in tests.

Implemented in altintegration::VbkChainParamsMain, altintegration::VbkChainParamsTest, and altintegration::VbkChainParamsRegTest.

◆ getEndorsementSettlementInterval()

virtual int32_t altintegration::VbkChainParams::getEndorsementSettlementInterval ( ) const
inlinevirtualnoexcept

Definition at line 55 of file vbk_chain_params.hpp.

55 {
56 return mEndorsementSettlementInterval;
57 }

◆ getFinalityDelay()

virtual uint32_t altintegration::VbkChainParams::getFinalityDelay ( ) const
inlinevirtualnoexcept

Definition at line 43 of file vbk_chain_params.hpp.

43{ return 11; }

◆ getForkResolutionLookUpTable()

virtual const std::vector< uint32_t > & altintegration::VbkChainParams::getForkResolutionLookUpTable ( ) const
inlinevirtualnoexcept

Definition at line 50 of file vbk_chain_params.hpp.

51 {
52 return forkResolutionLookUpTable_;
53 }

◆ getKeystoneInterval()

virtual uint32_t altintegration::VbkChainParams::getKeystoneInterval ( ) const
inlinevirtualnoexcept

Definition at line 41 of file vbk_chain_params.hpp.

41{ return 20; }

◆ getMaxReorgBlocks()

virtual int32_t altintegration::VbkChainParams::getMaxReorgBlocks ( ) const
inlinevirtualnoexcept

Definition at line 40 of file vbk_chain_params.hpp.

40{ return mMaxReorgBlocks; }

◆ getOldBlocksWindow()

virtual int32_t altintegration::VbkChainParams::getOldBlocksWindow ( ) const
inlinevirtualnoexcept

Definition at line 46 of file vbk_chain_params.hpp.

46 {
47 return mOldBlocksWindow;
48 }

◆ isProgPowStartTimeEpochEnabled()

virtual bool altintegration::VbkChainParams::isProgPowStartTimeEpochEnabled ( ) const
inlinevirtualnoexcept

Definition at line 23 of file vbk_chain_params.hpp.

23{ return true; }

◆ maxFutureBlockTime()

virtual uint32_t altintegration::VbkChainParams::maxFutureBlockTime ( ) const
inlinevirtualnoexcept

Definition at line 31 of file vbk_chain_params.hpp.

31 {
32 return mMaxFutureBlockTime;
33 }

◆ preserveBlocksBehindFinal()

uint32_t altintegration::VbkChainParams::preserveBlocksBehindFinal ( ) const
inlinenoexcept

In VBK we should preserve at least last endorsementSettlementInterval blocks before finalized (not including finalized).

Definition at line 63 of file vbk_chain_params.hpp.

63 {
64 VBK_ASSERT(mPreserveBlocksBehindFinal >= mEndorsementSettlementInterval);
65 return mPreserveBlocksBehindFinal;
66 }

Member Data Documentation

◆ forkResolutionLookUpTable_

std::vector<uint32_t> altintegration::VbkChainParams::forkResolutionLookUpTable_
protected
Initial value:
{
100, 100, 95, 89, 80, 69, 56, 40, 21}

Definition at line 78 of file vbk_chain_params.hpp.

◆ mEndorsementSettlementInterval

uint32_t altintegration::VbkChainParams::mEndorsementSettlementInterval = 400

Definition at line 72 of file vbk_chain_params.hpp.

◆ mMaxFutureBlockTime

uint32_t altintegration::VbkChainParams::mMaxFutureBlockTime = 5 * 60
protected

Definition at line 77 of file vbk_chain_params.hpp.

◆ mMaxReorgBlocks

int32_t altintegration::VbkChainParams::mMaxReorgBlocks = VBK_MAX_REORG_BLOCKS_MIN_VALUE

Definition at line 74 of file vbk_chain_params.hpp.

◆ mOldBlocksWindow

uint32_t altintegration::VbkChainParams::mOldBlocksWindow = 12000

Definition at line 70 of file vbk_chain_params.hpp.

◆ mPreserveBlocksBehindFinal

uint32_t altintegration::VbkChainParams::mPreserveBlocksBehindFinal = mEndorsementSettlementInterval

Definition at line 73 of file vbk_chain_params.hpp.


The documentation for this struct was generated from the following file: