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

RegTest VBK config. More...

Detailed Description

Note
technically, there's no RegTest in VeriBlock, we created it only for testing purposes specifically in veriblock-pop-cpp.

Definition at line 164 of file vbk_chain_params.hpp.

#include <vbk_chain_params.hpp>

+ Inheritance diagram for altintegration::VbkChainParamsRegTest:
+ Collaboration diagram for altintegration::VbkChainParamsRegTest:

Public Member Functions

int getProgPowForkHeight () const override
 
uint32_t getProgPowStartTimeEpoch () const noexcept override
 
bool isProgPowStartTimeEpochEnabled () const noexcept override
 
const char * networkName () const override
 
uint32_t numBlocksForBootstrap () const noexcept override
 
uint256 getMinimumDifficulty () const override
 
VbkNetworkType getTransactionMagicByte () const noexcept override
 
bool EnableTimeAdjustment () const noexcept override
 In miner it is hard to simulate correct timestamps, so this flag disables Time Adjustment Algorithm in POP Fork Resolution. More...
 
bool getPowNoRetargeting () const noexcept override
 
uint32_t getRetargetPeriod () const noexcept override
 
uint32_t getTargetBlockTime () const noexcept override
 
- Public Member Functions inherited from altintegration::VbkChainParams
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...
 

Additional Inherited Members

- Public Attributes inherited from altintegration::VbkChainParams
uint32_t mOldBlocksWindow = 12000
 
uint32_t mEndorsementSettlementInterval = 400
 
uint32_t mPreserveBlocksBehindFinal = mEndorsementSettlementInterval
 
int32_t mMaxReorgBlocks = VBK_MAX_REORG_BLOCKS_MIN_VALUE
 
- Protected Attributes inherited from altintegration::VbkChainParams
uint32_t mMaxFutureBlockTime = 5 * 60
 
std::vector< uint32_t > forkResolutionLookUpTable_
 

Member Function Documentation

◆ EnableTimeAdjustment()

bool altintegration::VbkChainParamsRegTest::EnableTimeAdjustment ( ) const
inlineoverridevirtualnoexcept

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

Implements altintegration::VbkChainParams.

Definition at line 190 of file vbk_chain_params.hpp.

190{ return false; }

◆ getMinimumDifficulty()

uint256 altintegration::VbkChainParamsRegTest::getMinimumDifficulty ( ) const
inlineoverridevirtual

Implements altintegration::VbkChainParams.

Definition at line 181 of file vbk_chain_params.hpp.

181 {
182 return uint256::fromHex("1");
183 }

◆ getPowNoRetargeting()

bool altintegration::VbkChainParamsRegTest::getPowNoRetargeting ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::VbkChainParams.

Definition at line 192 of file vbk_chain_params.hpp.

192{ return true; }

◆ getProgPowForkHeight()

int altintegration::VbkChainParamsRegTest::getProgPowForkHeight ( ) const
inlineoverridevirtual

Implements altintegration::VbkChainParams.

Definition at line 167 of file vbk_chain_params.hpp.

167{ return 0; }

◆ getProgPowStartTimeEpoch()

uint32_t altintegration::VbkChainParamsRegTest::getProgPowStartTimeEpoch ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::VbkChainParams.

Definition at line 168 of file vbk_chain_params.hpp.

168 {
169 // disabled (see 'false' below)
170 return 0;
171 }

◆ getRetargetPeriod()

uint32_t altintegration::VbkChainParamsRegTest::getRetargetPeriod ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::VbkChainParams.

Definition at line 194 of file vbk_chain_params.hpp.

194{ return 100; }

◆ getTargetBlockTime()

uint32_t altintegration::VbkChainParamsRegTest::getTargetBlockTime ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::VbkChainParams.

Definition at line 196 of file vbk_chain_params.hpp.

196{ return 30; }

◆ getTransactionMagicByte()

VbkNetworkType altintegration::VbkChainParamsRegTest::getTransactionMagicByte ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::VbkChainParams.

Definition at line 184 of file vbk_chain_params.hpp.

184 {
185 VbkNetworkType r;
186 r.hasValue = true;
187 r.value = 0xBB;
188 return r;
189 }

◆ isProgPowStartTimeEpochEnabled()

bool altintegration::VbkChainParamsRegTest::isProgPowStartTimeEpochEnabled ( ) const
inlineoverridevirtualnoexcept

Reimplemented from altintegration::VbkChainParams.

Definition at line 172 of file vbk_chain_params.hpp.

172 {
173 return false;
174 }

◆ networkName()

const char * altintegration::VbkChainParamsRegTest::networkName ( ) const
inlineoverridevirtual

Implements altintegration::VbkChainParams.

Definition at line 176 of file vbk_chain_params.hpp.

176{ return "regtest"; }

◆ numBlocksForBootstrap()

uint32_t altintegration::VbkChainParamsRegTest::numBlocksForBootstrap ( ) const
inlineoverridevirtualnoexcept

Implements altintegration::VbkChainParams.

Definition at line 178 of file vbk_chain_params.hpp.

178{ return 0; }

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