veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
|
Base class for all Altchain-related configs. More...
Definition at line 137 of file alt_chain_params.hpp.
#include <alt_chain_params.hpp>
Public Member Functions | |
size_t | maxWorkerQueueSize () const noexcept |
uint32_t | getKeystoneInterval () const noexcept |
number of blocks in single keystone interval. More... | |
uint32_t | getFinalityDelay () const noexcept |
number of blocks in VBK used for finalization More... | |
const std::vector< uint32_t > & | getForkResolutionLookUpTable () const noexcept |
pop score lookup table for fork resolution More... | |
uint32_t | getEndorsementSettlementInterval () const noexcept |
Validity window for ATVs. More... | |
const PopPayoutsParams & | getPayoutParams () const noexcept |
getter for reward parameters More... | |
size_t | getMaxVbkBlocksInAltBlock () const noexcept |
total maximum number of VBK blocks per 1 ALT block More... | |
size_t | getMaxVTBsInAltBlock () const noexcept |
total maximum number of VTBs per 1 ALT block More... | |
size_t | getMaxATVsInAltBlock () const noexcept |
total maximum number of ATVs per 1 ALT block More... | |
size_t | getMaxPopDataSize () const noexcept |
maximum size (in bytes) of single PopData per single ALT block More... | |
uint32_t | maxAltchainFutureBlockTime () const noexcept |
Maximum future block time for altchain blocks. More... | |
int32_t | getMaxReorgBlocks () const noexcept |
Max number of blocks that can be reorganized in altchain. More... | |
uint32_t | preserveBlocksBehindFinal () const noexcept |
when finalizeBlockImpl is called, this many blocks behind final block will be preserved in RAM. More... | |
virtual int64_t | getIdentifier () const noexcept=0 |
unique POP ID for the chain; identifies altchain in VBK More... | |
virtual AltBlock | getBootstrapBlock () const noexcept=0 |
"genesis" block for POP mining. More... | |
virtual std::vector< uint8_t > | getHash (const std::vector< uint8_t > &bytes) const noexcept=0 |
Calculate hash from block header. More... | |
virtual bool | checkBlockHeader (const std::vector< uint8_t > &bytes, const std::vector< uint8_t > &root, ValidationState &state) const noexcept=0 |
Returns true if input bytes : More... | |
Public Attributes | |
std::shared_ptr< PopPayoutsParams > | mPopPayoutsParams |
int32_t | mMaxReorgBlocks = ALT_MAX_REORG_BLOCKS_MIN_VALUE |
uint32_t | mMaxAltchainFutureBlockTime = 10 * 60 |
uint32_t | mKeystoneInterval = 5 |
uint32_t | mFinalityDelay = 100 |
uint32_t | mEndorsementSettlementInterval = 50 |
uint32_t | mPreserveBlocksBehindFinal = mEndorsementSettlementInterval |
uint32_t | mMaxPopDataSize = MAX_POPDATA_SIZE |
size_t | mMaxVbkBlocksInAltBlock = 200 |
size_t | mMaxVTBsInAltBlock = 200 |
size_t | mMaxATVsInAltBlock = 1000 |
std::vector< uint32_t > | mForkResolutionLookUpTable |
|
pure virtualnoexcept |
[in] | bytes | |
[in] | root | top level merkle root to validate |
[out] | state | validation state |
Implemented in altintegration::AltChainParamsRegTest.
|
pure virtualnoexcept |
This is first block that can be endorsed by POP miners. Can start at genesis block, or at any part of the active chain. This block is immediately finalized, so chain CAN NOT be reorganized past this block.
Implemented in altintegration::AltChainParamsRegTest.
|
inlinenoexcept |
If difference between endorsed/containing blocks is more than this number, endorsement becomes invalid.
Definition at line 166 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 156 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 159 of file alt_chain_params.hpp.
|
pure virtualnoexcept |
bytes | serialized block header |
Implemented in altintegration::AltChainParamsRegTest.
|
pure virtualnoexcept |
Implemented in altintegration::AltChainParamsRegTest.
|
inlinenoexcept |
5 means that blocks with heights 5,6,7,8,9 are blocks within same keystone interval
Definition at line 153 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 188 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 194 of file alt_chain_params.hpp.
|
inlinenoexcept |
As implication, we store last N blocks in RAM and effectively tip-maxReorgBlocks
block is finalized.
Definition at line 205 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 176 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 182 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 171 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 197 of file alt_chain_params.hpp.
|
inlinenoexcept |
Definition at line 140 of file alt_chain_params.hpp.
|
inlinenoexcept |
In ALT we should preserve at least last endorsementSettlementInterval
blocks before finalized (not including finalized).
Definition at line 215 of file alt_chain_params.hpp.
uint32_t altintegration::AltChainParams::mEndorsementSettlementInterval = 50 |
Definition at line 268 of file alt_chain_params.hpp.
uint32_t altintegration::AltChainParams::mFinalityDelay = 100 |
Definition at line 267 of file alt_chain_params.hpp.
std::vector<uint32_t> altintegration::AltChainParams::mForkResolutionLookUpTable |
Definition at line 276 of file alt_chain_params.hpp.
uint32_t altintegration::AltChainParams::mKeystoneInterval = 5 |
Definition at line 266 of file alt_chain_params.hpp.
uint32_t altintegration::AltChainParams::mMaxAltchainFutureBlockTime = 10 * 60 |
Definition at line 265 of file alt_chain_params.hpp.
size_t altintegration::AltChainParams::mMaxATVsInAltBlock = 1000 |
Definition at line 274 of file alt_chain_params.hpp.
uint32_t altintegration::AltChainParams::mMaxPopDataSize = MAX_POPDATA_SIZE |
Definition at line 270 of file alt_chain_params.hpp.
int32_t altintegration::AltChainParams::mMaxReorgBlocks = ALT_MAX_REORG_BLOCKS_MIN_VALUE |
Definition at line 264 of file alt_chain_params.hpp.
size_t altintegration::AltChainParams::mMaxVbkBlocksInAltBlock = 200 |
Definition at line 272 of file alt_chain_params.hpp.
size_t altintegration::AltChainParams::mMaxVTBsInAltBlock = 200 |
Definition at line 273 of file alt_chain_params.hpp.
std::shared_ptr<PopPayoutsParams> altintegration::AltChainParams::mPopPayoutsParams |
Definition at line 261 of file alt_chain_params.hpp.
uint32_t altintegration::AltChainParams::mPreserveBlocksBehindFinal = mEndorsementSettlementInterval |
Definition at line 269 of file alt_chain_params.hpp.